Skip to content

Use ObsBuilder scripts from SPOC in bufr conversion#830

Draft
mranst wants to merge 8 commits into
developfrom
feature/mranst/obs_builder
Draft

Use ObsBuilder scripts from SPOC in bufr conversion#830
mranst wants to merge 8 commits into
developfrom
feature/mranst/obs_builder

Conversation

@mranst

@mranst mranst commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Description

#773

I've been experimenting a bit with using the spoc scripts in the bufr-to-ioda conversion to see if I could get it work. I believe it mostly works, but it is a somewhat crude implementation, so it will probably require some fine-tuning from people more familiar with obs handling

This PR adds the CloneSpoc task, which can grab a branch set by spoc_tag in experiment.yaml, or point to an existing spoc_source_directory. Bufr2Ioda then uses the scripts to run the conversion.

A few questions/notes:

  • It seems like the scripts are expecting the corresponding yamls to live in the same directory they are being executed from? I may be misunderstanding something, but i added this process to CloneSpoc to accomodate:

    # Copy the mapping yaml's to the script path
    # ------------------------------------------
    config_glob = os.path.join(spoc_exp_path, 'dump', 'config', 'atmosphere', '*yaml')
    script_path = os.path.join(spoc_exp_path, 'dump', 'scripts', 'atmosphere')
    for config_file in glob.glob(config_glob):
    shutil.copy(config_file, script_path)

  • The output ioda files seem to be combined with all satId's in one file, not sure how significant this is

  • There are some obs types that have separate yamls under the bufr2netcdf.x schema, that don't have individual python scripts (I think this is noted in Incorporating SPOC into swell convert_bufr suite #773)

@mranst
mranst requested review from Dooruk, cohen-seth and jemccurr July 8, 2026 18:24
@cohen-seth

cohen-seth commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

A few questions/notes:

1. "It seems like the scripts are expecting the corresponding yamls to live in the same directory they are being executed from? I may be misunderstanding something, but i added this process to CloneSpoc to accomodate:"

  • This is correct the scripts are expecting the corresponding yamls to live in the same directory they are being executed from. This was done to preserve the yaml used for the conversion within the run directory for referring to later & for validation; that way, when we add the capability to customize the yamls and/or when spoc yamls are updated there will be a way of knowing how the files were converted. (See directory tree below)
  • CloneSpoc will be very helpful. Previously, I had to manually add the spoc yamls to the configuration/jedi/bufr2ioda/bufr2netcdf_x/ directory - should be able to remove these going forward.

run/20231010T000000Z/geos_atmosphere/

├── bufr/
├── ioda/
├── spoc_radiance_1bamua.yaml
├── spoc_radiance_1bmhs.yaml
├── spoc_radiance_atms.yaml
├── spoc_radiance_avcsam.yaml
├── spoc_radiance_avcspm.yaml
├── spoc_radiance_gpsro.yaml
└── spoc_radiance_mtiasi.yaml

2. "The output ioda files seem to be combined with all satId's in one file, not sure how significant this is"

  • I believe we want them in separate files. Double check with @rtodling
  • this functionality of bufr2netcd.x is still being developed. There are 2 methods, one method that only partially works and one method that requires more steps. So I had to use the 2nd method, the --no-gather method. We will want to switch to the other method once it's functional.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these obs builder python scripts placeholders?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants