Skip to content

Commit

Permalink
Marine DA updates (NOAA-EMC#2802)
Browse files Browse the repository at this point in the history
Companion PR to GDASApp#1226

Addresses a few issues described in:

- GDASApp#1219
- GDASApp#1217
- GDASApp#1232
  • Loading branch information
guillaumevernieres authored and CoryMartin-NOAA committed Aug 7, 2024
1 parent b193128 commit 56b940c
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 35 deletions.
2 changes: 1 addition & 1 deletion ci/cases/gfsv17/ocnanal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ base:
ACCOUNT: {{ 'HPC_ACCOUNT' | getenv }}

ocnanal:
SOCA_INPUT_FIX_DIR: {{ FIXgfs }}/gdas/soca/1440x1080x75/soca
SOCA_INPUT_FIX_DIR: {{ HOMEgfs }}/fix/gdas/soca/1440x1080x75/soca
SOCA_OBS_LIST: {{ HOMEgfs }}/sorc/gdas.cd/parm/soca/obs/obs_list.yaml
SOCA_NINNER: 100

Expand Down
6 changes: 4 additions & 2 deletions jobs/rocoto/prepoceanobs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ export jobid="${job}.$$"

###############################################################
# setup python path for class defs and utils

PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${HOMEgfs}/ush"
# shellcheck disable=SC2311
pyiodaPATH="${HOMEgfs}/sorc/gdas.cd/build/lib/python$(detect_py_ver)/"
PYTHONPATH="${pyiodaPATH}:${PYTHONPATH}"
export PYTHONPATH

###############################################################
# Execute the JJOB
Expand Down
2 changes: 1 addition & 1 deletion parm/config/gfs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ case ${step} in
case ${OCNRES} in
"025")
memory="128GB"
ntasks=40;;
ntasks=16;;
"050")
memory="32GB"
ntasks=16;;
Expand Down
2 changes: 1 addition & 1 deletion sorc/gdas.cd
Submodule gdas.cd updated 41 files
+4 −27 parm/soca/berror/soca_diagb.yaml.j2
+3 −3 parm/soca/fields_metadata.yaml
+286 −262 parm/soca/obs/config/insitu_profile_argo.yaml
+11 −0 parm/soca/obs/config/insitu_profile_bathy.yaml
+12 −0 parm/soca/obs/config/insitu_profile_dbuoy.yaml
+11 −0 parm/soca/obs/config/insitu_profile_dbuoyb.yaml
+12 −0 parm/soca/obs/config/insitu_profile_glider.yaml
+11 −0 parm/soca/obs/config/insitu_profile_marinemammal.yaml
+11 −0 parm/soca/obs/config/insitu_profile_mbuoy.yaml
+11 −0 parm/soca/obs/config/insitu_profile_mbuoyb.yaml
+11 −0 parm/soca/obs/config/insitu_profile_tesac.yaml
+11 −0 parm/soca/obs/config/insitu_profile_tesac_salinity.yaml
+11 −0 parm/soca/obs/config/insitu_profile_xbtctd.yaml
+11 −0 parm/soca/obs/config/insitu_surface_altkob.yaml
+11 −0 parm/soca/obs/config/insitu_surface_trkob.yaml
+11 −0 parm/soca/obs/config/insitu_surface_trkob_salinity.yaml
+5 −5 parm/soca/obs/config/sst_abi_g16_l3c.yaml
+5 −5 parm/soca/obs/config/sst_abi_g17_l3c.yaml
+5 −5 parm/soca/obs/config/sst_ahi_h08_l3c.yaml
+5 −5 parm/soca/obs/config/sst_avhrr_ma_l3u.yaml
+5 −5 parm/soca/obs/config/sst_avhrr_mb_l3u.yaml
+5 −5 parm/soca/obs/config/sst_avhrr_mc_l3u.yaml
+5 −5 parm/soca/obs/config/sst_viirs_n20_l3u.yaml
+5 −5 parm/soca/obs/config/sst_viirs_npp_l3u.yaml
+9 −9 parm/soca/obs/obs_list.yaml
+25 −0 parm/soca/obsop_name_map.yaml
+5 −7 parm/soca/soca_fix_stage_025.yaml.j2
+7 −0 parm/soca/soca_utils_stage.yaml.j2
+1 −0 scripts/exgdas_global_marine_analysis_chkpt.sh
+8 −1 scripts/exgdas_global_marine_analysis_prep.py
+1 −1 sorc/oops
+6 −17 ush/soca/bkg_utils.py
+165 −0 utils/obsproc/IcecMirs2Ioda.h
+4 −0 utils/obsproc/applications/gdas_obsprovider2ioda.h
+31 −18 utils/soca/gdas_soca_diagb.h
+9 −0 utils/test/CMakeLists.txt
+2 −0 utils/test/prepdata.sh
+961 −0 utils/test/testdata/icec_mirs_snpp_1.cdl
+961 −0 utils/test/testdata/icec_mirs_snpp_2.cdl
+13 −0 utils/test/testinput/gdas_icecmirs2ioda.yaml
+26 −0 utils/test/testref/icecmirs2ioda.test
11 changes: 5 additions & 6 deletions ush/python/pygfs/task/marine_bmat.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self, config):
'MARINE_WINDOW_END': _window_end,
'MARINE_WINDOW_MIDDLE': self.task_config.current_cycle,
'BERROR_YAML_DIR': os.path.join(_home_gdas, 'parm', 'soca', 'berror'),
'GRID_GEN_YAML': os.path.join(_home_gdas, 'parm', 'soca', 'gridgen', 'gridgen.yaml'),
'UTILITY_YAML_TMPL': os.path.join(_home_gdas, 'parm', 'soca', 'soca_utils_stage.yaml.j2'),
'MARINE_ENSDA_STAGE_BKG_YAML_TMPL': os.path.join(_home_gdas, 'parm', 'soca', 'ensda', 'stage_ens_mem.yaml.j2'),
'MARINE_DET_STAGE_BKG_YAML_TMPL': os.path.join(_home_gdas, 'parm', 'soca', 'soca_det_bkg_stage.yaml.j2'),
'ENSPERT_RELPATH': _enspert_relpath,
Expand Down Expand Up @@ -82,12 +82,11 @@ def initialize(self: Task) -> None:
# TODO(G): Check ocean backgrounds dates for consistency
bkg_list = parse_j2yaml(self.task_config.MARINE_DET_STAGE_BKG_YAML_TMPL, self.task_config)
FileHandler(bkg_list).sync()
for cice_fname in ['./INPUT/cice.res.nc', './bkg/ice.bkg.f006.nc', './bkg/ice.bkg.f009.nc']:
mdau.cice_hist2fms(cice_fname, cice_fname)

# stage the grid generation yaml
FileHandler({'copy': [[self.task_config.GRID_GEN_YAML,
os.path.join(self.task_config.DATA, 'gridgen.yaml')]]}).sync()
# stage the soca utility yamls (gridgen, fields and ufo mapping yamls)
logger.info(f"Staging SOCA utility yaml files from {self.task_config.HOMEgfs}/parm/gdas/soca")
soca_utility_list = parse_j2yaml(self.task_config.UTILITY_YAML_TMPL, self.task_config)
FileHandler(soca_utility_list).sync()

# generate the variance partitioning YAML file
logger.debug("Generate variance partitioning YAML file")
Expand Down
23 changes: 0 additions & 23 deletions ush/python/pygfs/utils/marine_da_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,29 +61,6 @@ def prep_input_nml(task_config: AttrDict) -> None:
nml.write('mom_input.nml')


@logit(logger)
def cice_hist2fms(input_filename: str, output_filename: str) -> None:
""" Reformat the CICE history file so it can be read by SOCA/FMS
Simple reformatting utility to allow soca/fms to read the CICE history files
"""

# open the CICE history file
ds = xr.open_dataset(input_filename)

if 'aicen' in ds.variables and 'hicen' in ds.variables and 'hsnon' in ds.variables:
logger.info(f"*** Already reformatted, skipping.")
return

# rename the dimensions to xaxis_1 and yaxis_1
ds = ds.rename({'ni': 'xaxis_1', 'nj': 'yaxis_1'})

# rename the variables
ds = ds.rename({'aice_h': 'aicen', 'hi_h': 'hicen', 'hs_h': 'hsnon'})

# Save the new netCDF file
ds.to_netcdf(output_filename, mode='w')


@logit(logger)
def stage_ens_mem(task_config: AttrDict) -> None:
""" Copy the ensemble members to the DATA directory
Expand Down
2 changes: 1 addition & 1 deletion versions/fix.ver
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export cpl_ver=20230526
export datm_ver=20220805
export gdas_crtm_ver=20220805
export gdas_fv3jedi_ver=20220805
export gdas_soca_ver=20240624
export gdas_soca_ver=20240802
export gdas_gsibec_ver=20240416
export gdas_obs_ver=20240213
export glwu_ver=20220805
Expand Down

0 comments on commit 56b940c

Please sign in to comment.