Skip to content

Commit

Permalink
Turn C96C48_ufs_hybatmDA and C48mx500_3DVarAOWCDA into a regression t…
Browse files Browse the repository at this point in the history
…est (#3120)

This PR is a companion to NOAA-EMC/GDASApp#1365

It turns ```C96C48_ufs_hybatmDA``` and ```C48mx500_3DVarAOWCDA``` into a
regression test using the JEDI application testing feature. This feature
is turned on using the new ```DO_TEST_MODE``` parameter added to
```config.base``` in GW PR
[#3115](#3115). This
parameter is set to ```"YES"``` in the yaml defaults for the JEDI-based
CI tests in GW.

The motivation for this PR is a need to catch changes in JEDI which
alter the outputs of our applications.
---------

Co-authored-by: CoryMartin-NOAA <[email protected]>
Co-authored-by: RussTreadon-NOAA <[email protected]>
  • Loading branch information
3 people authored Dec 12, 2024
1 parent 7090cff commit 0c7a3c6
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 7 deletions.
2 changes: 2 additions & 0 deletions ci/cases/yamls/soca_gfs_defaults_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ base:
marineanl:
SOCA_NINNER: 1
DO_TEST_MODE: "YES"
marineanl:
JCB_ALGO_YAML_VAR: "{{ HOMEgfs }}/sorc/gdas.cd/test/gw-ci/soca/jcb-prototype_3dfgat_3DVarAOWCDA.yaml.j2"
7 changes: 7 additions & 0 deletions ci/cases/yamls/ufs_hybatmDA_defaults.ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@ base:
DO_JEDIATMVAR: "YES"
DO_JEDIATMENS: "YES"
ACCOUNT: {{ 'HPC_ACCOUNT' | getenv }}
DO_TEST_MODE: "YES"
atmanl:
JCB_ALGO_YAML_VAR: "${HOMEgfs}/sorc/gdas.cd/test/gw-ci/atm/jcb-prototype_3dvar_ufs_hybatmDA.yaml.j2"
JCB_ALGO_YAML_FV3INC: "${HOMEgfs}/sorc/gdas.cd/test/gw-ci/atm/jcb-prototype_3dvar-fv3inc_ufs_hybatmDA.yaml.j2"
LAYOUT_X_ATMANL: 4
LAYOUT_Y_ATMANL: 4
atmensanl:
JCB_ALGO_YAML_LETKF: "${HOMEgfs}/sorc/gdas.cd/test/gw-ci/atm/jcb-prototype_lgetkf_ufs_hybatmDA.yaml.j2"
JCB_ALGO_YAML_OBS: "${HOMEgfs}/sorc/gdas.cd/test/gw-ci/atm/jcb-prototype_lgetkf_observer_ufs_hybatmDA.yaml.j2"
JCB_ALGO_YAML_SOL: "${HOMEgfs}/sorc/gdas.cd/test/gw-ci/atm/jcb-prototype_lgetkf_solver_ufs_hybatmDA.yaml.j2"
JCB_ALGO_YAML_FV3INC: "${HOMEgfs}/sorc/gdas.cd/test/gw-ci/atm/jcb-prototype_lgetkf-fv3inc_ufs_hybatmDA.yaml.j2"
LAYOUT_X_ATMENSANL: 4
LAYOUT_Y_ATMENSANL: 4
esfc:
Expand Down
1 change: 1 addition & 0 deletions parm/config/gfs/config.atmanl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
echo "BEGIN: config.atmanl"

export JCB_ALGO_YAML_VAR=@JCB_ALGO_YAML_VAR@
export JCB_ALGO_YAML_FV3INC=@JCB_ALGO_YAML_FV3INC@

export STATICB_TYPE=@STATICB_TYPE@
export LOCALIZATION_TYPE="bump"
Expand Down
1 change: 1 addition & 0 deletions parm/config/gfs/config.atmensanl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ echo "BEGIN: config.atmensanl"
export JCB_ALGO_YAML_LETKF=@JCB_ALGO_YAML_LETKF@
export JCB_ALGO_YAML_OBS=@JCB_ALGO_YAML_OBS@
export JCB_ALGO_YAML_SOL=@JCB_ALGO_YAML_SOL@
export JCB_ALGO_YAML_FV3INC=@JCB_ALGO_YAML_FV3INC@

export INTERP_METHOD='barycentric'

Expand Down
1 change: 1 addition & 0 deletions parm/config/gfs/config.marineanl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
echo "BEGIN: config.marineanl"

export JEDI_CONFIG_YAML="${PARMgfs}/gdas/soca_bmat_jedi_config.yaml.j2"
export JCB_ALGO_YAML_VAR=@JCB_ALGO_YAML_VAR@

export MARINE_OBS_YAML_DIR="${PARMgfs}/gdas/soca/obs/config"
export MARINE_OBS_LIST_YAML=@SOCA_OBS_LIST@
Expand Down
7 changes: 5 additions & 2 deletions parm/config/gfs/config.resources.ORION
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ case ${step} in
export walltime="00:45:00"
;;
"atmensanlobs")
# Run on 8 nodes for memory requirement
export tasks_per_node=8
# Run on 12 nodes for memory requirement
export tasks_per_node=12
export walltime="00:45:00"
;;
"atmensanlsol")
export tasks_per_node=12
;;
*)
;;
esac
3 changes: 3 additions & 0 deletions parm/config/gfs/yaml/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ base:

atmanl:
JCB_ALGO_YAML_VAR: "${PARMgfs}/gdas/atm/jcb-prototype_3dvar.yaml.j2"
JCB_ALGO_YAML_FV3INC: "${PARMgfs}/gdas/atm/jcb-prototype_3dvar-fv3inc.yaml.j2"
STATICB_TYPE: "gsibec"
LAYOUT_X_ATMANL: 8
LAYOUT_Y_ATMANL: 8
Expand All @@ -37,6 +38,7 @@ atmensanl:
JCB_ALGO_YAML_LETKF: "${PARMgfs}/gdas/atm/jcb-prototype_lgetkf.yaml.j2"
JCB_ALGO_YAML_OBS: "${PARMgfs}/gdas/atm/jcb-prototype_lgetkf_observer.yaml.j2"
JCB_ALGO_YAML_SOL: "${PARMgfs}/gdas/atm/jcb-prototype_lgetkf_solver.yaml.j2"
JCB_ALGO_YAML_FV3INC: "${PARMgfs}/gdas/atm/jcb-prototype_lgetkf-fv3inc.yaml.j2"
LAYOUT_X_ATMENSANL: 8
LAYOUT_Y_ATMENSANL: 8
IO_LAYOUT_X: 1
Expand All @@ -54,6 +56,7 @@ marineanl:
SOCA_INPUT_FIX_DIR: "${FIXgfs}/gdas/soca/72x35x25/soca"
SOCA_OBS_LIST: "${PARMgfs}/gdas/soca/obs/obs_list.yaml" # TODO: This is also repeated in oceanprepobs
SOCA_NINNER: 100
JCB_ALGO_YAML_VAR: "${PARMgfs}/gdas/soca/marine-jcb-3dfgat.yaml.j2"

prepoceanobs:
SOCA_INPUT_FIX_DIR: "${FIXgfs}/gdas/soca/72x35x25/soca"
Expand Down
2 changes: 1 addition & 1 deletion parm/gdas/atmanl_jedi_config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ atmanlfv3inc:
exe_src: '{{ EXECgfs }}/fv3jedi_fv3inc.x'
mpi_cmd: '{{ APRUN_ATMANLFV3INC }}'
jcb_base_yaml: '{{ PARMgfs }}/gdas/atm/jcb-base.yaml.j2'
jcb_algo: fv3jedi_fv3inc_variational
jcb_algo_yaml: '{{ JCB_ALGO_YAML_FV3INC }}'
2 changes: 1 addition & 1 deletion parm/gdas/atmensanl_jedi_config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ atmensanlfv3inc:
exe_src: '{{ EXECgfs }}/fv3jedi_fv3inc.x'
mpi_cmd: '{{ APRUN_ATMENSANLFV3INC }}'
jcb_base_yaml: '{{ PARMgfs }}/gdas/atm/jcb-base.yaml.j2'
jcb_algo: fv3jedi_fv3inc_lgetkf
jcb_algo_yaml: '{{ JCB_ALGO_YAML_FV3INC }}'
atmensanlletkf:
rundir: '{{ DATA }}'
exe_src: '{{ EXECgfs }}/gdas.x'
Expand Down
1 change: 0 additions & 1 deletion sorc/link_workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ if [[ -d "${HOMEgfs}/sorc/gdas.cd/build" ]]; then
cd "${HOMEgfs}/ush" || exit 1
${LINK_OR_COPY} "${HOMEgfs}/sorc/gdas.cd/ush/soca" .
${LINK_OR_COPY} "${HOMEgfs}/sorc/gdas.cd/ush/ufsda" .
${LINK_OR_COPY} "${HOMEgfs}/sorc/gdas.cd/ush/jediinc2fv3.py" .
${LINK_OR_COPY} "${HOMEgfs}/sorc/gdas.cd/ush/ioda/bufr2ioda/gen_bufr2ioda_json.py" .
${LINK_OR_COPY} "${HOMEgfs}/sorc/gdas.cd/ush/ioda/bufr2ioda/gen_bufr2ioda_yaml.py" .
${LINK_OR_COPY} "${HOMEgfs}/sorc/gdas.cd/ush/ioda/bufr2ioda/run_bufr2ioda.py" .
Expand Down
6 changes: 5 additions & 1 deletion ush/python/pygfs/task/marine_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ def _prep_variational_yaml(self: Task) -> None:
envconfig_jcb['cyc'] = os.getenv('cyc')
envconfig_jcb['SOCA_NINNER'] = self.task_config.SOCA_NINNER
envconfig_jcb['obs_list'] = ['adt_rads_all']
envconfig_jcb['HOMEgfs'] = self.task_config.HOMEgfs
envconfig_jcb['DO_TEST_MODE'] = self.task_config.DO_TEST_MODE
envconfig_jcb['RUN'] = self.task_config.RUN
envconfig_jcb['current_cycle'] = self.task_config.current_cycle
envconfig_jcb['MOM6_LEVS'] = mdau.get_mom6_levels(str(self.task_config.OCNRES).zfill(3))

# Write obs_list_short
Expand All @@ -222,7 +226,7 @@ def _prep_variational_yaml(self: Task) -> None:

# Render the JCB configuration files
jcb_base_yaml = os.path.join(self.task_config.PARMsoca, 'marine-jcb-base.yaml')
jcb_algo_yaml = os.path.join(self.task_config.PARMsoca, 'marine-jcb-3dfgat.yaml.j2')
jcb_algo_yaml = self.task_config.JCB_ALGO_YAML_VAR

jcb_base_config = parse_j2yaml(path=jcb_base_yaml, data=envconfig_jcb)
jcb_algo_config = parse_j2yaml(path=jcb_algo_yaml, data=envconfig_jcb)
Expand Down

0 comments on commit 0c7a3c6

Please sign in to comment.