Skip to content

Commit

Permalink
Copy post-processed sea ice increment for diagnostics (#3235)
Browse files Browse the repository at this point in the history
This change copies post-processed sea ice increment (the increment that
was added to CICE restart files, as opposed to the raw increment that
was produced by SOCA), so it can be used in the
verification/diagnostics.

It also cleans up previously committed code (removes a list of files
where it's not needed anymore).

Resolves NOAA-EMC/GDASApp#1402

---------

Co-authored-by: shlyaeva <[email protected]>
Co-authored-by: RussTreadon-NOAA <[email protected]>
  • Loading branch information
3 people authored Jan 24, 2025
1 parent 3f4877f commit 2dd94db
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions ush/python/pygfs/task/marine_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,18 +281,19 @@ def _prep_checkpoint(self: Task) -> None:
soca2cice_param = AttrDict({
"ocn_ana": f"./Data/ocn.3dvarfgat_pseudo.an.{self.task_config.MARINE_WINDOW_MIDDLE_ISO}.nc",
"ice_ana": f"./Data/ice.3dvarfgat_pseudo.an.{self.task_config.MARINE_WINDOW_MIDDLE_ISO}.nc",
"ocn_inc": f"./Data/ocn.3dvarfgat_pseudo.incr.{self.task_config.MARINE_WINDOW_MIDDLE_ISO}.nc",
"ice_inc": f"./Data/ice.3dvarfgat_pseudo.incr.{self.task_config.MARINE_WINDOW_MIDDLE_ISO}.nc",
"ice_rst": ice_rst_ana,
"fcst_begin": fcst_begin
})
logger.debug(f"{soca2cice_param}")

# render the SOCA to CICE YAML file for the Arctic and Antarctic
logger.info("render the SOCA to CICE YAML file for the Arctic and Antarctic")
varchgyamls = ['soca_2cice_global.yaml']
for varchgyaml in varchgyamls:
soca2cice_config = parse_j2yaml(path=os.path.join(self.task_config.MARINE_JCB_GDAS_ALGO, f'{varchgyaml}.j2'),
data=soca2cice_param)
soca2cice_config.save(os.path.join(self.task_config.DATA, varchgyaml))
varchgyaml = 'soca_2cice_global.yaml'
soca2cice_config = parse_j2yaml(path=os.path.join(self.task_config.MARINE_JCB_GDAS_ALGO, f'{varchgyaml}.j2'),
data=soca2cice_param)
soca2cice_config.save(os.path.join(self.task_config.DATA, varchgyaml))

@logit(logger)
def variational(self: Task) -> None:
Expand Down Expand Up @@ -388,6 +389,10 @@ def list_all_files(dir_in, dir_out, wc='*', fh_list=[]):
post_file_list.append([os.path.join(anl_dir, 'Data', f'{domain}.3dvarfgat_pseudo.an.{mdate}.nc'),
os.path.join(com_ocean_analysis, f'{RUN}.t{cyc}z.{domain}ana.nc')])

# Copy soca2cice ice increment
post_file_list.append([os.path.join(anl_dir, 'Data', f'ice.soca2cice.incr.{bdate}.nc'),
os.path.join(com_ocean_analysis, f'{RUN}.t{cyc}z.ice.incr.postproc.nc')])

# Copy of the ssh diagnostics
if nmem_ens > 2:
for string in ['ssh_steric_stddev', 'ssh_unbal_stddev', 'ssh_total_stddev', 'steric_explained_variance']:
Expand Down

0 comments on commit 2dd94db

Please sign in to comment.