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

Use different invariant.nc for different external models #660

Merged
merged 4 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions fix/meshes/conus3km.invariant.nc_L60_GFS
4 changes: 2 additions & 2 deletions scripts/exrrfs_fcst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
declare -rx PS4='+ $(basename ${BASH_SOURCE[0]:-${FUNCNAME[0]:-"Unknown"}})[${LINENO}]${id}: '
set -x
cpreq=${cpreq:-cpreq}

prefix=${EXTRN_MDL_SOURCE%_NCO} # remove the trailing '_NCO' if any
cd ${DATA}
#
# determine time steps and etc according to the mesh
Expand Down Expand Up @@ -48,7 +48,7 @@ ln -snf ${FIXrrfs}/physics/${PHYSICS_SUITE}/* .
ln -snf ${FIXrrfs}/meshes/${MESH_NAME}.ugwp_oro_data.nc ./ugwp_oro_data.nc
zeta_levels=${EXPDIR}/config/ZETA_LEVELS.txt
nlevel=$(wc -l < ${zeta_levels})
ln -snf ${FIXrrfs}/meshes/${MESH_NAME}.invariant.nc_L${nlevel} ./invariant.nc
ln -snf ${FIXrrfs}/meshes/${MESH_NAME}.invariant.nc_L${nlevel}_${prefix} ./invariant.nc
mkdir -p graphinfo stream_list
ln -snf ${FIXrrfs}/graphinfo/* graphinfo/
ln -snf ${FIXrrfs}/stream_list/${PHYSICS_SUITE}/* stream_list/
Expand Down
3 changes: 2 additions & 1 deletion scripts/exrrfs_jedivar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ declare -rx PS4='+ $(basename ${BASH_SOURCE[0]:-${FUNCNAME[0]:-"Unknown"}})[${LI
set -x

cpreq=${cpreq:-cpreq}
prefix=${EXTRN_MDL_SOURCE%_NCO} # remove the trailing '_NCO' if any
cd ${DATA}

CDATEm1=$($NDATE -1 ${CDATE})
Expand All @@ -25,7 +26,7 @@ ln -snf ${FIXrrfs}/physics/${PHYSICS_SUITE}/* .
ln -snf ${FIXrrfs}/meshes/${MESH_NAME}.ugwp_oro_data.nc ./ugwp_oro_data.nc
zeta_levels=${EXPDIR}/config/ZETA_LEVELS.txt
nlevel=$(wc -l < ${zeta_levels})
ln -snf ${FIXrrfs}/meshes/${MESH_NAME}.invariant.nc_L${nlevel} ./invariant.nc
ln -snf ${FIXrrfs}/meshes/${MESH_NAME}.invariant.nc_L${nlevel}_${prefix} ./invariant.nc
mkdir -p graphinfo stream_list
ln -snf ${FIXrrfs}/graphinfo/* graphinfo/
ln -snf ${FIXrrfs}/stream_list/${PHYSICS_SUITE}/* stream_list/
Expand Down
2 changes: 1 addition & 1 deletion scripts/exrrfs_lbc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ for fhr in ${fhr_all}; do
done
zeta_levels=${EXPDIR}/config/ZETA_LEVELS.txt
nlevel=$(wc -l < ${zeta_levels})
ln -snf ${FIXrrfs}/meshes/${MESH_NAME}.invariant.nc_L${nlevel} ./invariant.nc
ln -snf ${FIXrrfs}/meshes/${MESH_NAME}.invariant.nc_L${nlevel}_${prefix} ./invariant.nc
${cpreq} ${FIXrrfs}/meshes/${MESH_NAME}.static.nc static.nc
${cpreq} ${FIXrrfs}/graphinfo/${MESH_NAME}.graph.info.part.${NTASKS} .

Expand Down
2 changes: 2 additions & 0 deletions workflow/rocoto_funcs/fcst.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ def fcst(xmlFile, expdir, do_ensemble=False, do_spinup=False):
else:
cycledefs='prod'
# Task-specific EnVars beyond the task_common_vars
extrn_mdl_source=os.getenv('IC_EXTRN_MDL_NAME','IC_PREFIX_not_defined')
fcst_len_hrs_cycles=os.getenv('FCST_LEN_HRS_CYCLES', '03 03')
fcst_length=os.getenv('FCST_LENGTH','1')
lbc_interval=os.getenv('LBC_INTERVAL','3')
history_interval=os.getenv('HISTORY_INTERVAL', '1')
restart_interval=os.getenv('RESTART_INTERVAL', '99')
physics_suite=os.getenv('PHYSICS_SUITE','PHYSICS_SUITE_not_defined')
dcTaskEnv={
'EXTRN_MDL_SOURCE': f'{extrn_mdl_source}',
'FCST_LENGTH': f'{fcst_length}',
'LBC_INTERVAL': f'{lbc_interval}',
'HISTORY_INTERVAL': f'{history_interval}',
Expand Down
2 changes: 1 addition & 1 deletion workflow/rocoto_funcs/ic.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
def ic(xmlFile, expdir, do_ensemble=False):
meta_id='ic'
cycledefs='ic'
extrn_mdl_source=os.getenv('IC_EXTRN_MDL_NAME','IC_PREFIX_not_defined')
# Task-specific EnVars beyond the task_common_vars
extrn_mdl_source=os.getenv('IC_EXTRN_MDL_NAME','IC_PREFIX_not_defined')
physics_suite=os.getenv('PHYSICS_SUITE','PHYSICS_SUITE_not_defined')
dcTaskEnv={
'EXTRN_MDL_SOURCE': f'{extrn_mdl_source}',
Expand Down
2 changes: 2 additions & 0 deletions workflow/rocoto_funcs/jedivar.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ def jedivar(xmlFile, expdir,do_spinup=False):
cycledefs='prod'
task_id='jedivar'
# Task-specific EnVars beyond the task_common_vars
extrn_mdl_source=os.getenv('IC_EXTRN_MDL_NAME','IC_PREFIX_not_defined')
physics_suite=os.getenv('PHYSICS_SUITE','PHYSICS_SUITE_not_defined')
dcTaskEnv={
'EXTRN_MDL_SOURCE': f'{extrn_mdl_source}',
'PHYSICS_SUITE': f'{physics_suite}',
'REFERENCE_TIME': '@Y-@m-@dT@H:00:00Z',
'HYB_WGT_ENS': os.getenv('HYB_WGT_ENS','0.85'),
Expand Down