diff --git a/parm/ioda/bufr2ioda/bufr2ioda_insitu_profile_argo.yaml b/parm/ioda/bufr2ioda/bufr2ioda_insitu_profile_argo.yaml index b5c6c23e..7dd28f21 100644 --- a/parm/ioda/bufr2ioda/bufr2ioda_insitu_profile_argo.yaml +++ b/parm/ioda/bufr2ioda/bufr2ioda_insitu_profile_argo.yaml @@ -8,3 +8,4 @@ dump_directory: '{{ DMPDIR }}' ioda_directory: '{{ COM_OBS }}' source: NCEP data tank subsets: SUBPFL +ocean_basin: '{{ OCEAN_BASIN_FILE }}' diff --git a/ush/soca/prep_ocean_obs.py b/ush/soca/prep_ocean_obs.py index ace73155..467c5ced 100644 --- a/ush/soca/prep_ocean_obs.py +++ b/ush/soca/prep_ocean_obs.py @@ -154,23 +154,22 @@ def initialize(self): # set up the config file for conversion to IODA for bufr and # netcdf files respectively if obsprep_space['type'] == 'bufr': - gen_bufr_yaml_config = {'RUN': RUN, + bufrconv_config = {'RUN': RUN, 'current_cycle': cdate, 'DMPDIR': COMIN_OBS, 'COM_OBS': COMIN_OBS, 'OCEAN_BASIN_FILE': OCEAN_BASIN_FILE} - yaml_config_file = os.path.join(COMIN_OBS, + bufrconv_yaml_file = os.path.join(COMIN_OBS, f"{obtype}_{cdatestr}.yaml") - obsprep_space['conversion config file'] = yaml_config_file + obsprep_space['conversion config file'] = bufrconv_yaml_file bufr2iodapy = BUFR2IODA_PY_DIR + '/bufr2ioda_' + obtype + '.py' obsprep_space['bufr2ioda converter'] = bufr2iodapy tmpl_filename = 'bufr2ioda_' + obtype + '.yaml' - template = os.path.join(JSON_TMPL_DIR, tmpl_filename) + bufrconv_template = os.path.join(JSON_TMPL_DIR, tmpl_filename) try: -# gen_bufr_json(gen_bufr_json_config, template, yaml_config_file) - myyaml = parse_j2yaml(template, gen_bufr_yaml_config, yaml_config_file) - myyaml.save(yaml_config_file) + bufrconv = parse_j2yaml(bufrconv_template, bufrconv_config) + bufrconv.save(bufrconv_yaml_file) except Exception as e: logger.warning(f"An exeception {e} occured while trying to run gen_bufr_json") logger.warning(f"obtype {obtype} will be skipped") diff --git a/ush/soca/prep_ocean_obs_utils.py b/ush/soca/prep_ocean_obs_utils.py index 5074954b..db4cc70f 100755 --- a/ush/soca/prep_ocean_obs_utils.py +++ b/ush/soca/prep_ocean_obs_utils.py @@ -68,11 +68,10 @@ def run_netcdf_to_ioda(obsspace_to_convert, OCNOBS2IODAEXEC): def run_bufr_to_ioda(obsspace_to_convert): logger.info(f"running run_bufr_to_ioda on {obsspace_to_convert['name']}") - json_output_file = obsspace_to_convert['conversion config file'] + bufrconv_yaml = obsspace_to_convert['conversion config file'] bufr2iodapy = obsspace_to_convert['bufr2ioda converter'] try: -# subprocess.run(['python', bufr2iodapy, '-c', json_output_file, '-v'], check=True) - subprocess.run(['python', bufr2iodapy, '-c', json_output_file], check=True) + subprocess.run(['python', bufr2iodapy, '-c', bufrconv_yaml], check=True) logger.info(f"ran ioda converter on obs space {obsspace_to_convert['name']} successfully") return 0 except subprocess.CalledProcessError as e: