Skip to content

Commit

Permalink
Merge branch 'feature/simplify_res' of github.com:davidhuber-noaa/glo…
Browse files Browse the repository at this point in the history
…bal-workflow into feature/simplify_res

* 'feature/simplify_res' of github.com:davidhuber-noaa/global-workflow:
  Temporarily disable METplus jobs (#2796)
  Remove local declaration
  Remove unneeded _RUN_LIST
  Apply suggestions from code review
  Remove 'gefs' from default _RUN_LIST
  Replace CDUMP with RUN_local/RUN
  Require config.resources to be sourced for each job
  Remove unused ppn and nprocs from env files
  Refactoring of the marine B-matrix job (#2749)
  • Loading branch information
DavidHuber-NOAA committed Jul 29, 2024
2 parents ab8774b + 0203ddb commit 0333443
Show file tree
Hide file tree
Showing 47 changed files with 902 additions and 454 deletions.
9 changes: 3 additions & 6 deletions ci/cases/gfsv17/ocnanal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,14 @@ base:
DO_VERFRAD: "YES"
DO_VRFY_OCEANDA: "NO"
FHMAX_GFS: 240
ACCOUNT: {{ 'HPC_ACCOUNT' | getenv }}

ocnanal:
SOCA_INPUT_FIX_DIR: /scratch2/NCEPDEV/ocean/Guillaume.Vernieres/data/static/1440x1080x75/soca
CASE_ANL: 'C24'
SOCA_INPUT_FIX_DIR: {{ FIXgfs }}/gdas/soca/1440x1080x75/soca
SOCA_OBS_LIST: {{ HOMEgfs }}/sorc/gdas.cd/parm/soca/obs/obs_list.yaml
SOCA_NINNER: 100
SABER_BLOCKS_YAML: ''
NICAS_RESOL: 1
NICAS_GRID_SIZE: 15000

prepoceanobs:
SOCA_OBS_LIST: {{ HOMEgfs }}/sorc/gdas.cd/parm/soca/obs/obs_list.yaml
SOCA_OBS_LIST: {{ HOMEgfs }}/sorc/gdas.cd/parm/soca/obs/obs_list.yaml
OBSPREP_YAML: {{ HOMEgfs }}/sorc/gdas.cd/parm/soca/obsprep/obsprep_config.yaml
DMPDIR: /scratch1/NCEPDEV/da/common/
3 changes: 3 additions & 0 deletions env/AWSPW.env
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:-
[[ ${NTHREADSmax} -gt ${max_threads_per_task} ]] && NTHREADSmax=${max_threads_per_task}
[[ ${NTHREADS1} -gt ${max_threads_per_task} ]] && NTHREADS1=${max_threads_per_task}
APRUN="${launcher} -n ${ntasks}"
else
echo "ERROR config.resources must be sourced before sourcing AWSPW.env"
exit 2
fi

if [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then
Expand Down
3 changes: 3 additions & 0 deletions env/GAEA.env
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:-
# This may be useful when Gaea is fully ported, so ignore SC warning
# shellcheck disable=SC2034
APRUN="${launcher} -n ${ntasks}"
else
echo "ERROR config.resources must be sourced before sourcing GAEA.env"
exit 2
fi

if [[ "${step}" = "waveinit" ]]; then
Expand Down
16 changes: 9 additions & 7 deletions env/HERA.env
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:-
[[ ${NTHREADSmax} -gt ${max_threads_per_task} ]] && NTHREADSmax=${max_threads_per_task}
[[ ${NTHREADS1} -gt ${max_threads_per_task} ]] && NTHREADS1=${max_threads_per_task}
APRUN="${launcher} -n ${ntasks}"
else
echo "ERROR config.resources must be sourced before sourcing HERA.env"
exit 2
fi

if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then
Expand Down Expand Up @@ -103,11 +106,15 @@ elif [[ "${step}" = "snowanl" ]]; then

export APRUN_APPLY_INCR="${launcher} -n 6"

elif [[ "${step}" = "ocnanalbmat" ]]; then
elif [[ "${step}" = "marinebmat" ]]; then

export APRUNCFP="${launcher} -n \$ncmd --multi-prog"
export APRUN_MARINEBMAT="${APRUN}"

export APRUN_OCNANAL="${APRUN}"
elif [[ "${step}" = "marinebmat" ]]; then

export APRUNCFP="${launcher} -n \$ncmd --multi-prog"
export APRUN_MARINEBMAT="${APRUN}"

elif [[ "${step}" = "ocnanalrun" ]]; then

Expand Down Expand Up @@ -184,11 +191,6 @@ elif [[ "${step}" = "eupd" ]]; then

elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then

ppn="tasks_per_node"
[[ -z "${!ppn+0}" ]] && ppn="tasks_per_node"
nprocs="ntasks"
[[ -z ${!nprocs+0} ]] && nprocs="ntasks"

(( nnodes = (ntasks+tasks_per_node-1)/tasks_per_node ))
(( ufs_ntasks = nnodes*tasks_per_node ))
# With ESMF threading, the model wants to use the full node
Expand Down
13 changes: 6 additions & 7 deletions env/HERCULES.env
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:-
[[ ${NTHREADSmax} -gt ${max_threads_per_task} ]] && NTHREADSmax=${max_threads_per_task}
[[ ${NTHREADS1} -gt ${max_threads_per_task} ]] && NTHREADS1=${max_threads_per_task}
APRUN="${launcher} -n ${ntasks}"
else
echo "ERROR config.resources must be sourced before sourcing HERCULES.env"
exit 2
fi

case ${step} in
Expand Down Expand Up @@ -102,19 +105,15 @@ case ${step} in

export APRUN_APPLY_INCR="${launcher} -n 6"
;;
"ocnanalbmat")
"marinebmat")

export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}"

export NTHREADS_OCNANAL=${NTHREADSmax}
export APRUN_OCNANAL="${APRUN} --cpus-per-task=${NTHREADS_OCNANAL}"
export APRUN_MARINEBMAT="${APRUN}"
;;
"ocnanalrun")

export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}"

export NTHREADS_OCNANAL=${NTHREADSmax}
export APRUN_OCNANAL="${APRUN} --cpus-per-task=${NTHREADS_OCNANAL}"
export APRUN_OCNANAL="${APRUN}"
;;
"ocnanalecen")

Expand Down
11 changes: 5 additions & 6 deletions env/JET.env
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:-
[[ ${NTHREADSmax} -gt ${max_threads_per_task} ]] && NTHREADSmax=${max_threads_per_task}
[[ ${NTHREADS1} -gt ${max_threads_per_task} ]] && NTHREADS1=${max_threads_per_task}
APRUN="${launcher} -n ${ntasks}"
else
echo "ERROR config.resources must be sourced before sourcing JET.env"
exit 2
fi

if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then
Expand Down Expand Up @@ -91,18 +94,14 @@ elif [[ "${step}" = "atmanlfv3inc" ]]; then
export NTHREADS_ATMANLFV3INC=${NTHREADSmax}
export APRUN_ATMANLFV3INC="${APRUN}"

elif [[ "${step}" = "ocnanalbmat" ]]; then
elif [[ "${step}" = "marinebmat" ]]; then

export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}"

export NTHREADS_OCNANAL=${NTHREADSmax}
export APRUN_OCNANAL="${APRUN}"
export APRUN_MARINEBMAT="${APRUN}"

elif [[ "${step}" = "ocnanalrun" ]]; then

export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}"

export NTHREADS_OCNANAL=${NTHREADSmax}
export APRUN_OCNANAL="${APRUN}"

elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then
Expand Down
12 changes: 7 additions & 5 deletions env/ORION.env
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:-
[[ ${NTHREADSmax} -gt ${max_threads_per_task} ]] && NTHREADSmax=${max_threads_per_task}
[[ ${NTHREADS1} -gt ${max_threads_per_task} ]] && NTHREADS1=${max_threads_per_task}
APRUN="${launcher} -n ${ntasks}"
else
echo "ERROR config.resources must be sourced before sourcing ORION.env"
exit 2
fi

if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then
Expand Down Expand Up @@ -99,19 +102,18 @@ elif [[ "${step}" = "atmanlfv3inc" ]]; then
export NTHREADS_ATMANLFV3INC=${NTHREADSmax}
export APRUN_ATMANLFV3INC="${APRUN} --cpus-per-task=${NTHREADS_ATMANLFV3INC}"

elif [[ "${step}" = "ocnanalbmat" ]]; then
elif [[ "${step}" = "marinebmat" ]]; then

export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}"

export NTHREADS_OCNANAL=${NTHREADSmax}
export APRUN_OCNANAL="${APRUN} --cpus-per-task=${NTHREADS_OCNANAL}"
export NTHREADS_MARINEBMAT=${NTHREADSmax}
export APRUN_MARINEBMAT="${APRUN}"

elif [[ "${step}" = "ocnanalrun" ]]; then

export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}"

export NTHREADS_OCNANAL=${NTHREADSmax}
export APRUN_OCNANAL="${APRUN} --cpus-per-task=${NTHREADS_OCNANAL}"
export APRUN_OCNANAL="${APRUN}"

elif [[ "${step}" = "ocnanalchkpt" ]]; then

Expand Down
7 changes: 5 additions & 2 deletions env/S4.env
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:-
[[ ${NTHREADSmax} -gt ${max_threads_per_task} ]] && NTHREADSmax=${max_threads_per_task}
[[ ${NTHREADS1} -gt ${max_threads_per_task} ]] && NTHREADS1=${max_threads_per_task}
APRUN="${launcher} -n ${ntasks}"
else
echo "ERROR config.resources must be sourced before sourcing S4.env"
exit 2
fi

if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then
Expand Down Expand Up @@ -91,10 +94,10 @@ elif [[ "${step}" = "atmanlfv3inc" ]]; then
export NTHREADS_ATMANLFV3INC=${NTHREADSmax}
export APRUN_ATMANLFV3INC="${APRUN}"

elif [[ "${step}" = "ocnanalbmat" ]]; then
elif [[ "${step}" = "marinebmat" ]]; then
echo "WARNING: ${step} is not enabled on S4!"

elif [[ "${step}" = "ocnanalrun" ]]; then
elif [[ "${step}" = "marinerun" ]]; then
echo "WARNING: ${step} is not enabled on S4!"

elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then
Expand Down
8 changes: 3 additions & 5 deletions env/WCOSS2.env
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:-
[[ ${NTHREADSmax} -gt ${max_threads_per_task} ]] && NTHREADSmax=${max_threads_per_task}
[[ ${NTHREADS1} -gt ${max_threads_per_task} ]] && NTHREADS1=${max_threads_per_task}
APRUN="${launcher} -n ${ntasks}"
else
echo "ERROR config.resources must be sourced before sourcing WCOSS2.env"
exit 2
fi

if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then
Expand Down Expand Up @@ -153,11 +156,6 @@ elif [[ "${step}" = "eupd" ]]; then

elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then

ppn="tasks_per_node"
[[ -z "${!ppn+0}" ]] && ppn="tasks_per_node"
nprocs="ntasks"
[[ -z ${!nprocs+0} ]] && nprocs="ntasks"

(( nnodes = (ntasks+tasks_per_node-1)/tasks_per_node ))
(( ufs_ntasks = nnodes*tasks_per_node ))
# With ESMF threading, the model wants to use the full node
Expand Down
48 changes: 0 additions & 48 deletions jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_BMAT

This file was deleted.

47 changes: 0 additions & 47 deletions jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_BMAT_VRFY

This file was deleted.

4 changes: 4 additions & 0 deletions jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_PREP
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \
COM_ICE_HISTORY_PREV:COM_ICE_HISTORY_TMPL \
COM_ICE_RESTART_PREV:COM_ICE_RESTART_TMPL

YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMIN_OCEAN_BMATRIX:COM_OCEAN_BMATRIX_TMPL \
COMIN_ICE_BMATRIX:COM_ICE_BMATRIX_TMPL

##############################################
# Begin JOB SPECIFIC work
##############################################
Expand Down
2 changes: 1 addition & 1 deletion jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# GFS GEMPAK NCDC PRODUCT GENERATION
############################################
source "${HOMEgfs}/ush/preamble.sh"
source "${HOMEgfs}/ush/jjob_header.sh" -e "gempak_gif" -c "base"
source "${HOMEgfs}/ush/jjob_header.sh" -e "gempak_gif" -c "base gempak"

export MP_PULSE=0
export MP_TIMEOUT=2000
Expand Down
2 changes: 1 addition & 1 deletion jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# GFS PGRB2_SPECIAL_POST PRODUCT GENERATION
############################################
source "${HOMEgfs}/ush/preamble.sh"
source "${HOMEgfs}/ush/jjob_header.sh" -e "npoess" -c "base"
source "${HOMEgfs}/ush/jjob_header.sh" -e "npoess" -c "base npoess"

export OMP_NUM_THREADS=${OMP_NUM_THREADS:-1}

Expand Down
2 changes: 2 additions & 0 deletions jobs/JGLOBAL_ARCHIVE
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMIN_OCEAN_GRIB:COM_OCEAN_GRIB_TMPL \
COMIN_OCEAN_NETCDF:COM_OCEAN_NETCDF_TMPL \
COMIN_OCEAN_ANALYSIS:COM_OCEAN_ANALYSIS_TMPL \
COMIN_OCEAN_BMATRIX:COM_OCEAN_BMATRIX_TMPL \
COMIN_ICE_BMATRIX:COM_ICE_BMATRIX_TMPL \
COMIN_WAVE_GRID:COM_WAVE_GRID_TMPL \
COMIN_WAVE_HISTORY:COM_WAVE_HISTORY_TMPL \
COMIN_WAVE_STATION:COM_WAVE_STATION_TMPL \
Expand Down
Loading

0 comments on commit 0333443

Please sign in to comment.