Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert staging job to python and yaml #2651

Merged
Merged
Show file tree
Hide file tree
Changes from 115 commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
25a959e
Rename exglobal_stage script ahead of rewrite
KateFriedman-NOAA May 14, 2024
9bf02ee
Update for pythonization of stage script
KateFriedman-NOAA May 14, 2024
8d2203d
Add PYTHONPATH to stage_ic.sh
KateFriedman-NOAA May 14, 2024
ac9fe80
Remove IC staging from setup
KateFriedman-NOAA May 14, 2024
04d75e3
Add initial changes to pythonize and yamlize staging
KateFriedman-NOAA May 14, 2024
7489d20
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA May 14, 2024
f6548e3
Remove warm start check for ingesting fv3.yaml.j2
KateFriedman-NOAA May 14, 2024
a293a9b
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA May 16, 2024
de47f2e
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA May 17, 2024
7fc7b89
Merge remote-tracking branch 'upstream/develop' into feature/issue_2475
KateFriedman-NOAA May 22, 2024
11df1af
Split fv3 yaml into warm and cold
KateFriedman-NOAA May 22, 2024
606c34a
Fix other yamls to work
KateFriedman-NOAA May 22, 2024
0176d2e
Add COM variables exports in JGLOBAL_STAGE_IC
KateFriedman-NOAA May 22, 2024
4861ed1
Update fv3_cold yaml
KateFriedman-NOAA May 22, 2024
b7a8c82
Update stage python scripts
KateFriedman-NOAA May 22, 2024
5898ee2
Remove cycle_HH and cycle_YMD from fv3_cold yaml
KateFriedman-NOAA May 22, 2024
5e8f92f
Remove unneeded funcions from stage.py
KateFriedman-NOAA May 23, 2024
1cf0063
Refactor stage yamls
KateFriedman-NOAA May 23, 2024
9a39787
Add MEMDIR array to JGLOBAL_STAGE_IC
KateFriedman-NOAA May 23, 2024
cd362fd
Remove stage_ic job dependencies from setup
KateFriedman-NOAA May 23, 2024
859d31d
Set MEMDIR as empty if not set
KateFriedman-NOAA May 23, 2024
a805fa8
Add keys_gefs in exglobal_stage_ic.py
KateFriedman-NOAA May 23, 2024
719701b
Add USE_OCN_PERTURB_FILES to gfs config.base
KateFriedman-NOAA May 30, 2024
cf50f54
Stage job yaml updates
KateFriedman-NOAA May 30, 2024
3e754c1
Updates to exglobal_stage_ic.py
KateFriedman-NOAA May 30, 2024
b625906
Updates to stage.py
KateFriedman-NOAA May 30, 2024
4e94734
Yaml updates
KateFriedman-NOAA May 30, 2024
cb4e4d4
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA May 30, 2024
b7301f0
Move COM declares inside MEMDIR loop
KateFriedman-NOAA May 31, 2024
09a407a
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA May 31, 2024
4a92a10
Remove yamls not yet needed
KateFriedman-NOAA May 31, 2024
35cb29d
Remove nest option and cleanup python imports
KateFriedman-NOAA May 31, 2024
21c1d22
Undo change to setup_expt.py
KateFriedman-NOAA May 31, 2024
9bcaa83
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA Jun 3, 2024
a4cec79
Adjust MEMDIR export in JGLOBAL_STAGE_IC
KateFriedman-NOAA Jun 3, 2024
87302c2
Add fv3_warm and fv3_nest yamls back in
KateFriedman-NOAA Jun 3, 2024
9be34aa
Add whitespaces to address pynorms errors
KateFriedman-NOAA Jun 3, 2024
c2232cd
Address pynorm errors in exglobal_stage_ic.py
KateFriedman-NOAA Jun 3, 2024
561be58
Resolve pynorms error in stage.py
KateFriedman-NOAA Jun 3, 2024
3f08f03
Indent secondary yaml loops
KateFriedman-NOAA Jun 3, 2024
03d8e20
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA Jun 5, 2024
f793d0b
Rename fv3 yamls to atmosphere yamls
KateFriedman-NOAA Jun 5, 2024
5bb4fa3
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA Jun 6, 2024
f74ca10
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA Jun 7, 2024
60511e9
Replace BASE_CPLIC with BASE_IC
KateFriedman-NOAA Jun 14, 2024
f9e3a9c
Update JGLOBAL_STAGE_IC for cycled mode
KateFriedman-NOAA Jun 14, 2024
81d070c
Add ICSDIR setting to stage configs
KateFriedman-NOAA Jun 14, 2024
bb94111
Add cycled keys to exglobal_stage_ic.py
KateFriedman-NOAA Jun 14, 2024
a675a3d
Add cycled analysis yaml to stage.py
KateFriedman-NOAA Jun 14, 2024
b97a482
Add cycled staging job to mesh
KateFriedman-NOAA Jun 14, 2024
937a245
Remove fill_ROTDIR function and update icsdir option
KateFriedman-NOAA Jun 14, 2024
87309fc
Merge remote-tracking branch 'origin/develop' into feature/issue_2475
KateFriedman-NOAA Jun 14, 2024
86c68e5
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA Jun 17, 2024
d0945da
Introduce relpaths to stage yamls
KateFriedman-NOAA Jun 17, 2024
3c45d58
Create analysis stage yaml
KateFriedman-NOAA Jun 17, 2024
03b5024
Combine stage yamls into one
KateFriedman-NOAA Jun 17, 2024
f3c72b2
Staging job updates
KateFriedman-NOAA Jun 17, 2024
31bb29c
Staging variable updates
KateFriedman-NOAA Jun 17, 2024
e833c2a
Update for COMOUT, replay, and add mediator
KateFriedman-NOAA Jun 20, 2024
df0c933
Resolve pynorms errors
KateFriedman-NOAA Jun 20, 2024
0812baf
Some updates
KateFriedman-NOAA Jul 1, 2024
63904b4
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA Jul 1, 2024
f004457
Merge remote-tracking branch 'origin/develop' into feature/issue_2475
KateFriedman-NOAA Jul 2, 2024
94e0c72
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA Jul 16, 2024
c564933
Update stage.py for recent jinja2 updates
KateFriedman-NOAA Jul 17, 2024
ff972c2
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA Jul 18, 2024
6f5c772
Change model_data to model
KateFriedman-NOAA Jul 22, 2024
537ec32
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA Jul 23, 2024
faa9613
Remove CASE blocks in stage configs
KateFriedman-NOAA Jul 24, 2024
73eed18
Merge remote-tracking branch 'origin/develop' into feature/issue_2475
KateFriedman-NOAA Jul 25, 2024
2696940
Add STAGE_IC_YAML_TMPL variable
KateFriedman-NOAA Aug 1, 2024
e96db87
Merge remote-tracking branch 'origin/develop' into feature/issue_2475
KateFriedman-NOAA Aug 1, 2024
7b2621d
Update parm/config/gfs/config.stage_ic
KateFriedman-NOAA Aug 1, 2024
ed3be1b
Add documentation to stage.yaml.j2
KateFriedman-NOAA Aug 1, 2024
a375280
Updates to stage.yaml.j2
KateFriedman-NOAA Aug 1, 2024
e603059
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA Aug 2, 2024
e936dc2
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA Aug 5, 2024
6d5a802
Use newer cycle variables and RUN
KateFriedman-NOAA Aug 5, 2024
7af7f54
Move path_exists into stage task
KateFriedman-NOAA Aug 5, 2024
ccf5945
Update ocean ICs and add path_exists
KateFriedman-NOAA Aug 5, 2024
68c121f
Add allow_missing=False to stage task
KateFriedman-NOAA Aug 5, 2024
deec1af
Update cycle prefixes and add analysis file checks
KateFriedman-NOAA Aug 5, 2024
5f755ae
Add previous_cycle to staging yaml for sfcanl_data
KateFriedman-NOAA Aug 5, 2024
256b8e2
Discontinue exporting rRUN
KateFriedman-NOAA Aug 6, 2024
da0e39c
Update cycle variables to use PDYcyc
KateFriedman-NOAA Aug 6, 2024
0ee847f
Add -x for COMOUT_ATMOS_ANALYSIS declare
KateFriedman-NOAA Aug 6, 2024
3fee34c
Update staging job declares
KateFriedman-NOAA Aug 6, 2024
8f096b7
Update ENS check in config.stage_ic for gefs
KateFriedman-NOAA Aug 6, 2024
0527267
Remove PYTHONPATH export in stage_ic.sh
KateFriedman-NOAA Aug 6, 2024
00d0a8c
Change non-exported variables to lowercase
KateFriedman-NOAA Aug 6, 2024
e14e623
Add missing documentation to execute_stage function
KateFriedman-NOAA Aug 6, 2024
a0b9af0
Move IC variables from base to stage config
KateFriedman-NOAA Aug 6, 2024
bb54087
Correct spelling mistake in config.com
KateFriedman-NOAA Aug 6, 2024
6f2b75a
Add comments in config.stage_ic
KateFriedman-NOAA Aug 6, 2024
13934d8
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA Aug 6, 2024
55e47c6
MEMDIR updates in JGLOBAL_STAGE_IC
KateFriedman-NOAA Aug 6, 2024
d2de1df
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA Aug 7, 2024
2913b58
Add enkfgdas into stage_ic job checks
KateFriedman-NOAA Aug 12, 2024
b74e696
Refactor staging job for mem loop and COM declare
KateFriedman-NOAA Aug 12, 2024
b77dad3
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA Aug 12, 2024
9a0c642
Resolve pynorms errors
KateFriedman-NOAA Aug 12, 2024
863ecee
Some fixes and updates to conditions
KateFriedman-NOAA Aug 12, 2024
a83763d
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA Aug 12, 2024
7b3edf0
Add ocninc.nc copy to stage.yaml.j2
KateFriedman-NOAA Aug 12, 2024
c7ec976
Add IC timestamps to ICSDIR in CI yamls
KateFriedman-NOAA Aug 12, 2024
c71a82b
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA Aug 13, 2024
1e21b54
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA Aug 13, 2024
ff1246b
Update AWSPW host BASE_IC path
KateFriedman-NOAA Aug 13, 2024
7ae9ea4
Consolidate staging settings
KateFriedman-NOAA Aug 13, 2024
5c1f0c8
Address pynorms errors
KateFriedman-NOAA Aug 13, 2024
6659e72
Merge branch 'NOAA-EMC:develop' into feature/issue_2475
KateFriedman-NOAA Aug 13, 2024
c6bb969
Compress first[last]_mem logic and remove unused variable
KateFriedman-NOAA Aug 13, 2024
3022650
Remove unneeded lines and update mem setup
KateFriedman-NOAA Aug 13, 2024
54f8326
Separate stage yaml into component ones
KateFriedman-NOAA Aug 15, 2024
a53c97e
Remove enkfgdas from gdas/gfs stage dependency
KateFriedman-NOAA Aug 15, 2024
13dfad2
Adjust mem if-block and fix job list for JEDI
KateFriedman-NOAA Aug 19, 2024
ab35ffc
Update analysis yaml for enkfgdas ratminc.nc
KateFriedman-NOAA Aug 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/cases/pr/C48mx500_3DVarAOWCDA.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ arguments:
resdetocean: 5.0
comroot: {{ 'RUNTESTS' | getenv }}/COMROOT
expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C48mx500
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C48mx500/20240610
KateFriedman-NOAA marked this conversation as resolved.
Show resolved Hide resolved
idate: 2021032412
edate: 2021032418
nens: 0
Expand Down
2 changes: 1 addition & 1 deletion ci/cases/pr/C96C48_hybatmDA.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ arguments:
resensatmos: 48
comroot: {{ 'RUNTESTS' | getenv }}/COMROOT
expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20240610
idate: 2021122018
edate: 2021122106
nens: 2
Expand Down
2 changes: 1 addition & 1 deletion ci/cases/pr/C96C48_ufs_hybatmDA.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ arguments:
resensatmos: 48
comroot: {{ 'RUNTESTS' | getenv }}/COMROOT
expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20240610
idate: 2024022318
edate: 2024022400
nens: 2
Expand Down
2 changes: 1 addition & 1 deletion ci/cases/pr/C96_atm3DVar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ arguments:
resdetatmos: 96
comroot: {{ 'RUNTESTS' | getenv }}/COMROOT
expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20240610
idate: 2021122018
edate: 2021122106
nens: 0
Expand Down
2 changes: 1 addition & 1 deletion ci/cases/pr/C96_atm3DVar_extended.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ arguments:
resdetatmos: 96
comroot: {{ 'RUNTESTS' | getenv }}/COMROOT
expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20240610
idate: 2021122018
edate: 2021122118
nens: 0
Expand Down
2 changes: 1 addition & 1 deletion ci/cases/pr/C96_atmaerosnowDA.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ arguments:
resdetatmos: 96
comroot: {{ 'RUNTESTS' | getenv }}/COMROOT
expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20240610
idate: 2021122012
edate: 2021122100
nens: 0
Expand Down
10 changes: 5 additions & 5 deletions docs/source/init.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ Start date = 2021032312
├── enkfgdas.20210323
│   ├── 06
│   │   ├── mem001
│   │   │   └── model_data -> ../../../gdas.20210323/06/model_data
│   │   │   └── model -> ../../../gdas.20210323/06/model
│   │   ├── mem002
│   │   │   └── model_data -> ../../../gdas.20210323/06/model_data
│   │   │   └── model -> ../../../gdas.20210323/06/model
│   │   ├── mem003
│   │   │   └── model_data -> ../../../gdas.20210323/06/model_data
│   │   │   └── model -> ../../../gdas.20210323/06/model
...
│   │   └── mem080
│   │   └── model_data -> ../../../gdas.20210323/06/model_data
│   │   └── model -> ../../../gdas.20210323/06/model
│   └── 12
│   ├── mem001
│   │   └── analysis
Expand All @@ -153,7 +153,7 @@ Start date = 2021032312
│   └── gdas.t12z.ocninc.nc -> ../../../../../gdas.20210323/12/analysis/ocean/gdas.t12z.ocninc.nc
└── gdas.20210323
├── 06
│   └── model_data
│   └── model
│   ├── atmos
│   │   └── restart
│   │   ├── 20210323.120000.ca_data.tile1.nc
Expand Down
17 changes: 9 additions & 8 deletions jobs/JGLOBAL_STAGE_IC
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
source "${HOMEgfs}/ush/preamble.sh"
source "${HOMEgfs}/ush/jjob_header.sh" -e "stage_ic" -c "base stage_ic"

# Restart conditions for GFS cycle come from GDAS
# shellcheck disable=SC2153
rCDUMP=${RUN}
# shellcheck disable=SC2153
[[ ${RUN} = "gfs" ]] && export rCDUMP="gdas"
export rCDUMP
# Execute staging
"${SCRgfs}/exglobal_stage_ic.py"
err=$?

# Execute the Script
"${SCRgfs}/exglobal_stage_ic.sh"
###############################################################
# Check for errors and exit if any of the above failed
if [[ "${err}" -ne 0 ]]; then
aerorahul marked this conversation as resolved.
Show resolved Hide resolved
echo "FATAL ERROR: Unable to copy ICs to ${ROTDIR}; ABORT!"
exit "${err}"
fi

##########################################
# Remove the Temporary working directory
Expand Down
1 change: 0 additions & 1 deletion parm/config/gefs/config.base
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export FIXugwd=${FIXgfs}/ugwd
export PACKAGEROOT="@PACKAGEROOT@" # TODO: set via prod_envir in Ops
export COMROOT="@COMROOT@" # TODO: set via prod_envir in Ops
export COMINsyn="@COMINsyn@"
export BASE_CPLIC="@BASE_CPLIC@"

# USER specific paths
export HOMEDIR="@HOMEDIR@"
Expand Down
49 changes: 22 additions & 27 deletions parm/config/gefs/config.stage_ic
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,27 @@ echo "BEGIN: config.stage_ic"
# Get task specific resources
source "${EXPDIR}/config.resources" stage_ic

case "${CASE}" in
"C384")
export CPL_ATMIC=""
export CPL_ICEIC=""
export CPL_OCNIC=""
export CPL_WAVIC=""
export CPL_MEDIC=""
;;
"C96")
export CPL_ATMIC=""
export CPL_ICEIC=""
export CPL_OCNIC=""
export CPL_WAVIC=""
export CPL_MEDIC=""
;;
"C48")
export CPL_ATMIC="gefs_test"
export CPL_ICEIC="gefs_test"
export CPL_OCNIC="gefs_test"
export CPL_WAVIC="gefs_test"
export CPL_MEDIC="gefs_test"
;;
*)
echo "FATAL ERROR Unrecognized resolution: ${CASE}"
exit 1
;;
esac
export ICSDIR="@ICSDIR@" # User provided ICSDIR; blank if not provided
export BASE_IC="@BASE_IC@" # Platform home for staged ICs

export STAGE_IC_YAML_TMPL="${PARMgfs}/stage/master_gefs.yaml.j2"

# Set ICSDIR

if [[ -z "${ICSDIR}" ]] ; then

ic_ver="20240610"

if (( NMEM_ENS > 0 )) ; then
ensic="${CASE_ENS}"
fi

if [[ "${DO_OCN:-NO}" == "YES" ]] ; then
ocnic="mx${OCNRES}"
fi

export ICSDIR="${BASE_IC}/${CASE}${ensic:-}${ocnic:-}/${ic_ver}"

fi

echo "END: config.stage_ic"
1 change: 0 additions & 1 deletion parm/config/gfs/config.base
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export PACKAGEROOT="@PACKAGEROOT@" # TODO: set via prod_envir in Ops
export COMROOT="@COMROOT@" # TODO: set via prod_envir in Ops
export COMINsyn="@COMINsyn@"
export DMPDIR="@DMPDIR@"
export BASE_CPLIC="@BASE_CPLIC@"

# Gempak from external models
# Default locations are to dummy locations for testing
Expand Down
32 changes: 16 additions & 16 deletions parm/config/gfs/config.com
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ echo "BEGIN: config.com"
# declare_from_tmpl [-rx] $var1[:$tmpl1] [$var2[:$tmpl2]] [...]]
#
# options:
# -r: Make variable read-only (same as `decalre -r`)
# -r: Make variable read-only (same as `declare -r`)
# -x: Mark variable for declare -rx (same as `declare -x`)
# var1, var2, etc: Variable names whose values will be generated from a template
# and declared
Expand Down Expand Up @@ -51,12 +51,12 @@ declare -rx COM_TOP_TMPL='${ROTDIR}/${RUN}.${YMD}/${HH}'
declare -rx COM_CONF_TMPL=${COM_BASE}'/conf'
declare -rx COM_OBS_JEDI=${COM_BASE}'/obs_jedi'

declare -rx COM_ATMOS_INPUT_TMPL=${COM_BASE}'/model_data/atmos/input'
declare -rx COM_ATMOS_RESTART_TMPL=${COM_BASE}'/model_data/atmos/restart'
declare -rx COM_ATMOS_INPUT_TMPL=${COM_BASE}'/model/atmos/input'
declare -rx COM_ATMOS_RESTART_TMPL=${COM_BASE}'/model/atmos/restart'
declare -rx COM_ATMOS_ANALYSIS_TMPL=${COM_BASE}'/analysis/atmos'
declare -rx COM_SNOW_ANALYSIS_TMPL=${COM_BASE}'/analysis/snow'
declare -rx COM_ATMOS_HISTORY_TMPL=${COM_BASE}'/model_data/atmos/history'
declare -rx COM_ATMOS_MASTER_TMPL=${COM_BASE}'/model_data/atmos/master'
declare -rx COM_ATMOS_HISTORY_TMPL=${COM_BASE}'/model/atmos/history'
declare -rx COM_ATMOS_MASTER_TMPL=${COM_BASE}'/model/atmos/master'
declare -rx COM_ATMOS_GRIB_TMPL=${COM_BASE}'/products/atmos/grib2'
declare -rx COM_ATMOS_GRIB_GRID_TMPL=${COM_ATMOS_GRIB_TMPL}'/${GRID}'
declare -rx COM_ATMOS_BUFR_TMPL=${COM_BASE}'/products/atmos/bufr'
Expand All @@ -70,17 +70,17 @@ declare -rx COM_ATMOS_RADMON_TMPL=${COM_BASE}'/products/atmos/radmon'
declare -rx COM_ATMOS_MINMON_TMPL=${COM_BASE}'/products/atmos/minmon'
declare -rx COM_ATMOS_WMO_TMPL=${COM_BASE}'/products/atmos/wmo'

declare -rx COM_WAVE_RESTART_TMPL=${COM_BASE}'/model_data/wave/restart'
declare -rx COM_WAVE_PREP_TMPL=${COM_BASE}'/model_data/wave/prep'
declare -rx COM_WAVE_HISTORY_TMPL=${COM_BASE}'/model_data/wave/history'
declare -rx COM_WAVE_RESTART_TMPL=${COM_BASE}'/model/wave/restart'
declare -rx COM_WAVE_PREP_TMPL=${COM_BASE}'/model/wave/prep'
declare -rx COM_WAVE_HISTORY_TMPL=${COM_BASE}'/model/wave/history'
declare -rx COM_WAVE_GRID_TMPL=${COM_BASE}'/products/wave/gridded'
declare -rx COM_WAVE_STATION_TMPL=${COM_BASE}'/products/wave/station'
declare -rx COM_WAVE_GEMPAK_TMPL=${COM_BASE}'/products/wave/gempak'
declare -rx COM_WAVE_WMO_TMPL=${COM_BASE}'/products/wave/wmo'

declare -rx COM_OCEAN_HISTORY_TMPL=${COM_BASE}'/model_data/ocean/history'
declare -rx COM_OCEAN_RESTART_TMPL=${COM_BASE}'/model_data/ocean/restart'
declare -rx COM_OCEAN_INPUT_TMPL=${COM_BASE}'/model_data/ocean/input'
declare -rx COM_OCEAN_HISTORY_TMPL=${COM_BASE}'/model/ocean/history'
declare -rx COM_OCEAN_RESTART_TMPL=${COM_BASE}'/model/ocean/restart'
declare -rx COM_OCEAN_INPUT_TMPL=${COM_BASE}'/model/ocean/input'
declare -rx COM_OCEAN_ANALYSIS_TMPL=${COM_BASE}'/analysis/ocean'
declare -rx COM_OCEAN_BMATRIX_TMPL=${COM_BASE}'/bmatrix/ocean'
declare -rx COM_OCEAN_NETCDF_TMPL=${COM_BASE}'/products/ocean/netcdf'
Expand All @@ -89,14 +89,14 @@ declare -rx COM_OCEAN_GRIB_GRID_TMPL=${COM_OCEAN_GRIB_TMPL}'/${GRID}'

declare -rx COM_ICE_ANALYSIS_TMPL=${COM_BASE}'/analysis/ice'
declare -rx COM_ICE_BMATRIX_TMPL=${COM_BASE}'/bmatrix/ice'
declare -rx COM_ICE_INPUT_TMPL=${COM_BASE}'/model_data/ice/input'
declare -rx COM_ICE_HISTORY_TMPL=${COM_BASE}'/model_data/ice/history'
declare -rx COM_ICE_RESTART_TMPL=${COM_BASE}'/model_data/ice/restart'
declare -rx COM_ICE_INPUT_TMPL=${COM_BASE}'/model/ice/input'
declare -rx COM_ICE_HISTORY_TMPL=${COM_BASE}'/model/ice/history'
declare -rx COM_ICE_RESTART_TMPL=${COM_BASE}'/model/ice/restart'
declare -rx COM_ICE_NETCDF_TMPL=${COM_BASE}'/products/ice/netcdf'
declare -rx COM_ICE_GRIB_TMPL=${COM_BASE}'/products/ice/grib2'
declare -rx COM_ICE_GRIB_GRID_TMPL=${COM_ICE_GRIB_TMPL}'/${GRID}'

declare -rx COM_CHEM_HISTORY_TMPL=${COM_BASE}'/model_data/chem/history'
declare -rx COM_CHEM_HISTORY_TMPL=${COM_BASE}'/model/chem/history'
declare -rx COM_CHEM_ANALYSIS_TMPL=${COM_BASE}'/analysis/chem'

declare -rx COM_MED_RESTART_TMPL=${COM_BASE}'/model_data/med/restart'
declare -rx COM_MED_RESTART_TMPL=${COM_BASE}'/model/med/restart'
53 changes: 20 additions & 33 deletions parm/config/gfs/config.stage_ic
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,26 @@ echo "BEGIN: config.stage_ic"
# Get task specific resources
source "${EXPDIR}/config.resources" stage_ic

case "${CASE}" in
"C48" | "C96" | "C192")
export CPL_ATMIC="workflow_${CASE}_refactored"
export CPL_ICEIC="workflow_${CASE}_refactored"
export CPL_OCNIC="workflow_${CASE}_refactored"
export CPL_WAVIC="workflow_${CASE}_refactored"
;;
"C384")
export CPL_ATMIC=GEFS-NoahMP-aerosols-p8c_refactored
export CPL_ICEIC=CPC_refactored
export CPL_OCNIC=CPC3Dvar_refactored
export CPL_WAVIC=workflow_C384_refactored
;;
"C768")
export CPL_ATMIC=HR3C768
export CPL_ICEIC=HR3marine
export CPL_OCNIC=HR3marine
export CPL_WAVIC=HR3marine
;;
"C1152")
export CPL_ATMIC=HR3C1152
export CPL_ICEIC=HR3marine
export CPL_OCNIC=HR3marine
export CPL_WAVIC=HR3marine
;;
*)
echo "FATAL ERROR Unrecognized resolution: ${CASE}"
exit 1
;;
esac

if [[ "${DO_NEST:-NO}" == "YES" ]] ; then
export CPL_ATMIC="GLOBAL-NEST_${CASE}"
export ICSDIR="@ICSDIR@" # User provided ICSDIR; blank if not provided
export BASE_IC="@BASE_IC@" # Platform home for staged ICs

export STAGE_IC_YAML_TMPL="${PARMgfs}/stage/master_gfs.yaml.j2"

# Set ICSDIR (if not defined)
if [[ -z "${ICSDIR}" ]] ; then

ic_ver="20240610"

if (( NMEM_ENS > 0 )) ; then
ensic="${CASE_ENS}"
fi

if [[ "${DO_OCN:-NO}" == "YES" ]] ; then
ocnic="mx${OCNRES}"
fi

export ICSDIR="${BASE_IC}/${CASE}${ensic:-}${ocnic:-}/${ic_ver}"

fi

echo "END: config.stage_ic"
10 changes: 10 additions & 0 deletions parm/stage/analysis.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
analysis:
{% set COMOUT_ATMOS_ANALYSIS_MEM = COMOUT_ATMOS_ANALYSIS_MEM_list[0] %}
mkdir:
- "{{ COMOUT_ATMOS_ANALYSIS_MEM }}"
copy:
{% for ftype in ["abias", "abias_air", "abias_int", "abias_pc", "atminc.nc", "radstat"] %}
{% if path_exists(ICSDIR ~ "/" ~ COMOUT_ATMOS_ANALYSIS_MEM | relpath(ROTDIR) ~ "/" ~ RUN ~ ".t" ~ current_cycle_HH ~ "z." ~ ftype) %}
- ["{{ ICSDIR }}/{{ COMOUT_ATMOS_ANALYSIS_MEM | relpath(ROTDIR) }}/{{ RUN }}.t{{ current_cycle_HH }}z.{{ ftype }}", "{{ COMOUT_ATMOS_ANALYSIS_MEM }}"]
{% endif %}
{% endfor %}
18 changes: 18 additions & 0 deletions parm/stage/atmosphere_cold.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
atmosphere_cold:
mkdir:
{% for mem in range(first_mem, last_mem + 1) %}
{% set imem = mem - first_mem %}
{% set COMOUT_ATMOS_INPUT_MEM = COMOUT_ATMOS_INPUT_MEM_list[imem] %}
- "{{ COMOUT_ATMOS_INPUT_MEM }}"
{% endfor %} # mem loop
copy:
{% for mem in range(first_mem, last_mem + 1) %}
{% set imem = mem - first_mem %}
{% set COMOUT_ATMOS_INPUT_MEM = COMOUT_ATMOS_INPUT_MEM_list[imem] %}
- ["{{ ICSDIR }}/{{ COMOUT_ATMOS_INPUT_MEM | relpath(ROTDIR) }}/gfs_ctrl.nc", "{{ COMOUT_ATMOS_INPUT_MEM }}"]
{% for ftype in ["gfs_data", "sfc_data"] %}
{% for ntile in range(1, ntiles + 1) %}
- ["{{ ICSDIR }}/{{ COMOUT_ATMOS_INPUT_MEM | relpath(ROTDIR) }}/{{ ftype }}.tile{{ ntile }}.nc", "{{ COMOUT_ATMOS_INPUT_MEM }}"]
{% endfor %} # ntile
{% endfor %} # ftype
{% endfor %} # mem loop
33 changes: 33 additions & 0 deletions parm/stage/atmosphere_nest.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
atmosphere_nest:
{% set ntile = 7 %}
{% if EXP_WARM_START == True %}
mkdir:
{% for mem in range(first_mem, last_mem + 1) %}
{% set imem = mem - first_mem %}
{% set COMOUT_ATMOS_RESTART_PREV_MEM = COMOUT_ATMOS_RESTART_PREV_MEM_list[imem] %}
- "{{ COMOUT_ATMOS_RESTART_PREV_MEM }}"
{% endfor %} # mem loop
copy:
{% for mem in range(first_mem, last_mem + 1) %}
{% set imem = mem - first_mem %}
{% set COMOUT_ATMOS_RESTART_PREV_MEM = COMOUT_ATMOS_RESTART_PREV_MEM_list[imem] %}
{% for ftype in ["ca_data", "fv_core.res", "fv_srf_wnd.res", "fv_tracer.res", "phy_data", "sfc_data"] %}
- ["{{ ICSDIR }}/{{ COMOUT_ATMOS_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ m_prefix }}.{{ ftype }}.tile{{ ntile }}.nc", "{{ COMOUT_ATMOS_RESTART_PREV_MEM }}/{{ m_prefix }}.{{ ftype }}.nest0{{ ntile-5 }}.tile{{ ntile }}.nc"]
{% endfor %}
{% endfor %} # mem loop
{% else %} # cold start
mkdir:
{% for mem in range(first_mem, last_mem + 1) %}
{% set imem = mem - first_mem %}
{% set COMOUT_ATMOS_INPUT_MEM = COMOUT_ATMOS_INPUT_MEM_list[imem] %}
- "{{ COMOUT_ATMOS_INPUT_MEM }}"
{% endfor %} # mem loop
copy:
{% for mem in range(first_mem, last_mem + 1) %}
{% set imem = mem - first_mem %}
{% set COMOUT_ATMOS_INPUT_MEM = COMOUT_ATMOS_INPUT_MEM_list[imem] %}
{% for ftype in ["gfs_data", "sfc_data"] %}
- ["{{ COMOUT_ATMOS_INPUT_MEM }}/{{ ftype }}.tile{{ ntile }}.nc", "{{ COMOUT_ATMOS_INPUT_MEM }}/{{ ftype }}.nest0{{ ntile-5 }}.tile{{ ntile }}.nc"]
{% endfor %}
{% endfor %} # mem loop
{% endif %}
13 changes: 13 additions & 0 deletions parm/stage/atmosphere_perturbation.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
atmosphere_perturbation:
mkdir:
{% for mem in range(first_mem, last_mem + 1) %}
{% set imem = mem - first_mem %}
{% set COMOUT_ATMOS_ANALYSIS_MEM = COMOUT_ATMOS_ANALYSIS_MEM_list[imem] %}
- "{{ COMOUT_ATMOS_ANALYSIS_MEM }}"
{% endfor %} # mem loop
copy:
{% for mem in range(first_mem, last_mem + 1) %}
{% set imem = mem - first_mem %}
{% set COMOUT_ATMOS_ANALYSIS_MEM = COMOUT_ATMOS_ANALYSIS_MEM_list[imem] %}
- ["{{ ICSDIR }}/{{ COMOUT_ATMOS_ANALYSIS_MEM | relpath(ROTDIR) }}/{{ m_prefix }}.fv3_perturbation.nc", "{{ COMOUT_ATMOS_ANALYSIS_MEM }}/{{ RUN }}.t{{ current_cycle_HH }}z.atminc.nc"]
{% endfor %} # mem loop
Loading
Loading