Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewEichmann-NOAA committed Dec 19, 2024
1 parent 8495479 commit ebc713b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions ush/soca/prep_ocean_obs.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ def initialize(self):

# fetch the obs files to DATA directory and get the list of files and cycles
fetched_files = prep_ocean_obs_utils.obs_fetch(self.task_config,
self.task_config,
obsprep_space,
window_cdates)
self.task_config,
obsprep_space,
window_cdates)

if not fetched_files:
logger.warning(f"No files found for obs source {obtype}, skipping")
Expand All @@ -168,13 +168,13 @@ def initialize(self):
obsprep_space['bufr2ioda converter'] = bufr2iodapy
tmpl_filename = f"bufr2ioda_{obtype}.yaml"
bufrconv_template = os.path.join(BUFR2IODA_TMPL_DIR, tmpl_filename)
output_files = [] # files to save to COM directory
bufrconv_files = [] # files needed to populate the IODA converter config
output_files = [] # files to save to COM directory
bufrconv_files = [] # files needed to populate the IODA converter config
# for each cycle of the retrieved obs bufr files...
for input_file, cycle in fetched_files:
cycletime = cycle[8:10]
ioda_filename = f"{RUN}.t{cycletime}z.{obs_space_name}.{cycle}.nc4"
output_files.append( ioda_filename )
output_files.append(ioda_filename)
bufrconv_files.append((cycle, input_file, ioda_filename))

obsprep_space['output file'] = output_files
Expand All @@ -195,7 +195,7 @@ def initialize(self):

obsprep_space['input files'] = [f[0] for f in fetched_files]
ioda_filename = f"{RUN}.t{cyc:02d}z.{obs_space_name}.{cdatestr}.nc4"
obsprep_space['output file'] = [ ioda_filename ]
obsprep_space['output file'] = [ioda_filename]
save_as_yaml(obsprep_space, ioda_config_file)

obsspaces_to_convert.append({"obs space": obsprep_space})
Expand Down Expand Up @@ -284,7 +284,7 @@ def finalize(self):
files_to_save.append([output_file, output_file_dest])

try:
FileHandler({'copy': files_to_save }).sync()
FileHandler({'copy': files_to_save}).sync()
except Exception as e:
logger.warning(f"An exeception {e} occured while trying to run gen_bufr_json")
except OSError:
Expand Down
2 changes: 1 addition & 1 deletion ush/soca/prep_ocean_obs_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def obs_fetch(config, task_config, obsprep_space, cycles):
FileHandler({'copy': file_copy}).sync()

# return the modified file names for the IODA converters
return [(f[2],f[3]) for f in matching_files]
return [(f[2], f[3]) for f in matching_files]


def run_netcdf_to_ioda(obsspace_to_convert, OCNOBS2IODAEXEC):
Expand Down

0 comments on commit ebc713b

Please sign in to comment.