From 01b2f0d7d32485fe57411d1d4861c17d483bb0b3 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Mon, 24 Jun 2024 19:27:11 +0000 Subject: [PATCH 01/73] Simplify resource declarations in config.resources (cherry picked from commit 130e2e479fbb625cc5b57d39aa0802c711e2916c) --- parm/config/gfs/config.resources | 1126 +++++++++++++++--------------- 1 file changed, 561 insertions(+), 565 deletions(-) diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index 2e910d4eb47..e118854c8d2 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -126,149 +126,149 @@ export npe_node_max case ${step} in "prep") - export wtime_prep='00:30:00' - export npe_prep=4 - export npe_node_prep=2 - export nth_prep=1 - export memory_prep="40GB" + export wtime='00:30:00' + export npe=4 + export npe_node=2 + export nth=1 + export memory="40GB" ;; "prepsnowobs") - export wtime_prepsnowobs="00:05:00" - export npe_prepsnowobs=1 - export nth_prepsnowobs=1 - export npe_node_prepsnowobs=1 + export wtime="00:05:00" + export npe=1 + export nth=1 + export npe_node=1 ;; "prepatmiodaobs") - export wtime_prepatmiodaobs="00:30:00" - export npe_prepatmiodaobs=1 - export nth_prepatmiodaobs=1 - export npe_node_prepatmiodaobs=$(( npe_node_max / nth_prepatmiodaobs )) + export wtime="00:30:00" + export npe=1 + export nth=1 + export npe_node=$(( npe_node_max / nth )) ;; "aerosol_init") - export wtime_aerosol_init="00:05:00" - export npe_aerosol_init=1 - export nth_aerosol_init=1 - export npe_node_aerosol_init=$(( npe_node_max / nth_aerosol_init )) - export NTASKS=${npe_aerosol_init} - export memory_aerosol_init="6GB" + export wtime="00:05:00" + export npe=1 + export nth=1 + export npe_node=$(( npe_node_max / nth )) + export NTASKS=${npe} + export memory="6GB" ;; "waveinit") - export wtime_waveinit="00:10:00" - export npe_waveinit=12 - export nth_waveinit=1 - export npe_node_waveinit=$(( npe_node_max / nth_waveinit )) - export NTASKS=${npe_waveinit} - export memory_waveinit="2GB" + export wtime="00:10:00" + export npe=12 + export nth=1 + export npe_node=$(( npe_node_max / nth )) + export NTASKS=${npe} + export memory="2GB" ;; "waveprep") - export wtime_waveprep="00:10:00" - export npe_waveprep_gdas=5 - export npe_waveprep_gfs=65 - export nth_waveprep_gdas=1 - export nth_waveprep_gfs=1 - export npe_node_waveprep_gdas=$(( npe_node_max / nth_waveprep_gdas )) - export npe_node_waveprep_gfs=$(( npe_node_max / nth_waveprep_gfs )) - export NTASKS_gdas=${npe_waveprep_gdas} - export NTASKS_gfs=${npe_waveprep_gfs} - export memory_waveprep_gdas="100GB" - export memory_waveprep_gfs="150GB" - - var_npe_node="npe_node_waveprep_${RUN}" - var_nth="nth_waveprep_${RUN}" - var_npe="npe_waveprep_${RUN}" + export wtime="00:10:00" + export npe_gdas=5 + export npe_gfs=65 + export nth_gdas=1 + export nth_gfs=1 + export npe_node_gdas=$(( npe_node_max / nth_gdas )) + export npe_node_gfs=$(( npe_node_max / nth_gfs )) + export NTASKS_gdas=${npe_gdas} + export NTASKS_gfs=${npe_gfs} + export memory_gdas="100GB" + export memory_gfs="150GB" + + var_npe_node="npe_node_${RUN}" + var_nth="nth_${RUN}" + var_npe="npe_${RUN}" var_NTASKS="ntasks_${RUN}" # RUN is set to a single value at setup time, so these won't be found # TODO rework setup_xml.py to initialize RUN to the applicable option if [[ -n "${!var_npe_node+0}" ]]; then - declare -x "npe_node_waveprep"="${!var_npe_node}" \ - "nth_waveprep"="${!var_nth}" \ - "npe_waveprep"="${!var_npe}" \ + declare -x "npe_node"="${!var_npe_node}" \ + "nth"="${!var_nth}" \ + "npe"="${!var_npe}" \ "NTASKS"="${!var_NTASKS}" fi ;; "wavepostsbs") - export wtime_wavepostsbs_gdas="00:20:00" - export wtime_wavepostsbs_gfs="03:00:00" - export npe_wavepostsbs=8 - export nth_wavepostsbs=1 - export npe_node_wavepostsbs=$(( npe_node_max / nth_wavepostsbs )) - export NTASKS=${npe_wavepostsbs} - export memory_wavepostsbs_gdas="10GB" - export memory_wavepostsbs_gfs="10GB" + export wtime_gdas="00:20:00" + export wtime_gfs="03:00:00" + export npe=8 + export nth=1 + export npe_node=$(( npe_node_max / nth )) + export NTASKS=${npe} + export memory_gdas="10GB" + export memory_gfs="10GB" ;; # The wavepost*pnt* jobs are I/O heavy and do not scale well to large nodes. # Limit the number of tasks/node to 40. "wavepostbndpnt") - export wtime_wavepostbndpnt="03:00:00" - export npe_wavepostbndpnt=240 - export nth_wavepostbndpnt=1 - export npe_node_wavepostbndpnt=$(( npe_node_max / nth_wavepostbndpnt )) + export wtime="03:00:00" + export npe=240 + export nth=1 + export npe_node=$(( npe_node_max / nth )) export is_exclusive=True - if [[ ${npe_node_wavepostbndpnt} -gt 40 ]]; then - export npe_node_wavepostbndpnt=40 + if [[ ${npe_node} -gt 40 ]]; then + export npe_node=40 export is_exclusive=False fi - export NTASKS=${npe_wavepostbndpnt} + export NTASKS=${npe} ;; "wavepostbndpntbll") - export wtime_wavepostbndpntbll="01:00:00" - export npe_wavepostbndpntbll=448 - export nth_wavepostbndpntbll=1 - export npe_node_wavepostbndpntbll=$(( npe_node_max / nth_wavepostbndpntbll )) + export wtime="01:00:00" + export npe=448 + export nth=1 + export npe_node=$(( npe_node_max / nth )) export is_exclusive=True - if [[ ${npe_node_wavepostbndpntbll} -gt 40 ]]; then - export npe_node_wavepostbndpntbll=40 + if [[ ${npe_node} -gt 40 ]]; then + export npe_node=40 export is_exclusive=False fi - export NTASKS=${npe_wavepostbndpntbll} + export NTASKS=${npe} ;; "wavepostpnt") - export wtime_wavepostpnt="04:00:00" - export npe_wavepostpnt=200 - export nth_wavepostpnt=1 - export npe_node_wavepostpnt=$(( npe_node_max / nth_wavepostpnt )) + export wtime="04:00:00" + export npe=200 + export nth=1 + export npe_node=$(( npe_node_max / nth )) export is_exclusive=True - if [[ ${npe_node_wavepostpnt} -gt 40 ]]; then - export npe_node_wavepostpnt=40 + if [[ ${npe_node} -gt 40 ]]; then + export npe_node=40 export is_exclusive=False fi - export NTASKS=${npe_wavepostpnt} + export NTASKS=${npe} ;; "wavegempak") - export wtime_wavegempak="02:00:00" - export npe_wavegempak=1 - export nth_wavegempak=1 - export npe_node_wavegempak=$(( npe_node_max / nth_wavegempak )) - export NTASKS=${npe_wavegempak} - export memory_wavegempak="1GB" + export wtime="02:00:00" + export npe=1 + export nth=1 + export npe_node=$(( npe_node_max / nth )) + export NTASKS=${npe} + export memory="1GB" ;; "waveawipsbulls") - export wtime_waveawipsbulls="00:20:00" - export npe_waveawipsbulls=1 - export nth_waveawipsbulls=1 - export npe_node_waveawipsbulls=$(( npe_node_max / nth_waveawipsbulls )) - export NTASKS=${npe_waveawipsbulls} + export wtime="00:20:00" + export npe=1 + export nth=1 + export npe_node=$(( npe_node_max / nth )) + export NTASKS=${npe} export is_exclusive=True ;; "waveawipsgridded") - export wtime_waveawipsgridded="02:00:00" - export npe_waveawipsgridded=1 - export nth_waveawipsgridded=1 - export npe_node_waveawipsgridded=$(( npe_node_max / nth_waveawipsgridded )) - export NTASKS=${npe_waveawipsgridded} - export memory_waveawipsgridded_gfs="1GB" + export wtime="02:00:00" + export npe=1 + export nth=1 + export npe_node=$(( npe_node_max / nth )) + export NTASKS=${npe} + export memory_gfs="1GB" ;; "atmanlinit") @@ -278,35 +278,35 @@ case ${step} in export layout_gsib_x=$(( layout_x * 3 )) export layout_gsib_y=$(( layout_y * 2 )) - export wtime_atmanlinit="00:10:00" - export npe_atmanlinit=1 - export nth_atmanlinit=1 - export npe_node_atmanlinit=$(( npe_node_max / nth_atmanlinit )) - export npe_node_atmanlinit - export memory_atmanlinit="3072M" + export wtime="00:10:00" + export npe=1 + export nth=1 + export npe_node=$(( npe_node_max / nth )) + export npe_node + export memory="3072M" ;; "atmanlvar") export layout_x=${layout_x_atmanl} export layout_y=${layout_y_atmanl} - export wtime_atmanlvar="00:30:00" - export npe_atmanlvar_gdas=$(( layout_x * layout_y * 6 )) - export npe_atmanlvar_gfs=$(( layout_x * layout_y * 6 )) - export nth_atmanlvar_gdas=1 - export nth_atmanlvar_gfs=${nth_atmanlvar_gdas} - export npe_node_atmanlvar_gdas=$(( npe_node_max / nth_atmanlvar_gdas )) - export npe_node_atmanlvar_gfs=$(( npe_node_max / nth_atmanlvar_gfs )) - export memory_atmanlvar="96GB" + export wtime="00:30:00" + export npe_gdas=$(( layout_x * layout_y * 6 )) + export npe_gfs=$(( layout_x * layout_y * 6 )) + export nth_gdas=1 + export nth_gfs=${nth_gdas} + export npe_node_gdas=$(( npe_node_max / nth_gdas )) + export npe_node_gfs=$(( npe_node_max / nth_gfs )) + export memory="96GB" export is_exclusive=True - var_npe_node="npe_node_atmanlvar_${RUN}" - var_nth="nth_atmanlvar_${RUN}" - var_npe="npe_atmanlvar_${RUN}" + var_npe_node="npe_node_${RUN}" + var_nth="nth_${RUN}" + var_npe="npe_${RUN}" if [[ -n "${!var_npe_node+0}" ]]; then - declare -x "npe_node_atmanlvar"="${!var_npe_node}" \ - "nth_atmanlvar"="${!var_nth}" \ - "npe_atmanlvar"="${!var_npe}" + declare -x "npe_node"="${!var_npe_node}" \ + "nth"="${!var_nth}" \ + "npe"="${!var_npe}" fi ;; @@ -314,31 +314,31 @@ case ${step} in export layout_x=${layout_x_atmanl} export layout_y=${layout_y_atmanl} - export wtime_atmanlfv3inc="00:30:00" - export npe_atmanlfv3inc_gdas=$(( layout_x * layout_y * 6 )) - export npe_atmanlfv3inc_gfs=$(( layout_x * layout_y * 6 )) - export nth_atmanlfv3inc_gdas=1 - export nth_atmanlfv3inc_gfs=${nth_atmanlfv3inc_gdas} - export npe_node_atmanlfv3inc_gdas=$(( npe_node_max / nth_atmanlfv3inc_gdas )) - export npe_node_atmanlfv3inc_gfs=$(( npe_node_max / nth_atmanlfv3inc_gfs )) - export memory_atmanlfv3inc="96GB" + export wtime="00:30:00" + export npe_gdas=$(( layout_x * layout_y * 6 )) + export npe_gfs=$(( layout_x * layout_y * 6 )) + export nth_gdas=1 + export nth_gfs=${nth_gdas} + export npe_node_gdas=$(( npe_node_max / nth_gdas )) + export npe_node_gfs=$(( npe_node_max / nth_gfs )) + export memory="96GB" export is_exclusive=True - var_npe_node="npe_node_atmanlfv3inc_${RUN}" - var_nth="nth_atmanlfv3inc_${RUN}" - var_npe="npe_atmanlfv3inc_${RUN}" + var_npe_node="npe_node_${RUN}" + var_nth="nth_${RUN}" + var_npe="npe_${RUN}" if [[ -n "${!var_npe_node+0}" ]]; then - declare -x "npe_node_atmanlfv3inc"="${!var_npe_node}" \ - "nth_atmanlfv3inc"="${!var_nth}" \ - "npe_atmanlfv3inc"="${!var_npe}" + declare -x "npe_node"="${!var_npe_node}" \ + "nth"="${!var_nth}" \ + "npe"="${!var_npe}" fi ;; "atmanlfinal") - export wtime_atmanlfinal="00:30:00" - export npe_atmanlfinal=${npe_node_max} - export nth_atmanlfinal=1 - export npe_node_atmanlfinal=$(( npe_node_max / nth_atmanlfinal )) + export wtime="00:30:00" + export npe=${npe_node_max} + export nth=1 + export npe_node=$(( npe_node_max / nth )) export is_exclusive=True ;; @@ -365,18 +365,18 @@ case ${step} in export layout_x export layout_y - export wtime_snowanl="00:15:00" - export npe_snowanl=$(( layout_x * layout_y * 6 )) - export nth_snowanl=1 - export npe_node_snowanl=$(( npe_node_max / nth_snowanl )) + export wtime="00:15:00" + export npe=$(( layout_x * layout_y * 6 )) + export nth=1 + export npe_node=$(( npe_node_max / nth )) ;; "prepobsaero") - export wtime_prepobsaero="00:30:00" - export npe_prepobsaero=1 - export nth_prepobsaero=1 - export npe_node_prepobsaero=1 - export memory_prepobsaero="96GB" + export wtime="00:30:00" + export npe=1 + export nth=1 + export npe_node=1 + export memory="96GB" ;; "aeroanlinit") @@ -406,11 +406,11 @@ case ${step} in export layout_x export layout_y - export wtime_aeroanlinit="00:10:00" - export npe_aeroanlinit=1 - export nth_aeroanlinit=1 - export npe_node_aeroanlinit=$(( npe_node_max / nth_aeroanlinit )) - export memory_aeroanlinit="3072M" + export wtime="00:10:00" + export npe=1 + export nth=1 + export npe_node=$(( npe_node_max / nth )) + export memory="3072M" ;; "aeroanlrun") @@ -440,47 +440,47 @@ case ${step} in export layout_x export layout_y - export wtime_aeroanlrun="00:30:00" - export npe_aeroanlrun_gdas=$(( layout_x * layout_y * 6 )) - export npe_aeroanlrun_gfs=$(( layout_x * layout_y * 6 )) - export nth_aeroanlrun_gdas=1 - export nth_aeroanlrun_gfs=1 - export npe_node_aeroanlrun_gdas=$(( npe_node_max / nth_aeroanlrun_gdas )) - export npe_node_aeroanlrun_gfs=$(( npe_node_max / nth_aeroanlrun_gfs )) + export wtime="00:30:00" + export npe_gdas=$(( layout_x * layout_y * 6 )) + export npe_gfs=$(( layout_x * layout_y * 6 )) + export nth_gdas=1 + export nth_gfs=1 + export npe_node_gdas=$(( npe_node_max / nth_gdas )) + export npe_node_gfs=$(( npe_node_max / nth_gfs )) export is_exclusive=True - var_npe_node="npe_node_aeroanlrun_${RUN}" - var_nth="nth_aeroanlrun_${RUN}" - var_npe="npe_aeroanlrun_${RUN}" + var_npe_node="npe_node_${RUN}" + var_nth="nth_${RUN}" + var_npe="npe_${RUN}" if [[ -n "${!var_npe_node+0}" ]]; then - declare -x "npe_node_aeroanlrun"="${!var_npe_node}" \ - "nth_aeroanlrun"="${!var_nth}" \ - "npe_aeroanlrun"="${!var_npe}" + declare -x "npe_node"="${!var_npe_node}" \ + "nth"="${!var_nth}" \ + "npe"="${!var_npe}" fi ;; "aeroanlfinal") - export wtime_aeroanlfinal="00:10:00" - export npe_aeroanlfinal=1 - export nth_aeroanlfinal=1 - export npe_node_aeroanlfinal=$(( npe_node_max / nth_aeroanlfinal )) - export memory_aeroanlfinal="3072M" + export wtime="00:10:00" + export npe=1 + export nth=1 + export npe_node=$(( npe_node_max / nth )) + export memory="3072M" ;; "ocnanalprep") - export wtime_ocnanalprep="00:10:00" - export npe_ocnanalprep=1 - export nth_ocnanalprep=1 - export npe_node_ocnanalprep=$(( npe_node_max / nth_ocnanalprep )) - export memory_ocnanalprep="24GB" + export wtime="00:10:00" + export npe=1 + export nth=1 + export npe_node=$(( npe_node_max / nth )) + export memory="24GB" ;; "prepoceanobs") - export wtime_prepoceanobs="00:10:00" - export npe_prepoceanobs=1 - export nth_prepoceanobs=1 - export npe_node_prepoceanobs=$(( npe_node_max / nth_prepoceanobs )) - export memory_prepoceanobs="48GB" + export wtime="00:10:00" + export npe=1 + export nth=1 + export npe_node=$(( npe_node_max / nth )) + export memory="48GB" ;; "ocnanalbmat") @@ -494,11 +494,11 @@ case ${step} in exit 4 esac - export wtime_ocnanalbmat="00:30:00" - export npe_ocnanalbmat=${npes} - export nth_ocnanalbmat=1 + export wtime="00:30:00" + export npe=${npes} + export nth=1 export is_exclusive=True - export npe_node_ocnanalbmat=$(( npe_node_max / nth_ocnanalbmat )) + export npe_node=$(( npe_node_max / nth )) ;; "ocnanalrun") @@ -506,27 +506,27 @@ case ${step} in case ${OCNRES} in "025") npes=480 - memory_ocnanalrun="96GB" + memory="96GB" ;; "050") npes=16 - memory_ocnanalrun="96GB" + memory="96GB" ;; "500") npes=16 - memory_ocnanalrun="24GB" + memory="24GB" ;; *) echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${OCNRES}" exit 4 esac - export wtime_ocnanalrun="00:15:00" - export npe_ocnanalrun=${npes} - export nth_ocnanalrun=1 + export wtime="00:15:00" + export npe=${npes} + export nth=1 export is_exclusive=True - export npe_node_ocnanalrun=$(( npe_node_max / nth_ocnanalrun )) - export memory_ocnanalrun + export npe_node=$(( npe_node_max / nth )) + export memory ;; "ocnanalecen") @@ -534,27 +534,27 @@ case ${step} in case ${OCNRES} in "025") npes=40 - memory_ocnanalecen="96GB" + memory="96GB" ;; "050") npes=16 - memory_ocnanalecen="96GB" + memory="96GB" ;; "500") npes=16 - memory_ocnanalecen="24GB" + memory="24GB" ;; *) echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${OCNRES}" exit 4 esac - export wtime_ocnanalecen="00:10:00" - export npe_ocnanalecen=${npes} - export nth_ocnanalecen=1 + export wtime="00:10:00" + export npe=${npes} + export nth=1 export is_exclusive=True - export npe_node_ocnanalecen=$(( npe_node_max / nth_ocnanalecen )) - export memory_ocnanalecen + export npe_node=$(( npe_node_max / nth )) + export memory ;; "ocnanalletkf") @@ -562,136 +562,136 @@ case ${step} in case ${OCNRES} in "025") npes=480 - memory_ocnanalletkf="96GB" + memory="96GB" ;; "050") npes=16 - memory_ocnanalletkf="96GB" + memory="96GB" ;; "500") npes=16 - memory_ocnanalletkf="24GB" + memory="24GB" ;; *) echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${OCNRES}" exit 4 esac - export wtime_ocnanalletkf="00:10:00" - export npe_ocnanalletkf=${npes} - export nth_ocnanalletkf=1 + export wtime="00:10:00" + export npe=${npes} + export nth=1 export is_exclusive=True - export npe_node_ocnanalletkf=$(( npe_node_max / nth_ocnanalletkf )) - export memory_ocnanalletkf + export npe_node=$(( npe_node_max / nth )) + export memory ;; "ocnanalchkpt") - export wtime_ocnanalchkpt="00:10:00" - export npe_ocnanalchkpt=1 - export nth_ocnanalchkpt=1 - export npe_node_ocnanalchkpt=$(( npe_node_max / nth_ocnanalchkpt )) + export wtime="00:10:00" + export npe=1 + export nth=1 + export npe_node=$(( npe_node_max / nth )) case ${OCNRES} in "025") - memory_ocnanalchkpt="128GB" + memory="128GB" npes=40;; "050") - memory_ocnanalchkpt="32GB" + memory="32GB" npes=16;; "500") - memory_ocnanalchkpt="32GB" + memory="32GB" npes=8;; *) echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${OCNRES}" exit 4 esac - export npe_ocnanalchkpt=${npes} - export memory_ocnanalchkpt + export npe=${npes} + export memory ;; "ocnanalpost") - export wtime_ocnanalpost="00:30:00" - export npe_ocnanalpost=${npe_node_max} - export nth_ocnanalpost=1 - export npe_node_ocnanalpost=$(( npe_node_max / nth_ocnanalpost )) + export wtime="00:30:00" + export npe=${npe_node_max} + export nth=1 + export npe_node=$(( npe_node_max / nth )) ;; "ocnanalvrfy") - export wtime_ocnanalvrfy="00:35:00" - export npe_ocnanalvrfy=1 - export nth_ocnanalvrfy=1 - export npe_node_ocnanalvrfy=$(( npe_node_max / nth_ocnanalvrfy )) - export memory_ocnanalvrfy="24GB" + export wtime="00:35:00" + export npe=1 + export nth=1 + export npe_node=$(( npe_node_max / nth )) + export memory="24GB" ;; "anal") - export wtime_anal_gdas="01:20:00" - export wtime_anal_gfs="01:00:00" + export wtime_gdas="01:20:00" + export wtime_gfs="01:00:00" case ${CASE} in "C768") - export npe_anal_gdas=780 - export npe_anal_gfs=825 - export nth_anal=5 + export npe_gdas=780 + export npe_gfs=825 + export nth=5 ;; "C384") - export npe_anal_gdas=160 - export npe_anal_gfs=160 - export nth_anal=10 + export npe_gdas=160 + export npe_gfs=160 + export nth=10 ;; "C192" | "C96" | "C48") - export npe_anal_gdas=84 - export npe_anal_gfs=84 - export nth_anal=5 + export npe_gdas=84 + export npe_gfs=84 + export nth=5 ;; *) echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${CASE}" exit 4 ;; esac - export npe_node_anal=$(( npe_node_max / nth_anal )) - export nth_cycle=${nth_anal} - export npe_node_cycle=$(( npe_node_max / nth_cycle )) + export npe_node=$(( npe_node_max / nth )) + export nth=${nth} + export npe_node=$(( npe_node_max / nth_cycle )) export is_exclusive=True - var_npe="npe_anal_${RUN}" + var_npe="npe_${RUN}" if [[ -n "${!var_npe+0}" ]]; then - declare -x "npe_anal"="${!var_npe}" + declare -x "npe"="${!var_npe}" fi ;; "analcalc") - export wtime_analcalc="00:15:00" - export npe_analcalc=127 - export ntasks="${npe_analcalc}" - export nth_analcalc=1 - export npe_node_analcalc=$(( npe_node_max / nth_analcalc )) + export wtime="00:15:00" + export npe=127 + export ntasks="${npe}" + export nth=1 + export npe_node=$(( npe_node_max / nth )) export nth_echgres_gdas=4 export nth_echgres_gfs=12 export is_exclusive=True - export memory_analcalc="48GB" + export memory="48GB" if [[ "${CASE}" == "C384" || "${CASE}" == "C768" ]]; then - export memory_analcalc="${mem_node_max}" + export memory="${mem_node_max}" fi var_nth="nth_echgres_${RUN}" if [[ -n "${!var_nth+0}" ]]; then - declare -x "nth_echgres"="${!var_nth}" + declare -x "nth"="${!var_nth}" fi ;; "analdiag") - export wtime_analdiag="00:15:00" - export npe_analdiag=96 # Should be at least twice npe_ediag - export nth_analdiag=1 - export npe_node_analdiag=$(( npe_node_max / nth_analdiag )) - export memory_analdiag="48GB" + export wtime="00:15:00" + export npe=96 # Should be at least twice npe + export nth=1 + export npe_node=$(( npe_node_max / nth )) + export memory="48GB" ;; "sfcanl") - export wtime_sfcanl="00:20:00" - export npe_sfcanl=6 - export nth_sfcanl=1 - export npe_node_sfcanl=$(( npe_node_max / nth_sfcanl )) + export wtime="00:20:00" + export npe=6 + export nth=1 + export npe_node=$(( npe_node_max / nth )) export is_exclusive=True ;; @@ -821,29 +821,29 @@ case ${step} in echo "Total PETS for ${_CDUMP} = ${NTASKS_TOT}" - declare -x "npe_${step}_${_CDUMP}"="${NTASKS_TOT}" - declare -x "nth_${step}_${_CDUMP}"="${UFS_THREADS}" - declare -x "npe_node_${step}_${_CDUMP}"="${npe_node_max}" + declare -x "npe_${_CDUMP}"="${NTASKS_TOT}" + declare -x "nth_${_CDUMP}"="${UFS_THREADS}" + declare -x "npe_node_${_CDUMP}"="${npe_node_max}" done case "${CASE}" in "C48" | "C96" | "C192") - declare -x "wtime_${step}_gdas"="00:20:00" - declare -x "wtime_${step}_enkfgdas"="00:20:00" - declare -x "wtime_${step}_gfs"="03:00:00" - declare -x "wtime_${step}_enkfgfs"="00:20:00" + declare -x "wtime_gdas"="00:20:00" + declare -x "wtime_enkfgdas"="00:20:00" + declare -x "wtime_gfs"="03:00:00" + declare -x "wtime_enkfgfs"="00:20:00" ;; "C384") - declare -x "wtime_${step}_gdas"="00:30:00" - declare -x "wtime_${step}_enkfgdas"="00:30:00" - declare -x "wtime_${step}_gfs"="06:00:00" - declare -x "wtime_${step}_enkfgfs"="00:30:00" + declare -x "wtime_gdas"="00:30:00" + declare -x "wtime_enkfgdas"="00:30:00" + declare -x "wtime_gfs"="06:00:00" + declare -x "wtime_enkfgfs"="00:30:00" ;; "C768" | "C1152") # Not valid resolutions for ensembles - declare -x "wtime_${step}_gdas"="00:40:00" - declare -x "wtime_${step}_gfs"="06:00:00" + declare -x "wtime_gdas"="00:40:00" + declare -x "wtime_gfs"="06:00:00" ;; *) echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${CASE}" @@ -851,13 +851,13 @@ case ${step} in ;; esac - var_npe_node="npe_node_${step}_${RUN}" - var_nth="nth_${step}_${RUN}" - var_npe="npe_${step}_${RUN}" + var_npe_node="npe_node_${RUN}" + var_nth="nth_${RUN}" + var_npe="npe_${RUN}" if [[ -n "${!var_npe_node+0}" ]]; then - declare -x "npe_node_${step}"="${!var_npe_node}" \ - "nth_${step}"="${!var_nth}" \ - "npe_${step}"="${!var_npe}" + declare -x "npe_node"="${!var_npe_node}" \ + "nth"="${!var_nth}" \ + "npe"="${!var_npe}" fi unset _CDUMP _CDUMP_LIST @@ -865,161 +865,161 @@ case ${step} in ;; "oceanice_products") - export wtime_oceanice_products="00:15:00" - export npe_oceanice_products=1 - export npe_node_oceanice_products=1 - export nth_oceanice_products=1 - export memory_oceanice_products="96GB" + export wtime="00:15:00" + export npe=1 + export npe_node=1 + export nth=1 + export memory="96GB" ;; "upp") case "${CASE}" in "C48" | "C96") - export npe_upp=${CASE:1} + export npe=${CASE:1} ;; "C192" | "C384" | "C768" ) - export npe_upp=120 - export memory_upp="${mem_node_max}" + export npe=120 + export memory="${mem_node_max}" ;; *) echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${CASE}" exit 4 ;; esac - export npe_node_upp=${npe_upp} + export npe_node=${npe} - export nth_upp=1 + export nth=1 - export wtime_upp="00:15:00" - if (( npe_node_upp > npe_node_max )); then - export npe_node_upp=${npe_node_max} + export wtime="00:15:00" + if (( npe_node > npe_node_max )); then + export npe_node=${npe_node_max} fi export is_exclusive=True ;; "atmos_products") - export wtime_atmos_products="00:15:00" - export npe_atmos_products=24 - export nth_atmos_products=1 - export npe_node_atmos_products="${npe_atmos_products}" + export wtime="00:15:00" + export npe=24 + export nth=1 + export npe_node="${npe}" export is_exclusive=True ;; "verfozn") - export wtime_verfozn="00:05:00" - export npe_verfozn=1 - export nth_verfozn=1 - export npe_node_verfozn=1 - export memory_verfozn="1G" + export wtime="00:05:00" + export npe=1 + export nth=1 + export npe_node=1 + export memory="1G" ;; "verfrad") - export wtime_verfrad="00:40:00" - export npe_verfrad=1 - export nth_verfrad=1 - export npe_node_verfrad=1 - export memory_verfrad="5G" + export wtime="00:40:00" + export npe=1 + export nth=1 + export npe_node=1 + export memory="5G" ;; "vminmon") - export wtime_vminmon="00:05:00" - export npe_vminmon=1 - export nth_vminmon=1 - export npe_node_vminmon=1 - export memory_vminmon="1G" + export wtime="00:05:00" + export npe=1 + export nth=1 + export npe_node=1 + export memory="1G" ;; "tracker") - export wtime_tracker="00:10:00" - export npe_tracker=1 - export nth_tracker=1 - export npe_node_tracker=1 - export memory_tracker="4G" + export wtime="00:10:00" + export npe=1 + export nth=1 + export npe_node=1 + export memory="4G" ;; "genesis") - export wtime_genesis="00:25:00" - export npe_genesis=1 - export nth_genesis=1 - export npe_node_genesis=1 - export memory_genesis="10G" + export wtime="00:25:00" + export npe=1 + export nth=1 + export npe_node=1 + export memory="10G" ;; "genesis_fsu") - export wtime_genesis_fsu="00:10:00" - export npe_genesis_fsu=1 - export nth_genesis_fsu=1 - export npe_node_genesis_fsu=1 - export memory_genesis_fsu="10G" + export wtime="00:10:00" + export npe=1 + export nth=1 + export npe_node=1 + export memory="10G" ;; "fit2obs") - export wtime_fit2obs="00:20:00" - export npe_fit2obs=3 - export nth_fit2obs=1 - export npe_node_fit2obs=1 - export memory_fit2obs="20G" + export wtime="00:20:00" + export npe=3 + export nth=1 + export npe_node=1 + export memory="20G" ;; "metp") - export nth_metp=1 - export wtime_metp_gdas="03:00:00" - export wtime_metp_gfs="06:00:00" - export npe_metp=4 - export npe_node_metp=4 + export nth=1 + export wtime_gdas="03:00:00" + export wtime_gfs="06:00:00" + export npe=4 + export npe_node=4 export is_exclusive=True ;; "echgres") - export wtime_echgres="00:10:00" - export npe_echgres=3 - export nth_echgres=${npe_node_max} - export npe_node_echgres=1 + export wtime="00:10:00" + export npe=3 + export nth=${npe_node_max} + export npe_node=1 ;; "init") - export wtime_init="00:30:00" - export npe_init=24 - export nth_init=1 - export npe_node_init=6 - export memory_init="70GB" + export wtime="00:30:00" + export npe=24 + export nth=1 + export npe_node=6 + export memory="70GB" ;; "init_chem") - export wtime_init_chem="00:30:00" - export npe_init_chem=1 - export npe_node_init_chem=1 + export wtime="00:30:00" + export npe=1 + export npe_node=1 export is_exclusive=True ;; "mom6ic") - export wtime_mom6ic="00:30:00" - export npe_mom6ic=24 - export npe_node_mom6ic=24 + export wtime="00:30:00" + export npe=24 + export npe_node=24 export is_exclusive=True ;; "arch" | "earc" | "getic") - declare -x "wtime_${step}"="06:00:00" - declare -x "npe_${step}"="1" - declare -x "npe_node_${step}"="1" - declare -x "nth_${step}"="1" - declare -x "memory_${step}"="4096M" + declare -x "wtime"="06:00:00" + declare -x "npe"="1" + declare -x "npe_node"="1" + declare -x "nth"="1" + declare -x "memory"="4096M" ;; "cleanup") - export wtime_cleanup="00:15:00" - export npe_cleanup=1 - export npe_node_cleanup=1 - export nth_cleanup=1 - export memory_cleanup="4096M" + export wtime="00:15:00" + export npe=1 + export npe_node=1 + export nth=1 + export memory="4096M" ;; "stage_ic") - export wtime_stage_ic="00:15:00" - export npe_stage_ic=1 - export npe_node_stage_ic=1 - export nth_stage_ic=1 + export wtime="00:15:00" + export npe=1 + export npe_node=1 + export nth=1 export is_exclusive=True ;; @@ -1027,36 +1027,36 @@ case ${step} in export layout_x=${layout_x_atmensanl} export layout_y=${layout_y_atmensanl} - export wtime_atmensanlinit="00:10:00" - export npe_atmensanlinit=1 - export nth_atmensanlinit=1 - export npe_node_atmensanlinit=$(( npe_node_max / nth_atmensanlinit )) - export memory_atmensanlinit="3072M" + export wtime="00:10:00" + export npe=1 + export nth=1 + export npe_node=$(( npe_node_max / nth )) + export memory="3072M" ;; "atmensanlletkf") export layout_x=${layout_x_atmensanl} export layout_y=${layout_y_atmensanl} - export wtime_atmensanlletkf="00:30:00" - export npe_atmensanlletkf_enkfgdas=$(( layout_x * layout_y * 6 )) - export npe_atmensanlletkf_enkfgfs=$(( layout_x * layout_y * 6 )) - export nth_atmensanlletkf_enkfgdas=1 - export nth_atmensanlletkf_enkfgfs=${nth_atmensanlletkf_enkfgdas} - export npe_node_atmensanlletkf_enkfgdas=$(( npe_node_max / nth_atmensanlletkf_enkfgdas )) - export npe_node_atmensanlletkf_enkfgfs=$(( npe_node_max / nth_atmensanlletkf_enkfgfs )) - export memory_atmensanlletkf="96GB" + export wtime="00:30:00" + export npe_enkfgdas=$(( layout_x * layout_y * 6 )) + export npe_enkfgfs=$(( layout_x * layout_y * 6 )) + export nth_enkfgdas=1 + export nth_enkfgfs=${nth_enkfgdas} + export npe_node_enkfgdas=$(( npe_node_max / nth_enkfgdas )) + export npe_node_enkfgfs=$(( npe_node_max / nth_enkfgfs )) + export memory="96GB" export is_exclusive=True - var_npe_node="npe_node_atmensanlletkf_${RUN}" - var_nth="nth_atmensanlletkf_${RUN}" - var_npe="npe_atmensanlletkf_${RUN}" + var_npe_node="npe_node_${RUN}" + var_nth="nth_${RUN}" + var_npe="npe_${RUN}" # RUN is set to a single value at setup time, so these won't be found # TODO rework setup_xml.py to initialize RUN to the applicable option if [[ -n "${!var_npe_node+0}" ]]; then - declare -x "npe_node_atmensanlletkf"="${!var_npe_node}" \ - "nth_atmensanlletkf"="${!var_nth}" \ - "npe_atmensanlletkf"="${!var_npe}" + declare -x "npe_node"="${!var_npe_node}" \ + "nth"="${!var_nth}" \ + "npe"="${!var_npe}" fi ;; @@ -1064,323 +1064,319 @@ case ${step} in export layout_x=${layout_x_atmensanl} export layout_y=${layout_y_atmensanl} - export wtime_atmensanlfv3inc="00:30:00" - export npe_atmensanlfv3inc_enkfgdas=$(( layout_x * layout_y * 6 )) - export npe_atmensanlfv3inc_enkfgfs=$(( layout_x * layout_y * 6 )) - export nth_atmensanlfv3inc_enkfgdas=1 - export nth_atmensanlfv3inc_enkfgfs=${nth_atmensanlfv3inc_enkfgdas} - export npe_node_atmensanlfv3inc_enkfgdas=$(( npe_node_max / nth_atmensanlfv3inc_enkfgdas )) - export npe_node_atmensanlfv3inc_enkfgfs=$(( npe_node_max / nth_atmensanlfv3inc_enkfgfs )) - export memory_atmensanlfv3inc="96GB" + export wtime="00:30:00" + export npe_enkfgdas=$(( layout_x * layout_y * 6 )) + export npe_enkfgfs=$(( layout_x * layout_y * 6 )) + export nth_enkfgdas=1 + export nth_enkfgfs=${nth_enkfgdas} + export npe_node_enkfgdas=$(( npe_node_max / nth_enkfgdas )) + export npe_node_enkfgfs=$(( npe_node_max / nth_enkfgfs )) + export memory="96GB" export is_exclusive=True - var_npe_node="npe_node_atmensanlfv3inc_${RUN}" - var_nth="nth_atmensanlfv3inc_${RUN}" - var_npe="npe_atmensanlfv3inc_${RUN}" + var_npe_node="npe_node_${RUN}" + var_nth="nth_${RUN}" + var_npe="npe_${RUN}" # RUN is set to a single value at setup time, so these won't be found # TODO rework setup_xml.py to initialize RUN to the applicable option if [[ -n "${!var_npe_node+0}" ]]; then - declare -x "npe_node_atmensanlfv3inc"="${!var_npe_node}" \ - "nth_atmensanlfv3inc"="${!var_nth}" \ - "npe_atmensanlfv3inc"="${!var_npe}" + declare -x "npe_node"="${!var_npe_node}" \ + "nth"="${!var_nth}" \ + "npe"="${!var_npe}" fi ;; "atmensanlfinal") - export wtime_atmensanlfinal="00:30:00" - export npe_atmensanlfinal=${npe_node_max} - export nth_atmensanlfinal=1 - export npe_node_atmensanlfinal=$(( npe_node_max / nth_atmensanlfinal )) + export wtime="00:30:00" + export npe=${npe_node_max} + export nth=1 + export npe_node=$(( npe_node_max / nth )) export is_exclusive=True ;; "eobs" | "eomg") - export wtime_eobs="00:15:00" - export wtime_eomg="00:30:00" + export wtime="00:15:00" + export wtime="00:30:00" case ${CASE} in - "C768") export npe_eobs=200;; - "C384") export npe_eobs=100;; - "C192" | "C96" | "C48") export npe_eobs=40;; + "C768") export npe=200;; + "C384") export npe=100;; + "C192" | "C96" | "C48") export npe=40;; *) echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${CASE}" exit 4 ;; esac - export npe_eomg=${npe_eobs} - export nth_eobs=2 - export nth_eomg=${nth_eobs} + export nth=2 # NOTE The number of tasks and cores used must be the same for eobs # See https://github.com/NOAA-EMC/global-workflow/issues/2092 for details - export npe_node_eobs=$(( npe_node_max / nth_eobs )) + export npe_node=$(( npe_node_max / nth )) export is_exclusive=True - export npe_node_eomg=${npe_node_eobs} - # Unset npe_node_eobs if it is not a multiple of npe_node_max + # Unset npe_node if it is not a multiple of npe_node_max # to prevent dropping data on the floor. This should be set int # config.resources.{machine} instead. This will result in an error at # experiment setup time if not set in config.resources.{machine}. - if [[ $(( npe_node_max % npe_node_eobs )) != 0 ]]; then + if [[ $(( npe_node_max % npe_node )) != 0 ]]; then unset npe_node_max fi ;; "ediag") - export wtime_ediag="00:15:00" - export npe_ediag=48 - export nth_ediag=1 - export npe_node_ediag=$(( npe_node_max / nth_ediag )) - export memory_ediag="30GB" + export wtime="00:15:00" + export npe=48 + export nth=1 + export npe_node=$(( npe_node_max / nth )) + export memory="30GB" ;; "eupd") - export wtime_eupd="00:30:00" + export wtime="00:30:00" case ${CASE} in "C768") - export npe_eupd=480 - export nth_eupd=6 + export npe=480 + export nth=6 ;; "C384") - export npe_eupd=270 - export nth_eupd=8 + export npe=270 + export nth=8 ;; "C192" | "C96" | "C48") - export npe_eupd=42 - export nth_eupd=2 + export npe=42 + export nth=2 ;; *) echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${CASE}" exit 4 ;; esac - export npe_node_eupd=$(( npe_node_max / nth_eupd )) + export npe_node=$(( npe_node_max / nth )) export is_exclusive=True ;; "ecen") - export wtime_ecen="00:10:00" - export npe_ecen=80 - export nth_ecen=4 + export wtime="00:10:00" + export npe=80 + export nth=4 if [[ ${CASE} == "C384" || ${CASE} == "C192" || ${CASE} == "C96" || ${CASE} == "C48" ]]; then - export nth_ecen=2 + export nth=2 fi - export npe_node_ecen=$(( npe_node_max / nth_ecen )) - export nth_cycle=${nth_ecen} - export npe_node_cycle=$(( npe_node_max / nth_cycle )) + export npe_node=$(( npe_node_max / nth )) + export npe_node_cycle=${npe_node} export is_exclusive=True ;; "esfc") - export wtime_esfc="00:15:00" - export npe_esfc=80 - export nth_esfc=1 - export npe_node_esfc=$(( npe_node_max / nth_esfc )) - export nth_cycle=${nth_esfc} + export wtime="00:15:00" + export npe=80 + export nth=1 + export npe_node=$(( npe_node_max / nth )) + export nth_cycle=${nth} export npe_node_cycle=$(( npe_node_max / nth_cycle )) ;; "epos") - export wtime_epos="00:15:00" - [[ ${CASE} == "C768" ]] && export wtime_epos="00:25:00" - export npe_epos=80 - export nth_epos=1 - export npe_node_epos=$(( npe_node_max / nth_epos )) + export wtime="00:15:00" + [[ ${CASE} == "C768" ]] && export wtime="00:25:00" + export npe=80 + export nth=1 + export npe_node=$(( npe_node_max / nth )) export is_exclusive=True ;; "postsnd") - export wtime_postsnd="02:00:00" - export npe_postsnd=40 - export nth_postsnd=8 - export npe_node_postsnd=10 - export npe_postsndcfp=9 - export npe_node_postsndcfp=1 - postsnd_req_cores=$(( npe_node_postsnd * nth_postsnd )) + export wtime="02:00:00" + export npe=40 + export nth=8 + export npe_node=10 + export npe=9 + export npe_node=1 + postsnd_req_cores=$(( npe_node * nth )) if (( postsnd_req_cores > npe_node_max )); then - export npe_node_postsnd=$(( npe_node_max / nth_postsnd )) + export npe_node=$(( npe_node_max / nth )) fi export is_exclusive=True ;; "awips") - export wtime_awips="03:30:00" - export npe_awips=1 - export npe_node_awips=1 - export nth_awips=1 - export memory_awips="3GB" + export wtime="03:30:00" + export npe=1 + export npe_node=1 + export nth=1 + export memory="3GB" ;; "npoess") - export wtime_npoess="03:30:00" - export npe_npoess=1 - export npe_node_npoess=1 - export nth_npoess=1 - export memory_npoess="3GB" + export wtime="03:30:00" + export npe=1 + export npe_node=1 + export nth=1 + export memory="3GB" ;; "gempak") - export wtime_gempak="03:00:00" - export npe_gempak_gdas=2 - export npe_gempak_gfs=28 - export npe_node_gempak_gdas=2 - export npe_node_gempak_gfs=28 - export nth_gempak=1 - export memory_gempak_gdas="4GB" - export memory_gempak_gfs="2GB" - - var_npe_node="npe_node_gempak_${RUN}" - var_npe="npe_gempak_${RUN}" + export wtime="03:00:00" + export npe_gdas=2 + export npe_gfs=28 + export npe_node_gdas=2 + export npe_node_gfs=28 + export nth=1 + export memory_gdas="4GB" + export memory_gfs="2GB" + + var_npe_node="npe_node_${RUN}" + var_npe="npe_${RUN}" # RUN is set to a single value at setup time, so these won't be found # TODO rework setup_xml.py to initialize RUN to the applicable option if [[ -n "${!var_npe_node+0}" ]]; then - declare -x "npe_node_gempak"="${!var_npe_node}" \ - "npe_gempak"="${!var_npe}" + declare -x "npe_node"="${!var_npe_node}" \ + "npe"="${!var_npe}" fi ;; "mos_stn_prep") - export wtime_mos_stn_prep="00:10:00" - export npe_mos_stn_prep=3 - export npe_node_mos_stn_prep=3 - export nth_mos_stn_prep=1 - export memory_mos_stn_prep="5GB" - export NTASK="${npe_mos_stn_prep}" - export PTILE="${npe_node_mos_stn_prep}" + export wtime="00:10:00" + export npe=3 + export npe_node=3 + export nth=1 + export memory="5GB" + export NTASK="${npe}" + export PTILE="${npe_node}" ;; "mos_grd_prep") - export wtime_mos_grd_prep="00:10:00" - export npe_mos_grd_prep=4 - export npe_node_mos_grd_prep=4 - export nth_mos_grd_prep=1 - export memory_mos_grd_prep="16GB" - export NTASK="${npe_mos_grd_prep}" - export PTILE="${npe_node_mos_grd_prep}" + export wtime="00:10:00" + export npe=4 + export npe_node=4 + export nth=1 + export memory="16GB" + export NTASK="${npe}" + export PTILE="${npe_node}" ;; "mos_ext_stn_prep") - export wtime_mos_ext_stn_prep="00:15:00" - export npe_mos_ext_stn_prep=2 - export npe_node_mos_ext_stn_prep=2 - export nth_mos_ext_stn_prep=1 - export memory_mos_ext_stn_prep="5GB" - export NTASK="${npe_mos_ext_stn_prep}" - export PTILE="${npe_node_mos_ext_stn_prep}" + export wtime="00:15:00" + export npe=2 + export npe_node=2 + export nth=1 + export memory="5GB" + export NTASK="${npe}" + export PTILE="${npe_node}" ;; "mos_ext_grd_prep") - export wtime_mos_ext_grd_prep="00:10:00" - export npe_mos_ext_grd_prep=7 - export npe_node_mos_ext_grd_prep=7 - export nth_mos_ext_grd_prep=1 - export memory_mos_ext_grd_prep="3GB" - export NTASK="${npe_mos_ext_grd_prep}" - export PTILE="${npe_node_mos_ext_grd_prep}" + export wtime="00:10:00" + export npe=7 + export npe_node=7 + export nth=1 + export memory="3GB" + export NTASK="${npe}" + export PTILE="${npe_node}" ;; "mos_stn_fcst") - export wtime_mos_stn_fcst="00:10:00" - export npe_mos_stn_fcst=5 - export npe_node_mos_stn_fcst=5 - export nth_mos_stn_fcst=1 - export memory_mos_stn_fcst="40GB" - export NTASK="${npe_mos_stn_fcst}" - export PTILE="${npe_node_mos_stn_fcst}" + export wtime="00:10:00" + export npe=5 + export npe_node=5 + export nth=1 + export memory="40GB" + export NTASK="${npe}" + export PTILE="${npe_node}" ;; "mos_grd_fcst") - export wtime_mos_grd_fcst="00:10:00" - export npe_mos_grd_fcst=7 - export npe_node_mos_grd_fcst=7 - export nth_mos_grd_fcst=1 - export memory_mos_grd_fcst="50GB" - export NTASK="${npe_mos_grd_fcst}" - export PTILE="${npe_node_mos_grd_fcst}" + export wtime="00:10:00" + export npe=7 + export npe_node=7 + export nth=1 + export memory="50GB" + export NTASK="${npe}" + export PTILE="${npe_node}" ;; "mos_ext_stn_fcst") - export wtime_mos_ext_stn_fcst="00:20:00" - export npe_mos_ext_stn_fcst=3 - export npe_node_mos_ext_stn_fcst=3 - export nth_mos_ext_stn_fcst=1 - export memory_mos_ext_stn_fcst="50GB" - export NTASK="${npe_mos_ext_stn_fcst}" - export PTILE="${npe_node_mos_ext_stn_fcst}" + export wtime="00:20:00" + export npe=3 + export npe_node=3 + export nth=1 + export memory="50GB" + export NTASK="${npe}" + export PTILE="${npe_node}" export prepost=True ;; "mos_ext_grd_fcst") - export wtime_mos_ext_grd_fcst="00:10:00" - export npe_mos_ext_grd_fcst=7 - export npe_node_mos_ext_grd_fcst=7 - export nth_mos_ext_grd_fcst=1 - export memory_mos_ext_grd_fcst="50GB" - export NTASK="${npe_mos_ext_grd_fcst}" - export PTILE="${npe_node_mos_ext_grd_fcst}" + export wtime="00:10:00" + export npe=7 + export npe_node=7 + export nth=1 + export memory="50GB" + export NTASK="${npe}" + export PTILE="${npe_node}" ;; "mos_stn_prdgen") - export wtime_mos_stn_prdgen="00:10:00" - export npe_mos_stn_prdgen=1 - export npe_node_mos_stn_prdgen=1 - export nth_mos_stn_prdgen=1 - export memory_mos_stn_prdgen="15GB" - export NTASK="${npe_mos_stn_prdgen}" - export PTILE="${npe_node_mos_stn_prdgen}" + export wtime="00:10:00" + export npe=1 + export npe_node=1 + export nth=1 + export memory="15GB" + export NTASK="${npe}" + export PTILE="${npe_node}" export prepost=True ;; "mos_grd_prdgen") - export wtime_mos_grd_prdgen="00:40:00" - export npe_mos_grd_prdgen=72 - export npe_node_mos_grd_prdgen=18 - export nth_mos_grd_prdgen=4 - export memory_mos_grd_prdgen="20GB" - export NTASK="${npe_mos_grd_prdgen}" - export PTILE="${npe_node_mos_grd_prdgen}" - export OMP_NUM_THREADS="${nth_mos_grd_prdgen}" + export wtime="00:40:00" + export npe=72 + export npe_node=18 + export nth=4 + export memory="20GB" + export NTASK="${npe}" + export PTILE="${npe_node}" + export OMP_NUM_THREADS="${nth}" ;; "mos_ext_stn_prdgen") - export wtime_mos_ext_stn_prdgen="00:10:00" - export npe_mos_ext_stn_prdgen=1 - export npe_node_mos_ext_stn_prdgen=1 - export nth_mos_ext_stn_prdgen=1 - export memory_mos_ext_stn_prdgen="15GB" - export NTASK="${npe_mos_ext_stn_prdgen}" - export PTILE="${npe_node_mos_ext_stn_prdgen}" + export wtime="00:10:00" + export npe=1 + export npe_node=1 + export nth=1 + export memory="15GB" + export NTASK="${npe}" + export PTILE="${npe_node}" export prepost=True ;; "mos_ext_grd_prdgen") - export wtime_mos_ext_grd_prdgen="00:30:00" - export npe_mos_ext_grd_prdgen=96 - export npe_node_mos_ext_grd_prdgen=6 - export nth_mos_ext_grd_prdgen=16 - export memory_mos_ext_grd_prdgen="30GB" - export NTASK="${npe_mos_ext_grd_prdgen}" - export PTILE="${npe_node_mos_ext_grd_prdgen}" - export OMP_NUM_THREADS="${nth_mos_ext_grd_prdgen}" + export wtime="00:30:00" + export npe=96 + export npe_node=6 + export nth=16 + export memory="30GB" + export NTASK="${npe}" + export PTILE="${npe_node}" + export OMP_NUM_THREADS="${nth}" ;; "mos_wx_prdgen") - export wtime_mos_wx_prdgen="00:10:00" - export npe_mos_wx_prdgen=4 - export npe_node_mos_wx_prdgen=2 - export nth_mos_wx_prdgen=2 - export memory_mos_wx_prdgen="10GB" - export NTASK="${npe_mos_wx_prdgen}" - export PTILE="${npe_node_mos_wx_prdgen}" - export OMP_NUM_THREADS="${nth_mos_wx_prdgen}" + export wtime="00:10:00" + export npe=4 + export npe_node=2 + export nth=2 + export memory="10GB" + export NTASK="${npe}" + export PTILE="${npe_node}" + export OMP_NUM_THREADS="${nth}" ;; "mos_wx_ext_prdgen") - export wtime_mos_wx_ext_prdgen="00:10:00" - export npe_mos_wx_ext_prdgen=4 - export npe_node_mos_wx_ext_prdgen=2 - export nth_mos_wx_ext_prdgen=2 - export memory_mos_wx_ext_prdgen="10GB" - export NTASK="${npe_mos_wx_ext_prdgen}" - export PTILE="${npe_node_mos_wx_ext_prdgen}" - export OMP_NUM_THREADS="${nth_mos_wx_ext_prdgen}" + export wtime="00:10:00" + export npe=4 + export npe_node=2 + export nth=2 + export memory="10GB" + export NTASK="${npe}" + export PTILE="${npe_node}" + export OMP_NUM_THREADS="${nth}" ;; *) From 3ebb2b9b1b98b831b4c7c76c75d2f8b259571864 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Tue, 25 Jun 2024 12:30:43 +0000 Subject: [PATCH 02/73] Remove 'step' from resource variable names in env files (cherry picked from commit c3276ac77b2c5411a0e8b769e8957041f71e62e8) --- env/AWSPW.env | 52 ++++++++-------- env/GAEA.env | 8 +-- env/HERA.env | 144 +++++++++++++++++++++---------------------- env/HERCULES.env | 140 +++++++++++++++++++++--------------------- env/JET.env | 128 +++++++++++++++++++------------------- env/ORION.env | 156 +++++++++++++++++++++++------------------------ env/WCOSS2.env | 134 ++++++++++++++++++++-------------------- 7 files changed, 381 insertions(+), 381 deletions(-) diff --git a/env/AWSPW.env b/env/AWSPW.env index a4f598d3d7c..4c2e5e5e6fb 100755 --- a/env/AWSPW.env +++ b/env/AWSPW.env @@ -21,10 +21,10 @@ ulimit -a if [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then - ppn="npe_node_${step}_${RUN}" - [[ -z "${!ppn+0}" ]] && ppn="npe_node_${step}" - nprocs="npe_${step}_${RUN}" - [[ -z ${!nprocs+0} ]] && nprocs="npe_${step}" + ppn="npe_node_${RUN}" + [[ -z "${!ppn+0}" ]] && ppn="npe_node" + nprocs="npe_${RUN}" + [[ -z ${!nprocs+0} ]] && nprocs="npe" (( nnodes = (${!nprocs}+${!ppn}-1)/${!ppn} )) (( ntasks = nnodes*${!ppn} )) @@ -34,11 +34,11 @@ if [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then elif [[ "${step}" = "post" ]]; then - nth_max=$((npe_node_max / npe_node_post)) + nth_max=$((npe_node_max / npe_node)) export NTHREADS_NP=${nth_np:-1} [[ ${NTHREADS_NP} -gt ${nth_max} ]] && export NTHREADS_NP=${nth_max} - export APRUN_NP="${launcher} -n ${npe_post}" + export APRUN_NP="${launcher} -n ${npe}" export NTHREADS_DWN=${nth_dwn:-1} [[ ${NTHREADS_DWN} -gt ${nth_max} ]] && export NTHREADS_DWN=${nth_max} @@ -46,11 +46,11 @@ elif [[ "${step}" = "post" ]]; then elif [[ "${step}" = "ecen" ]]; then - nth_max=$((npe_node_max / npe_node_ecen)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ECEN=${nth_ecen:-${nth_max}} + export NTHREADS_ECEN=${nth:-${nth_max}} [[ ${NTHREADS_ECEN} -gt ${nth_max} ]] && export NTHREADS_ECEN=${nth_max} - export APRUN_ECEN="${launcher} -n ${npe_ecen}" + export APRUN_ECEN="${launcher} -n ${npe}" export NTHREADS_CHGRES=${nth_chgres:-12} [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} @@ -58,37 +58,37 @@ elif [[ "${step}" = "ecen" ]]; then export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} - export APRUN_CALCINC="${launcher} -n ${npe_ecen}" + export APRUN_CALCINC="${launcher} -n ${npe}" elif [[ "${step}" = "esfc" ]]; then - nth_max=$((npe_node_max / npe_node_esfc)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ESFC=${nth_esfc:-${nth_max}} + export NTHREADS_ESFC=${nth:-${nth_max}} [[ ${NTHREADS_ESFC} -gt ${nth_max} ]] && export NTHREADS_ESFC=${nth_max} - export APRUN_ESFC="${launcher} -n ${npe_esfc}" + export APRUN_ESFC="${launcher} -n ${npe}" export NTHREADS_CYCLE=${nth_cycle:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - export APRUN_CYCLE="${launcher} -n ${npe_esfc}" + export APRUN_CYCLE="${launcher} -n ${npe}" elif [[ "${step}" = "epos" ]]; then - nth_max=$((npe_node_max / npe_node_epos)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_EPOS=${nth_epos:-${nth_max}} + export NTHREADS_EPOS=${nth:-${nth_max}} [[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max} - export APRUN_EPOS="${launcher} -n ${npe_epos}" + export APRUN_EPOS="${launcher} -n ${npe}" elif [[ "${step}" = "postsnd" ]]; then export CFP_MP="YES" - nth_max=$((npe_node_max / npe_node_postsnd)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_POSTSND=${nth_postsnd:-1} + export NTHREADS_POSTSND=${nth:-1} [[ ${NTHREADS_POSTSND} -gt ${nth_max} ]] && export NTHREADS_POSTSND=${nth_max} - export APRUN_POSTSND="${launcher} -n ${npe_postsnd}" + export APRUN_POSTSND="${launcher} -n ${npe}" export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} @@ -96,19 +96,19 @@ elif [[ "${step}" = "postsnd" ]]; then elif [[ "${step}" = "awips" ]]; then - nth_max=$((npe_node_max / npe_node_awips)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_AWIPS=${nth_awips:-2} + export NTHREADS_AWIPS=${nth:-2} [[ ${NTHREADS_AWIPS} -gt ${nth_max} ]] && export NTHREADS_AWIPS=${nth_max} - export APRUN_AWIPSCFP="${launcher} -n ${npe_awips} ${mpmd_opt}" + export APRUN_AWIPSCFP="${launcher} -n ${npe} ${mpmd_opt}" elif [[ "${step}" = "fit2obs" ]]; then - nth_max=$((npe_node_max / npe_node_fit2obs)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_FIT2OBS=${nth_fit2obs:-1} + export NTHREADS_FIT2OBS=${nth:-1} [[ ${NTHREADS_FIT2OBS} -gt ${nth_max} ]] && export NTHREADS_FIT2OBS=${nth_max} - export MPIRUN="${launcher} -n ${npe_fit2obs}" + export MPIRUN="${launcher} -n ${npe}" fi diff --git a/env/GAEA.env b/env/GAEA.env index 5509a29a3f8..7352e373ba0 100755 --- a/env/GAEA.env +++ b/env/GAEA.env @@ -17,10 +17,10 @@ ulimit -a if [[ "${step}" = "fcst" ]]; then - ppn="npe_node_${step}_${RUN}" - [[ -z "${!ppn+0}" ]] && ppn="npe_node_${step}" - nprocs="npe_${step}_${RUN}" - [[ -z ${!nprocs+0} ]] && nprocs="npe_${step}" + ppn="npe_node_${RUN}" + [[ -z "${!ppn+0}" ]] && ppn="npe_node" + nprocs="npe_${RUN}" + [[ -z ${!nprocs+0} ]] && nprocs="npe" (( nnodes = (${!nprocs}+${!ppn}-1)/${!ppn} )) (( ntasks = nnodes*${!ppn} )) diff --git a/env/HERA.env b/env/HERA.env index db63f0bfa58..ca08145d790 100755 --- a/env/HERA.env +++ b/env/HERA.env @@ -33,7 +33,7 @@ fi if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then - nth_max=$((npe_node_max / npe_node_prep)) + nth_max=$((npe_node_max / npe_node)) export POE="NO" export BACK="NO" @@ -57,60 +57,60 @@ elif [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step} elif [[ "${step}" = "atmanlvar" ]]; then - nth_max=$((npe_node_max / npe_node_atmanlvar)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMANLVAR=${nth_atmanlvar:-${nth_max}} + export NTHREADS_ATMANLVAR=${nth:-${nth_max}} [[ ${NTHREADS_ATMANLVAR} -gt ${nth_max} ]] && export NTHREADS_ATMANLVAR=${nth_max} - export APRUN_ATMANLVAR="${launcher} -n ${npe_atmanlvar} --cpus-per-task=${NTHREADS_ATMANLVAR}" + export APRUN_ATMANLVAR="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMANLVAR}" elif [[ "${step}" = "atmensanlletkf" ]]; then - nth_max=$((npe_node_max / npe_node_atmensanlletkf)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMENSANLLETKF=${nth_atmensanlletkf:-${nth_max}} + export NTHREADS_ATMENSANLLETKF=${nth:-${nth_max}} [[ ${NTHREADS_ATMENSANLLETKF} -gt ${nth_max} ]] && export NTHREADS_ATMENSANLLETKF=${nth_max} - export APRUN_ATMENSANLLETKF="${launcher} -n ${npe_atmensanlletkf} --cpus-per-task=${NTHREADS_ATMENSANLLETKF}" + export APRUN_ATMENSANLLETKF="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMENSANLLETKF}" elif [[ "${step}" = "atmensanlfv3inc" ]]; then - nth_max=$((npe_node_max / npe_node_atmensanlfv3inc)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMENSANLFV3INC=${nth_atmensanlfv3inc:-${nth_max}} + export NTHREADS_ATMENSANLFV3INC=${nth:-${nth_max}} [[ ${NTHREADS_ATMENSANLFV3INC} -gt ${nth_max} ]] && export NTHREADS_ATMENSANLFV3INC=${nth_max} - export APRUN_ATMENSANLFV3INC="${launcher} -n ${npe_atmensanlfv3inc} --cpus-per-task=${NTHREADS_ATMENSANLFV3INC}" + export APRUN_ATMENSANLFV3INC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMENSANLFV3INC}" elif [[ "${step}" = "aeroanlrun" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_aeroanlrun)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_AEROANL=${nth_aeroanlrun:-${nth_max}} + export NTHREADS_AEROANL=${nth:-${nth_max}} [[ ${NTHREADS_AEROANL} -gt ${nth_max} ]] && export NTHREADS_AEROANL=${nth_max} - export APRUN_AEROANL="${launcher} -n ${npe_aeroanlrun} --cpus-per-task=${NTHREADS_AEROANL}" + export APRUN_AEROANL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_AEROANL}" elif [[ "${step}" = "atmanlfv3inc" ]]; then - nth_max=$((npe_node_max / npe_node_atmanlfv3inc)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMANLFV3INC=${nth_atmanlfv3inc:-${nth_max}} + export NTHREADS_ATMANLFV3INC=${nth:-${nth_max}} [[ ${NTHREADS_ATMANLFV3INC} -gt ${nth_max} ]] && export NTHREADS_ATMANLFV3INC=${nth_max} - export APRUN_ATMANLFV3INC="${launcher} -n ${npe_atmanlfv3inc} --cpus-per-task=${NTHREADS_ATMANLFV3INC}" + export APRUN_ATMANLFV3INC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMANLFV3INC}" elif [[ "${step}" = "prepobsaero" ]]; then - nth_max=$((npe_node_max / npe_node_prepobsaero)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_PREPOBSAERO=${nth_prepobsaero:-1} - export APRUN_PREPOBSAERO="${launcher} -n ${npe_prepobsaero} --cpus-per-task=${NTHREADS_PREPOBSAERO}" + export NTHREADS_PREPOBSAERO=${nth:-1} + export APRUN_PREPOBSAERO="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_PREPOBSAERO}" elif [[ "${step}" = "snowanl" ]]; then - nth_max=$((npe_node_max / npe_node_snowanl)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_SNOWANL=${nth_snowanl:-${nth_max}} + export NTHREADS_SNOWANL=${nth:-${nth_max}} [[ ${NTHREADS_SNOWANL} -gt ${nth_max} ]] && export NTHREADS_SNOWANL=${nth_max} - export APRUN_SNOWANL="${launcher} -n ${npe_snowanl} --cpus-per-task=${NTHREADS_SNOWANL}" + export APRUN_SNOWANL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_SNOWANL}" export APRUN_APPLY_INCR="${launcher} -n 6" @@ -118,35 +118,35 @@ elif [[ "${step}" = "ocnanalbmat" ]]; then export APRUNCFP="${launcher} -n \$ncmd --multi-prog" - export APRUN_OCNANAL="${launcher} -n ${npe_ocnanalbmat}" + export APRUN_OCNANAL="${launcher} -n ${npe}" elif [[ "${step}" = "ocnanalrun" ]]; then export APRUNCFP="${launcher} -n \$ncmd --multi-prog" - export APRUN_OCNANAL="${launcher} -n ${npe_ocnanalrun}" + export APRUN_OCNANAL="${launcher} -n ${npe}" elif [[ "${step}" = "ocnanalchkpt" ]]; then export APRUNCFP="${launcher} -n \$ncmd --multi-prog" - export APRUN_OCNANAL="${launcher} -n ${npe_ocnanalchkpt}" + export APRUN_OCNANAL="${launcher} -n ${npe}" elif [[ "${step}" = "ocnanalecen" ]]; then - nth_max=$((npe_node_max / npe_node_ocnanalecen)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNANALECEN=${nth_ocnanalecen:-${nth_max}} + export NTHREADS_OCNANALECEN=${nth:-${nth_max}} [[ ${NTHREADS_OCNANALECEN} -gt ${nth_max} ]] && export NTHREADS_OCNANALECEN=${nth_max} - export APRUN_OCNANALECEN="${launcher} -n ${npe_ocnanalecen} --cpus-per-task=${NTHREADS_OCNANALECEN}" + export APRUN_OCNANALECEN="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_OCNANALECEN}" elif [[ "${step}" = "ocnanalletkf" ]]; then - nth_max=$((npe_node_max / npe_node_ocnanalletkf)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNANALLETKF=${nth_ocnanalletkf:-${nth_max}} + export NTHREADS_OCNANALLETKF=${nth:-${nth_max}} [[ ${NTHREADS_OCNANALLETKF} -gt ${nth_max} ]] && export NTHREADS_OCNANALLETKF=${nth_max} - export APRUN_OCNANALLETKF="${launcher} -n ${npe_ocnanalletkf} --cpus-per-task=${NTHREADS_OCNANALLETKF}" + export APRUN_OCNANALLETKF="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_OCNANALLETKF}" elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then @@ -157,11 +157,11 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_anal)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_GSI=${nth_anal:-${nth_max}} + export NTHREADS_GSI=${nth:-${nth_max}} [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe_anal}} --cpus-per-task=${NTHREADS_GSI}" + export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} --cpus-per-task=${NTHREADS_GSI}" export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} @@ -178,9 +178,9 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then elif [[ "${step}" = "sfcanl" ]]; then - nth_max=$((npe_node_max / npe_node_sfcanl)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_CYCLE=${nth_sfcanl:-14} + export NTHREADS_CYCLE=${nth:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} npe_sfcanl=${ntiles:-6} export APRUN_CYCLE="${launcher} -n ${npe_sfcanl} --cpus-per-task=${NTHREADS_CYCLE}" @@ -190,11 +190,11 @@ elif [[ "${step}" = "eobs" ]]; then export MKL_NUM_THREADS=4 export MKL_CBWR=AUTO - nth_max=$((npe_node_max / npe_node_eobs)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_GSI=${nth_eobs:-${nth_max}} + export NTHREADS_GSI=${nth:-${nth_max}} [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe_eobs}} --cpus-per-task=${NTHREADS_GSI}" + export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} --cpus-per-task=${NTHREADS_GSI}" export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} @@ -202,11 +202,11 @@ elif [[ "${step}" = "eobs" ]]; then elif [[ "${step}" = "eupd" ]]; then - nth_max=$((npe_node_max / npe_node_eupd)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ENKF=${nth_eupd:-${nth_max}} + export NTHREADS_ENKF=${nth:-${nth_max}} [[ ${NTHREADS_ENKF} -gt ${nth_max} ]] && export NTHREADS_ENKF=${nth_max} - export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe_eupd}} --cpus-per-task=${NTHREADS_ENKF}" + export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe}} --cpus-per-task=${NTHREADS_ENKF}" export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} @@ -214,10 +214,10 @@ elif [[ "${step}" = "eupd" ]]; then elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then - ppn="npe_node_${step}_${RUN}" - [[ -z "${!ppn+0}" ]] && ppn="npe_node_${step}" - nprocs="npe_${step}_${RUN}" - [[ -z ${!nprocs+0} ]] && nprocs="npe_${step}" + ppn="npe_node_${RUN}" + [[ -z "${!ppn+0}" ]] && ppn="npe_node" + nprocs="npe_${RUN}" + [[ -z ${!nprocs+0} ]] && nprocs="npe" (( nnodes = (${!nprocs}+${!ppn}-1)/${!ppn} )) (( ntasks = nnodes*${!ppn} )) @@ -228,11 +228,11 @@ elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then elif [[ "${step}" = "upp" ]]; then - nth_max=$((npe_node_max / npe_node_upp)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_UPP=${nth_upp:-1} + export NTHREADS_UPP=${nth:-1} [[ ${NTHREADS_UPP} -gt ${nth_max} ]] && export NTHREADS_UPP=${nth_max} - export APRUN_UPP="${launcher} -n ${npe_upp} --cpus-per-task=${NTHREADS_UPP}" + export APRUN_UPP="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_UPP}" elif [[ "${step}" = "atmos_products" ]]; then @@ -240,18 +240,18 @@ elif [[ "${step}" = "atmos_products" ]]; then elif [[ "${step}" = "oceanice_products" ]]; then - nth_max=$((npe_node_max / npe_node_oceanice_products)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNICEPOST=${nth_oceanice_products:-1} + export NTHREADS_OCNICEPOST=${nth:-1} export APRUN_OCNICEPOST="${launcher} -n 1 --cpus-per-task=${NTHREADS_OCNICEPOST}" elif [[ "${step}" = "ecen" ]]; then - nth_max=$((npe_node_max / npe_node_ecen)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ECEN=${nth_ecen:-${nth_max}} + export NTHREADS_ECEN=${nth:-${nth_max}} [[ ${NTHREADS_ECEN} -gt ${nth_max} ]] && export NTHREADS_ECEN=${nth_max} - export APRUN_ECEN="${launcher} -n ${npe_ecen} --cpus-per-task=${NTHREADS_ECEN}" + export APRUN_ECEN="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ECEN}" export NTHREADS_CHGRES=${nth_chgres:-12} [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} @@ -259,37 +259,37 @@ elif [[ "${step}" = "ecen" ]]; then export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} - export APRUN_CALCINC="${launcher} -n ${npe_ecen} --cpus-per-task=${NTHREADS_CALCINC}" + export APRUN_CALCINC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_CALCINC}" elif [[ "${step}" = "esfc" ]]; then - nth_max=$((npe_node_max / npe_node_esfc)) + nth_max=$((npe_node_max / npe_node)) export NTHREADS_ESFC=${nth_esfc:-${nth_max}} [[ ${NTHREADS_ESFC} -gt ${nth_max} ]] && export NTHREADS_ESFC=${nth_max} - export APRUN_ESFC="${launcher} -n ${npe_esfc} --cpus-per-task=${NTHREADS_ESFC}" + export APRUN_ESFC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ESFC}" export NTHREADS_CYCLE=${nth_cycle:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - export APRUN_CYCLE="${launcher} -n ${npe_esfc} --cpus-per-task=${NTHREADS_CYCLE}" + export APRUN_CYCLE="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_CYCLE}" elif [[ "${step}" = "epos" ]]; then - nth_max=$((npe_node_max / npe_node_epos)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_EPOS=${nth_epos:-${nth_max}} + export NTHREADS_EPOS=${nth:-${nth_max}} [[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max} - export APRUN_EPOS="${launcher} -n ${npe_epos} --cpus-per-task=${NTHREADS_EPOS}" + export APRUN_EPOS="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_EPOS}" elif [[ "${step}" = "postsnd" ]]; then export CFP_MP="YES" - nth_max=$((npe_node_max / npe_node_postsnd)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_POSTSND=${nth_postsnd:-1} + export NTHREADS_POSTSND=${nth:-1} [[ ${NTHREADS_POSTSND} -gt ${nth_max} ]] && export NTHREADS_POSTSND=${nth_max} - export APRUN_POSTSND="${launcher} -n ${npe_postsnd} --cpus-per-task=${NTHREADS_POSTSND}" + export APRUN_POSTSND="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_POSTSND}" export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} @@ -297,27 +297,27 @@ elif [[ "${step}" = "postsnd" ]]; then elif [[ "${step}" = "awips" ]]; then - nth_max=$((npe_node_max / npe_node_awips)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_AWIPS=${nth_awips:-2} + export NTHREADS_AWIPS=${nth:-2} [[ ${NTHREADS_AWIPS} -gt ${nth_max} ]] && export NTHREADS_AWIPS=${nth_max} - export APRUN_AWIPSCFP="${launcher} -n ${npe_awips} ${mpmd_opt}" + export APRUN_AWIPSCFP="${launcher} -n ${npe} ${mpmd_opt}" elif [[ "${step}" = "gempak" ]]; then export CFP_MP="YES" - nth_max=$((npe_node_max / npe_node_gempak)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_GEMPAK=${nth_gempak:-1} + export NTHREADS_GEMPAK=${nth:-1} [[ ${NTHREADS_GEMPAK} -gt ${nth_max} ]] && export NTHREADS_GEMPAK=${nth_max} elif [[ "${step}" = "fit2obs" ]]; then - nth_max=$((npe_node_max / npe_node_fit2obs)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_FIT2OBS=${nth_fit2obs:-1} + export NTHREADS_FIT2OBS=${nth:-1} [[ ${NTHREADS_FIT2OBS} -gt ${nth_max} ]] && export NTHREADS_FIT2OBS=${nth_max} - export MPIRUN="${launcher} -n ${npe_fit2obs} --cpus-per-task=${NTHREADS_FIT2OBS}" + export MPIRUN="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_FIT2OBS}" fi diff --git a/env/HERCULES.env b/env/HERCULES.env index 77e57e066d1..da3051771af 100755 --- a/env/HERCULES.env +++ b/env/HERCULES.env @@ -31,7 +31,7 @@ ulimit -a case ${step} in "prep" | "prepbufr") - nth_max=$((npe_node_max / npe_node_prep)) + nth_max=$((npe_node_max / npe_node)) export POE="NO" export BACK=${BACK:-"YES"} @@ -56,59 +56,59 @@ case ${step} in ;; "atmanlvar") - nth_max=$((npe_node_max / npe_node_atmanlvar)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMANLVAR=${nth_atmanlvar:-${nth_max}} + export NTHREADS_ATMANLVAR=${nth:-${nth_max}} [[ ${NTHREADS_ATMANLVAR} -gt ${nth_max} ]] && export NTHREADS_ATMANLVAR=${nth_max} - export APRUN_ATMANLVAR="${launcher} -n ${npe_atmanlvar} --cpus-per-task=${NTHREADS_ATMANLVAR}" + export APRUN_ATMANLVAR="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMANLVAR}" ;; "atmanlfv3inc") - nth_max=$((npe_node_max / npe_node_atmanlfv3inc)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMANLFV3INC=${nth_atmanlfv3inc:-${nth_max}} + export NTHREADS_ATMANLFV3INC=${nth:-${nth_max}} [[ ${NTHREADS_ATMANLFV3INC} -gt ${nth_max} ]] && export NTHREADS_ATMANLFV3INC=${nth_max} - export APRUN_ATMANLFV3INC="${launcher} -n ${npe_atmanlfv3inc} --cpus-per-task=${NTHREADS_ATMANLFV3INC}" + export APRUN_ATMANLFV3INC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMANLFV3INC}" ;; "atmensanlletkf") - nth_max=$((npe_node_max / npe_node_atmensanlletkf)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMENSANLLETKF=${nth_atmensanlletkf:-${nth_max}} + export NTHREADS_ATMENSANLLETKF=${nth:-${nth_max}} [[ ${NTHREADS_ATMENSANLLETKF} -gt ${nth_max} ]] && export NTHREADS_ATMENSANLLETKF=${nth_max} - export APRUN_ATMENSANLLETKF="${launcher} -n ${npe_atmensanlletkf} --cpus-per-task=${NTHREADS_ATMENSANLLETKF}" + export APRUN_ATMENSANLLETKF="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMENSANLLETKF}" ;; "atmensanlfv3inc") - nth_max=$((npe_node_max / npe_node_atmensanlfv3inc)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMENSANLFV3INC=${nth_atmensanlfv3inc:-${nth_max}} + export NTHREADS_ATMENSANLFV3INC=${nth:-${nth_max}} [[ ${NTHREADS_ATMENSANLFV3INC} -gt ${nth_max} ]] && export NTHREADS_ATMENSANLFV3INC=${nth_max} - export APRUN_ATMENSANLFV3INC="${launcher} -n ${npe_atmensanlfv3inc} --cpus-per-task=${NTHREADS_ATMENSANLFV3INC}" + export APRUN_ATMENSANLFV3INC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMENSANLFV3INC}" ;; "aeroanlrun") export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_aeroanlrun)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_AEROANL=${nth_aeroanlrun:-${nth_max}} + export NTHREADS_AEROANL=${nth:-${nth_max}} [[ ${NTHREADS_AEROANL} -gt ${nth_max} ]] && export NTHREADS_AEROANL=${nth_max} - export APRUN_AEROANL="${launcher} -n ${npe_aeroanlrun} --cpus-per-task=${NTHREADS_AEROANL}" + export APRUN_AEROANL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_AEROANL}" ;; "prepobsaero") - nth_max=$((npe_node_max / npe_node_prepobsaero)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_PREPOBSAERO=${nth_prepobsaero:-1} - export APRUN_PREPOBSAERO="${launcher} -n ${npe_prepobsaero} --cpus-per-task=${NTHREADS_PREPOBSAERO}" + export NTHREADS_PREPOBSAERO=${nth:-1} + export APRUN_PREPOBSAERO="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_PREPOBSAERO}" ;; "snowanl") - nth_max=$((npe_node_max / npe_node_snowanl)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_SNOWANL=${nth_snowanl:-${nth_max}} + export NTHREADS_SNOWANL=${nth:-${nth_max}} [[ ${NTHREADS_SNOWANL} -gt ${nth_max} ]] && export NTHREADS_SNOWANL=${nth_max} - export APRUN_SNOWANL="${launcher} -n ${npe_snowanl} --cpus-per-task=${NTHREADS_SNOWANL}" + export APRUN_SNOWANL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_SNOWANL}" export APRUN_APPLY_INCR="${launcher} -n 6" ;; @@ -116,31 +116,31 @@ case ${step} in export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_ocnanalbmat)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNANAL=${nth_ocnanalbmat:-${nth_max}} + export NTHREADS_OCNANAL=${nth:-${nth_max}} [[ ${NTHREADS_OCNANAL} -gt ${nth_max} ]] && export NTHREADS_OCNANAL=${nth_max} - export APRUN_OCNANAL="${launcher} -n ${npe_ocnanalbmat} --cpus-per-task=${NTHREADS_OCNANAL}" + export APRUN_OCNANAL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_OCNANAL}" ;; "ocnanalrun") export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_ocnanalrun)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNANAL=${nth_ocnanalrun:-${nth_max}} + export NTHREADS_OCNANAL=${nth:-${nth_max}} [[ ${NTHREADS_OCNANAL} -gt ${nth_max} ]] && export NTHREADS_OCNANAL=${nth_max} - export APRUN_OCNANAL="${launcher} -n ${npe_ocnanalrun} --cpus-per-task=${NTHREADS_OCNANAL}" + export APRUN_OCNANAL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_OCNANAL}" ;; "ocnanalchkpt") export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_ocnanalchkpt)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNANAL=${nth_ocnanalchkpt:-${nth_max}} + export NTHREADS_OCNANAL=${nth:-${nth_max}} [[ ${NTHREADS_OCNANAL} -gt ${nth_max} ]] && export NTHREADS_OCNANAL=${nth_max} - export APRUN_OCNANAL="${launcher} -n ${npe_ocnanalchkpt} --cpus-per-task=${NTHREADS_OCNANAL}" + export APRUN_OCNANAL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_OCNANAL}" ;; "anal" | "analcalc") @@ -151,11 +151,11 @@ case ${step} in export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_anal)) + nth_max=$((npe_node_max / npe_node)) export NTHREADS_GSI=${nth_anal:-${nth_max}} [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe_anal}} --cpus-per-task=${NTHREADS_GSI}" + export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} --cpus-per-task=${NTHREADS_GSI}" export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} @@ -171,9 +171,9 @@ case ${step} in export APRUN_GAUSFCANL="${launcher} -n ${npe_gausfcanl} --cpus-per-task=${NTHREADS_GAUSFCANL}" ;; "sfcanl") - nth_max=$((npe_node_max / npe_node_sfcanl)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_CYCLE=${nth_sfcanl:-14} + export NTHREADS_CYCLE=${nth:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} npe_sfcanl=${ntiles:-6} export APRUN_CYCLE="${launcher} -n ${npe_sfcanl} --cpus-per-task=${NTHREADS_CYCLE}" @@ -187,11 +187,11 @@ case ${step} in export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_eobs)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_GSI=${nth_eobs:-${nth_max}} + export NTHREADS_GSI=${nth:-${nth_max}} [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe_eobs}} --cpus-per-task=${NTHREADS_GSI}" + export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} --cpus-per-task=${NTHREADS_GSI}" ;; "eupd") @@ -199,20 +199,20 @@ case ${step} in export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_eupd)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ENKF=${nth_eupd:-${nth_max}} + export NTHREADS_ENKF=${nth:-${nth_max}} [[ ${NTHREADS_ENKF} -gt ${nth_max} ]] && export NTHREADS_ENKF=${nth_max} - export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe_eupd}} --cpus-per-task=${NTHREADS_ENKF}" + export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe}} --cpus-per-task=${NTHREADS_ENKF}" ;; "fcst" | "efcs") export OMP_STACKSIZE=512M - ppn="npe_node_${step}_${RUN}" - [[ -z "${!ppn+0}" ]] && ppn="npe_node_${step}" - nprocs="npe_${step}_${RUN}" - [[ -z ${!nprocs+0} ]] && nprocs="npe_${step}" + ppn="npe_node_${RUN}" + [[ -z "${!ppn+0}" ]] && ppn="npe_node" + nprocs="npe_${RUN}" + [[ -z ${!nprocs+0} ]] && nprocs="npe" (( nnodes = (${!nprocs}+${!ppn}-1)/${!ppn} )) (( ntasks = nnodes*${!ppn} )) @@ -223,11 +223,11 @@ case ${step} in "upp") - nth_max=$((npe_node_max / npe_node_upp)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_UPP=${nth_upp:-1} + export NTHREADS_UPP=${nth:-1} [[ ${NTHREADS_UPP} -gt ${nth_max} ]] && export NTHREADS_UPP=${nth_max} - export APRUN_UPP="${launcher} -n ${npe_upp} --cpus-per-task=${NTHREADS_UPP}" + export APRUN_UPP="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_UPP}" ;; "atmos_products") @@ -237,19 +237,19 @@ case ${step} in "oceanice_products") - nth_max=$((npe_node_max / npe_node_oceanice_products)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNICEPOST=${nth_oceanice_products:-1} + export NTHREADS_OCNICEPOST=${nth:-1} export APRUN_OCNICEPOST="${launcher} -n 1 --cpus-per-task=${NTHREADS_OCNICEPOST}" ;; "ecen") - nth_max=$((npe_node_max / npe_node_ecen)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ECEN=${nth_ecen:-${nth_max}} + export NTHREADS_ECEN=${nth:-${nth_max}} [[ ${NTHREADS_ECEN} -gt ${nth_max} ]] && export NTHREADS_ECEN=${nth_max} - export APRUN_ECEN="${launcher} -n ${npe_ecen} --cpus-per-task=${NTHREADS_ECEN}" + export APRUN_ECEN="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ECEN}" export NTHREADS_CHGRES=${nth_chgres:-12} [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} @@ -257,40 +257,40 @@ case ${step} in export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} - export APRUN_CALCINC="${launcher} -n ${npe_ecen} --cpus-per-task=${NTHREADS_CALCINC}" + export APRUN_CALCINC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_CALCINC}" ;; "esfc") - nth_max=$((npe_node_max / npe_node_esfc)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ESFC=${nth_esfc:-${nth_max}} + export NTHREADS_ESFC=${nth:-${nth_max}} [[ ${NTHREADS_ESFC} -gt ${nth_max} ]] && export NTHREADS_ESFC=${nth_max} - export APRUN_ESFC="${launcher} -n ${npe_esfc} --cpus-per-task=${NTHREADS_ESFC}" + export APRUN_ESFC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ESFC}" export NTHREADS_CYCLE=${nth_cycle:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - export APRUN_CYCLE="${launcher} -n ${npe_esfc} --cpus-per-task=${NTHREADS_CYCLE}" + export APRUN_CYCLE="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_CYCLE}" ;; "epos") - nth_max=$((npe_node_max / npe_node_epos)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_EPOS=${nth_epos:-${nth_max}} + export NTHREADS_EPOS=${nth:-${nth_max}} [[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max} - export APRUN_EPOS="${launcher} -n ${npe_epos} --cpus-per-task=${NTHREADS_EPOS}" + export APRUN_EPOS="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_EPOS}" ;; "postsnd") export CFP_MP="YES" - nth_max=$((npe_node_max / npe_node_postsnd)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_POSTSND=${nth_postsnd:-1} + export NTHREADS_POSTSND=${nth:-1} [[ ${NTHREADS_POSTSND} -gt ${nth_max} ]] && export NTHREADS_POSTSND=${nth_max} - export APRUN_POSTSND="${launcher} -n ${npe_postsnd} --cpus-per-task=${NTHREADS_POSTSND}" + export APRUN_POSTSND="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_POSTSND}" export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} @@ -299,11 +299,11 @@ case ${step} in ;; "awips") - nth_max=$((npe_node_max / npe_node_awips)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_AWIPS=${nth_awips:-2} + export NTHREADS_AWIPS=${nth:-2} [[ ${NTHREADS_AWIPS} -gt ${nth_max} ]] && export NTHREADS_AWIPS=${nth_max} - export APRUN_AWIPSCFP="${launcher} -n ${npe_awips} ${mpmd_opt}" + export APRUN_AWIPSCFP="${launcher} -n ${npe} ${mpmd_opt}" ;; "gempak") @@ -313,11 +313,11 @@ case ${step} in ;; "fit2obs") - nth_max=$((npe_node_max / npe_node_fit2obs)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_FIT2OBS=${nth_fit2obs:-1} + export NTHREADS_FIT2OBS=${nth:-1} [[ ${NTHREADS_FIT2OBS} -gt ${nth_max} ]] && export NTHREADS_FIT2OBS=${nth_max} - export MPIRUN="${launcher} -n ${npe_fit2obs} --cpus-per-task=${NTHREADS_FIT2OBS}" + export MPIRUN="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_FIT2OBS}" ;; *) diff --git a/env/JET.env b/env/JET.env index bb9826f3317..311893ef440 100755 --- a/env/JET.env +++ b/env/JET.env @@ -21,7 +21,7 @@ ulimit -a if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then - nth_max=$((npe_node_max / npe_node_prep)) + nth_max=$((npe_node_max / npe_node)) export POE="NO" export BACK="NO" @@ -45,82 +45,82 @@ elif [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step} elif [[ "${step}" = "atmanlvar" ]]; then - nth_max=$((npe_node_max / npe_node_atmanlvar)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMANLVAR=${nth_atmanlvar:-${nth_max}} + export NTHREADS_ATMANLVAR=${nth:-${nth_max}} [[ ${NTHREADS_ATMANLVAR} -gt ${nth_max} ]] && export NTHREADS_ATMANLVAR=${nth_max} - export APRUN_ATMANLVAR="${launcher} -n ${npe_atmanlvar}" + export APRUN_ATMANLVAR="${launcher} -n ${npe}" elif [[ "${step}" = "atmensanlletkf" ]]; then - nth_max=$((npe_node_max / npe_node_atmensanlletkf)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMENSANLLETKF=${nth_atmensanlletkf:-${nth_max}} + export NTHREADS_ATMENSANLLETKF=${nth:-${nth_max}} [[ ${NTHREADS_ATMENSANLLETKF} -gt ${nth_max} ]] && export NTHREADS_ATMENSANLLETKF=${nth_max} - export APRUN_ATMENSANLLETKF="${launcher} ${npe_atmensanlletkf}" + export APRUN_ATMENSANLLETKF="${launcher} ${npe}" elif [[ "${step}" = "atmensanlfv3inc" ]]; then - nth_max=$((npe_node_max / npe_node_atmensanlfv3inc)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMENSANLFV3INC=${nth_atmensanlfv3inc:-${nth_max}} + export NTHREADS_ATMENSANLFV3INC=${nth:-${nth_max}} [[ ${NTHREADS_ATMENSANLFV3INC} -gt ${nth_max} ]] && export NTHREADS_ATMENSANLFV3INC=${nth_max} - export APRUN_ATMENSANLFV3INC="${launcher} ${npe_atmensanlfv3inc}" + export APRUN_ATMENSANLFV3INC="${launcher} ${npe}" elif [[ "${step}" = "aeroanlrun" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_aeroanlrun)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_AEROANL=${nth_aeroanlrun:-${nth_max}} + export NTHREADS_AEROANL=${nth:-${nth_max}} [[ ${NTHREADS_AEROANL} -gt ${nth_max} ]] && export NTHREADS_AEROANL=${nth_max} - export APRUN_AEROANL="${launcher} -n ${npe_aeroanlrun}" + export APRUN_AEROANL="${launcher} -n ${npe}" elif [[ "${step}" = "prepobsaero" ]]; then - nth_max=$((npe_node_max / npe_node_prepobsaero)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_PREPOBSAERO=${nth_prepobsaero:-1} - export APRUN_PREPOBSAERO="${launcher} -n ${npe_prepobsaero} --cpus-per-task=${NTHREADS_PREPOBSAERO}" + export NTHREADS_PREPOBSAERO=${nth:-1} + export APRUN_PREPOBSAERO="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_PREPOBSAERO}" elif [[ "${step}" = "snowanl" ]]; then - nth_max=$((npe_node_max / npe_node_snowanl)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_SNOWANL=${nth_snowanl:-${nth_max}} + export NTHREADS_SNOWANL=${nth:-${nth_max}} [[ ${NTHREADS_SNOWANL} -gt ${nth_max} ]] && export NTHREADS_SNOWANL=${nth_max} - export APRUN_SNOWANL="${launcher} -n ${npe_snowanl}" + export APRUN_SNOWANL="${launcher} -n ${npe}" export APRUN_APPLY_INCR="${launcher} -n 6" elif [[ "${step}" = "atmanlfv3inc" ]]; then - nth_max=$((npe_node_max / npe_node_atmanlfv3inc)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMANLFV3INC=${nth_atmanlfv3inc:-${nth_max}} + export NTHREADS_ATMANLFV3INC=${nth:-${nth_max}} [[ ${NTHREADS_ATMANLFV3INC} -gt ${nth_max} ]] && export NTHREADS_ATMANLFV3INC=${nth_max} - export APRUN_ATMANLFV3INC="${launcher} -n ${npe_atmanlfv3inc}" + export APRUN_ATMANLFV3INC="${launcher} -n ${npe}" elif [[ "${step}" = "ocnanalbmat" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_ocnanalbmat)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNANAL=${nth_ocnanalbmat:-${nth_max}} + export NTHREADS_OCNANAL=${nth:-${nth_max}} [[ ${NTHREADS_OCNANAL} -gt ${nth_max} ]] && export NTHREADS_OCNANAL=${nth_max} - export APRUN_OCNANAL="${launcher} -n ${npe_ocnanalbmat}" + export APRUN_OCNANAL="${launcher} -n ${npe}" elif [[ "${step}" = "ocnanalrun" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_ocnanalrun)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNANAL=${nth_ocnanalrun:-${nth_max}} + export NTHREADS_OCNANAL=${nth:-${nth_max}} [[ ${NTHREADS_OCNANAL} -gt ${nth_max} ]] && export NTHREADS_OCNANAL=${nth_max} - export APRUN_OCNANAL="${launcher} -n ${npe_ocnanalrun}" + export APRUN_OCNANAL="${launcher} -n ${npe}" elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then @@ -131,11 +131,11 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_anal)) + nth_max=$((npe_node_max / npe_node)) export NTHREADS_GSI=${nth_anal:-${nth_max}} [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe_anal}}" + export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}}" export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} @@ -151,9 +151,9 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export APRUN_GAUSFCANL="${launcher} -n ${npe_gausfcanl}" elif [[ "${step}" = "sfcanl" ]]; then - nth_max=$((npe_node_max / npe_node_sfcanl)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_CYCLE=${nth_sfcanl:-14} + export NTHREADS_CYCLE=${nth:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} npe_sfcanl=${ntiles:-6} export APRUN_CYCLE="${launcher} -n ${npe_sfcanl}" @@ -163,11 +163,11 @@ elif [[ "${step}" = "eobs" ]]; then export MKL_NUM_THREADS=4 export MKL_CBWR=AUTO - nth_max=$((npe_node_max / npe_node_eobs)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_GSI=${nth_eobs:-${nth_max}} + export NTHREADS_GSI=${nth:-${nth_max}} [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe_eobs}}" + export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}}" export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} @@ -175,11 +175,11 @@ elif [[ "${step}" = "eobs" ]]; then elif [[ "${step}" = "eupd" ]]; then - nth_max=$((npe_node_max / npe_node_eupd)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ENKF=${nth_eupd:-${nth_max}} + export NTHREADS_ENKF=${nth:-${nth_max}} [[ ${NTHREADS_ENKF} -gt ${nth_max} ]] && export NTHREADS_ENKF=${nth_max} - export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe_eupd}}" + export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe}}" export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} @@ -187,10 +187,10 @@ elif [[ "${step}" = "eupd" ]]; then elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then - ppn="npe_node_${step}_${RUN}" - [[ -z "${!ppn+0}" ]] && ppn="npe_node_${step}" - nprocs="npe_${step}_${RUN}" - [[ -z ${!nprocs+0} ]] && nprocs="npe_${step}" + ppn="npe_node_${RUN}" + [[ -z "${!ppn+0}" ]] && ppn="npe_node" + nprocs="npe_${RUN}" + [[ -z ${!nprocs+0} ]] && nprocs="npe" (( nnodes = (${!nprocs}+${!ppn}-1)/${!ppn} )) (( ntasks = nnodes*${!ppn} )) @@ -200,11 +200,11 @@ elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then elif [[ "${step}" = "upp" ]]; then - nth_max=$((npe_node_max / npe_node_upp)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_UPP=${nth_upp:-1} + export NTHREADS_UPP=${nth:-1} [[ ${NTHREADS_UPP} -gt ${nth_max} ]] && export NTHREADS_UPP=${nth_max} - export APRUN_UPP="${launcher} -n ${npe_upp}" + export APRUN_UPP="${launcher} -n ${npe}" elif [[ "${step}" = "atmos_products" ]]; then @@ -212,18 +212,18 @@ elif [[ "${step}" = "atmos_products" ]]; then elif [[ "${step}" = "oceanice_products" ]]; then - nth_max=$((npe_node_max / npe_node_oceanice_products)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNICEPOST=${nth_oceanice_products:-1} + export NTHREADS_OCNICEPOST=${nth:-1} export APRUN_OCNICEPOST="${launcher} -n 1 --cpus-per-task=${NTHREADS_OCNICEPOST}" elif [[ "${step}" = "ecen" ]]; then - nth_max=$((npe_node_max / npe_node_ecen)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ECEN=${nth_ecen:-${nth_max}} + export NTHREADS_ECEN=${nth:-${nth_max}} [[ ${NTHREADS_ECEN} -gt ${nth_max} ]] && export NTHREADS_ECEN=${nth_max} - export APRUN_ECEN="${launcher} -n ${npe_ecen}" + export APRUN_ECEN="${launcher} -n ${npe}" export NTHREADS_CHGRES=${nth_chgres:-12} [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} @@ -231,37 +231,37 @@ elif [[ "${step}" = "ecen" ]]; then export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} - export APRUN_CALCINC="${launcher} -n ${npe_ecen}" + export APRUN_CALCINC="${launcher} -n ${npe}" elif [[ "${step}" = "esfc" ]]; then - nth_max=$((npe_node_max / npe_node_esfc)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ESFC=${nth_esfc:-${nth_max}} + export NTHREADS_ESFC=${nth:-${nth_max}} [[ ${NTHREADS_ESFC} -gt ${nth_max} ]] && export NTHREADS_ESFC=${nth_max} - export APRUN_ESFC="${launcher} -n ${npe_esfc}" + export APRUN_ESFC="${launcher} -n ${npe}" export NTHREADS_CYCLE=${nth_cycle:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - export APRUN_CYCLE="${launcher} -n ${npe_esfc}" + export APRUN_CYCLE="${launcher} -n ${npe}" elif [[ "${step}" = "epos" ]]; then - nth_max=$((npe_node_max / npe_node_epos)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_EPOS=${nth_epos:-${nth_max}} + export NTHREADS_EPOS=${nth:-${nth_max}} [[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max} - export APRUN_EPOS="${launcher} -n ${npe_epos}" + export APRUN_EPOS="${launcher} -n ${npe}" elif [[ "${step}" = "postsnd" ]]; then export CFP_MP="YES" - nth_max=$((npe_node_max / npe_node_postsnd)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_POSTSND=${nth_postsnd:-1} + export NTHREADS_POSTSND=${nth:-1} [[ ${NTHREADS_POSTSND} -gt ${nth_max} ]] && export NTHREADS_POSTSND=${nth_max} - export APRUN_POSTSND="${launcher} -n ${npe_postsnd}" + export APRUN_POSTSND="${launcher} -n ${npe}" export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} @@ -277,10 +277,10 @@ elif [[ "${step}" = "gempak" ]]; then elif [[ "${step}" = "fit2obs" ]]; then - nth_max=$((npe_node_max / npe_node_fit2obs)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_FIT2OBS=${nth_fit2obs:-1} + export NTHREADS_FIT2OBS=${nth:-1} [[ ${NTHREADS_FIT2OBS} -gt ${nth_max} ]] && export NTHREADS_FIT2OBS=${nth_max} - export MPIRUN="${launcher} -n ${npe_fit2obs}" + export MPIRUN="${launcher} -n ${npe}" fi diff --git a/env/ORION.env b/env/ORION.env index 502e99e1928..161d4c7f189 100755 --- a/env/ORION.env +++ b/env/ORION.env @@ -28,7 +28,7 @@ ulimit -a if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then - nth_max=$((npe_node_max / npe_node_prep)) + nth_max=$((npe_node_max / npe_node)) export POE="NO" export BACK=${BACK:-"YES"} @@ -53,108 +53,108 @@ elif [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step} elif [[ "${step}" = "atmanlvar" ]]; then - nth_max=$((npe_node_max / npe_node_atmanlvar)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMANLVAR=${nth_atmanlvar:-${nth_max}} + export NTHREADS_ATMANLVAR=${nth:-${nth_max}} [[ ${NTHREADS_ATMANLVAR} -gt ${nth_max} ]] && export NTHREADS_ATMANLVAR=${nth_max} - export APRUN_ATMANLVAR="${launcher} -n ${npe_atmanlvar} --cpus-per-task=${NTHREADS_ATMANLVAR}" + export APRUN_ATMANLVAR="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMANLVAR}" elif [[ "${step}" = "atmensanlletkf" ]]; then - nth_max=$((npe_node_max / npe_node_atmensanlletkf)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMENSANLLETKF=${nth_atmensanlletkf:-${nth_max}} + export NTHREADS_ATMENSANLLETKF=${nth:-${nth_max}} [[ ${NTHREADS_ATMENSANLLETKF} -gt ${nth_max} ]] && export NTHREADS_ATMENSANLLETKF=${nth_max} - export APRUN_ATMENSANLLETKF="${launcher} -n ${npe_atmensanlletkf} --cpus-per-task=${NTHREADS_ATMENSANLLETKF}" + export APRUN_ATMENSANLLETKF="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMENSANLLETKF}" elif [[ "${step}" = "atmensanlfv3inc" ]]; then - nth_max=$((npe_node_max / npe_node_atmensanlfv3inc)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMENSANLFV3INC=${nth_atmensanlfv3inc:-${nth_max}} + export NTHREADS_ATMENSANLFV3INC=${nth:-${nth_max}} [[ ${NTHREADS_ATMENSANLFV3INC} -gt ${nth_max} ]] && export NTHREADS_ATMENSANLFV3INC=${nth_max} - export APRUN_ATMENSANLFV3INC="${launcher} -n ${npe_atmensanlfv3inc} --cpus-per-task=${NTHREADS_ATMENSANLFV3INC}" + export APRUN_ATMENSANLFV3INC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMENSANLFV3INC}" elif [[ "${step}" = "aeroanlrun" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_aeroanlrun)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_AEROANL=${nth_aeroanlrun:-${nth_max}} + export NTHREADS_AEROANL=${nth:-${nth_max}} [[ ${NTHREADS_AEROANL} -gt ${nth_max} ]] && export NTHREADS_AEROANL=${nth_max} - export APRUN_AEROANL="${launcher} -n ${npe_aeroanlrun} --cpus-per-task=${NTHREADS_AEROANL}" + export APRUN_AEROANL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_AEROANL}" elif [[ "${step}" = "prepobsaero" ]]; then - nth_max=$((npe_node_max / npe_node_prepobsaero)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_PREPOBSAERO=${nth_prepobsaero:-1} - export APRUN_PREPOBSAERO="${launcher} -n ${npe_prepobsaero} --cpus-per-task=${NTHREADS_PREPOBSAERO}" + export NTHREADS_PREPOBSAERO=${nth:-1} + export APRUN_PREPOBSAERO="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_PREPOBSAERO}" elif [[ "${step}" = "snowanl" ]]; then - nth_max=$((npe_node_max / npe_node_snowanl)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_SNOWANL=${nth_snowanl:-${nth_max}} + export NTHREADS_SNOWANL=${nth:-${nth_max}} [[ ${NTHREADS_SNOWANL} -gt ${nth_max} ]] && export NTHREADS_SNOWANL=${nth_max} - export APRUN_SNOWANL="${launcher} -n ${npe_snowanl} --cpus-per-task=${NTHREADS_SNOWANL}" + export APRUN_SNOWANL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_SNOWANL}" export APRUN_APPLY_INCR="${launcher} -n 6" elif [[ "${step}" = "atmanlfv3inc" ]]; then - nth_max=$((npe_node_max / npe_node_atmanlfv3inc)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMANLFV3INC=${nth_atmanlfv3inc:-${nth_max}} + export NTHREADS_ATMANLFV3INC=${nth:-${nth_max}} [[ ${NTHREADS_ATMANLFV3INC} -gt ${nth_max} ]] && export NTHREADS_ATMANLFV3INC=${nth_max} - export APRUN_ATMANLFV3INC="${launcher} -n ${npe_atmanlfv3inc} --cpus-per-task=${NTHREADS_ATMANLFV3INC}" + export APRUN_ATMANLFV3INC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMANLFV3INC}" elif [[ "${step}" = "ocnanalbmat" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_ocnanalbmat)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNANAL=${nth_ocnanalbmat:-${nth_max}} + export NTHREADS_OCNANAL=${nth:-${nth_max}} [[ ${NTHREADS_OCNANAL} -gt ${nth_max} ]] && export NTHREADS_OCNANAL=${nth_max} - export APRUN_OCNANAL="${launcher} -n ${npe_ocnanalbmat} --cpus-per-task=${NTHREADS_OCNANAL}" + export APRUN_OCNANAL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_OCNANAL}" elif [[ "${step}" = "ocnanalrun" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_ocnanalrun)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNANAL=${nth_ocnanalrun:-${nth_max}} + export NTHREADS_OCNANAL=${nth:-${nth_max}} [[ ${NTHREADS_OCNANAL} -gt ${nth_max} ]] && export NTHREADS_OCNANAL=${nth_max} - export APRUN_OCNANAL="${launcher} -n ${npe_ocnanalrun} --cpus-per-task=${NTHREADS_OCNANAL}" + export APRUN_OCNANAL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_OCNANAL}" elif [[ "${step}" = "ocnanalchkpt" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_ocnanalchkpt)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNANAL=${nth_ocnanalchkpt:-${nth_max}} + export NTHREADS_OCNANAL=${nth:-${nth_max}} [[ ${NTHREADS_OCNANAL} -gt ${nth_max} ]] && export NTHREADS_OCNANAL=${nth_max} - export APRUN_OCNANAL="${launcher} -n ${npe_ocnanalchkpt} --cpus-per-task=${NTHREADS_OCNANAL}" + export APRUN_OCNANAL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_OCNANAL}" elif [[ "${step}" = "ocnanalecen" ]]; then - nth_max=$((npe_node_max / npe_node_ocnanalecen)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNANALECEN=${nth_ocnanalecen:-${nth_max}} + export NTHREADS_OCNANALECEN=${nth:-${nth_max}} [[ ${NTHREADS_OCNANALECEN} -gt ${nth_max} ]] && export NTHREADS_OCNANALECEN=${nth_max} - export APRUN_OCNANALECEN="${launcher} -n ${npe_ocnanalecen} --cpus-per-task=${NTHREADS_OCNANALECEN}" + export APRUN_OCNANALECEN="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_OCNANALECEN}" elif [[ "${step}" = "ocnanalletkf" ]]; then - nth_max=$((npe_node_max / npe_node_ocnanalletkf)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNANALLETKF=${nth_ocnanalletkf:-${nth_max}} + export NTHREADS_OCNANALLETKF=${nth:-${nth_max}} [[ ${NTHREADS_OCNANALLETKF} -gt ${nth_max} ]] && export NTHREADS_OCNANALLETKF=${nth_max} - export APRUN_OCNANALLETKF="${launcher} -n ${npe_ocnanalletkf} --cpus-per-task=${NTHREADS_OCNANALLETKF}" + export APRUN_OCNANALLETKF="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_OCNANALLETKF}" elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then @@ -165,11 +165,11 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_anal)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_GSI=${nth_anal:-${nth_max}} + export NTHREADS_GSI=${nth:-${nth_max}} [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe_anal}} --cpus-per-task=${NTHREADS_GSI}" + export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} --cpus-per-task=${NTHREADS_GSI}" export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} @@ -185,9 +185,9 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export APRUN_GAUSFCANL="${launcher} -n ${npe_gausfcanl} --cpus-per-task=${NTHREADS_GAUSFCANL}" elif [[ "${step}" = "sfcanl" ]]; then - nth_max=$((npe_node_max / npe_node_sfcanl)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_CYCLE=${nth_sfcanl:-14} + export NTHREADS_CYCLE=${nth:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} npe_sfcanl=${ntiles:-6} export APRUN_CYCLE="${launcher} -n ${npe_sfcanl} --cpus-per-task=${NTHREADS_CYCLE}" @@ -201,11 +201,11 @@ elif [[ "${step}" = "eobs" ]]; then export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_eobs)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_GSI=${nth_eobs:-${nth_max}} + export NTHREADS_GSI=${nth:-${nth_max}} [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe_eobs}} --cpus-per-task=${NTHREADS_GSI}" + export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} --cpus-per-task=${NTHREADS_GSI}" elif [[ "${step}" = "eupd" ]]; then @@ -213,18 +213,18 @@ elif [[ "${step}" = "eupd" ]]; then export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_eupd)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ENKF=${nth_eupd:-${nth_max}} + export NTHREADS_ENKF=${nth:-${nth_max}} [[ ${NTHREADS_ENKF} -gt ${nth_max} ]] && export NTHREADS_ENKF=${nth_max} - export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe_eupd}} --cpus-per-task=${NTHREADS_ENKF}" + export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe}} --cpus-per-task=${NTHREADS_ENKF}" elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then - ppn="npe_node_${step}_${RUN}" - [[ -z "${!ppn+0}" ]] && ppn="npe_node_${step}" - nprocs="npe_${step}_${RUN}" - [[ -z ${!nprocs+0} ]] && nprocs="npe_${step}" + ppn="npe_node_${RUN}" + [[ -z "${!ppn+0}" ]] && ppn="npe_node" + nprocs="npe_${RUN}" + [[ -z ${!nprocs+0} ]] && nprocs="npe" (( nnodes = (${!nprocs}+${!ppn}-1)/${!ppn} )) (( ntasks = nnodes*${!ppn} )) @@ -234,11 +234,11 @@ elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then elif [[ "${step}" = "upp" ]]; then - nth_max=$((npe_node_max / npe_node_upp)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_UPP=${nth_upp:-1} + export NTHREADS_UPP=${nth:-1} [[ ${NTHREADS_UPP} -gt ${nth_max} ]] && export NTHREADS_UPP=${nth_max} - export APRUN_UPP="${launcher} -n ${npe_upp} --cpus-per-task=${NTHREADS_UPP}" + export APRUN_UPP="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_UPP}" elif [[ "${step}" = "atmos_products" ]]; then @@ -246,56 +246,56 @@ elif [[ "${step}" = "atmos_products" ]]; then elif [[ "${step}" = "oceanice_products" ]]; then - nth_max=$((npe_node_max / npe_node_oceanice_products)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNICEPOST=${nth_oceanice_products:-1} + export NTHREADS_OCNICEPOST=${nth:-1} export APRUN_OCNICEPOST="${launcher} -n 1 --cpus-per-task=${NTHREADS_OCNICEPOST}" elif [[ "${step}" = "ecen" ]]; then - nth_max=$((npe_node_max / npe_node_ecen)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ECEN=${nth_ecen:-${nth_max}} + export NTHREADS_ECEN=${nth:-${nth_max}} [[ ${NTHREADS_ECEN} -gt ${nth_max} ]] && export NTHREADS_ECEN=${nth_max} - export APRUN_ECEN="${launcher} -n ${npe_ecen} --cpus-per-task=${NTHREADS_ECEN}" + export APRUN_ECEN="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ECEN}" - export NTHREADS_CHGRES=${nth_chgres:-12} + export NTHREADS_CHGRES=${nth:-12} [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} export APRUN_CHGRES="time" export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} - export APRUN_CALCINC="${launcher} -n ${npe_ecen} --cpus-per-task=${NTHREADS_CALCINC}" + export APRUN_CALCINC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_CALCINC}" elif [[ "${step}" = "esfc" ]]; then - nth_max=$((npe_node_max / npe_node_esfc)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ESFC=${nth_esfc:-${nth_max}} + export NTHREADS_ESFC=${nth:-${nth_max}} [[ ${NTHREADS_ESFC} -gt ${nth_max} ]] && export NTHREADS_ESFC=${nth_max} - export APRUN_ESFC="${launcher} -n ${npe_esfc} --cpus-per-task=${NTHREADS_ESFC}" + export APRUN_ESFC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ESFC}" export NTHREADS_CYCLE=${nth_cycle:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - export APRUN_CYCLE="${launcher} -n ${npe_esfc} --cpus-per-task=${NTHREADS_CYCLE}" + export APRUN_CYCLE="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_CYCLE}" elif [[ "${step}" = "epos" ]]; then - nth_max=$((npe_node_max / npe_node_epos)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_EPOS=${nth_epos:-${nth_max}} + export NTHREADS_EPOS=${nth:-${nth_max}} [[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max} - export APRUN_EPOS="${launcher} -n ${npe_epos} --cpus-per-task=${NTHREADS_EPOS}" + export APRUN_EPOS="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_EPOS}" elif [[ "${step}" = "postsnd" ]]; then export CFP_MP="YES" - nth_max=$((npe_node_max / npe_node_postsnd)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_POSTSND=${nth_postsnd:-1} + export NTHREADS_POSTSND=${nth:-1} [[ ${NTHREADS_POSTSND} -gt ${nth_max} ]] && export NTHREADS_POSTSND=${nth_max} - export APRUN_POSTSND="${launcher} -n ${npe_postsnd} --cpus-per-task=${NTHREADS_POSTSND}" + export APRUN_POSTSND="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_POSTSND}" export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} @@ -303,11 +303,11 @@ elif [[ "${step}" = "postsnd" ]]; then elif [[ "${step}" = "awips" ]]; then - nth_max=$((npe_node_max / npe_node_awips)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_AWIPS=${nth_awips:-2} + export NTHREADS_AWIPS=${nth:-2} [[ ${NTHREADS_AWIPS} -gt ${nth_max} ]] && export NTHREADS_AWIPS=${nth_max} - export APRUN_AWIPSCFP="${launcher} -n ${npe_awips} ${mpmd_opt}" + export APRUN_AWIPSCFP="${launcher} -n ${npe} ${mpmd_opt}" elif [[ "${step}" = "gempak" ]]; then @@ -315,10 +315,10 @@ elif [[ "${step}" = "gempak" ]]; then elif [[ "${step}" = "fit2obs" ]]; then - nth_max=$((npe_node_max / npe_node_fit2obs)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_FIT2OBS=${nth_fit2obs:-1} + export NTHREADS_FIT2OBS=${nth:-1} [[ ${NTHREADS_FIT2OBS} -gt ${nth_max} ]] && export NTHREADS_FIT2OBS=${nth_max} - export MPIRUN="${launcher} -n ${npe_fit2obs} --cpus-per-task=${NTHREADS_FIT2OBS}" + export MPIRUN="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_FIT2OBS}" fi diff --git a/env/WCOSS2.env b/env/WCOSS2.env index befca81d267..33e30d9ac51 100755 --- a/env/WCOSS2.env +++ b/env/WCOSS2.env @@ -15,7 +15,7 @@ export mpmd_opt="--cpu-bind verbose,core cfp" if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then - nth_max=$((npe_node_max / npe_node_prep)) + nth_max=$((npe_node_max / npe_node)) export POE=${POE:-"YES"} export BACK=${BACK:-"off"} @@ -38,62 +38,62 @@ elif [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step} elif [[ "${step}" = "atmanlvar" ]]; then - nth_max=$((npe_node_max / npe_node_atmanlvar)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMANLVAR=${nth_atmanlvar:-${nth_max}} + export NTHREADS_ATMANLVAR=${nth:-${nth_max}} [[ ${NTHREADS_ATMANLVAR} -gt ${nth_max} ]] && export NTHREADS_ATMANLVAR=${nth_max} - export APRUN_ATMANLVAR="${launcher} -n ${npe_atmanlvar}" + export APRUN_ATMANLVAR="${launcher} -n ${npe}" elif [[ "${step}" = "atmensanlletkf" ]]; then - nth_max=$((npe_node_max / npe_node_atmensanlletkf)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMENSANLLETKF=${nth_atmensanlletkf:-${nth_max}} + export NTHREADS_ATMENSANLLETKF=${nth:-${nth_max}} [[ ${NTHREADS_ATMENSANLLETKF} -gt ${nth_max} ]] && export NTHREADS_ATMENSANLLETKF=${nth_max} - export APRUN_ATMENSANLLETKF="${launcher} -n ${npe_atmensanlletkf}" + export APRUN_ATMENSANLLETKF="${launcher} -n ${npe}" elif [[ "${step}" = "atmensanlfv3inc" ]]; then - nth_max=$((npe_node_max / npe_node_atmensanlfv3inc)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMENSANLFV3INC=${nth_atmensanlfv3inc:-${nth_max}} + export NTHREADS_ATMENSANLFV3INC=${nth:-${nth_max}} [[ ${NTHREADS_ATMENSANLFV3INC} -gt ${nth_max} ]] && export NTHREADS_ATMENSANLFV3INC=${nth_max} - export APRUN_ATMENSANLFV3INC="${launcher} -n ${npe_atmensanlfv3inc}" + export APRUN_ATMENSANLFV3INC="${launcher} -n ${npe}" elif [[ "${step}" = "aeroanlrun" ]]; then export APRUNCFP="${launcher} -np \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_aeroanlrun)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_AEROANL=${nth_aeroanlrun:-${nth_max}} + export NTHREADS_AEROANL=${nth:-${nth_max}} [[ ${NTHREADS_AEROANL} -gt ${nth_max} ]] && export NTHREADS_AEROANL=${nth_max} - export APRUN_AEROANL="${launcher} -n ${npe_aeroanlrun}" + export APRUN_AEROANL="${launcher} -n ${npe}" elif [[ "${step}" = "prepobsaero" ]]; then - nth_max=$((npe_node_max / npe_node_prepaeroobs)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_PREPOBSAERO=${nth_prepobsaero:-1} - export APRUN_PREPOBSAERO="${launcher} -n ${npe_prepobsaero} --ppn ${npe_node_prepobsaero}--cpu-bind depth --depth=${NTHREADS_PREPOBSAERO}" + export NTHREADS_PREPOBSAERO=${nth:-1} + export APRUN_PREPOBSAERO="${launcher} -n ${npe} --ppn ${npe_node}--cpu-bind depth --depth=${NTHREADS_PREPOBSAERO}" elif [[ "${step}" = "snowanl" ]]; then - nth_max=$((npe_node_max / npe_node_snowanl)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_SNOWANL=${nth_snowanl:-${nth_max}} + export NTHREADS_SNOWANL=${nth:-${nth_max}} [[ ${NTHREADS_SNOWANL} -gt ${nth_max} ]] && export NTHREADS_SNOWANL=${nth_max} - export APRUN_SNOWANL="${launcher} -n ${npe_snowanl}" + export APRUN_SNOWANL="${launcher} -n ${npe}" export APRUN_APPLY_INCR="${launcher} -n 6" elif [[ "${step}" = "atmanlfv3inc" ]]; then - nth_max=$((npe_node_max / npe_node_atmanlfv3inc)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMANLFV3INC=${nth_atmanlfv3inc:-${nth_max}} + export NTHREADS_ATMANLFV3INC=${nth:-${nth_max}} [[ ${NTHREADS_ATMANLFV3INC} -gt ${nth_max} ]] && export NTHREADS_ATMANLFV3INC=${nth_max} - export APRUN_ATMANLFV3INC="${launcher} -n ${npe_atmanlfv3inc}" + export APRUN_ATMANLFV3INC="${launcher} -n ${npe}" elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then @@ -105,11 +105,11 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export MPICH_MPIIO_HINTS="*:romio_cb_write=disable" fi - nth_max=$((npe_node_max / npe_node_anal)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_GSI=${nth_anal:-${nth_max}} + export NTHREADS_GSI=${nth:-${nth_max}} [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe_anal}} -ppn ${npe_node_anal} --cpu-bind depth --depth ${NTHREADS_GSI}" + export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_GSI}" export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} @@ -134,9 +134,9 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then elif [[ "${step}" = "sfcanl" ]]; then - nth_max=$((npe_node_max / npe_node_sfcanl)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_CYCLE=${nth_sfcanl:-14} + export NTHREADS_CYCLE=${nth:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} npe_sfcanl=${ntiles:-6} export APRUN_CYCLE="${launcher} -n ${npe_sfcanl}" @@ -147,11 +147,11 @@ elif [[ "${step}" = "eobs" ]]; then export OMP_STACKSIZE=1G export FI_OFI_RXM_SAR_LIMIT=3145728 - nth_max=$((npe_node_max / npe_node_eobs)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_GSI=${nth_eobs:-${nth_max}} + export NTHREADS_GSI=${nth:-${nth_max}} [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe_eobs}} -ppn ${npe_node_eobs} --cpu-bind depth --depth ${NTHREADS_GSI}" + export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_GSI}" export CFP_MP=${CFP_MP:-"NO"} export USE_CFP=${USE_CFP:-"YES"} @@ -164,11 +164,11 @@ elif [[ "${step}" = "eupd" ]]; then export MPICH_COLL_OPT_OFF=1 export FI_OFI_RXM_SAR_LIMIT=3145728 - nth_max=$((npe_node_max / npe_node_eupd)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ENKF=${nth_eupd:-${nth_max}} + export NTHREADS_ENKF=${nth:-${nth_max}} [[ ${NTHREADS_ENKF} -gt ${nth_max} ]] && export NTHREADS_ENKF=${nth_max} - export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe_eupd}} -ppn ${npe_node_eupd} --cpu-bind depth --depth ${NTHREADS_ENKF}" + export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe}} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_ENKF}" export CFP_MP=${CFP_MP:-"NO"} export USE_CFP=${USE_CFP:-"YES"} @@ -176,10 +176,10 @@ elif [[ "${step}" = "eupd" ]]; then elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then - ppn="npe_node_${step}_${RUN}" - [[ -z "${!ppn+0}" ]] && ppn="npe_node_${step}" - nprocs="npe_${step}_${RUN}" - [[ -z ${!nprocs+0} ]] && nprocs="npe_${step}" + ppn="npe_node_${RUN}" + [[ -z "${!ppn+0}" ]] && ppn="npe_node" + nprocs="npe_${RUN}" + [[ -z ${!nprocs+0} ]] && nprocs="npe" (( nnodes = (${!nprocs}+${!ppn}-1)/${!ppn} )) (( ntasks = nnodes*${!ppn} )) @@ -201,11 +201,11 @@ elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then elif [[ "${step}" = "upp" ]]; then - nth_max=$((npe_node_max / npe_node_upp)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_UPP=${nth_upp:-1} + export NTHREADS_UPP=${nth:-1} [[ ${NTHREADS_UPP} -gt ${nth_max} ]] && export NTHREADS_UPP=${nth_max} - export APRUN_UPP="${launcher} -n ${npe_upp} -ppn ${npe_node_upp} --cpu-bind depth --depth ${NTHREADS_UPP}" + export APRUN_UPP="${launcher} -n ${npe} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_UPP}" elif [[ "${step}" = "atmos_products" ]]; then @@ -213,18 +213,18 @@ elif [[ "${step}" = "atmos_products" ]]; then elif [[ "${step}" = "oceanice_products" ]]; then - nth_max=$((npe_node_max / npe_node_oceanice_products)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNICEPOST=${nth_oceanice_products:-1} - export APRUN_OCNICEPOST="${launcher} -n 1 -ppn ${npe_node_oceanice_products} --cpu-bind depth --depth ${NTHREADS_OCNICEPOST}" + export NTHREADS_OCNICEPOST=${nth:-1} + export APRUN_OCNICEPOST="${launcher} -n 1 -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_OCNICEPOST}" elif [[ "${step}" = "ecen" ]]; then - nth_max=$((npe_node_max / npe_node_ecen)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ECEN=${nth_ecen:-${nth_max}} + export NTHREADS_ECEN=${nth:-${nth_max}} [[ ${NTHREADS_ECEN} -gt ${nth_max} ]] && export NTHREADS_ECEN=${nth_max} - export APRUN_ECEN="${launcher} -n ${npe_ecen} -ppn ${npe_node_ecen} --cpu-bind depth --depth ${NTHREADS_ECEN}" + export APRUN_ECEN="${launcher} -n ${npe} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_ECEN}" export NTHREADS_CHGRES=${nth_chgres:-14} [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} @@ -232,42 +232,42 @@ elif [[ "${step}" = "ecen" ]]; then export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} - export APRUN_CALCINC="${launcher} -n ${npe_ecen}" + export APRUN_CALCINC="${launcher} -n ${npe}" export NTHREADS_CYCLE=${nth_cycle:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - export APRUN_CYCLE="${launcher} -n ${npe_ecen} -ppn ${npe_node_cycle} --cpu-bind depth --depth ${NTHREADS_CYCLE}" + export APRUN_CYCLE="${launcher} -n ${npe} -ppn ${npe_node_cycle} --cpu-bind depth --depth ${NTHREADS_CYCLE}" elif [[ "${step}" = "esfc" ]]; then - nth_max=$((npe_node_max / npe_node_esfc)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ESFC=${nth_esfc:-${nth_max}} + export NTHREADS_ESFC=${nth:-${nth_max}} [[ ${NTHREADS_ESFC} -gt ${nth_max} ]] && export NTHREADS_ESFC=${nth_max} - export APRUN_ESFC="${launcher} -n ${npe_esfc} -ppn ${npe_node_esfc} --cpu-bind depth --depth ${NTHREADS_ESFC}" + export APRUN_ESFC="${launcher} -n ${npe} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_ESFC}" export NTHREADS_CYCLE=${nth_cycle:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - export APRUN_CYCLE="${launcher} -n ${npe_esfc} -ppn ${npe_node_cycle} --cpu-bind depth --depth ${NTHREADS_CYCLE}" + export APRUN_CYCLE="${launcher} -n ${npe} -ppn ${npe_node_cycle} --cpu-bind depth --depth ${NTHREADS_CYCLE}" elif [[ "${step}" = "epos" ]]; then - nth_max=$((npe_node_max / npe_node_epos)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_EPOS=${nth_epos:-${nth_max}} + export NTHREADS_EPOS=${nth:-${nth_max}} [[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max} - export APRUN_EPOS="${launcher} -n ${npe_epos} -ppn ${npe_node_epos} --cpu-bind depth --depth ${NTHREADS_EPOS}" + export APRUN_EPOS="${launcher} -n ${npe} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_EPOS}" elif [[ "${step}" = "postsnd" ]]; then export MPICH_MPIIO_HINTS_DISPLAY=1 export OMP_NUM_THREADS=1 - nth_max=$((npe_node_max / npe_node_postsnd)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_POSTSND=${nth_postsnd:-1} + export NTHREADS_POSTSND=${nth:-1} [[ ${NTHREADS_POSTSND} -gt ${nth_max} ]] && export NTHREADS_POSTSND=${nth_max} - export APRUN_POSTSND="${launcher} -n ${npe_postsnd} --depth=${NTHREADS_POSTSND} --cpu-bind depth" + export APRUN_POSTSND="${launcher} -n ${npe} --depth=${NTHREADS_POSTSND} --cpu-bind depth" export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} @@ -275,27 +275,27 @@ elif [[ "${step}" = "postsnd" ]]; then elif [[ "${step}" = "awips" ]]; then - nth_max=$((npe_node_max / npe_node_awips)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_AWIPS=${nth_awips:-2} + export NTHREADS_AWIPS=${nth:-2} [[ ${NTHREADS_AWIPS} -gt ${nth_max} ]] && export NTHREADS_AWIPS=${nth_max} - export APRUN_AWIPSCFP="${launcher} -np ${npe_awips} ${mpmd_opt}" + export APRUN_AWIPSCFP="${launcher} -np ${npe} ${mpmd_opt}" elif [[ "${step}" = "gempak" ]]; then - nth_max=$((npe_node_max / npe_node_gempak)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_GEMPAK=${nth_gempak:-1} + export NTHREADS_GEMPAK=${nth:-1} [[ ${NTHREADS_GEMPAK} -gt ${nth_max} ]] && export NTHREADS_GEMPAK=${nth_max} - export APRUN_GEMPAKCFP="${launcher} -np ${npe_gempak} ${mpmd_opt}" + export APRUN_GEMPAKCFP="${launcher} -np ${npe} ${mpmd_opt}" elif [[ "${step}" = "fit2obs" ]]; then - nth_max=$((npe_node_max / npe_node_fit2obs)) + nth_max=$((npe_node_max / npe_node)) - export NTHREADS_FIT2OBS=${nth_fit2obs:-1} + export NTHREADS_FIT2OBS=${nth:-1} [[ ${NTHREADS_FIT2OBS} -gt ${nth_max} ]] && export NTHREADS_FIT2OBS=${nth_max} - export MPIRUN="${launcher} -np ${npe_fit2obs}" + export MPIRUN="${launcher} -np ${npe}" elif [[ "${step}" = "waveawipsbulls" ]]; then From f722cdbad738cb5e8f2f0984d403746e4aac1c71 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Tue, 25 Jun 2024 13:25:23 +0000 Subject: [PATCH 03/73] Trim env files by declaring common variables (cherry picked from commit 325891d9bed5482017cebff52bb1e3c3d15eaf40) --- env/AWSPW.env | 70 ++++++-------------- env/GAEA.env | 8 +++ env/HERA.env | 164 +++++++++++++++------------------------------ env/HERCULES.env | 110 ++++++++++++++----------------- env/JET.env | 134 ++++++++++++------------------------- env/ORION.env | 168 +++++++++++++++-------------------------------- env/S4.env | 160 ++++++++++++++------------------------------ env/WCOSS2.env | 146 ++++++++++++++-------------------------- 8 files changed, 325 insertions(+), 635 deletions(-) diff --git a/env/AWSPW.env b/env/AWSPW.env index 4c2e5e5e6fb..52e66640dd2 100755 --- a/env/AWSPW.env +++ b/env/AWSPW.env @@ -19,6 +19,14 @@ export NTHSTACK=1024000000 ulimit -s unlimited ulimit -a +# Calculate common variables +nth_max=$((npe_node_max / npe_node)) +NTHREADSmax=$((nth:-${nth_max})) +NTHREADS1=$((nth:-1)) +[[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} +[[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} +APRUN="${launcher} -n ${npe}" + if [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then ppn="npe_node_${RUN}" @@ -34,11 +42,8 @@ if [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then elif [[ "${step}" = "post" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_NP=${nth_np:-1} - [[ ${NTHREADS_NP} -gt ${nth_max} ]] && export NTHREADS_NP=${nth_max} - export APRUN_NP="${launcher} -n ${npe}" + export NTHREADS_NP=${NTHREADS1} + export APRUN_NP="${APRUN}" export NTHREADS_DWN=${nth_dwn:-1} [[ ${NTHREADS_DWN} -gt ${nth_max} ]] && export NTHREADS_DWN=${nth_max} @@ -46,11 +51,8 @@ elif [[ "${step}" = "post" ]]; then elif [[ "${step}" = "ecen" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ECEN=${nth:-${nth_max}} - [[ ${NTHREADS_ECEN} -gt ${nth_max} ]] && export NTHREADS_ECEN=${nth_max} - export APRUN_ECEN="${launcher} -n ${npe}" + export NTHREADS_ECEN=${NTHREADSmax} + export APRUN_ECEN="${APRUN}" export NTHREADS_CHGRES=${nth_chgres:-12} [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} @@ -58,57 +60,25 @@ elif [[ "${step}" = "ecen" ]]; then export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} - export APRUN_CALCINC="${launcher} -n ${npe}" + export APRUN_CALCINC="${APRUN}" elif [[ "${step}" = "esfc" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ESFC=${nth:-${nth_max}} - [[ ${NTHREADS_ESFC} -gt ${nth_max} ]] && export NTHREADS_ESFC=${nth_max} - export APRUN_ESFC="${launcher} -n ${npe}" + export NTHREADS_ESFC=${NTHREADSmax} + export APRUN_ESFC="${APRUN}" export NTHREADS_CYCLE=${nth_cycle:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - export APRUN_CYCLE="${launcher} -n ${npe}" + export APRUN_CYCLE="${APRUN}" elif [[ "${step}" = "epos" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_EPOS=${nth:-${nth_max}} - [[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max} - export APRUN_EPOS="${launcher} -n ${npe}" - -elif [[ "${step}" = "postsnd" ]]; then - - export CFP_MP="YES" - - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_POSTSND=${nth:-1} - [[ ${NTHREADS_POSTSND} -gt ${nth_max} ]] && export NTHREADS_POSTSND=${nth_max} - export APRUN_POSTSND="${launcher} -n ${npe}" - - export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} - [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} - export APRUN_POSTSNDCFP="${launcher} -n ${npe_postsndcfp} ${mpmd_opt}" - -elif [[ "${step}" = "awips" ]]; then - - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_AWIPS=${nth:-2} - [[ ${NTHREADS_AWIPS} -gt ${nth_max} ]] && export NTHREADS_AWIPS=${nth_max} - export APRUN_AWIPSCFP="${launcher} -n ${npe} ${mpmd_opt}" - + export NTHREADS_EPOS=${NTHREADSmax} + export APRUN_EPOS="${APRUN}" elif [[ "${step}" = "fit2obs" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_FIT2OBS=${nth:-1} - [[ ${NTHREADS_FIT2OBS} -gt ${nth_max} ]] && export NTHREADS_FIT2OBS=${nth_max} - export MPIRUN="${launcher} -n ${npe}" + export NTHREADS_FIT2OBS=${NTHREADS1} + export MPIRUN="${APRUN}" fi diff --git a/env/GAEA.env b/env/GAEA.env index 7352e373ba0..0048788059d 100755 --- a/env/GAEA.env +++ b/env/GAEA.env @@ -15,6 +15,14 @@ export mpmd_opt="--multi-prog --output=mpmd.%j.%t.out" ulimit -s unlimited ulimit -a +# Calculate common variables +nth_max=$((npe_node_max / npe_node)) +NTHREADSmax=$((nth:-${nth_max})) +NTHREADS1=$((nth:-1)) +[[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} +[[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} +APRUN="${launcher} -n ${npe}" + if [[ "${step}" = "fcst" ]]; then ppn="npe_node_${RUN}" diff --git a/env/HERA.env b/env/HERA.env index ca08145d790..e4e004d87c3 100755 --- a/env/HERA.env +++ b/env/HERA.env @@ -31,9 +31,17 @@ if [[ -n "${SLURM_JOB_ID:-}" ]]; then ulimit -a fi -if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then +# Calculate common variables +nth_max=$((npe_node_max / npe_node)) +NTHREADSmax=$((nth:-${nth_max})) +NTHREADS1=$((nth:-1)) +NTHREADS2=$((nth:-2)) +[[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} +[[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} +[[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} +APRUN="${launcher} -n ${npe}" - nth_max=$((npe_node_max / npe_node)) +if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then export POE="NO" export BACK="NO" @@ -42,11 +50,11 @@ if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then elif [[ "${step}" = "prepsnowobs" ]]; then - export APRUN_CALCFIMS="${launcher} -n 1" + export APRUN_CALCFIMS="${APRUN}" elif [[ "${step}" = "prep_emissions" ]]; then - export APRUN="${launcher} -n 1" + export APRUN="${APRUN}" elif [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step}" = "wavepostsbs" ]] || [[ "${step}" = "wavepostbndpnt" ]] || [[ "${step}" = "wavepostbndpntbll" ]] || [[ "${step}" = "wavepostpnt" ]]; then @@ -57,60 +65,40 @@ elif [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step} elif [[ "${step}" = "atmanlvar" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ATMANLVAR=${nth:-${nth_max}} - [[ ${NTHREADS_ATMANLVAR} -gt ${nth_max} ]] && export NTHREADS_ATMANLVAR=${nth_max} - export APRUN_ATMANLVAR="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMANLVAR}" + export NTHREADS_ATMANLVAR=${NTHREADSmax} + export APRUN_ATMANLVAR="${APRUN} --cpus-per-task=${NTHREADS_ATMANLVAR}" elif [[ "${step}" = "atmensanlletkf" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ATMENSANLLETKF=${nth:-${nth_max}} - [[ ${NTHREADS_ATMENSANLLETKF} -gt ${nth_max} ]] && export NTHREADS_ATMENSANLLETKF=${nth_max} - export APRUN_ATMENSANLLETKF="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMENSANLLETKF}" + export NTHREADS_ATMENSANLLETKF=${NTHREADSmax} + export APRUN_ATMENSANLLETKF="${APRUN} --cpus-per-task=${NTHREADS_ATMENSANLLETKF}" elif [[ "${step}" = "atmensanlfv3inc" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ATMENSANLFV3INC=${nth:-${nth_max}} - [[ ${NTHREADS_ATMENSANLFV3INC} -gt ${nth_max} ]] && export NTHREADS_ATMENSANLFV3INC=${nth_max} - export APRUN_ATMENSANLFV3INC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMENSANLFV3INC}" + export NTHREADS_ATMENSANLFV3INC=${NTHREADSmax} + export APRUN_ATMENSANLFV3INC="${APRUN} --cpus-per-task=${NTHREADS_ATMENSANLFV3INC}" elif [[ "${step}" = "aeroanlrun" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_AEROANL=${nth:-${nth_max}} - [[ ${NTHREADS_AEROANL} -gt ${nth_max} ]] && export NTHREADS_AEROANL=${nth_max} - export APRUN_AEROANL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_AEROANL}" + export NTHREADS_AEROANL=${NTHREADSmax} + export APRUN_AEROANL="${APRUN} --cpus-per-task=${NTHREADS_AEROANL}" elif [[ "${step}" = "atmanlfv3inc" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ATMANLFV3INC=${nth:-${nth_max}} - [[ ${NTHREADS_ATMANLFV3INC} -gt ${nth_max} ]] && export NTHREADS_ATMANLFV3INC=${nth_max} - export APRUN_ATMANLFV3INC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMANLFV3INC}" + export NTHREADS_ATMANLFV3INC=${NTHREADSmax} + export APRUN_ATMANLFV3INC="${APRUN} --cpus-per-task=${NTHREADS_ATMANLFV3INC}" elif [[ "${step}" = "prepobsaero" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_PREPOBSAERO=${nth:-1} - export APRUN_PREPOBSAERO="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_PREPOBSAERO}" + export NTHREADS_PREPOBSAERO=${NTHREADS1} + export APRUN_PREPOBSAERO="${APRUN} --cpus-per-task=${NTHREADS_PREPOBSAERO}" elif [[ "${step}" = "snowanl" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_SNOWANL=${nth:-${nth_max}} - [[ ${NTHREADS_SNOWANL} -gt ${nth_max} ]] && export NTHREADS_SNOWANL=${nth_max} - export APRUN_SNOWANL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_SNOWANL}" + export NTHREADS_SNOWANL=${NTHREADSmax} + export APRUN_SNOWANL="${APRUN} --cpus-per-task=${NTHREADS_SNOWANL}" export APRUN_APPLY_INCR="${launcher} -n 6" @@ -118,35 +106,29 @@ elif [[ "${step}" = "ocnanalbmat" ]]; then export APRUNCFP="${launcher} -n \$ncmd --multi-prog" - export APRUN_OCNANAL="${launcher} -n ${npe}" + export APRUN_OCNANAL="${APRUN}" elif [[ "${step}" = "ocnanalrun" ]]; then export APRUNCFP="${launcher} -n \$ncmd --multi-prog" - export APRUN_OCNANAL="${launcher} -n ${npe}" + export APRUN_OCNANAL="${APRUN}" elif [[ "${step}" = "ocnanalchkpt" ]]; then export APRUNCFP="${launcher} -n \$ncmd --multi-prog" - export APRUN_OCNANAL="${launcher} -n ${npe}" + export APRUN_OCNANAL="${APRUN}" elif [[ "${step}" = "ocnanalecen" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_OCNANALECEN=${nth:-${nth_max}} - [[ ${NTHREADS_OCNANALECEN} -gt ${nth_max} ]] && export NTHREADS_OCNANALECEN=${nth_max} - export APRUN_OCNANALECEN="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_OCNANALECEN}" + export NTHREADS_OCNANALECEN=${NTHREADSmax} + export APRUN_OCNANALECEN="${APRUN} --cpus-per-task=${NTHREADS_OCNANALECEN}" elif [[ "${step}" = "ocnanalletkf" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_OCNANALLETKF=${nth:-${nth_max}} - [[ ${NTHREADS_OCNANALLETKF} -gt ${nth_max} ]] && export NTHREADS_OCNANALLETKF=${nth_max} - export APRUN_OCNANALLETKF="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_OCNANALLETKF}" + export NTHREADS_OCNANALLETKF=${NTHREADSmax} + export APRUN_OCNANALLETKF="${APRUN} --cpus-per-task=${NTHREADS_OCNANALLETKF}" elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then @@ -157,10 +139,7 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_GSI=${nth:-${nth_max}} - [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} + export NTHREADS_GSI=${NTHREADSmax} export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} --cpus-per-task=${NTHREADS_GSI}" export NTHREADS_CALCINC=${nth_calcinc:-1} @@ -178,22 +157,15 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then elif [[ "${step}" = "sfcanl" ]]; then - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_CYCLE=${nth:-14} - [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - npe_sfcanl=${ntiles:-6} - export APRUN_CYCLE="${launcher} -n ${npe_sfcanl} --cpus-per-task=${NTHREADS_CYCLE}" + export APRUN_CYCLE="${APRUN} --cpus-per-task=${NTHREADS_CYCLE}" elif [[ "${step}" = "eobs" ]]; then export MKL_NUM_THREADS=4 export MKL_CBWR=AUTO - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_GSI=${nth:-${nth_max}} - [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} + export NTHREADS_GSI=${NTHREADSmax} export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} --cpus-per-task=${NTHREADS_GSI}" export CFP_MP=${CFP_MP:-"YES"} @@ -202,10 +174,7 @@ elif [[ "${step}" = "eobs" ]]; then elif [[ "${step}" = "eupd" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ENKF=${nth:-${nth_max}} - [[ ${NTHREADS_ENKF} -gt ${nth_max} ]] && export NTHREADS_ENKF=${nth_max} + export NTHREADS_ENKF=${NTHREADSmax} export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe}} --cpus-per-task=${NTHREADS_ENKF}" export CFP_MP=${CFP_MP:-"YES"} @@ -228,11 +197,8 @@ elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then elif [[ "${step}" = "upp" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_UPP=${nth:-1} - [[ ${NTHREADS_UPP} -gt ${nth_max} ]] && export NTHREADS_UPP=${nth_max} - export APRUN_UPP="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_UPP}" + export NTHREADS_UPP=${NTHREADS1} + export APRUN_UPP="${APRUN} --cpus-per-task=${NTHREADS_UPP}" elif [[ "${step}" = "atmos_products" ]]; then @@ -240,18 +206,13 @@ elif [[ "${step}" = "atmos_products" ]]; then elif [[ "${step}" = "oceanice_products" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_OCNICEPOST=${nth:-1} + export NTHREADS_OCNICEPOST=${NTHREADS1} export APRUN_OCNICEPOST="${launcher} -n 1 --cpus-per-task=${NTHREADS_OCNICEPOST}" elif [[ "${step}" = "ecen" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ECEN=${nth:-${nth_max}} - [[ ${NTHREADS_ECEN} -gt ${nth_max} ]] && export NTHREADS_ECEN=${nth_max} - export APRUN_ECEN="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ECEN}" + export NTHREADS_ECEN=${NTHREADSmax} + export APRUN_ECEN="${APRUN} --cpus-per-task=${NTHREADS_ECEN}" export NTHREADS_CHGRES=${nth_chgres:-12} [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} @@ -259,37 +220,28 @@ elif [[ "${step}" = "ecen" ]]; then export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} - export APRUN_CALCINC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_CALCINC}" + export APRUN_CALCINC="${APRUN} --cpus-per-task=${NTHREADS_CALCINC}" elif [[ "${step}" = "esfc" ]]; then - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ESFC=${nth_esfc:-${nth_max}} - [[ ${NTHREADS_ESFC} -gt ${nth_max} ]] && export NTHREADS_ESFC=${nth_max} - export APRUN_ESFC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ESFC}" + export APRUN_ESFC="${APRUN} --cpus-per-task=${NTHREADS_ESFC}" export NTHREADS_CYCLE=${nth_cycle:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - export APRUN_CYCLE="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_CYCLE}" + export APRUN_CYCLE="${APRUN} --cpus-per-task=${NTHREADS_CYCLE}" elif [[ "${step}" = "epos" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_EPOS=${nth:-${nth_max}} - [[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max} - export APRUN_EPOS="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_EPOS}" + export NTHREADS_EPOS=${NTHREADSmax} + export APRUN_EPOS="${APRUN} --cpus-per-task=${NTHREADS_EPOS}" elif [[ "${step}" = "postsnd" ]]; then export CFP_MP="YES" - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_POSTSND=${nth:-1} - [[ ${NTHREADS_POSTSND} -gt ${nth_max} ]] && export NTHREADS_POSTSND=${nth_max} - export APRUN_POSTSND="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_POSTSND}" + export NTHREADS_POSTSND=${NTHREADS1} + export APRUN_POSTSND="${APRUN} --cpus-per-task=${NTHREADS_POSTSND}" export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} @@ -297,27 +249,19 @@ elif [[ "${step}" = "postsnd" ]]; then elif [[ "${step}" = "awips" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_AWIPS=${nth:-2} - [[ ${NTHREADS_AWIPS} -gt ${nth_max} ]] && export NTHREADS_AWIPS=${nth_max} - export APRUN_AWIPSCFP="${launcher} -n ${npe} ${mpmd_opt}" + export NTHREADS_AWIPS=${NTHREADS2} + export APRUN_AWIPSCFP="${APRUN} ${mpmd_opt}" elif [[ "${step}" = "gempak" ]]; then export CFP_MP="YES" - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_GEMPAK=${nth:-1} + export NTHREADS_GEMPAK=${NTHREADS1} [[ ${NTHREADS_GEMPAK} -gt ${nth_max} ]] && export NTHREADS_GEMPAK=${nth_max} elif [[ "${step}" = "fit2obs" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_FIT2OBS=${nth:-1} - [[ ${NTHREADS_FIT2OBS} -gt ${nth_max} ]] && export NTHREADS_FIT2OBS=${nth_max} - export MPIRUN="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_FIT2OBS}" + export NTHREADS_FIT2OBS=${NTHREADS1} + export MPIRUN="${APRUN} --cpus-per-task=${NTHREADS_FIT2OBS}" fi diff --git a/env/HERCULES.env b/env/HERCULES.env index da3051771af..20b95636e4b 100755 --- a/env/HERCULES.env +++ b/env/HERCULES.env @@ -28,6 +28,16 @@ export I_MPI_EXTRA_FILESYSTEM_LIST=lustre ulimit -s unlimited ulimit -a +# Calculate common variables +nth_max=$((npe_node_max / npe_node)) +NTHREADSmax=$((nth:-${nth_max})) +NTHREADS1=$((nth:-1)) +NTHREADS2=$((nth:-2)) +[[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} +[[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} +[[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} +APRUN="${launcher} -n ${npe}" + case ${step} in "prep" | "prepbufr") @@ -40,11 +50,11 @@ case ${step} in ;; "prepsnowobs") - export APRUN_CALCFIMS="${launcher} -n 1" + export APRUN_CALCFIMS="${APRUN}" ;; "prep_emissions") - export APRUN="${launcher} -n 1" + export APRUN="${APRUN}" ;; "waveinit" | "waveprep" | "wavepostsbs" | "wavepostbndpnt" | "wavepostpnt" | "wavepostbndpntbll") @@ -58,33 +68,29 @@ case ${step} in nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMANLVAR=${nth:-${nth_max}} - [[ ${NTHREADS_ATMANLVAR} -gt ${nth_max} ]] && export NTHREADS_ATMANLVAR=${nth_max} - export APRUN_ATMANLVAR="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMANLVAR}" + export NTHREADS_ATMANLVAR=${NTHREADSmax} + export APRUN_ATMANLVAR="${APRUN} --cpus-per-task=${NTHREADS_ATMANLVAR}" ;; "atmanlfv3inc") nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMANLFV3INC=${nth:-${nth_max}} - [[ ${NTHREADS_ATMANLFV3INC} -gt ${nth_max} ]] && export NTHREADS_ATMANLFV3INC=${nth_max} - export APRUN_ATMANLFV3INC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMANLFV3INC}" + export NTHREADS_ATMANLFV3INC=${NTHREADSmax} + export APRUN_ATMANLFV3INC="${APRUN} --cpus-per-task=${NTHREADS_ATMANLFV3INC}" ;; "atmensanlletkf") nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMENSANLLETKF=${nth:-${nth_max}} - [[ ${NTHREADS_ATMENSANLLETKF} -gt ${nth_max} ]] && export NTHREADS_ATMENSANLLETKF=${nth_max} - export APRUN_ATMENSANLLETKF="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMENSANLLETKF}" + export NTHREADS_ATMENSANLLETKF=${NTHREADSmax} + export APRUN_ATMENSANLLETKF="${APRUN} --cpus-per-task=${NTHREADS_ATMENSANLLETKF}" ;; "atmensanlfv3inc") nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMENSANLFV3INC=${nth:-${nth_max}} - [[ ${NTHREADS_ATMENSANLFV3INC} -gt ${nth_max} ]] && export NTHREADS_ATMENSANLFV3INC=${nth_max} - export APRUN_ATMENSANLFV3INC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMENSANLFV3INC}" + export NTHREADS_ATMENSANLFV3INC=${NTHREADSmax} + export APRUN_ATMENSANLFV3INC="${APRUN} --cpus-per-task=${NTHREADS_ATMENSANLFV3INC}" ;; "aeroanlrun") @@ -92,23 +98,21 @@ case ${step} in nth_max=$((npe_node_max / npe_node)) - export NTHREADS_AEROANL=${nth:-${nth_max}} - [[ ${NTHREADS_AEROANL} -gt ${nth_max} ]] && export NTHREADS_AEROANL=${nth_max} - export APRUN_AEROANL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_AEROANL}" + export NTHREADS_AEROANL=${NTHREADSmax} + export APRUN_AEROANL="${APRUN} --cpus-per-task=${NTHREADS_AEROANL}" ;; "prepobsaero") nth_max=$((npe_node_max / npe_node)) - export NTHREADS_PREPOBSAERO=${nth:-1} - export APRUN_PREPOBSAERO="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_PREPOBSAERO}" + export NTHREADS_PREPOBSAERO=${NTHREADS1} + export APRUN_PREPOBSAERO="${APRUN} --cpus-per-task=${NTHREADS_PREPOBSAERO}" ;; "snowanl") nth_max=$((npe_node_max / npe_node)) - export NTHREADS_SNOWANL=${nth:-${nth_max}} - [[ ${NTHREADS_SNOWANL} -gt ${nth_max} ]] && export NTHREADS_SNOWANL=${nth_max} - export APRUN_SNOWANL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_SNOWANL}" + export NTHREADS_SNOWANL=${NTHREADSmax} + export APRUN_SNOWANL="${APRUN} --cpus-per-task=${NTHREADS_SNOWANL}" export APRUN_APPLY_INCR="${launcher} -n 6" ;; @@ -118,9 +122,8 @@ case ${step} in nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNANAL=${nth:-${nth_max}} - [[ ${NTHREADS_OCNANAL} -gt ${nth_max} ]] && export NTHREADS_OCNANAL=${nth_max} - export APRUN_OCNANAL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_OCNANAL}" + export NTHREADS_OCNANAL=${NTHREADSmax} + export APRUN_OCNANAL="${APRUN} --cpus-per-task=${NTHREADS_OCNANAL}" ;; "ocnanalrun") @@ -128,9 +131,8 @@ case ${step} in nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNANAL=${nth:-${nth_max}} - [[ ${NTHREADS_OCNANAL} -gt ${nth_max} ]] && export NTHREADS_OCNANAL=${nth_max} - export APRUN_OCNANAL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_OCNANAL}" + export NTHREADS_OCNANAL=${NTHREADSmax} + export APRUN_OCNANAL="${APRUN} --cpus-per-task=${NTHREADS_OCNANAL}" ;; "ocnanalchkpt") @@ -138,9 +140,8 @@ case ${step} in nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNANAL=${nth:-${nth_max}} - [[ ${NTHREADS_OCNANAL} -gt ${nth_max} ]] && export NTHREADS_OCNANAL=${nth_max} - export APRUN_OCNANAL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_OCNANAL}" + export NTHREADS_OCNANAL=${NTHREADSmax} + export APRUN_OCNANAL="${APRUN} --cpus-per-task=${NTHREADS_OCNANAL}" ;; "anal" | "analcalc") @@ -154,7 +155,6 @@ case ${step} in nth_max=$((npe_node_max / npe_node)) export NTHREADS_GSI=${nth_anal:-${nth_max}} - [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} --cpus-per-task=${NTHREADS_GSI}" export NTHREADS_CALCINC=${nth_calcinc:-1} @@ -189,7 +189,7 @@ case ${step} in nth_max=$((npe_node_max / npe_node)) - export NTHREADS_GSI=${nth:-${nth_max}} + export NTHREADS_GSI=${NTHREADSmax} [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} --cpus-per-task=${NTHREADS_GSI}" ;; @@ -201,8 +201,7 @@ case ${step} in nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ENKF=${nth:-${nth_max}} - [[ ${NTHREADS_ENKF} -gt ${nth_max} ]] && export NTHREADS_ENKF=${nth_max} + export NTHREADS_ENKF=${NTHREADSmax} export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe}} --cpus-per-task=${NTHREADS_ENKF}" ;; "fcst" | "efcs") @@ -225,9 +224,8 @@ case ${step} in nth_max=$((npe_node_max / npe_node)) - export NTHREADS_UPP=${nth:-1} - [[ ${NTHREADS_UPP} -gt ${nth_max} ]] && export NTHREADS_UPP=${nth_max} - export APRUN_UPP="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_UPP}" + export NTHREADS_UPP=${NTHREADS1} + export APRUN_UPP="${APRUN} --cpus-per-task=${NTHREADS_UPP}" ;; "atmos_products") @@ -239,7 +237,7 @@ case ${step} in nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNICEPOST=${nth:-1} + export NTHREADS_OCNICEPOST=${NTHREADS1} export APRUN_OCNICEPOST="${launcher} -n 1 --cpus-per-task=${NTHREADS_OCNICEPOST}" ;; @@ -247,9 +245,8 @@ case ${step} in nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ECEN=${nth:-${nth_max}} - [[ ${NTHREADS_ECEN} -gt ${nth_max} ]] && export NTHREADS_ECEN=${nth_max} - export APRUN_ECEN="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ECEN}" + export NTHREADS_ECEN=${NTHREADSmax} + export APRUN_ECEN="${APRUN} --cpus-per-task=${NTHREADS_ECEN}" export NTHREADS_CHGRES=${nth_chgres:-12} [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} @@ -257,29 +254,27 @@ case ${step} in export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} - export APRUN_CALCINC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_CALCINC}" + export APRUN_CALCINC="${APRUN} --cpus-per-task=${NTHREADS_CALCINC}" ;; "esfc") nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ESFC=${nth:-${nth_max}} - [[ ${NTHREADS_ESFC} -gt ${nth_max} ]] && export NTHREADS_ESFC=${nth_max} - export APRUN_ESFC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ESFC}" + export NTHREADS_ESFC=${NTHREADSmax} + export APRUN_ESFC="${APRUN} --cpus-per-task=${NTHREADS_ESFC}" export NTHREADS_CYCLE=${nth_cycle:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - export APRUN_CYCLE="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_CYCLE}" + export APRUN_CYCLE="${APRUN} --cpus-per-task=${NTHREADS_CYCLE}" ;; "epos") nth_max=$((npe_node_max / npe_node)) - export NTHREADS_EPOS=${nth:-${nth_max}} - [[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max} - export APRUN_EPOS="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_EPOS}" + export NTHREADS_EPOS=${NTHREADSmax} + export APRUN_EPOS="${APRUN} --cpus-per-task=${NTHREADS_EPOS}" ;; "postsnd") @@ -288,9 +283,8 @@ case ${step} in nth_max=$((npe_node_max / npe_node)) - export NTHREADS_POSTSND=${nth:-1} - [[ ${NTHREADS_POSTSND} -gt ${nth_max} ]] && export NTHREADS_POSTSND=${nth_max} - export APRUN_POSTSND="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_POSTSND}" + export NTHREADS_POSTSND=${NTHREADS1} + export APRUN_POSTSND="${APRUN} --cpus-per-task=${NTHREADS_POSTSND}" export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} @@ -301,9 +295,8 @@ case ${step} in nth_max=$((npe_node_max / npe_node)) - export NTHREADS_AWIPS=${nth:-2} - [[ ${NTHREADS_AWIPS} -gt ${nth_max} ]] && export NTHREADS_AWIPS=${nth_max} - export APRUN_AWIPSCFP="${launcher} -n ${npe} ${mpmd_opt}" + export NTHREADS_AWIPS=${NTHREADS2} + export APRUN_AWIPSCFP="${APRUN} ${mpmd_opt}" ;; "gempak") @@ -315,9 +308,8 @@ case ${step} in nth_max=$((npe_node_max / npe_node)) - export NTHREADS_FIT2OBS=${nth:-1} - [[ ${NTHREADS_FIT2OBS} -gt ${nth_max} ]] && export NTHREADS_FIT2OBS=${nth_max} - export MPIRUN="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_FIT2OBS}" + export NTHREADS_FIT2OBS=${NTHREADS1} + export MPIRUN="${APRUN} --cpus-per-task=${NTHREADS_FIT2OBS}" ;; *) diff --git a/env/JET.env b/env/JET.env index 311893ef440..baeabdd0fe4 100755 --- a/env/JET.env +++ b/env/JET.env @@ -19,9 +19,16 @@ export NTHSTACK=1024000000 ulimit -s unlimited ulimit -a -if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then +# Calculate common variables +nth_max=$((npe_node_max / npe_node)) +NTHREADSmax=$((nth:-${nth_max})) +NTHREADS1=$((nth:-1)) +[[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} +[[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} +[[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} +APRUN="${launcher} -n ${npe}" - nth_max=$((npe_node_max / npe_node)) +if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then export POE="NO" export BACK="NO" @@ -45,82 +52,56 @@ elif [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step} elif [[ "${step}" = "atmanlvar" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ATMANLVAR=${nth:-${nth_max}} - [[ ${NTHREADS_ATMANLVAR} -gt ${nth_max} ]] && export NTHREADS_ATMANLVAR=${nth_max} - export APRUN_ATMANLVAR="${launcher} -n ${npe}" + export NTHREADS_ATMANLVAR=${NTHREADSmax} + export APRUN_ATMANLVAR="${APRUN}" elif [[ "${step}" = "atmensanlletkf" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ATMENSANLLETKF=${nth:-${nth_max}} - [[ ${NTHREADS_ATMENSANLLETKF} -gt ${nth_max} ]] && export NTHREADS_ATMENSANLLETKF=${nth_max} + export NTHREADS_ATMENSANLLETKF=${NTHREADSmax} export APRUN_ATMENSANLLETKF="${launcher} ${npe}" elif [[ "${step}" = "atmensanlfv3inc" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ATMENSANLFV3INC=${nth:-${nth_max}} - [[ ${NTHREADS_ATMENSANLFV3INC} -gt ${nth_max} ]] && export NTHREADS_ATMENSANLFV3INC=${nth_max} + export NTHREADS_ATMENSANLFV3INC=${NTHREADSmax} export APRUN_ATMENSANLFV3INC="${launcher} ${npe}" elif [[ "${step}" = "aeroanlrun" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_AEROANL=${nth:-${nth_max}} - [[ ${NTHREADS_AEROANL} -gt ${nth_max} ]] && export NTHREADS_AEROANL=${nth_max} - export APRUN_AEROANL="${launcher} -n ${npe}" + export NTHREADS_AEROANL=${NTHREADSmax} + export APRUN_AEROANL="${APRUN}" elif [[ "${step}" = "prepobsaero" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_PREPOBSAERO=${nth:-1} - export APRUN_PREPOBSAERO="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_PREPOBSAERO}" + export NTHREADS_PREPOBSAERO=${NTHREADS1} + export APRUN_PREPOBSAERO="${APRUN} --cpus-per-task=${NTHREADS_PREPOBSAERO}" elif [[ "${step}" = "snowanl" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_SNOWANL=${nth:-${nth_max}} - [[ ${NTHREADS_SNOWANL} -gt ${nth_max} ]] && export NTHREADS_SNOWANL=${nth_max} - export APRUN_SNOWANL="${launcher} -n ${npe}" + export NTHREADS_SNOWANL=${NTHREADSmax} + export APRUN_SNOWANL="${APRUN}" export APRUN_APPLY_INCR="${launcher} -n 6" elif [[ "${step}" = "atmanlfv3inc" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ATMANLFV3INC=${nth:-${nth_max}} - [[ ${NTHREADS_ATMANLFV3INC} -gt ${nth_max} ]] && export NTHREADS_ATMANLFV3INC=${nth_max} - export APRUN_ATMANLFV3INC="${launcher} -n ${npe}" + export NTHREADS_ATMANLFV3INC=${NTHREADSmax} + export APRUN_ATMANLFV3INC="${APRUN}" elif [[ "${step}" = "ocnanalbmat" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_OCNANAL=${nth:-${nth_max}} - [[ ${NTHREADS_OCNANAL} -gt ${nth_max} ]] && export NTHREADS_OCNANAL=${nth_max} - export APRUN_OCNANAL="${launcher} -n ${npe}" + export NTHREADS_OCNANAL=${NTHREADSmax} + export APRUN_OCNANAL="${APRUN}" elif [[ "${step}" = "ocnanalrun" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_OCNANAL=${nth:-${nth_max}} - [[ ${NTHREADS_OCNANAL} -gt ${nth_max} ]] && export NTHREADS_OCNANAL=${nth_max} - export APRUN_OCNANAL="${launcher} -n ${npe}" + export NTHREADS_OCNANAL=${NTHREADSmax} + export APRUN_OCNANAL="${APRUN}" elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then @@ -131,10 +112,7 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_GSI=${nth_anal:-${nth_max}} - [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}}" export NTHREADS_CALCINC=${nth_calcinc:-1} @@ -151,8 +129,6 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export APRUN_GAUSFCANL="${launcher} -n ${npe_gausfcanl}" elif [[ "${step}" = "sfcanl" ]]; then - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_CYCLE=${nth:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} npe_sfcanl=${ntiles:-6} @@ -163,10 +139,7 @@ elif [[ "${step}" = "eobs" ]]; then export MKL_NUM_THREADS=4 export MKL_CBWR=AUTO - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_GSI=${nth:-${nth_max}} - [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} + export NTHREADS_GSI=${NTHREADSmax} export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}}" export CFP_MP=${CFP_MP:-"YES"} @@ -175,10 +148,7 @@ elif [[ "${step}" = "eobs" ]]; then elif [[ "${step}" = "eupd" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ENKF=${nth:-${nth_max}} - [[ ${NTHREADS_ENKF} -gt ${nth_max} ]] && export NTHREADS_ENKF=${nth_max} + export NTHREADS_ENKF=${NTHREADSmax} export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe}}" export CFP_MP=${CFP_MP:-"YES"} @@ -200,11 +170,8 @@ elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then elif [[ "${step}" = "upp" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_UPP=${nth:-1} - [[ ${NTHREADS_UPP} -gt ${nth_max} ]] && export NTHREADS_UPP=${nth_max} - export APRUN_UPP="${launcher} -n ${npe}" + export NTHREADS_UPP=${NTHREADS1} + export APRUN_UPP="${APRUN}" elif [[ "${step}" = "atmos_products" ]]; then @@ -212,18 +179,13 @@ elif [[ "${step}" = "atmos_products" ]]; then elif [[ "${step}" = "oceanice_products" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_OCNICEPOST=${nth:-1} + export NTHREADS_OCNICEPOST=${NTHREADS1} export APRUN_OCNICEPOST="${launcher} -n 1 --cpus-per-task=${NTHREADS_OCNICEPOST}" elif [[ "${step}" = "ecen" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ECEN=${nth:-${nth_max}} - [[ ${NTHREADS_ECEN} -gt ${nth_max} ]] && export NTHREADS_ECEN=${nth_max} - export APRUN_ECEN="${launcher} -n ${npe}" + export NTHREADS_ECEN=${NTHREADSmax} + export APRUN_ECEN="${APRUN}" export NTHREADS_CHGRES=${nth_chgres:-12} [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} @@ -231,37 +193,28 @@ elif [[ "${step}" = "ecen" ]]; then export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} - export APRUN_CALCINC="${launcher} -n ${npe}" + export APRUN_CALCINC="${APRUN}" elif [[ "${step}" = "esfc" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ESFC=${nth:-${nth_max}} - [[ ${NTHREADS_ESFC} -gt ${nth_max} ]] && export NTHREADS_ESFC=${nth_max} - export APRUN_ESFC="${launcher} -n ${npe}" + export NTHREADS_ESFC=${NTHREADSmax} + export APRUN_ESFC="${APRUN}" export NTHREADS_CYCLE=${nth_cycle:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - export APRUN_CYCLE="${launcher} -n ${npe}" + export APRUN_CYCLE="${APRUN}" elif [[ "${step}" = "epos" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_EPOS=${nth:-${nth_max}} - [[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max} - export APRUN_EPOS="${launcher} -n ${npe}" + export NTHREADS_EPOS=${NTHREADSmax} + export APRUN_EPOS="${APRUN}" elif [[ "${step}" = "postsnd" ]]; then export CFP_MP="YES" - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_POSTSND=${nth:-1} - [[ ${NTHREADS_POSTSND} -gt ${nth_max} ]] && export NTHREADS_POSTSND=${nth_max} - export APRUN_POSTSND="${launcher} -n ${npe}" + export NTHREADS_POSTSND=${NTHREADS1} + export APRUN_POSTSND="${APRUN}" export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} @@ -277,10 +230,7 @@ elif [[ "${step}" = "gempak" ]]; then elif [[ "${step}" = "fit2obs" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_FIT2OBS=${nth:-1} - [[ ${NTHREADS_FIT2OBS} -gt ${nth_max} ]] && export NTHREADS_FIT2OBS=${nth_max} - export MPIRUN="${launcher} -n ${npe}" + export NTHREADS_FIT2OBS=${NTHREADS1} + export MPIRUN="${APRUN}" fi diff --git a/env/ORION.env b/env/ORION.env index 161d4c7f189..981d2af17a1 100755 --- a/env/ORION.env +++ b/env/ORION.env @@ -26,9 +26,17 @@ export NTHSTACK=1024000000 ulimit -s unlimited ulimit -a -if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then +# Calculate common variables +nth_max=$((npe_node_max / npe_node)) +NTHREADSmax=$((nth:-${nth_max})) +NTHREADS1=$((nth:-1)) +NTHREADS2=$((nth:-2)) +[[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} +[[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} +[[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} +APRUN="${launcher} -n ${npe}" - nth_max=$((npe_node_max / npe_node)) +if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then export POE="NO" export BACK=${BACK:-"YES"} @@ -53,108 +61,73 @@ elif [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step} elif [[ "${step}" = "atmanlvar" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ATMANLVAR=${nth:-${nth_max}} - [[ ${NTHREADS_ATMANLVAR} -gt ${nth_max} ]] && export NTHREADS_ATMANLVAR=${nth_max} - export APRUN_ATMANLVAR="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMANLVAR}" + export NTHREADS_ATMANLVAR=${NTHREADSmax} + export APRUN_ATMANLVAR="${APRUN} --cpus-per-task=${NTHREADS_ATMANLVAR}" elif [[ "${step}" = "atmensanlletkf" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ATMENSANLLETKF=${nth:-${nth_max}} - [[ ${NTHREADS_ATMENSANLLETKF} -gt ${nth_max} ]] && export NTHREADS_ATMENSANLLETKF=${nth_max} - export APRUN_ATMENSANLLETKF="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMENSANLLETKF}" + export NTHREADS_ATMENSANLLETKF=${NTHREADSmax} + export APRUN_ATMENSANLLETKF="${APRUN} --cpus-per-task=${NTHREADS_ATMENSANLLETKF}" elif [[ "${step}" = "atmensanlfv3inc" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ATMENSANLFV3INC=${nth:-${nth_max}} - [[ ${NTHREADS_ATMENSANLFV3INC} -gt ${nth_max} ]] && export NTHREADS_ATMENSANLFV3INC=${nth_max} - export APRUN_ATMENSANLFV3INC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMENSANLFV3INC}" + export NTHREADS_ATMENSANLFV3INC=${NTHREADSmax} + export APRUN_ATMENSANLFV3INC="${APRUN} --cpus-per-task=${NTHREADS_ATMENSANLFV3INC}" elif [[ "${step}" = "aeroanlrun" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_AEROANL=${nth:-${nth_max}} - [[ ${NTHREADS_AEROANL} -gt ${nth_max} ]] && export NTHREADS_AEROANL=${nth_max} - export APRUN_AEROANL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_AEROANL}" + export NTHREADS_AEROANL=${NTHREADSmax} + export APRUN_AEROANL="${APRUN} --cpus-per-task=${NTHREADS_AEROANL}" elif [[ "${step}" = "prepobsaero" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_PREPOBSAERO=${nth:-1} - export APRUN_PREPOBSAERO="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_PREPOBSAERO}" + export NTHREADS_PREPOBSAERO=${NTHREADS1} + export APRUN_PREPOBSAERO="${APRUN} --cpus-per-task=${NTHREADS_PREPOBSAERO}" elif [[ "${step}" = "snowanl" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_SNOWANL=${nth:-${nth_max}} - [[ ${NTHREADS_SNOWANL} -gt ${nth_max} ]] && export NTHREADS_SNOWANL=${nth_max} - export APRUN_SNOWANL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_SNOWANL}" + export NTHREADS_SNOWANL=${NTHREADSmax} + export APRUN_SNOWANL="${APRUN} --cpus-per-task=${NTHREADS_SNOWANL}" export APRUN_APPLY_INCR="${launcher} -n 6" elif [[ "${step}" = "atmanlfv3inc" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ATMANLFV3INC=${nth:-${nth_max}} - [[ ${NTHREADS_ATMANLFV3INC} -gt ${nth_max} ]] && export NTHREADS_ATMANLFV3INC=${nth_max} - export APRUN_ATMANLFV3INC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ATMANLFV3INC}" + export NTHREADS_ATMANLFV3INC=${NTHREADSmax} + export APRUN_ATMANLFV3INC="${APRUN} --cpus-per-task=${NTHREADS_ATMANLFV3INC}" elif [[ "${step}" = "ocnanalbmat" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_OCNANAL=${nth:-${nth_max}} - [[ ${NTHREADS_OCNANAL} -gt ${nth_max} ]] && export NTHREADS_OCNANAL=${nth_max} - export APRUN_OCNANAL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_OCNANAL}" + export NTHREADS_OCNANAL=${NTHREADSmax} + export APRUN_OCNANAL="${APRUN} --cpus-per-task=${NTHREADS_OCNANAL}" elif [[ "${step}" = "ocnanalrun" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_OCNANAL=${nth:-${nth_max}} - [[ ${NTHREADS_OCNANAL} -gt ${nth_max} ]] && export NTHREADS_OCNANAL=${nth_max} - export APRUN_OCNANAL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_OCNANAL}" + export NTHREADS_OCNANAL=${NTHREADSmax} + export APRUN_OCNANAL="${APRUN} --cpus-per-task=${NTHREADS_OCNANAL}" elif [[ "${step}" = "ocnanalchkpt" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_OCNANAL=${nth:-${nth_max}} - [[ ${NTHREADS_OCNANAL} -gt ${nth_max} ]] && export NTHREADS_OCNANAL=${nth_max} - export APRUN_OCNANAL="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_OCNANAL}" + export NTHREADS_OCNANAL=${NTHREADSmax} + export APRUN_OCNANAL="${APRUN} --cpus-per-task=${NTHREADS_OCNANAL}" elif [[ "${step}" = "ocnanalecen" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_OCNANALECEN=${nth:-${nth_max}} - [[ ${NTHREADS_OCNANALECEN} -gt ${nth_max} ]] && export NTHREADS_OCNANALECEN=${nth_max} - export APRUN_OCNANALECEN="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_OCNANALECEN}" + export NTHREADS_OCNANALECEN=${NTHREADSmax} + export APRUN_OCNANALECEN="${APRUN} --cpus-per-task=${NTHREADS_OCNANALECEN}" elif [[ "${step}" = "ocnanalletkf" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_OCNANALLETKF=${nth:-${nth_max}} - [[ ${NTHREADS_OCNANALLETKF} -gt ${nth_max} ]] && export NTHREADS_OCNANALLETKF=${nth_max} - export APRUN_OCNANALLETKF="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_OCNANALLETKF}" + export NTHREADS_OCNANALLETKF=${NTHREADSmax} + export APRUN_OCNANALLETKF="${APRUN} --cpus-per-task=${NTHREADS_OCNANALLETKF}" elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then @@ -165,10 +138,7 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_GSI=${nth:-${nth_max}} - [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} + export NTHREADS_GSI=${NTHREADSmax} export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} --cpus-per-task=${NTHREADS_GSI}" export NTHREADS_CALCINC=${nth_calcinc:-1} @@ -185,8 +155,6 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export APRUN_GAUSFCANL="${launcher} -n ${npe_gausfcanl} --cpus-per-task=${NTHREADS_GAUSFCANL}" elif [[ "${step}" = "sfcanl" ]]; then - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_CYCLE=${nth:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} npe_sfcanl=${ntiles:-6} @@ -201,9 +169,7 @@ elif [[ "${step}" = "eobs" ]]; then export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_GSI=${nth:-${nth_max}} + export NTHREADS_GSI=${NTHREADSmax} [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} --cpus-per-task=${NTHREADS_GSI}" @@ -213,10 +179,7 @@ elif [[ "${step}" = "eupd" ]]; then export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ENKF=${nth:-${nth_max}} - [[ ${NTHREADS_ENKF} -gt ${nth_max} ]] && export NTHREADS_ENKF=${nth_max} + export NTHREADS_ENKF=${NTHREADSmax} export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe}} --cpus-per-task=${NTHREADS_ENKF}" elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then @@ -234,11 +197,8 @@ elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then elif [[ "${step}" = "upp" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_UPP=${nth:-1} - [[ ${NTHREADS_UPP} -gt ${nth_max} ]] && export NTHREADS_UPP=${nth_max} - export APRUN_UPP="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_UPP}" + export NTHREADS_UPP=${NTHREADS1} + export APRUN_UPP="${APRUN} --cpus-per-task=${NTHREADS_UPP}" elif [[ "${step}" = "atmos_products" ]]; then @@ -246,18 +206,13 @@ elif [[ "${step}" = "atmos_products" ]]; then elif [[ "${step}" = "oceanice_products" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_OCNICEPOST=${nth:-1} + export NTHREADS_OCNICEPOST=${NTHREADS1} export APRUN_OCNICEPOST="${launcher} -n 1 --cpus-per-task=${NTHREADS_OCNICEPOST}" elif [[ "${step}" = "ecen" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ECEN=${nth:-${nth_max}} - [[ ${NTHREADS_ECEN} -gt ${nth_max} ]] && export NTHREADS_ECEN=${nth_max} - export APRUN_ECEN="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ECEN}" + export NTHREADS_ECEN=${NTHREADSmax} + export APRUN_ECEN="${APRUN} --cpus-per-task=${NTHREADS_ECEN}" export NTHREADS_CHGRES=${nth:-12} [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} @@ -265,37 +220,28 @@ elif [[ "${step}" = "ecen" ]]; then export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} - export APRUN_CALCINC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_CALCINC}" + export APRUN_CALCINC="${APRUN} --cpus-per-task=${NTHREADS_CALCINC}" elif [[ "${step}" = "esfc" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ESFC=${nth:-${nth_max}} - [[ ${NTHREADS_ESFC} -gt ${nth_max} ]] && export NTHREADS_ESFC=${nth_max} - export APRUN_ESFC="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_ESFC}" + export NTHREADS_ESFC=${NTHREADSmax} + export APRUN_ESFC="${APRUN} --cpus-per-task=${NTHREADS_ESFC}" export NTHREADS_CYCLE=${nth_cycle:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - export APRUN_CYCLE="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_CYCLE}" + export APRUN_CYCLE="${APRUN} --cpus-per-task=${NTHREADS_CYCLE}" elif [[ "${step}" = "epos" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_EPOS=${nth:-${nth_max}} - [[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max} - export APRUN_EPOS="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_EPOS}" + export NTHREADS_EPOS=${NTHREADSmax} + export APRUN_EPOS="${APRUN} --cpus-per-task=${NTHREADS_EPOS}" elif [[ "${step}" = "postsnd" ]]; then export CFP_MP="YES" - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_POSTSND=${nth:-1} - [[ ${NTHREADS_POSTSND} -gt ${nth_max} ]] && export NTHREADS_POSTSND=${nth_max} - export APRUN_POSTSND="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_POSTSND}" + export NTHREADS_POSTSND=${NTHREADS1} + export APRUN_POSTSND="${APRUN} --cpus-per-task=${NTHREADS_POSTSND}" export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} @@ -303,11 +249,8 @@ elif [[ "${step}" = "postsnd" ]]; then elif [[ "${step}" = "awips" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_AWIPS=${nth:-2} - [[ ${NTHREADS_AWIPS} -gt ${nth_max} ]] && export NTHREADS_AWIPS=${nth_max} - export APRUN_AWIPSCFP="${launcher} -n ${npe} ${mpmd_opt}" + export NTHREADS_AWIPS=${NTHREADS2} + export APRUN_AWIPSCFP="${APRUN} ${mpmd_opt}" elif [[ "${step}" = "gempak" ]]; then @@ -315,10 +258,7 @@ elif [[ "${step}" = "gempak" ]]; then elif [[ "${step}" = "fit2obs" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_FIT2OBS=${nth:-1} - [[ ${NTHREADS_FIT2OBS} -gt ${nth_max} ]] && export NTHREADS_FIT2OBS=${nth_max} - export MPIRUN="${launcher} -n ${npe} --cpus-per-task=${NTHREADS_FIT2OBS}" + export NTHREADS_FIT2OBS=${NTHREADS1} + export MPIRUN="${APRUN} --cpus-per-task=${NTHREADS_FIT2OBS}" fi diff --git a/env/S4.env b/env/S4.env index 190c7295f4a..4ae8b896d75 100755 --- a/env/S4.env +++ b/env/S4.env @@ -19,9 +19,15 @@ export NTHSTACK=1024000000 ulimit -s unlimited ulimit -a -if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then +# Calculate common variables +nth_max=$((npe_node_max / npe_node)) +NTHREADSmax=$((nth:-${nth_max})) +NTHREADS1=$((nth:-1)) +[[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} +[[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} +APRUN="${launcher} -n ${npe}" - nth_max=$((npe_node_max / npe_node_prep)) +if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then export POE="NO" export BACK="NO" @@ -30,11 +36,11 @@ if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then elif [[ "${step}" = "prepsnowobs" ]]; then - export APRUN_CALCFIMS="${launcher} -n 1" + export APRUN_CALCFIMS="${APRUN}" elif [[ "${step}" = "prep_emissions" ]]; then - export APRUN="${launcher} -n 1" + export APRUN="${APRUN}" elif [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step}" = "wavepostsbs" ]] || [[ "${step}" = "wavepostbndpnt" ]] || [[ "${step}" = "wavepostbndpntbll" ]] || [[ "${step}" = "wavepostpnt" ]]; then @@ -45,62 +51,42 @@ elif [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step} elif [[ "${step}" = "atmanlvar" ]]; then - nth_max=$((npe_node_max / npe_node_atmanlvar)) - - export NTHREADS_ATMANLVAR=${nth_atmanlvar:-${nth_max}} - [[ ${NTHREADS_ATMANLVAR} -gt ${nth_max} ]] && export NTHREADS_ATMANLVAR=${nth_max} - export APRUN_ATMANLVAR="${launcher} -n ${npe_atmanlvar}" + export NTHREADS_ATMANLVAR=${NTHREADSmax} + export APRUN_ATMANLVAR="${APRUN}" elif [[ "${step}" = "atmensanlletkf" ]]; then - nth_max=$((npe_node_max / npe_node_atmensanlletkf)) - - export NTHREADS_ATMENSANLLETKF=${nth_atmensanlletkf:-${nth_max}} - [[ ${NTHREADS_ATMENSANLLETKF} -gt ${nth_max} ]] && export NTHREADS_ATMENSANLLETKF=${nth_max} - export APRUN_ATMENSANLLETKF="${launcher} -n ${npe_atmensanlletkf}" + export NTHREADS_ATMENSANLLETKF=${NTHREADSmax} + export APRUN_ATMENSANLLETKF="${APRUN}" elif [[ "${step}" = "atmensanlfv3inc" ]]; then - nth_max=$((npe_node_max / npe_node_atmensanlfv3inc)) - - export NTHREADS_ATMENSANLFV3INC=${nth_atmensanlfv3inc:-${nth_max}} - [[ ${NTHREADS_ATMENSANLFV3INC} -gt ${nth_max} ]] && export NTHREADS_ATMENSANLFV3INC=${nth_max} - export APRUN_ATMENSANLFV3INC="${launcher} -n ${npe_atmensanlfv3inc}" + export NTHREADS_ATMENSANLFV3INC=${NTHREADSmax} + export APRUN_ATMENSANLFV3INC="${APRUN}" elif [[ "${step}" = "aeroanlrun" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_aeroanlrun)) - - export NTHREADS_AEROANL=${nth_aeroanlrun:-${nth_max}} - [[ ${NTHREADS_AEROANL} -gt ${nth_max} ]] && export NTHREADS_AEROANL=${nth_max} - export APRUN_AEROANL="${launcher} -n ${npe_aeroanlrun}" + export NTHREADS_AEROANL=${NTHREADSmax} + export APRUN_AEROANL="${APRUN}" elif [[ "${step}" = "prepobsaero" ]]; then - nth_max=$((npe_node_max / npe_node_prepobsaero)) - - export NTHREADS_PREPOBSAERO=${nth_prepobsaero:-1} - export APRUN_PREPOBSAERO="${launcher} -n ${npe_prepobsaero} --cpus-per-task=${NTHREADS_PREPOBSAERO}" + export NTHREADS_PREPOBSAERO=${NTHREADS1} + export APRUN_PREPOBSAERO="${APRUN} --cpus-per-task=${NTHREADS_PREPOBSAERO}" elif [[ "${step}" = "snowanl" ]]; then - nth_max=$((npe_node_max / npe_node_snowanl)) - - export NTHREADS_SNOWANL=${nth_snowanl:-${nth_max}} - [[ ${NTHREADS_SNOWANL} -gt ${nth_max} ]] && export NTHREADS_SNOWANL=${nth_max} - export APRUN_SNOWANL="${launcher} -n ${npe_snowanl}" + export NTHREADS_SNOWANL=${NTHREADSmax} + export APRUN_SNOWANL="${APRUN}" export APRUN_APPLY_INCR="${launcher} -n 6" elif [[ "${step}" = "atmanlfv3inc" ]]; then - nth_max=$((npe_node_max / npe_node_atmanlfv3inc)) - - export NTHREADS_ATMANLFV3INC=${nth_atmanlfv3inc:-${nth_max}} - [[ ${NTHREADS_ATMANLFV3INC} -gt ${nth_max} ]] && export NTHREADS_ATMANLFV3INC=${nth_max} - export APRUN_ATMANLFV3INC="${launcher} -n ${npe_atmanlfv3inc}" + export NTHREADS_ATMANLFV3INC=${NTHREADSmax} + export APRUN_ATMANLFV3INC="${APRUN}" elif [[ "${step}" = "ocnanalbmat" ]]; then echo "WARNING: ${step} is not enabled on S4!" @@ -117,11 +103,8 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_anal)) - - export NTHREADS_GSI=${nth_anal:-${nth_max}} - [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe_anal}}" + export NTHREADS_GSI=${NTHREADSmax} + export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}}" export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} @@ -138,9 +121,7 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export APRUN_GAUSFCANL="${launcher} -n ${npe_gausfcanl}" elif [[ "${step}" = "sfcanl" ]]; then - nth_max=$((npe_node_max / npe_node_sfcanl)) - - export NTHREADS_CYCLE=${nth_sfcanl:-14} + export NTHREADS_CYCLE=${nth:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} npe_sfcanl=${ntiles:-6} export APRUN_CYCLE="${launcher} -n ${npe_sfcanl}" @@ -150,11 +131,8 @@ elif [[ "${step}" = "eobs" ]]; then export MKL_NUM_THREADS=4 export MKL_CBWR=AUTO - nth_max=$((npe_node_max / npe_node_eobs)) - - export NTHREADS_GSI=${nth_eobs:-${nth_max}} - [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe_eobs}}" + export NTHREADS_GSI=${NTHREADSmax} + export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}}" export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} @@ -162,11 +140,8 @@ elif [[ "${step}" = "eobs" ]]; then elif [[ "${step}" = "eupd" ]]; then - nth_max=$((npe_node_max / npe_node_eupd)) - - export NTHREADS_ENKF=${nth_eupd:-${nth_max}} - [[ ${NTHREADS_ENKF} -gt ${nth_max} ]] && export NTHREADS_ENKF=${nth_max} - export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe_eupd}}" + export NTHREADS_ENKF=${NTHREADSmax} + export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe}}" export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} @@ -174,10 +149,10 @@ elif [[ "${step}" = "eupd" ]]; then elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then - ppn="npe_node_${step}_${RUN}" - [[ -z "${!ppn+0}" ]] && ppn="npe_node_${step}" - nprocs="npe_${step}_${RUN}" - [[ -z ${!nprocs+0} ]] && nprocs="npe_${step}" + ppn="npe_node_${RUN}" + [[ -z "${!ppn+0}" ]] && ppn="npe_node" + nprocs="npe_${RUN}" + [[ -z ${!nprocs+0} ]] && nprocs="npe" (( nnodes = (${!nprocs}+${!ppn}-1)/${!ppn} )) (( ntasks = nnodes*${!ppn} )) @@ -187,12 +162,9 @@ elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then elif [[ "${step}" = "upp" ]]; then - nth_max=$((npe_node_max / npe_node_upp)) - - export NTHREADS_UPP=${nth_upp:-1} - [[ ${NTHREADS_UPP} -gt ${nth_max} ]] && export NTHREADS_UPP=${nth_max} + export NTHREADS_UPP=${NTHREADS1} export OMP_NUM_THREADS="${NTHREADS_UPP}" - export APRUN_UPP="${launcher} -n ${npe_upp}" + export APRUN_UPP="${APRUN}" elif [[ "${step}" = "atmos_products" ]]; then @@ -200,18 +172,13 @@ elif [[ "${step}" = "atmos_products" ]]; then elif [[ "${step}" = "oceanice_products" ]]; then - nth_max=$((npe_node_max / npe_node_oceanice_products)) - - export NTHREADS_OCNICEPOST=${nth_oceanice_products:-1} + export NTHREADS_OCNICEPOST=${NTHREADS1} export APRUN_OCNICEPOST="${launcher} -n 1 --cpus-per-task=${NTHREADS_OCNICEPOST}" elif [[ "${step}" = "ecen" ]]; then - nth_max=$((npe_node_max / npe_node_ecen)) - - export NTHREADS_ECEN=${nth_ecen:-${nth_max}} - [[ ${NTHREADS_ECEN} -gt ${nth_max} ]] && export NTHREADS_ECEN=${nth_max} - export APRUN_ECEN="${launcher} -n ${npe_ecen}" + export NTHREADS_ECEN=${NTHREADSmax} + export APRUN_ECEN="${APRUN}" export NTHREADS_CHGRES=${nth_chgres:-12} [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} @@ -219,56 +186,25 @@ elif [[ "${step}" = "ecen" ]]; then export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} - export APRUN_CALCINC="${launcher} -n ${npe_ecen}" + export APRUN_CALCINC="${APRUN}" elif [[ "${step}" = "esfc" ]]; then - nth_max=$((npe_node_max / npe_node_esfc)) - - export NTHREADS_ESFC=${nth_esfc:-${nth_max}} - [[ ${NTHREADS_ESFC} -gt ${nth_max} ]] && export NTHREADS_ESFC=${nth_max} - export APRUN_ESFC="${launcher} -n ${npe_esfc}" + export NTHREADS_ESFC=${NTHREADSmax} + export APRUN_ESFC="${APRUN}" export NTHREADS_CYCLE=${nth_cycle:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - export APRUN_CYCLE="${launcher} -n ${npe_esfc}" + export APRUN_CYCLE="${APRUN}" elif [[ "${step}" = "epos" ]]; then - nth_max=$((npe_node_max / npe_node_epos)) - - export NTHREADS_EPOS=${nth_epos:-${nth_max}} - [[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max} - export APRUN_EPOS="${launcher} -n ${npe_epos}" - -elif [[ "${step}" = "postsnd" ]]; then - - export CFP_MP="YES" - - nth_max=$((npe_node_max / npe_node_postsnd)) - - export NTHREADS_POSTSND=${nth_postsnd:-1} - [[ ${NTHREADS_POSTSND} -gt ${nth_max} ]] && export NTHREADS_POSTSND=${nth_max} - export APRUN_POSTSND="${launcher} -n ${npe_postsnd}" - - export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} - [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} - export APRUN_POSTSNDCFP="${launcher} -n ${npe_postsndcfp} ${mpmd_opt}" - -elif [[ "${step}" = "awips" ]]; then - - echo "WARNING: ${step} is not enabled on S4!" - -elif [[ "${step}" = "gempak" ]]; then - - echo "WARNING: ${step} is not enabled on S4!" + export NTHREADS_EPOS=${NTHREADSmax} + export APRUN_EPOS="${APRUN}" elif [[ "${step}" = "fit2obs" ]]; then - nth_max=$((npe_node_max / npe_node_fit2obs)) - - export NTHREADS_FIT2OBS=${nth_fit2obs:-1} - [[ ${NTHREADS_FIT2OBS} -gt ${nth_max} ]] && export NTHREADS_FIT2OBS=${nth_max} - export MPIRUN="${launcher} -n ${npe_fit2obs}" + export NTHREADS_FIT2OBS=${NTHREADS1} + export MPIRUN="${APRUN}" fi diff --git a/env/WCOSS2.env b/env/WCOSS2.env index 33e30d9ac51..bfc57e591e3 100755 --- a/env/WCOSS2.env +++ b/env/WCOSS2.env @@ -13,9 +13,17 @@ step=$1 export launcher="mpiexec -l" export mpmd_opt="--cpu-bind verbose,core cfp" -if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then +# Calculate common variables +nth_max=$((npe_node_max / npe_node)) +NTHREADSmax=$((nth:-${nth_max})) +NTHREADS1=$((nth:-1)) +NTHREADS2=$((nth:-2)) +[[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} +[[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} +[[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} +APRUN="${launcher} -n ${npe}" - nth_max=$((npe_node_max / npe_node)) +if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then export POE=${POE:-"YES"} export BACK=${BACK:-"off"} @@ -24,11 +32,11 @@ if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then elif [[ "${step}" = "prepsnowobs" ]]; then - export APRUN_CALCFIMS="${launcher} -n 1" + export APRUN_CALCFIMS="${APRUN}" elif [[ "${step}" = "prep_emissions" ]]; then - export APRUN="${launcher} -n 1" + export APRUN="${APRUN}" elif [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step}" = "wavepostsbs" ]] || [[ "${step}" = "wavepostbndpnt" ]] || [[ "${step}" = "wavepostbndpntbll" ]] || [[ "${step}" = "wavepostpnt" ]]; then @@ -38,62 +46,42 @@ elif [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step} elif [[ "${step}" = "atmanlvar" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ATMANLVAR=${nth:-${nth_max}} - [[ ${NTHREADS_ATMANLVAR} -gt ${nth_max} ]] && export NTHREADS_ATMANLVAR=${nth_max} - export APRUN_ATMANLVAR="${launcher} -n ${npe}" + export NTHREADS_ATMANLVAR=${NTHREADS} + export APRUN_ATMANLVAR="${APRUN}" elif [[ "${step}" = "atmensanlletkf" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ATMENSANLLETKF=${nth:-${nth_max}} - [[ ${NTHREADS_ATMENSANLLETKF} -gt ${nth_max} ]] && export NTHREADS_ATMENSANLLETKF=${nth_max} - export APRUN_ATMENSANLLETKF="${launcher} -n ${npe}" + export NTHREADS_ATMENSANLLETKF=${NTHREADSmax} + export APRUN_ATMENSANLLETKF="${APRUN}" elif [[ "${step}" = "atmensanlfv3inc" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ATMENSANLFV3INC=${nth:-${nth_max}} - [[ ${NTHREADS_ATMENSANLFV3INC} -gt ${nth_max} ]] && export NTHREADS_ATMENSANLFV3INC=${nth_max} - export APRUN_ATMENSANLFV3INC="${launcher} -n ${npe}" + export NTHREADS_ATMENSANLFV3INC=${NTHREADSmax} + export APRUN_ATMENSANLFV3INC="${APRUN}" elif [[ "${step}" = "aeroanlrun" ]]; then export APRUNCFP="${launcher} -np \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_AEROANL=${nth:-${nth_max}} - [[ ${NTHREADS_AEROANL} -gt ${nth_max} ]] && export NTHREADS_AEROANL=${nth_max} - export APRUN_AEROANL="${launcher} -n ${npe}" + export NTHREADS_AEROANL=${NTHREADSmax} + export APRUN_AEROANL="${APRUN}" elif [[ "${step}" = "prepobsaero" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_PREPOBSAERO=${nth:-1} - export APRUN_PREPOBSAERO="${launcher} -n ${npe} --ppn ${npe_node}--cpu-bind depth --depth=${NTHREADS_PREPOBSAERO}" + export NTHREADS_PREPOBSAERO=${NTHREADS1} + export APRUN_PREPOBSAERO="${APRUN} --ppn ${npe_node}--cpu-bind depth --depth=${NTHREADS_PREPOBSAERO}" elif [[ "${step}" = "snowanl" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_SNOWANL=${nth:-${nth_max}} - [[ ${NTHREADS_SNOWANL} -gt ${nth_max} ]] && export NTHREADS_SNOWANL=${nth_max} - export APRUN_SNOWANL="${launcher} -n ${npe}" + export NTHREADS_SNOWANL=${NTHREADSmax} + export APRUN_SNOWANL="${APRUN}" export APRUN_APPLY_INCR="${launcher} -n 6" elif [[ "${step}" = "atmanlfv3inc" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ATMANLFV3INC=${nth:-${nth_max}} - [[ ${NTHREADS_ATMANLFV3INC} -gt ${nth_max} ]] && export NTHREADS_ATMANLFV3INC=${nth_max} - export APRUN_ATMANLFV3INC="${launcher} -n ${npe}" + export NTHREADS_ATMANLFV3INC=${NTHREADSmax} + export APRUN_ATMANLFV3INC="${APRUN}" elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then @@ -105,14 +93,10 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export MPICH_MPIIO_HINTS="*:romio_cb_write=disable" fi - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_GSI=${nth:-${nth_max}} - [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} + export NTHREADS_GSI=${NTHREADSmax} export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_GSI}" - export NTHREADS_CALCINC=${nth_calcinc:-1} - [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} + export NTHREADS_CALCINC=${NTHREADS1} export APRUN_CALCINC="${launcher} \$ncmd" export NTHREADS_CYCLE=${nth_cycle:-14} @@ -134,12 +118,10 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then elif [[ "${step}" = "sfcanl" ]]; then - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_CYCLE=${nth:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} npe_sfcanl=${ntiles:-6} - export APRUN_CYCLE="${launcher} -n ${npe_sfcanl}" + export APRUN_CYCLE="${APRUN}" elif [[ "${step}" = "eobs" ]]; then @@ -147,10 +129,7 @@ elif [[ "${step}" = "eobs" ]]; then export OMP_STACKSIZE=1G export FI_OFI_RXM_SAR_LIMIT=3145728 - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_GSI=${nth:-${nth_max}} - [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} + export NTHREADS_GSI=${NTHREADSmax} export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_GSI}" export CFP_MP=${CFP_MP:-"NO"} @@ -164,10 +143,7 @@ elif [[ "${step}" = "eupd" ]]; then export MPICH_COLL_OPT_OFF=1 export FI_OFI_RXM_SAR_LIMIT=3145728 - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ENKF=${nth:-${nth_max}} - [[ ${NTHREADS_ENKF} -gt ${nth_max} ]] && export NTHREADS_ENKF=${nth_max} + export NTHREADS_ENKF=${NTHREADSmax} export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe}} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_ENKF}" export CFP_MP=${CFP_MP:-"NO"} @@ -201,11 +177,8 @@ elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then elif [[ "${step}" = "upp" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_UPP=${nth:-1} - [[ ${NTHREADS_UPP} -gt ${nth_max} ]] && export NTHREADS_UPP=${nth_max} - export APRUN_UPP="${launcher} -n ${npe} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_UPP}" + export NTHREADS_UPP=${NTHREADS1} + export APRUN_UPP="${APRUN} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_UPP}" elif [[ "${step}" = "atmos_products" ]]; then @@ -213,18 +186,13 @@ elif [[ "${step}" = "atmos_products" ]]; then elif [[ "${step}" = "oceanice_products" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_OCNICEPOST=${nth:-1} + export NTHREADS_OCNICEPOST=${NTHREADS1} export APRUN_OCNICEPOST="${launcher} -n 1 -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_OCNICEPOST}" elif [[ "${step}" = "ecen" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ECEN=${nth:-${nth_max}} - [[ ${NTHREADS_ECEN} -gt ${nth_max} ]] && export NTHREADS_ECEN=${nth_max} - export APRUN_ECEN="${launcher} -n ${npe} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_ECEN}" + export NTHREADS_ECEN=${NTHREADSmax} + export APRUN_ECEN="${APRUN} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_ECEN}" export NTHREADS_CHGRES=${nth_chgres:-14} [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} @@ -232,42 +200,33 @@ elif [[ "${step}" = "ecen" ]]; then export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} - export APRUN_CALCINC="${launcher} -n ${npe}" + export APRUN_CALCINC="${APRUN}" export NTHREADS_CYCLE=${nth_cycle:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - export APRUN_CYCLE="${launcher} -n ${npe} -ppn ${npe_node_cycle} --cpu-bind depth --depth ${NTHREADS_CYCLE}" + export APRUN_CYCLE="${APRUN} -ppn ${npe_node_cycle} --cpu-bind depth --depth ${NTHREADS_CYCLE}" elif [[ "${step}" = "esfc" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_ESFC=${nth:-${nth_max}} - [[ ${NTHREADS_ESFC} -gt ${nth_max} ]] && export NTHREADS_ESFC=${nth_max} - export APRUN_ESFC="${launcher} -n ${npe} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_ESFC}" + export NTHREADS_ESFC=${NTHREADSmax} + export APRUN_ESFC="${APRUN} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_ESFC}" export NTHREADS_CYCLE=${nth_cycle:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - export APRUN_CYCLE="${launcher} -n ${npe} -ppn ${npe_node_cycle} --cpu-bind depth --depth ${NTHREADS_CYCLE}" + export APRUN_CYCLE="${APRUN} -ppn ${npe_node_cycle} --cpu-bind depth --depth ${NTHREADS_CYCLE}" elif [[ "${step}" = "epos" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_EPOS=${nth:-${nth_max}} - [[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max} - export APRUN_EPOS="${launcher} -n ${npe} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_EPOS}" + export NTHREADS_EPOS=${NTHREADSmax} + export APRUN_EPOS="${APRUN} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_EPOS}" elif [[ "${step}" = "postsnd" ]]; then export MPICH_MPIIO_HINTS_DISPLAY=1 export OMP_NUM_THREADS=1 - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_POSTSND=${nth:-1} - [[ ${NTHREADS_POSTSND} -gt ${nth_max} ]] && export NTHREADS_POSTSND=${nth_max} - export APRUN_POSTSND="${launcher} -n ${npe} --depth=${NTHREADS_POSTSND} --cpu-bind depth" + export NTHREADS_POSTSND=${NTHREADS1} + export APRUN_POSTSND="${APRUN} --depth=${NTHREADS_POSTSND} --cpu-bind depth" export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} @@ -275,26 +234,17 @@ elif [[ "${step}" = "postsnd" ]]; then elif [[ "${step}" = "awips" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_AWIPS=${nth:-2} - [[ ${NTHREADS_AWIPS} -gt ${nth_max} ]] && export NTHREADS_AWIPS=${nth_max} + export NTHREADS_AWIPS=${NTHREADS2} export APRUN_AWIPSCFP="${launcher} -np ${npe} ${mpmd_opt}" elif [[ "${step}" = "gempak" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_GEMPAK=${nth:-1} - [[ ${NTHREADS_GEMPAK} -gt ${nth_max} ]] && export NTHREADS_GEMPAK=${nth_max} + export NTHREADS_GEMPAK=${NTHREADS1} export APRUN_GEMPAKCFP="${launcher} -np ${npe} ${mpmd_opt}" elif [[ "${step}" = "fit2obs" ]]; then - nth_max=$((npe_node_max / npe_node)) - - export NTHREADS_FIT2OBS=${nth:-1} - [[ ${NTHREADS_FIT2OBS} -gt ${nth_max} ]] && export NTHREADS_FIT2OBS=${nth_max} + export NTHREADS_FIT2OBS=${NTHREADS1} export MPIRUN="${launcher} -np ${npe}" elif [[ "${step}" = "waveawipsbulls" ]]; then From 1e5e6cfd86e979cac11bdbee62f6760689e19a63 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Tue, 25 Jun 2024 13:40:04 +0000 Subject: [PATCH 04/73] More env cleanup --- env/HERCULES.env | 44 +------------------------------------------- env/JET.env | 3 +-- env/ORION.env | 3 +-- env/S4.env | 3 +-- env/WCOSS2.env | 1 - 5 files changed, 4 insertions(+), 50 deletions(-) diff --git a/env/HERCULES.env b/env/HERCULES.env index 20b95636e4b..47a0a1c8ccd 100755 --- a/env/HERCULES.env +++ b/env/HERCULES.env @@ -41,8 +41,6 @@ APRUN="${launcher} -n ${npe}" case ${step} in "prep" | "prepbufr") - nth_max=$((npe_node_max / npe_node)) - export POE="NO" export BACK=${BACK:-"YES"} export sys_tp="HERCULES" @@ -66,29 +64,21 @@ case ${step} in ;; "atmanlvar") - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMANLVAR=${NTHREADSmax} export APRUN_ATMANLVAR="${APRUN} --cpus-per-task=${NTHREADS_ATMANLVAR}" ;; "atmanlfv3inc") - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMANLFV3INC=${NTHREADSmax} export APRUN_ATMANLFV3INC="${APRUN} --cpus-per-task=${NTHREADS_ATMANLFV3INC}" ;; "atmensanlletkf") - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMENSANLLETKF=${NTHREADSmax} export APRUN_ATMENSANLLETKF="${APRUN} --cpus-per-task=${NTHREADS_ATMENSANLLETKF}" ;; "atmensanlfv3inc") - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ATMENSANLFV3INC=${NTHREADSmax} export APRUN_ATMENSANLFV3INC="${APRUN} --cpus-per-task=${NTHREADS_ATMENSANLFV3INC}" ;; @@ -96,21 +86,16 @@ case ${step} in export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_AEROANL=${NTHREADSmax} export APRUN_AEROANL="${APRUN} --cpus-per-task=${NTHREADS_AEROANL}" ;; "prepobsaero") - nth_max=$((npe_node_max / npe_node)) export NTHREADS_PREPOBSAERO=${NTHREADS1} export APRUN_PREPOBSAERO="${APRUN} --cpus-per-task=${NTHREADS_PREPOBSAERO}" ;; "snowanl") - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_SNOWANL=${NTHREADSmax} export APRUN_SNOWANL="${APRUN} --cpus-per-task=${NTHREADS_SNOWANL}" @@ -120,8 +105,6 @@ case ${step} in export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNANAL=${NTHREADSmax} export APRUN_OCNANAL="${APRUN} --cpus-per-task=${NTHREADS_OCNANAL}" ;; @@ -129,8 +112,6 @@ case ${step} in export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNANAL=${NTHREADSmax} export APRUN_OCNANAL="${APRUN} --cpus-per-task=${NTHREADS_OCNANAL}" ;; @@ -138,8 +119,6 @@ case ${step} in export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNANAL=${NTHREADSmax} export APRUN_OCNANAL="${APRUN} --cpus-per-task=${NTHREADS_OCNANAL}" ;; @@ -152,7 +131,6 @@ case ${step} in export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node)) export NTHREADS_GSI=${nth_anal:-${nth_max}} export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} --cpus-per-task=${NTHREADS_GSI}" @@ -171,12 +149,10 @@ case ${step} in export APRUN_GAUSFCANL="${launcher} -n ${npe_gausfcanl} --cpus-per-task=${NTHREADS_GAUSFCANL}" ;; "sfcanl") - nth_max=$((npe_node_max / npe_node)) export NTHREADS_CYCLE=${nth:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - npe_sfcanl=${ntiles:-6} - export APRUN_CYCLE="${launcher} -n ${npe_sfcanl} --cpus-per-task=${NTHREADS_CYCLE}" + export APRUN_CYCLE="${APRUN} --cpus-per-task=${NTHREADS_CYCLE}" ;; "eobs") @@ -187,7 +163,6 @@ case ${step} in export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node)) export NTHREADS_GSI=${NTHREADSmax} [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} @@ -199,7 +174,6 @@ case ${step} in export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node)) export NTHREADS_ENKF=${NTHREADSmax} export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe}} --cpus-per-task=${NTHREADS_ENKF}" @@ -222,8 +196,6 @@ case ${step} in "upp") - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_UPP=${NTHREADS1} export APRUN_UPP="${APRUN} --cpus-per-task=${NTHREADS_UPP}" ;; @@ -235,16 +207,12 @@ case ${step} in "oceanice_products") - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_OCNICEPOST=${NTHREADS1} export APRUN_OCNICEPOST="${launcher} -n 1 --cpus-per-task=${NTHREADS_OCNICEPOST}" ;; "ecen") - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ECEN=${NTHREADSmax} export APRUN_ECEN="${APRUN} --cpus-per-task=${NTHREADS_ECEN}" @@ -259,8 +227,6 @@ case ${step} in ;; "esfc") - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_ESFC=${NTHREADSmax} export APRUN_ESFC="${APRUN} --cpus-per-task=${NTHREADS_ESFC}" @@ -271,8 +237,6 @@ case ${step} in ;; "epos") - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_EPOS=${NTHREADSmax} export APRUN_EPOS="${APRUN} --cpus-per-task=${NTHREADS_EPOS}" @@ -281,8 +245,6 @@ case ${step} in export CFP_MP="YES" - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_POSTSND=${NTHREADS1} export APRUN_POSTSND="${APRUN} --cpus-per-task=${NTHREADS_POSTSND}" @@ -293,8 +255,6 @@ case ${step} in ;; "awips") - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_AWIPS=${NTHREADS2} export APRUN_AWIPSCFP="${APRUN} ${mpmd_opt}" @@ -306,8 +266,6 @@ case ${step} in ;; "fit2obs") - nth_max=$((npe_node_max / npe_node)) - export NTHREADS_FIT2OBS=${NTHREADS1} export MPIRUN="${APRUN} --cpus-per-task=${NTHREADS_FIT2OBS}" diff --git a/env/JET.env b/env/JET.env index baeabdd0fe4..0f902c700b4 100755 --- a/env/JET.env +++ b/env/JET.env @@ -131,8 +131,7 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then elif [[ "${step}" = "sfcanl" ]]; then export NTHREADS_CYCLE=${nth:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - npe_sfcanl=${ntiles:-6} - export APRUN_CYCLE="${launcher} -n ${npe_sfcanl}" + export APRUN_CYCLE="${APRUN}" elif [[ "${step}" = "eobs" ]]; then diff --git a/env/ORION.env b/env/ORION.env index 981d2af17a1..70dc125b663 100755 --- a/env/ORION.env +++ b/env/ORION.env @@ -157,8 +157,7 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then elif [[ "${step}" = "sfcanl" ]]; then export NTHREADS_CYCLE=${nth:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - npe_sfcanl=${ntiles:-6} - export APRUN_CYCLE="${launcher} -n ${npe_sfcanl} --cpus-per-task=${NTHREADS_CYCLE}" + export APRUN_CYCLE="${APRUN} --cpus-per-task=${NTHREADS_CYCLE}" elif [[ "${step}" = "eobs" ]]; then diff --git a/env/S4.env b/env/S4.env index 4ae8b896d75..b1a1d779766 100755 --- a/env/S4.env +++ b/env/S4.env @@ -123,8 +123,7 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then elif [[ "${step}" = "sfcanl" ]]; then export NTHREADS_CYCLE=${nth:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - npe_sfcanl=${ntiles:-6} - export APRUN_CYCLE="${launcher} -n ${npe_sfcanl}" + export APRUN_CYCLE="${APRUN}" elif [[ "${step}" = "eobs" ]]; then diff --git a/env/WCOSS2.env b/env/WCOSS2.env index bfc57e591e3..8e21f930fd9 100755 --- a/env/WCOSS2.env +++ b/env/WCOSS2.env @@ -120,7 +120,6 @@ elif [[ "${step}" = "sfcanl" ]]; then export NTHREADS_CYCLE=${nth:-14} [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - npe_sfcanl=${ntiles:-6} export APRUN_CYCLE="${APRUN}" elif [[ "${step}" = "eobs" ]]; then From c5a99bbf74086762f9f4e11fed06bfc1e2d0359f Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Tue, 25 Jun 2024 13:54:44 +0000 Subject: [PATCH 05/73] Get sfcanl npe based on ntiles --- parm/config/gfs/config.resources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index e118854c8d2..bf9ee751701 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -689,7 +689,7 @@ case ${step} in "sfcanl") export wtime="00:20:00" - export npe=6 + export npe=${ntiles:-6} export nth=1 export npe_node=$(( npe_node_max / nth )) export is_exclusive=True From 4b9da33a7f67ec054d4390ffafd581462b4075a6 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Tue, 25 Jun 2024 18:04:37 +0000 Subject: [PATCH 06/73] Export standard resource variables only --- parm/config/gfs/config.resources | 1020 ++++++++++++++---------------- 1 file changed, 465 insertions(+), 555 deletions(-) diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index bf9ee751701..28f046831f6 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -126,149 +126,136 @@ export npe_node_max case ${step} in "prep") - export wtime='00:30:00' - export npe=4 - export npe_node=2 - export nth=1 - export memory="40GB" + wtime='00:30:00' + npe=4 + npe_node=2 + nth=1 + memory="40GB" ;; "prepsnowobs") - export wtime="00:05:00" - export npe=1 - export nth=1 - export npe_node=1 + wtime="00:05:00" + npe=1 + nth=1 + npe_node=1 ;; "prepatmiodaobs") - export wtime="00:30:00" - export npe=1 - export nth=1 - export npe_node=$(( npe_node_max / nth )) + wtime="00:30:00" + npe=1 + nth=1 + npe_node=$(( npe_node_max / nth )) ;; "aerosol_init") - export wtime="00:05:00" - export npe=1 - export nth=1 - export npe_node=$(( npe_node_max / nth )) - export NTASKS=${npe} - export memory="6GB" + wtime="00:05:00" + npe=1 + nth=1 + npe_node=$(( npe_node_max / nth )) + NTASKS=${npe} + memory="6GB" ;; "waveinit") - export wtime="00:10:00" - export npe=12 - export nth=1 - export npe_node=$(( npe_node_max / nth )) - export NTASKS=${npe} - export memory="2GB" + wtime="00:10:00" + npe=12 + nth=1 + npe_node=$(( npe_node_max / nth )) + NTASKS=${npe} + memory="2GB" ;; "waveprep") - export wtime="00:10:00" - export npe_gdas=5 - export npe_gfs=65 - export nth_gdas=1 - export nth_gfs=1 - export npe_node_gdas=$(( npe_node_max / nth_gdas )) - export npe_node_gfs=$(( npe_node_max / nth_gfs )) - export NTASKS_gdas=${npe_gdas} - export NTASKS_gfs=${npe_gfs} - export memory_gdas="100GB" - export memory_gfs="150GB" - - var_npe_node="npe_node_${RUN}" - var_nth="nth_${RUN}" - var_npe="npe_${RUN}" - var_NTASKS="ntasks_${RUN}" - # RUN is set to a single value at setup time, so these won't be found - # TODO rework setup_xml.py to initialize RUN to the applicable option - if [[ -n "${!var_npe_node+0}" ]]; then - declare -x "npe_node"="${!var_npe_node}" \ - "nth"="${!var_nth}" \ - "npe"="${!var_npe}" \ - "NTASKS"="${!var_NTASKS}" - fi + wtime="00:10:00" + npe_gdas=5 + npe_gfs=65 + nth_gdas=1 + nth_gfs=1 + npe_node_gdas=$(( npe_node_max / nth_gdas )) + npe_node_gfs=$(( npe_node_max / nth_gfs )) + NTASKS_gdas=${npe_gdas} + NTASKS_gfs=${npe_gfs} + memory_gdas="100GB" + memory_gfs="150GB" ;; "wavepostsbs") - export wtime_gdas="00:20:00" - export wtime_gfs="03:00:00" - export npe=8 - export nth=1 - export npe_node=$(( npe_node_max / nth )) - export NTASKS=${npe} - export memory_gdas="10GB" - export memory_gfs="10GB" + wtime_gdas="00:20:00" + wtime_gfs="03:00:00" + npe=8 + nth=1 + npe_node=$(( npe_node_max / nth )) + NTASKS=${npe} + memory_gdas="10GB" + memory_gfs="10GB" ;; # The wavepost*pnt* jobs are I/O heavy and do not scale well to large nodes. # Limit the number of tasks/node to 40. "wavepostbndpnt") - export wtime="03:00:00" - export npe=240 - export nth=1 - export npe_node=$(( npe_node_max / nth )) + wtime="03:00:00" + npe=240 + nth=1 + npe_node=$(( npe_node_max / nth )) export is_exclusive=True if [[ ${npe_node} -gt 40 ]]; then - export npe_node=40 + npe_node=40 export is_exclusive=False fi - export NTASKS=${npe} + NTASKS=${npe} ;; "wavepostbndpntbll") - export wtime="01:00:00" - export npe=448 - export nth=1 - export npe_node=$(( npe_node_max / nth )) + wtime="01:00:00" + npe=448 + nth=1 + npe_node=$(( npe_node_max / nth )) export is_exclusive=True if [[ ${npe_node} -gt 40 ]]; then - export npe_node=40 + npe_node=40 export is_exclusive=False fi - export NTASKS=${npe} + NTASKS=${npe} ;; "wavepostpnt") - export wtime="04:00:00" - export npe=200 - export nth=1 - export npe_node=$(( npe_node_max / nth )) + wtime="04:00:00" + npe=200 + nth=1 + npe_node=$(( npe_node_max / nth )) export is_exclusive=True if [[ ${npe_node} -gt 40 ]]; then - export npe_node=40 + npe_node=40 export is_exclusive=False fi - export NTASKS=${npe} + NTASKS=${npe} ;; "wavegempak") - export wtime="02:00:00" - export npe=1 - export nth=1 - export npe_node=$(( npe_node_max / nth )) - export NTASKS=${npe} - export memory="1GB" + wtime="02:00:00" + npe=1 + nth=1 + npe_node=$(( npe_node_max / nth )) + NTASKS=${npe} + memory="1GB" ;; "waveawipsbulls") - export wtime="00:20:00" - export npe=1 - export nth=1 - export npe_node=$(( npe_node_max / nth )) - export NTASKS=${npe} + wtime="00:20:00" + npe=1 + nth=1 + npe_node=$(( npe_node_max / nth )) + NTASKS=${npe} export is_exclusive=True ;; "waveawipsgridded") - export wtime="02:00:00" - export npe=1 - export nth=1 - export npe_node=$(( npe_node_max / nth )) - export NTASKS=${npe} - export memory_gfs="1GB" + wtime="02:00:00" + npe=1 + nth=1 + npe_node=$(( npe_node_max / nth )) + NTASKS=${npe} + memory_gfs="1GB" ;; "atmanlinit") @@ -278,67 +265,48 @@ case ${step} in export layout_gsib_x=$(( layout_x * 3 )) export layout_gsib_y=$(( layout_y * 2 )) - export wtime="00:10:00" - export npe=1 - export nth=1 - export npe_node=$(( npe_node_max / nth )) - export npe_node - export memory="3072M" + wtime="00:10:00" + npe=1 + nth=1 + npe_node=$(( npe_node_max / nth )) + memory="3072M" ;; "atmanlvar") export layout_x=${layout_x_atmanl} export layout_y=${layout_y_atmanl} - export wtime="00:30:00" - export npe_gdas=$(( layout_x * layout_y * 6 )) - export npe_gfs=$(( layout_x * layout_y * 6 )) - export nth_gdas=1 - export nth_gfs=${nth_gdas} - export npe_node_gdas=$(( npe_node_max / nth_gdas )) - export npe_node_gfs=$(( npe_node_max / nth_gfs )) - export memory="96GB" + wtime="00:30:00" + npe_gdas=$(( layout_x * layout_y * 6 )) + npe_gfs=$(( layout_x * layout_y * 6 )) + nth_gdas=1 + nth_gfs=${nth_gdas} + npe_node_gdas=$(( npe_node_max / nth_gdas )) + npe_node_gfs=$(( npe_node_max / nth_gfs )) + memory="96GB" export is_exclusive=True - - var_npe_node="npe_node_${RUN}" - var_nth="nth_${RUN}" - var_npe="npe_${RUN}" - if [[ -n "${!var_npe_node+0}" ]]; then - declare -x "npe_node"="${!var_npe_node}" \ - "nth"="${!var_nth}" \ - "npe"="${!var_npe}" - fi ;; "atmanlfv3inc") export layout_x=${layout_x_atmanl} export layout_y=${layout_y_atmanl} - export wtime="00:30:00" - export npe_gdas=$(( layout_x * layout_y * 6 )) - export npe_gfs=$(( layout_x * layout_y * 6 )) - export nth_gdas=1 - export nth_gfs=${nth_gdas} - export npe_node_gdas=$(( npe_node_max / nth_gdas )) - export npe_node_gfs=$(( npe_node_max / nth_gfs )) - export memory="96GB" + wtime="00:30:00" + npe_gdas=$(( layout_x * layout_y * 6 )) + npe_gfs=$(( layout_x * layout_y * 6 )) + nth_gdas=1 + nth_gfs=${nth_gdas} + npe_node_gdas=$(( npe_node_max / nth_gdas )) + npe_node_gfs=$(( npe_node_max / nth_gfs )) + memory="96GB" export is_exclusive=True - - var_npe_node="npe_node_${RUN}" - var_nth="nth_${RUN}" - var_npe="npe_${RUN}" - if [[ -n "${!var_npe_node+0}" ]]; then - declare -x "npe_node"="${!var_npe_node}" \ - "nth"="${!var_nth}" \ - "npe"="${!var_npe}" - fi ;; "atmanlfinal") - export wtime="00:30:00" - export npe=${npe_node_max} - export nth=1 - export npe_node=$(( npe_node_max / nth )) + wtime="00:30:00" + npe=${npe_node_max} + nth=1 + npe_node=$(( npe_node_max / nth )) export is_exclusive=True ;; @@ -365,18 +333,18 @@ case ${step} in export layout_x export layout_y - export wtime="00:15:00" - export npe=$(( layout_x * layout_y * 6 )) - export nth=1 - export npe_node=$(( npe_node_max / nth )) + wtime="00:15:00" + npe=$(( layout_x * layout_y * 6 )) + nth=1 + npe_node=$(( npe_node_max / nth )) ;; "prepobsaero") - export wtime="00:30:00" - export npe=1 - export nth=1 - export npe_node=1 - export memory="96GB" + wtime="00:30:00" + npe=1 + nth=1 + npe_node=1 + memory="96GB" ;; "aeroanlinit") @@ -406,11 +374,11 @@ case ${step} in export layout_x export layout_y - export wtime="00:10:00" - export npe=1 - export nth=1 - export npe_node=$(( npe_node_max / nth )) - export memory="3072M" + wtime="00:10:00" + npe=1 + nth=1 + npe_node=$(( npe_node_max / nth )) + memory="3072M" ;; "aeroanlrun") @@ -440,47 +408,38 @@ case ${step} in export layout_x export layout_y - export wtime="00:30:00" - export npe_gdas=$(( layout_x * layout_y * 6 )) - export npe_gfs=$(( layout_x * layout_y * 6 )) - export nth_gdas=1 - export nth_gfs=1 - export npe_node_gdas=$(( npe_node_max / nth_gdas )) - export npe_node_gfs=$(( npe_node_max / nth_gfs )) + wtime="00:30:00" + npe_gdas=$(( layout_x * layout_y * 6 )) + npe_gfs=$(( layout_x * layout_y * 6 )) + nth_gdas=1 + nth_gfs=1 + npe_node_gdas=$(( npe_node_max / nth_gdas )) + npe_node_gfs=$(( npe_node_max / nth_gfs )) export is_exclusive=True - - var_npe_node="npe_node_${RUN}" - var_nth="nth_${RUN}" - var_npe="npe_${RUN}" - if [[ -n "${!var_npe_node+0}" ]]; then - declare -x "npe_node"="${!var_npe_node}" \ - "nth"="${!var_nth}" \ - "npe"="${!var_npe}" - fi ;; "aeroanlfinal") - export wtime="00:10:00" - export npe=1 - export nth=1 - export npe_node=$(( npe_node_max / nth )) - export memory="3072M" + wtime="00:10:00" + npe=1 + nth=1 + npe_node=$(( npe_node_max / nth )) + memory="3072M" ;; "ocnanalprep") - export wtime="00:10:00" - export npe=1 - export nth=1 - export npe_node=$(( npe_node_max / nth )) - export memory="24GB" + wtime="00:10:00" + npe=1 + nth=1 + npe_node=$(( npe_node_max / nth )) + memory="24GB" ;; "prepoceanobs") - export wtime="00:10:00" - export npe=1 - export nth=1 - export npe_node=$(( npe_node_max / nth )) - export memory="48GB" + wtime="00:10:00" + npe=1 + nth=1 + npe_node=$(( npe_node_max / nth )) + memory="48GB" ;; "ocnanalbmat") @@ -494,11 +453,11 @@ case ${step} in exit 4 esac - export wtime="00:30:00" - export npe=${npes} - export nth=1 + wtime="00:30:00" + npe=${npes} + nth=1 export is_exclusive=True - export npe_node=$(( npe_node_max / nth )) + npe_node=$(( npe_node_max / nth )) ;; "ocnanalrun") @@ -521,12 +480,11 @@ case ${step} in exit 4 esac - export wtime="00:15:00" - export npe=${npes} - export nth=1 + wtime="00:15:00" + npe=${npes} + nth=1 export is_exclusive=True - export npe_node=$(( npe_node_max / nth )) - export memory + npe_node=$(( npe_node_max / nth )) ;; "ocnanalecen") @@ -549,12 +507,11 @@ case ${step} in exit 4 esac - export wtime="00:10:00" - export npe=${npes} - export nth=1 + wtime="00:10:00" + npe=${npes} + nth=1 export is_exclusive=True - export npe_node=$(( npe_node_max / nth )) - export memory + npe_node=$(( npe_node_max / nth )) ;; "ocnanalletkf") @@ -577,20 +534,19 @@ case ${step} in exit 4 esac - export wtime="00:10:00" - export npe=${npes} - export nth=1 + wtime="00:10:00" + npe=${npes} + nth=1 export is_exclusive=True - export npe_node=$(( npe_node_max / nth )) - export memory + npe_node=$(( npe_node_max / nth )) ;; "ocnanalchkpt") - export wtime="00:10:00" - export npe=1 - export nth=1 - export npe_node=$(( npe_node_max / nth )) + wtime="00:10:00" + npe=1 + nth=1 + npe_node=$(( npe_node_max / nth )) case ${OCNRES} in "025") memory="128GB" @@ -605,93 +561,82 @@ case ${step} in echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${OCNRES}" exit 4 esac - export npe=${npes} - export memory + npe=${npes} ;; "ocnanalpost") - export wtime="00:30:00" - export npe=${npe_node_max} - export nth=1 - export npe_node=$(( npe_node_max / nth )) + wtime="00:30:00" + npe=${npe_node_max} + nth=1 + npe_node=$(( npe_node_max / nth )) ;; "ocnanalvrfy") - export wtime="00:35:00" - export npe=1 - export nth=1 - export npe_node=$(( npe_node_max / nth )) - export memory="24GB" + wtime="00:35:00" + npe=1 + nth=1 + npe_node=$(( npe_node_max / nth )) + memory="24GB" ;; "anal") - export wtime_gdas="01:20:00" - export wtime_gfs="01:00:00" + wtime_gdas="01:20:00" + wtime_gfs="01:00:00" case ${CASE} in "C768") - export npe_gdas=780 - export npe_gfs=825 - export nth=5 + npe_gdas=780 + npe_gfs=825 + nth=5 ;; "C384") - export npe_gdas=160 - export npe_gfs=160 - export nth=10 + npe_gdas=160 + npe_gfs=160 + nth=10 ;; "C192" | "C96" | "C48") - export npe_gdas=84 - export npe_gfs=84 - export nth=5 + npe_gdas=84 + npe_gfs=84 + nth=5 ;; *) echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${CASE}" exit 4 ;; esac - export npe_node=$(( npe_node_max / nth )) - export nth=${nth} - export npe_node=$(( npe_node_max / nth_cycle )) + npe_node=$(( npe_node_max / nth )) + export nth_cycle=${nth} + export npe_node_cycle=$(( npe_node_max / nth_cycle )) export is_exclusive=True - - var_npe="npe_${RUN}" - if [[ -n "${!var_npe+0}" ]]; then - declare -x "npe"="${!var_npe}" - fi ;; "analcalc") - export wtime="00:15:00" - export npe=127 + wtime="00:15:00" + npe=127 export ntasks="${npe}" - export nth=1 - export npe_node=$(( npe_node_max / nth )) + nth=1 + npe_node=$(( npe_node_max / nth )) export nth_echgres_gdas=4 export nth_echgres_gfs=12 export is_exclusive=True - export memory="48GB" + memory="48GB" if [[ "${CASE}" == "C384" || "${CASE}" == "C768" ]]; then - export memory="${mem_node_max}" - fi - - var_nth="nth_echgres_${RUN}" - if [[ -n "${!var_nth+0}" ]]; then - declare -x "nth"="${!var_nth}" + memory="${mem_node_max}" fi ;; "analdiag") - export wtime="00:15:00" - export npe=96 # Should be at least twice npe - export nth=1 - export npe_node=$(( npe_node_max / nth )) - export memory="48GB" + wtime="00:15:00" + npe=96 # Should be at least twice npe + nth=1 + npe_node=$(( npe_node_max / nth )) + memory="48GB" ;; "sfcanl") - export wtime="00:20:00" - export npe=${ntiles:-6} - export nth=1 - export npe_node=$(( npe_node_max / nth )) + wtime="00:20:00" + npe=${ntiles:-6} + nth=1 + npe_node=$(( npe_node_max / nth )) export is_exclusive=True ;; @@ -851,175 +796,166 @@ case ${step} in ;; esac - var_npe_node="npe_node_${RUN}" - var_nth="nth_${RUN}" - var_npe="npe_${RUN}" - if [[ -n "${!var_npe_node+0}" ]]; then - declare -x "npe_node"="${!var_npe_node}" \ - "nth"="${!var_nth}" \ - "npe"="${!var_npe}" - fi - unset _CDUMP _CDUMP_LIST unset NTASKS_TOT ;; "oceanice_products") - export wtime="00:15:00" - export npe=1 - export npe_node=1 - export nth=1 - export memory="96GB" + wtime="00:15:00" + npe=1 + npe_node=1 + nth=1 + memory="96GB" ;; "upp") case "${CASE}" in "C48" | "C96") - export npe=${CASE:1} + npe=${CASE:1} ;; "C192" | "C384" | "C768" ) - export npe=120 - export memory="${mem_node_max}" + npe=120 + memory="${mem_node_max}" ;; *) echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${CASE}" exit 4 ;; esac - export npe_node=${npe} + npe_node=${npe} - export nth=1 + nth=1 - export wtime="00:15:00" + wtime="00:15:00" if (( npe_node > npe_node_max )); then - export npe_node=${npe_node_max} + npe_node=${npe_node_max} fi export is_exclusive=True ;; "atmos_products") - export wtime="00:15:00" - export npe=24 - export nth=1 - export npe_node="${npe}" + wtime="00:15:00" + npe=24 + nth=1 + npe_node="${npe}" export is_exclusive=True ;; "verfozn") - export wtime="00:05:00" - export npe=1 - export nth=1 - export npe_node=1 - export memory="1G" + wtime="00:05:00" + npe=1 + nth=1 + npe_node=1 + memory="1G" ;; "verfrad") - export wtime="00:40:00" - export npe=1 - export nth=1 - export npe_node=1 - export memory="5G" + wtime="00:40:00" + npe=1 + nth=1 + npe_node=1 + memory="5G" ;; "vminmon") - export wtime="00:05:00" - export npe=1 - export nth=1 - export npe_node=1 - export memory="1G" + wtime="00:05:00" + npe=1 + nth=1 + npe_node=1 + memory="1G" ;; "tracker") - export wtime="00:10:00" - export npe=1 - export nth=1 - export npe_node=1 - export memory="4G" + wtime="00:10:00" + npe=1 + nth=1 + npe_node=1 + memory="4G" ;; "genesis") - export wtime="00:25:00" - export npe=1 - export nth=1 - export npe_node=1 - export memory="10G" + wtime="00:25:00" + npe=1 + nth=1 + npe_node=1 + memory="10G" ;; "genesis_fsu") - export wtime="00:10:00" - export npe=1 - export nth=1 - export npe_node=1 - export memory="10G" + wtime="00:10:00" + npe=1 + nth=1 + npe_node=1 + memory="10G" ;; "fit2obs") - export wtime="00:20:00" - export npe=3 - export nth=1 - export npe_node=1 - export memory="20G" + wtime="00:20:00" + npe=3 + nth=1 + npe_node=1 + memory="20G" ;; "metp") - export nth=1 - export wtime_gdas="03:00:00" - export wtime_gfs="06:00:00" - export npe=4 - export npe_node=4 + nth=1 + wtime_gdas="03:00:00" + wtime_gfs="06:00:00" + npe=4 + npe_node=4 export is_exclusive=True ;; "echgres") - export wtime="00:10:00" - export npe=3 - export nth=${npe_node_max} - export npe_node=1 + wtime="00:10:00" + npe=3 + nth=${npe_node_max} + npe_node=1 ;; "init") - export wtime="00:30:00" - export npe=24 - export nth=1 - export npe_node=6 - export memory="70GB" + wtime="00:30:00" + npe=24 + nth=1 + npe_node=6 + memory="70GB" ;; "init_chem") - export wtime="00:30:00" - export npe=1 - export npe_node=1 + wtime="00:30:00" + npe=1 + npe_node=1 export is_exclusive=True ;; "mom6ic") - export wtime="00:30:00" - export npe=24 - export npe_node=24 + wtime="00:30:00" + npe=24 + npe_node=24 export is_exclusive=True ;; "arch" | "earc" | "getic") - declare -x "wtime"="06:00:00" - declare -x "npe"="1" - declare -x "npe_node"="1" - declare -x "nth"="1" - declare -x "memory"="4096M" + wtime="06:00:00" + npe=1 + npe_node=1 + nth=1 + memory="4096M" ;; "cleanup") - export wtime="00:15:00" - export npe=1 - export npe_node=1 - export nth=1 - export memory="4096M" + wtime="00:15:00" + npe=1 + npe_node=1 + nth=1 + memory="4096M" ;; "stage_ic") - export wtime="00:15:00" - export npe=1 - export npe_node=1 - export nth=1 + wtime="00:15:00" + npe=1 + npe_node=1 + nth=1 export is_exclusive=True ;; @@ -1027,89 +963,67 @@ case ${step} in export layout_x=${layout_x_atmensanl} export layout_y=${layout_y_atmensanl} - export wtime="00:10:00" - export npe=1 - export nth=1 - export npe_node=$(( npe_node_max / nth )) - export memory="3072M" + wtime="00:10:00" + npe=1 + nth=1 + npe_node=$(( npe_node_max / nth )) + memory="3072M" ;; "atmensanlletkf") export layout_x=${layout_x_atmensanl} export layout_y=${layout_y_atmensanl} - export wtime="00:30:00" - export npe_enkfgdas=$(( layout_x * layout_y * 6 )) - export npe_enkfgfs=$(( layout_x * layout_y * 6 )) - export nth_enkfgdas=1 - export nth_enkfgfs=${nth_enkfgdas} - export npe_node_enkfgdas=$(( npe_node_max / nth_enkfgdas )) - export npe_node_enkfgfs=$(( npe_node_max / nth_enkfgfs )) - export memory="96GB" + wtime="00:30:00" + npe_enkfgdas=$(( layout_x * layout_y * 6 )) + npe_enkfgfs=$(( layout_x * layout_y * 6 )) + nth_enkfgdas=1 + nth_enkfgfs=${nth_enkfgdas} + npe_node_enkfgdas=$(( npe_node_max / nth_enkfgdas )) + npe_node_enkfgfs=$(( npe_node_max / nth_enkfgfs )) + memory="96GB" export is_exclusive=True - - var_npe_node="npe_node_${RUN}" - var_nth="nth_${RUN}" - var_npe="npe_${RUN}" - # RUN is set to a single value at setup time, so these won't be found - # TODO rework setup_xml.py to initialize RUN to the applicable option - if [[ -n "${!var_npe_node+0}" ]]; then - declare -x "npe_node"="${!var_npe_node}" \ - "nth"="${!var_nth}" \ - "npe"="${!var_npe}" - fi ;; "atmensanlfv3inc") export layout_x=${layout_x_atmensanl} export layout_y=${layout_y_atmensanl} - export wtime="00:30:00" - export npe_enkfgdas=$(( layout_x * layout_y * 6 )) - export npe_enkfgfs=$(( layout_x * layout_y * 6 )) - export nth_enkfgdas=1 - export nth_enkfgfs=${nth_enkfgdas} - export npe_node_enkfgdas=$(( npe_node_max / nth_enkfgdas )) - export npe_node_enkfgfs=$(( npe_node_max / nth_enkfgfs )) - export memory="96GB" + wtime="00:30:00" + npe_enkfgdas=$(( layout_x * layout_y * 6 )) + npe_enkfgfs=$(( layout_x * layout_y * 6 )) + nth_enkfgdas=1 + nth_enkfgfs=${nth_enkfgdas} + npe_node_enkfgdas=$(( npe_node_max / nth_enkfgdas )) + npe_node_enkfgfs=$(( npe_node_max / nth_enkfgfs )) + memory="96GB" export is_exclusive=True - - var_npe_node="npe_node_${RUN}" - var_nth="nth_${RUN}" - var_npe="npe_${RUN}" - # RUN is set to a single value at setup time, so these won't be found - # TODO rework setup_xml.py to initialize RUN to the applicable option - if [[ -n "${!var_npe_node+0}" ]]; then - declare -x "npe_node"="${!var_npe_node}" \ - "nth"="${!var_nth}" \ - "npe"="${!var_npe}" - fi ;; "atmensanlfinal") - export wtime="00:30:00" - export npe=${npe_node_max} - export nth=1 - export npe_node=$(( npe_node_max / nth )) + wtime="00:30:00" + npe=${npe_node_max} + nth=1 + npe_node=$(( npe_node_max / nth )) export is_exclusive=True ;; "eobs" | "eomg") - export wtime="00:15:00" - export wtime="00:30:00" + wtime="00:15:00" + wtime="00:30:00" case ${CASE} in - "C768") export npe=200;; - "C384") export npe=100;; - "C192" | "C96" | "C48") export npe=40;; + "C768") npe=200;; + "C384") npe=100;; + "C192" | "C96" | "C48") npe=40;; *) echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${CASE}" exit 4 ;; esac - export nth=2 + nth=2 # NOTE The number of tasks and cores used must be the same for eobs # See https://github.com/NOAA-EMC/global-workflow/issues/2092 for details - export npe_node=$(( npe_node_max / nth )) + npe_node=$(( npe_node_max / nth )) export is_exclusive=True # Unset npe_node if it is not a multiple of npe_node_max # to prevent dropping data on the floor. This should be set int @@ -1121,260 +1035,252 @@ case ${step} in ;; "ediag") - export wtime="00:15:00" - export npe=48 - export nth=1 - export npe_node=$(( npe_node_max / nth )) - export memory="30GB" + wtime="00:15:00" + npe=48 + nth=1 + npe_node=$(( npe_node_max / nth )) + memory="30GB" ;; "eupd") - export wtime="00:30:00" + wtime="00:30:00" case ${CASE} in "C768") - export npe=480 - export nth=6 + npe=480 + nth=6 ;; "C384") - export npe=270 - export nth=8 + npe=270 + nth=8 ;; "C192" | "C96" | "C48") - export npe=42 - export nth=2 + npe=42 + nth=2 ;; *) echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${CASE}" exit 4 ;; esac - export npe_node=$(( npe_node_max / nth )) + npe_node=$(( npe_node_max / nth )) export is_exclusive=True ;; "ecen") - export wtime="00:10:00" - export npe=80 - export nth=4 + wtime="00:10:00" + npe=80 + nth=4 if [[ ${CASE} == "C384" || ${CASE} == "C192" || ${CASE} == "C96" || ${CASE} == "C48" ]]; then - export nth=2 + nth=2 fi - export npe_node=$(( npe_node_max / nth )) + npe_node=$(( npe_node_max / nth )) + export nth_cycle=${nth} export npe_node_cycle=${npe_node} export is_exclusive=True ;; "esfc") - export wtime="00:15:00" - export npe=80 - export nth=1 - export npe_node=$(( npe_node_max / nth )) - export nth_cycle=${nth} - export npe_node_cycle=$(( npe_node_max / nth_cycle )) + wtime="00:15:00" + npe=80 + nth=1 + npe_node=$(( npe_node_max / nth )) + nth_cycle=${nth} + npe_node_cycle=$(( npe_node_max / nth_cycle )) ;; "epos") - export wtime="00:15:00" - [[ ${CASE} == "C768" ]] && export wtime="00:25:00" - export npe=80 - export nth=1 - export npe_node=$(( npe_node_max / nth )) + wtime="00:15:00" + [[ ${CASE} == "C768" ]] && wtime="00:25:00" + npe=80 + nth=1 + npe_node=$(( npe_node_max / nth )) export is_exclusive=True ;; "postsnd") - export wtime="02:00:00" - export npe=40 - export nth=8 - export npe_node=10 - export npe=9 - export npe_node=1 + wtime="02:00:00" + npe=40 + nth=8 + npe_node=10 + npe=9 + npe_node=1 postsnd_req_cores=$(( npe_node * nth )) if (( postsnd_req_cores > npe_node_max )); then - export npe_node=$(( npe_node_max / nth )) + npe_node=$(( npe_node_max / nth )) fi export is_exclusive=True ;; "awips") - export wtime="03:30:00" - export npe=1 - export npe_node=1 - export nth=1 - export memory="3GB" + wtime="03:30:00" + npe=1 + npe_node=1 + nth=1 + memory="3GB" ;; "npoess") - export wtime="03:30:00" - export npe=1 - export npe_node=1 - export nth=1 - export memory="3GB" + wtime="03:30:00" + npe=1 + npe_node=1 + nth=1 + memory="3GB" ;; "gempak") - export wtime="03:00:00" - export npe_gdas=2 - export npe_gfs=28 - export npe_node_gdas=2 - export npe_node_gfs=28 - export nth=1 - export memory_gdas="4GB" - export memory_gfs="2GB" - - var_npe_node="npe_node_${RUN}" - var_npe="npe_${RUN}" - # RUN is set to a single value at setup time, so these won't be found - # TODO rework setup_xml.py to initialize RUN to the applicable option - if [[ -n "${!var_npe_node+0}" ]]; then - declare -x "npe_node"="${!var_npe_node}" \ - "npe"="${!var_npe}" - fi + wtime="03:00:00" + npe_gdas=2 + npe_gfs=28 + npe_node_gdas=2 + npe_node_gfs=28 + nth=1 + memory_gdas="4GB" + memory_gfs="2GB" ;; "mos_stn_prep") - export wtime="00:10:00" - export npe=3 - export npe_node=3 - export nth=1 - export memory="5GB" - export NTASK="${npe}" + wtime="00:10:00" + npe=3 + npe_node=3 + nth=1 + memory="5GB" + NTASK="${npe}" export PTILE="${npe_node}" ;; "mos_grd_prep") - export wtime="00:10:00" - export npe=4 - export npe_node=4 - export nth=1 - export memory="16GB" - export NTASK="${npe}" + wtime="00:10:00" + npe=4 + npe_node=4 + nth=1 + memory="16GB" + NTASK="${npe}" export PTILE="${npe_node}" ;; "mos_ext_stn_prep") - export wtime="00:15:00" - export npe=2 - export npe_node=2 - export nth=1 - export memory="5GB" - export NTASK="${npe}" + wtime="00:15:00" + npe=2 + npe_node=2 + nth=1 + memory="5GB" + NTASK="${npe}" export PTILE="${npe_node}" ;; "mos_ext_grd_prep") - export wtime="00:10:00" - export npe=7 - export npe_node=7 - export nth=1 - export memory="3GB" - export NTASK="${npe}" + wtime="00:10:00" + npe=7 + npe_node=7 + nth=1 + memory="3GB" + NTASK="${npe}" export PTILE="${npe_node}" ;; "mos_stn_fcst") - export wtime="00:10:00" - export npe=5 - export npe_node=5 - export nth=1 - export memory="40GB" - export NTASK="${npe}" + wtime="00:10:00" + npe=5 + npe_node=5 + nth=1 + memory="40GB" + NTASK="${npe}" export PTILE="${npe_node}" ;; "mos_grd_fcst") - export wtime="00:10:00" - export npe=7 - export npe_node=7 - export nth=1 - export memory="50GB" - export NTASK="${npe}" + wtime="00:10:00" + npe=7 + npe_node=7 + nth=1 + memory="50GB" + NTASK="${npe}" export PTILE="${npe_node}" ;; "mos_ext_stn_fcst") - export wtime="00:20:00" - export npe=3 - export npe_node=3 - export nth=1 - export memory="50GB" - export NTASK="${npe}" + wtime="00:20:00" + npe=3 + npe_node=3 + nth=1 + memory="50GB" + NTASK="${npe}" export PTILE="${npe_node}" export prepost=True ;; "mos_ext_grd_fcst") - export wtime="00:10:00" - export npe=7 - export npe_node=7 - export nth=1 - export memory="50GB" - export NTASK="${npe}" + wtime="00:10:00" + npe=7 + npe_node=7 + nth=1 + memory="50GB" + NTASK="${npe}" export PTILE="${npe_node}" ;; "mos_stn_prdgen") - export wtime="00:10:00" - export npe=1 - export npe_node=1 - export nth=1 - export memory="15GB" - export NTASK="${npe}" + wtime="00:10:00" + npe=1 + npe_node=1 + nth=1 + memory="15GB" + NTASK="${npe}" export PTILE="${npe_node}" export prepost=True ;; "mos_grd_prdgen") - export wtime="00:40:00" - export npe=72 - export npe_node=18 - export nth=4 - export memory="20GB" - export NTASK="${npe}" + wtime="00:40:00" + npe=72 + npe_node=18 + nth=4 + memory="20GB" + NTASK="${npe}" export PTILE="${npe_node}" export OMP_NUM_THREADS="${nth}" ;; "mos_ext_stn_prdgen") - export wtime="00:10:00" - export npe=1 - export npe_node=1 - export nth=1 - export memory="15GB" - export NTASK="${npe}" + wtime="00:10:00" + npe=1 + npe_node=1 + nth=1 + memory="15GB" + NTASK="${npe}" export PTILE="${npe_node}" export prepost=True ;; "mos_ext_grd_prdgen") - export wtime="00:30:00" - export npe=96 - export npe_node=6 - export nth=16 - export memory="30GB" - export NTASK="${npe}" + wtime="00:30:00" + npe=96 + npe_node=6 + nth=16 + memory="30GB" + NTASK="${npe}" export PTILE="${npe_node}" export OMP_NUM_THREADS="${nth}" ;; "mos_wx_prdgen") - export wtime="00:10:00" - export npe=4 - export npe_node=2 - export nth=2 - export memory="10GB" - export NTASK="${npe}" + wtime="00:10:00" + npe=4 + npe_node=2 + nth=2 + memory="10GB" + NTASK="${npe}" export PTILE="${npe_node}" export OMP_NUM_THREADS="${nth}" ;; "mos_wx_ext_prdgen") - export wtime="00:10:00" - export npe=4 - export npe_node=2 - export nth=2 - export memory="10GB" - export NTASK="${npe}" + wtime="00:10:00" + npe=4 + npe_node=2 + nth=2 + memory="10GB" + NTASK="${npe}" export PTILE="${npe_node}" export OMP_NUM_THREADS="${nth}" ;; @@ -1386,15 +1292,19 @@ case ${step} in esac -# Unset dynamic variable names -unset var_NTASKS \ - var_npe \ - var_npe_node \ - var_nth - # Get machine-specific resources, overriding/extending the above assignments if [[ -f "${EXPDIR}/config.resources.${machine}" ]]; then source "${EXPDIR}/config.resources.${machine}" fi +# Check for RUN-specific variables and export them +for var_name in nth npe npe_node NTASKS memory wtime; do + run_var_name="${var_name}_${RUN}" + if [[ -n "${!run_var_name+0}" ]]; then + declare -x "${var_name}"="${!run_var_name}" + elif [[ -n "${!var_name+0}" ]]; then + export "${var_name}" + fi +done + echo "END: config.resources" From aa9faf42054a944c01310452a8a3fa54edc15720 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Tue, 25 Jun 2024 18:05:07 +0000 Subject: [PATCH 07/73] Clean up machine resource files --- parm/config/gfs/config.resources.GAEA | 4 +-- parm/config/gfs/config.resources.HERA | 16 ++++++------ parm/config/gfs/config.resources.HERCULES | 3 +-- parm/config/gfs/config.resources.JET | 24 ++++++++--------- parm/config/gfs/config.resources.S4 | 32 +++++++++++------------ parm/config/gfs/config.resources.WCOSS2 | 26 +++++++++--------- 6 files changed, 52 insertions(+), 53 deletions(-) diff --git a/parm/config/gfs/config.resources.GAEA b/parm/config/gfs/config.resources.GAEA index 64990b299fe..2e747e23865 100644 --- a/parm/config/gfs/config.resources.GAEA +++ b/parm/config/gfs/config.resources.GAEA @@ -8,10 +8,10 @@ case ${step} in # See https://github.com/NOAA-EMC/global-workflow/issues/2092 for details case ${CASE} in "C768" | "C384") - export npe_node_eobs=50 + export npe_node=50 ;; *) - export npe_node_eobs=40 + export npe_node=40 ;; esac ;; diff --git a/parm/config/gfs/config.resources.HERA b/parm/config/gfs/config.resources.HERA index cfd614961d1..2b1b3ab7478 100644 --- a/parm/config/gfs/config.resources.HERA +++ b/parm/config/gfs/config.resources.HERA @@ -5,30 +5,30 @@ case ${step} in "anal") if [[ "${CASE}" == "C384" ]]; then - export npe_anal_gdas=270 - export npe_anal_gfs=270 + export npe_gdas=270 + export npe_gfs=270 export nth_anal=8 - export npe_node_anal=$(( npe_node_max / nth_anal )) + export npe_node=$(( npe_node_max / nth )) fi ;; "eupd") case ${CASE} in "C384") - export npe_eupd=80 + export npe=80 ;; "C192" | "C96" | "C48") - export nth_eupd=4 + export nth=4 ;; *) ;; esac - export npe_node_eupd=$(( npe_node_max / nth_eupd )) + export npe_node=$(( npe_node_max / nth )) ;; "ecen") - if [[ "${CASE}" == "C768" ]]; then export nth_ecen=6; fi - export npe_node_ecen=$(( npe_node_max / nth_ecen )) + if [[ "${CASE}" == "C768" ]]; then export nth=6; fi + export npe_node=$(( npe_node_max / nth )) ;; *) diff --git a/parm/config/gfs/config.resources.HERCULES b/parm/config/gfs/config.resources.HERCULES index 7d2ca646e63..9c8e9cc1d5b 100644 --- a/parm/config/gfs/config.resources.HERCULES +++ b/parm/config/gfs/config.resources.HERCULES @@ -8,9 +8,8 @@ case ${step} in # See https://github.com/NOAA-EMC/global-workflow/issues/2092 for details # For Hercules, this is only an issue at C384; use 20 tasks/node if [[ ${CASE} = "C384" ]]; then - export npe_node_eobs=20 + export npe_node=20 fi - export npe_node_eomg=${npe_node_eobs} ;; *) ;; diff --git a/parm/config/gfs/config.resources.JET b/parm/config/gfs/config.resources.JET index de2ec6547ab..33ece47073b 100644 --- a/parm/config/gfs/config.resources.JET +++ b/parm/config/gfs/config.resources.JET @@ -5,10 +5,10 @@ case ${step} in "anal") if [[ "${CASE}" == "C384" ]]; then - export npe_anal_gdas=270 - export npe_anal_gfs=270 - export nth_anal=8 - export npe_node_anal=$(( npe_node_max / nth_anal )) + export npe_gdas=270 + export npe_gfs=270 + export nth=8 + export npe_node=$(( npe_node_max / nth )) fi ;; @@ -17,35 +17,35 @@ case ${step} in # The number of tasks and cores used must be the same for eobs # See https://github.com/NOAA-EMC/global-workflow/issues/2092 for details # This would also be an issues for vjet and sjet if anyone runs on those nodes. - export npe_node_eobs=10 + export npe_node=10 fi ;; "eupd") case ${CASE} in "C384") - export npe_eupd=80 + export npe=80 ;; "C192" | "C96" | "C48") - export nth_eupd=4 + export nth=4 ;; *) ;; esac - export npe_node_eupd=$(( npe_node_max / nth_eupd )) + export npe_node=$(( npe_node_max / nth )) ;; "ecen") - if [[ "${CASE}" == "C768" ]]; then export nth_ecen=6; fi - export npe_node_ecen=$(( npe_node_max / nth_ecen )) + if [[ "${CASE}" == "C768" ]]; then export nth=6; fi + export npe_node=$(( npe_node_max / nth )) ;; "upp") - export memory_upp="${mem_node_max}" + export memory="${mem_node_max}" ;; "esfc") - export memory_esfc="${mem_node_max}" + export memory="${mem_node_max}" ;; *) diff --git a/parm/config/gfs/config.resources.S4 b/parm/config/gfs/config.resources.S4 index 3f6654f8d60..c20d99e38a9 100644 --- a/parm/config/gfs/config.resources.S4 +++ b/parm/config/gfs/config.resources.S4 @@ -11,47 +11,47 @@ case ${step} in #On the S4-s4 partition, this is accomplished by increasing the task #count to a multiple of 32 if [[ ${PARTITION_BATCH} = "s4" ]]; then - export npe_anal_gdas=416 - export npe_anal_gfs=416 + export npe_gdas=416 + export npe_gfs=416 fi #S4 is small, so run this task with just 1 thread - export nth_anal=1 - export wtime_anal_gdas="02:00:00" - export wtime_anal_gfs="02:00:00" + export nth=1 + export wtime_gdas="02:00:00" + export wtime_gfs="02:00:00" ;; "C192" | "C96" | "C48") - export nth_anal=4 + export nth=4 if [[ ${PARTITION_BATCH} == "s4" ]]; then - export npe_anal_gdas=88 - export npe_anal_gfs=88 + export npe_gdas=88 + export npe_gfs=88 elif [[ ${PARTITION_BATCH} == "ivy" ]]; then - export npe_anal_gdas=90 - export npe_anal_gfs=90 + export npe_gdas=90 + export npe_gfs=90 fi ;; *) ;; esac - export npe_node_anal=$(( npe_node_max / nth_anal )) + export npe_node=$(( npe_node_max / nth )) ;; "eobs") # The number of tasks and cores used must be the same for eobs # See https://github.com/NOAA-EMC/global-workflow/issues/2092 for details # For S4, this is accomplished by running 10 tasks/node - export npe_node_eobs=10 + export npe_node=10 ;; "eupd") if [[ "${CASE}" == "C384" ]]; then - export npe_eupd=160 - export nth_eupd=2 + export npe=160 + export nth=2 fi - export npe_node_eupd=$(( npe_node_max / nth_eupd )) + export npe_node=$(( npe_node_max / nth )) ;; "ediag") - export memory_ediag="${mem_node_max}" + export memory="${mem_node_max}" ;; *) diff --git a/parm/config/gfs/config.resources.WCOSS2 b/parm/config/gfs/config.resources.WCOSS2 index 7e4314a0e92..0dd6dfe2109 100644 --- a/parm/config/gfs/config.resources.WCOSS2 +++ b/parm/config/gfs/config.resources.WCOSS2 @@ -5,50 +5,50 @@ case ${step} in "prep") export is_exclusive=True - export memory_prep="480GB" + export memory="480GB" ;; "anal") if [[ "${CASE}" == "C768" ]]; then - export nth_anal=8 + export nth=8 # Make npe a multiple of 16 - export npe_anal_gdas=784 - export npe_anal_gfs=832 - export npe_node_anal=$(( npe_node_max / nth_anal )) + export npe_gdas=784 + export npe_gfs=832 + export npe_node=$(( npe_node_max / nth )) fi ;; "fit2obs") - export npe_node_fit2obs=3 + export npe_node=3 ;; "echgres") - export memory_echgres="200GB" + export memory="200GB" ;; "arch" | "earc" | "getic") - declare -x "memory_${step}"="50GB" + declare -x "memory"="50GB" ;; "eupd") case ${CASE} in "C768" | "C384") - export npe_eupd=315 - export nth_eupd=14 + export npe=315 + export nth=14 ;; *) ;; esac - export npe_node_eupd=$(( npe_node_max / nth_eupd )) + export npe_node=$(( npe_node_max / nth )) ;; "eobs") case ${CASE} in "C768" | "C384") - export npe_node_eobs=50 + export npe_node=50 ;; *) - export npe_node_eobs=40 + export npe_node=40 ;; esac ;; From efe234d8556ba439120eb898959090eac4cb85df Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Tue, 25 Jun 2024 18:14:07 +0000 Subject: [PATCH 08/73] Improved variable name --- parm/config/gfs/config.resources | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index 28f046831f6..ba9c85322fe 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -1298,12 +1298,12 @@ if [[ -f "${EXPDIR}/config.resources.${machine}" ]]; then fi # Check for RUN-specific variables and export them -for var_name in nth npe npe_node NTASKS memory wtime; do - run_var_name="${var_name}_${RUN}" - if [[ -n "${!run_var_name+0}" ]]; then - declare -x "${var_name}"="${!run_var_name}" - elif [[ -n "${!var_name+0}" ]]; then - export "${var_name}" +for resource_var in nth npe npe_node NTASKS memory wtime; do + run_resource_var="${resource_var}_${RUN}" + if [[ -n "${!run_resource_var+0}" ]]; then + declare -x "${resource_var}"="${!run_resource_var}" + elif [[ -n "${!resource_var+0}" ]]; then + export "${resource_var}" fi done From 4883ddd63e299f112bec49b85f5ec0d9d1e7bbe5 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Tue, 25 Jun 2024 18:22:45 +0000 Subject: [PATCH 09/73] Strip cdump from resource variables in tasks.py --- workflow/rocoto/tasks.py | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/workflow/rocoto/tasks.py b/workflow/rocoto/tasks.py index a126992ceed..251368dea04 100644 --- a/workflow/rocoto/tasks.py +++ b/workflow/rocoto/tasks.py @@ -178,33 +178,16 @@ def get_resource(self, task_name): account = task_config['ACCOUNT_SERVICE'] if task_name in Tasks.SERVICE_TASKS else task_config['ACCOUNT'] - if f'wtime_{task_name}_{self.cdump}' in task_config: - walltime = task_config[f'wtime_{task_name}_{self.cdump}'] - else: - walltime = task_config[f'wtime_{task_name}'] - - if f'npe_{task_name}_{self.cdump}' in task_config: - cores = task_config[f'npe_{task_name}_{self.cdump}'] - else: - cores = task_config[f'npe_{task_name}'] - - if f'npe_node_{task_name}_{self.cdump}' in task_config: - ppn = task_config[f'npe_node_{task_name}_{self.cdump}'] - else: - ppn = task_config[f'npe_node_{task_name}'] + walltime = task_config[f'wtime'] + cores = task_config[f'npe'] + ppn = task_config[f'npe_node'] nodes = int(np.ceil(float(cores) / float(ppn))) - if f'nth_{task_name}_{self.cdump}' in task_config: - threads = task_config[f'nth_{task_name}_{self.cdump}'] - else: - threads = task_config[f'nth_{task_name}'] + threads = task_config[f'nth'] - if f'memory_{task_name}_{self.cdump}' in task_config: - memory = task_config[f'memory_{task_name}_{self.cdump}'] - else: - # Memory is not required - memory = task_config.get(f'memory_{task_name}', None) + # Memory is not required + memory = task_config.get(f'memory', None) if scheduler in ['pbspro']: if task_config.get('prepost', False): From 4a4e5df16239f09ab724fdbb4b5e7726bf0e80ca Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Wed, 26 Jun 2024 19:32:44 +0000 Subject: [PATCH 10/73] Replace references of CDUMP with RUN --- jobs/JGDAS_ENKF_ARCHIVE | 2 - jobs/JGDAS_ENKF_UPDATE | 1 - jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT | 1 + jobs/JGLOBAL_ARCHIVE | 2 - jobs/JGLOBAL_STAGE_IC | 2 +- parm/archive/arcdir.yaml.j2 | 2 +- parm/archive/gdas.yaml.j2 | 2 +- parm/archive/gfsa.yaml.j2 | 2 +- parm/archive/master_gfs.yaml.j2 | 2 +- parm/config/gefs/config.base | 23 +- parm/config/gefs/config.fcst | 4 +- parm/config/gefs/config.resources | 14 +- parm/config/gefs/config.wave | 4 +- parm/config/gfs/config.anal | 2 +- parm/config/gfs/config.base | 26 +- parm/config/gfs/config.fcst | 8 +- parm/config/gfs/config.metp | 10 +- parm/config/gfs/config.resources | 22 +- parm/config/gfs/config.wave | 4 +- parm/config/gfs/config.waveprep | 2 +- scripts/exgdas_atmos_chgres_forenkf.sh | 1 - scripts/exgfs_aero_init_aerosol.py | 18 +- scripts/exgfs_wave_post_pnt.sh | 2 +- scripts/exglobal_archive.py | 2 +- scripts/exglobal_atmos_analysis.sh | 4 +- scripts/exglobal_diag.sh | 1 - scripts/exglobal_forecast.sh | 8 +- ush/calcanl_gfs.py | 10 +- ush/forecast_predet.sh | 4 +- ush/getdump.sh | 8 +- ush/python/pygfs/task/aero_analysis.py | 10 +- ush/python/pygfs/task/aero_prepobs.py | 2 +- ush/python/pygfs/task/atm_analysis.py | 12 +- ush/python/pygfs/task/atmens_analysis.py | 12 +- workflow/applications/applications.py | 48 +- workflow/applications/gefs.py | 4 +- workflow/applications/gfs_cycled.py | 30 +- workflow/applications/gfs_forecast_only.py | 8 +- workflow/rocoto/gefs_tasks.py | 12 +- workflow/rocoto/gfs_tasks.py | 746 ++++++++++----------- workflow/rocoto/tasks.py | 26 +- workflow/rocoto/workflow_tasks.py | 8 +- workflow/setup_expt.py | 26 +- 43 files changed, 567 insertions(+), 570 deletions(-) diff --git a/jobs/JGDAS_ENKF_ARCHIVE b/jobs/JGDAS_ENKF_ARCHIVE index 7496acd8d42..29ef9c1812c 100755 --- a/jobs/JGDAS_ENKF_ARCHIVE +++ b/jobs/JGDAS_ENKF_ARCHIVE @@ -7,8 +7,6 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "earc" -c "base earc" ############################################## # Set variables used in the script ############################################## -export CDUMP=${RUN/enkf} - YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_TOP MEMDIR="ensstat" YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \ COMIN_ATMOS_ANALYSIS_ENSSTAT:COM_ATMOS_ANALYSIS_TMPL \ diff --git a/jobs/JGDAS_ENKF_UPDATE b/jobs/JGDAS_ENKF_UPDATE index 66f9ddf21b0..213b49081ab 100755 --- a/jobs/JGDAS_ENKF_UPDATE +++ b/jobs/JGDAS_ENKF_UPDATE @@ -7,7 +7,6 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "eupd" -c "base anal eupd" ############################################## # Set variables used in the script ############################################## -export CDUMP="${RUN/enkf}" ############################################## diff --git a/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT b/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT index 64764e249db..a2222ffeab5 100755 --- a/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT +++ b/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT @@ -10,6 +10,7 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "ocnanalchkpt" -c "base ocnanal ocnana ############################################## # Ignore possible spelling error (nothing is misspelled) # shellcheck disable=SC2153 +export CDUMP=${CDUMP:-${RUN:-"gfs"}} GDATE=$(date --utc +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours") export GDATE export gPDY=${GDATE:0:8} diff --git a/jobs/JGLOBAL_ARCHIVE b/jobs/JGLOBAL_ARCHIVE index 28bd820de16..c909cd88015 100755 --- a/jobs/JGLOBAL_ARCHIVE +++ b/jobs/JGLOBAL_ARCHIVE @@ -7,8 +7,6 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "arch" -c "base arch" ############################################## # Set variables used in the script ############################################## -export CDUMP=${RUN/enkf} - YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \ COMIN_ATMOS_ANALYSIS:COM_ATMOS_ANALYSIS_TMPL \ COMIN_ATMOS_BUFR:COM_ATMOS_BUFR_TMPL \ diff --git a/jobs/JGLOBAL_STAGE_IC b/jobs/JGLOBAL_STAGE_IC index c460e91c9e4..225e0e2a4fe 100755 --- a/jobs/JGLOBAL_STAGE_IC +++ b/jobs/JGLOBAL_STAGE_IC @@ -5,7 +5,7 @@ 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=${CDUMP} +rCDUMP=${RUN} [[ ${CDUMP} = "gfs" ]] && export rCDUMP="gdas" export rCDUMP diff --git a/parm/archive/arcdir.yaml.j2 b/parm/archive/arcdir.yaml.j2 index f845e3c9cb5..57dbc78885e 100644 --- a/parm/archive/arcdir.yaml.j2 +++ b/parm/archive/arcdir.yaml.j2 @@ -50,7 +50,7 @@ ARCDIR ~ "/snowstat." ~ RUN ~ "." ~ cycle_YMDH ~ ".tgz"]) %} {% endif %} - {% if AERO_ANL_CDUMP == RUN or AERO_ANL_CDUMP == "both" %} + {% if AERO_ANL_RUN == RUN or AERO_ANL_RUN == "both" %} {% do det_anl_files.append([COMIN_CHEM_ANALYSIS ~ "/" ~ head ~ "aerostat", ARCDIR ~ "/aerostat." ~ RUN ~ "." ~ cycle_YMDH ]) %} {% endif %} diff --git a/parm/archive/gdas.yaml.j2 b/parm/archive/gdas.yaml.j2 index b253d272682..7dd87f122b8 100644 --- a/parm/archive/gdas.yaml.j2 +++ b/parm/archive/gdas.yaml.j2 @@ -66,7 +66,7 @@ gdas: - "{{ COMIN_ATMOS_ANALYSIS | relpath(ROTDIR) }}/{{ head }}oznstat" - "{{ COMIN_ATMOS_ANALYSIS | relpath(ROTDIR) }}/{{ head }}radstat" {% endif %} - {% if AERO_ANL_CDUMP == "gdas" or AERO_ANL_CDUMP == "both" %} + {% if AERO_ANL_RUN == "gdas" or AERO_ANL_RUN == "both" %} - "{{ COMIN_CHEM_ANALYSIS | relpath(ROTDIR) }}/{{ head }}aerostat" {% endif %} {% if DO_PREP_OBS_AERO %} diff --git a/parm/archive/gfsa.yaml.j2 b/parm/archive/gfsa.yaml.j2 index e76c26e60e2..4a86778e2e0 100644 --- a/parm/archive/gfsa.yaml.j2 +++ b/parm/archive/gfsa.yaml.j2 @@ -37,7 +37,7 @@ gfsa: {% else %} - "{{ COMIN_ATMOS_ANALYSIS | relpath(ROTDIR) }}/{{ head }}gsistat" {% endif %} - {% if AERO_ANL_CDUMP == "gfs" or AERO_ANL_CDUMP == "both" %} + {% if AERO_ANL_RUN == "gfs" or AERO_ANL_RUN == "both" %} - "{{ COMIN_CHEM_ANALYSIS | relpath(ROTDIR) }}/{{ head }}aerostat" {% endif %} {% if DO_PREP_OBS_AERO %} diff --git a/parm/archive/master_gfs.yaml.j2 b/parm/archive/master_gfs.yaml.j2 index 67cde482a23..18833f6fe77 100644 --- a/parm/archive/master_gfs.yaml.j2 +++ b/parm/archive/master_gfs.yaml.j2 @@ -45,7 +45,7 @@ datasets: {% endfilter %} {% endif %} -{% if AERO_FCST_CDUMP == "gfs" or AERO_FCST_CDUMP == "both" %} +{% if AERO_FCST_RUN == "gfs" or AERO_FCST_RUN == "both" %} # Aerosol forecasts {% filter indent(width=4) %} {% include "chem.yaml.j2" %} diff --git a/parm/config/gefs/config.base b/parm/config/gefs/config.base index 16e0fefaba3..a78ca32ad8d 100644 --- a/parm/config/gefs/config.base +++ b/parm/config/gefs/config.base @@ -106,10 +106,7 @@ export ATARDIR="@ATARDIR@" # Commonly defined parameters in JJOBS export envir=${envir:-"prod"} export NET="gefs" # NET is defined in the job-card (ecf) -export RUN="gefs" # RUN is defined in the job-card (ecf); CDUMP is used at EMC as a RUN proxy -# TODO: determine where is RUN actually used in the workflow other than here -# TODO: is it possible to replace all instances of ${CDUMP} to ${RUN} to be -# consistent w/ EE2? +export RUN="gefs" # RUN is defined in the job-card (ecf) # Get all the COM path templates source "${EXPDIR}/config.com" @@ -138,9 +135,9 @@ export DO_WAVE="NO" export DO_OCN="NO" export DO_ICE="NO" export DO_AERO="NO" -export AERO_FCST_CDUMP="" # When to run aerosol forecast: gdas, gfs, or both -export AERO_ANL_CDUMP="" # When to run aerosol analysis: gdas, gfs, or both -export WAVE_CDUMP="" # When to include wave suite: gdas, gfs, or both +export AERO_FCST_RUN="" # When to run aerosol forecast: gdas, gfs, or both +export AERO_ANL_RUN="" # When to run aerosol analysis: gdas, gfs, or both +export WAVE_RUN="" # When to include wave suite: gdas, gfs, or both export DOBNDPNT_WAVE="NO" # The GEFS buoys file does not currently have any boundary points export DOIBP_WAV="NO" # Option to create point outputs from input boundary points export FRAC_GRID=".true." @@ -186,13 +183,13 @@ case "${APP}" in ;; ATMA) export DO_AERO="YES" - export AERO_ANL_CDUMP="both" - export AERO_FCST_CDUMP="gdas" + export AERO_ANL_RUN="both" + export AERO_FCST_RUN="gdas" ;; ATMW) export DO_COUPLED="YES" export DO_WAVE="YES" - export WAVE_CDUMP="both" + export WAVE_RUN="both" ;; NG-GODAS) export DO_ATM="NO" @@ -206,13 +203,13 @@ case "${APP}" in if [[ "${APP}" =~ A$ ]]; then export DO_AERO="YES" - export AERO_ANL_CDUMP="both" - export AERO_FCST_CDUMP="gdas" + export AERO_ANL_RUN="both" + export AERO_FCST_RUN="gdas" fi if [[ "${APP}" =~ ^S2SW ]]; then export DO_WAVE="YES" - export WAVE_CDUMP="both" + export WAVE_RUN="both" export cplwav2atm=".true." fi ;; diff --git a/parm/config/gefs/config.fcst b/parm/config/gefs/config.fcst index 103d6f091d2..0a7cec38154 100644 --- a/parm/config/gefs/config.fcst +++ b/parm/config/gefs/config.fcst @@ -9,13 +9,13 @@ export USE_ESMF_THREADING="YES" # Toggle to use ESMF-managed threading or tradi export COPY_FINAL_RESTARTS="NO" # Toggle to copy restarts from the end of GFS/GEFS Run (GDAS is handled seperately) # Turn off waves if not used for this RUN -case ${WAVE_CDUMP} in +case ${WAVE_RUN} in both | "${RUN/enkf}" ) ;; # Don't change *) DO_WAVE="NO" ;; # Turn waves off esac # Turn off aerosols if not used for this RUN -case ${AERO_FCST_CDUMP} in +case ${AERO_FCST_RUN} in both | "${RUN/enkf}" ) ;; # Don't change *) DO_AERO="NO" ;; # Turn waves off esac diff --git a/parm/config/gefs/config.resources b/parm/config/gefs/config.resources index 7c3d77de1d8..9f8cdea3625 100644 --- a/parm/config/gefs/config.resources +++ b/parm/config/gefs/config.resources @@ -80,11 +80,11 @@ case ${step} in "fcst" | "efcs") export is_exclusive=True - _CDUMP_LIST=${CDUMP:-"gdas gfs"} + _RUN_LIST=${RUN:-"gdas gfs"} - # During workflow creation, we need resources for all CDUMPs and CDUMP is undefined - for _CDUMP in ${_CDUMP_LIST}; do - if [[ "${_CDUMP}" =~ "gfs" ]]; then + # During workflow creation, we need resources for all RUNs and RUN is undefined + for _RUN in ${_RUN_LIST}; do + if [[ "${_RUN}" =~ "gfs" ]]; then export layout_x=${layout_x_gfs} export layout_y=${layout_y_gfs} export WRITE_GROUP=${WRITE_GROUP_GFS} @@ -178,9 +178,9 @@ case ${step} in fi export ICEPETS ICETHREADS - echo "Total PETS for ${_CDUMP} = ${NTASKS_TOT}" + echo "Total PETS for ${_RUN} = ${NTASKS_TOT}" - if [[ "${_CDUMP}" =~ "gfs" ]]; then + if [[ "${_RUN}" =~ "gfs" ]]; then declare -x "npe_${step}_gfs"="${NTASKS_TOT}" declare -x "nth_${step}_gfs"="${UFS_THREADS}" declare -x "npe_node_${step}_gfs"="${npe_node_max}" @@ -207,7 +207,7 @@ case ${step} in ;; esac - unset _CDUMP _CDUMP_LIST + unset _RUN _RUN_LIST unset NTASKS_TOT ;; diff --git a/parm/config/gefs/config.wave b/parm/config/gefs/config.wave index bef3437adf9..6a1529274a9 100644 --- a/parm/config/gefs/config.wave +++ b/parm/config/gefs/config.wave @@ -10,10 +10,10 @@ echo "BEGIN: config.wave" # Some others are also used across the workflow in wave component scripts # General runtime labels -export CDUMPwave="${RUN}wave" +export RUNwave="${RUN}wave" # In GFS/GDAS, restart files are generated/read from gdas runs -export CDUMPRSTwave="gdas" +export RUNRSTwave="gdas" #grid dependent variable defaults export waveGRDN='1' # grid number for ww3_multi diff --git a/parm/config/gfs/config.anal b/parm/config/gfs/config.anal index 2c55d85ff44..ee717a832bd 100644 --- a/parm/config/gfs/config.anal +++ b/parm/config/gfs/config.anal @@ -12,7 +12,7 @@ if [[ ${DONST} = "YES" ]]; then . ${EXPDIR}/config.nsst fi -if [[ "${CDUMP}" = "gfs" ]] ; then +if [[ "${RUN}" = "gfs" ]] ; then export USE_RADSTAT="NO" # This can be only used when bias correction is not-zero. export GENDIAG="NO" export SETUP='diag_rad=.false.,diag_pcp=.false.,diag_conv=.false.,diag_ozone=.false.,write_diag(3)=.false.,niter(2)=100,' diff --git a/parm/config/gfs/config.base b/parm/config/gfs/config.base index f893eaaf4e8..a9bad7ebfec 100644 --- a/parm/config/gfs/config.base +++ b/parm/config/gfs/config.base @@ -135,9 +135,9 @@ export ATARDIR="@ATARDIR@" # Commonly defined parameters in JJOBS export envir=${envir:-"prod"} export NET="gfs" # NET is defined in the job-card (ecf) -export RUN=${RUN:-${CDUMP:-"gfs"}} # RUN is defined in the job-card (ecf); CDUMP is used at EMC as a RUN proxy +export RUN=${RUN:-${RUN:-"gfs"}} # RUN is defined in the job-card (ecf) # TODO: determine where is RUN actually used in the workflow other than here -# TODO: is it possible to replace all instances of ${CDUMP} to ${RUN} to be +# TODO: is it possible to replace all instances of ${RUN} to ${RUN} to be # consistent w/ EE2? # Get all the COM path templates @@ -179,9 +179,9 @@ export DO_OCN="NO" export DO_ICE="NO" export DO_AERO="NO" export DO_PREP_OBS_AERO="NO" -export AERO_FCST_CDUMP="" # When to run aerosol forecast: gdas, gfs, or both -export AERO_ANL_CDUMP="" # When to run aerosol analysis: gdas, gfs, or both -export WAVE_CDUMP="" # When to include wave suite: gdas, gfs, or both +export AERO_FCST_RUN="" # When to run aerosol forecast: gdas, gfs, or both +export AERO_ANL_RUN="" # When to run aerosol analysis: gdas, gfs, or both +export WAVE_RUN="" # When to include wave suite: gdas, gfs, or both export DOBNDPNT_WAVE="NO" export DOIBP_WAV="NO" # Option to create point outputs from input boundary points export FRAC_GRID=".true." @@ -232,13 +232,13 @@ case "${APP}" in ;; ATMA) export DO_AERO="YES" - export AERO_ANL_CDUMP="both" - export AERO_FCST_CDUMP="gdas" + export AERO_ANL_RUN="both" + export AERO_FCST_RUN="gdas" ;; ATMW) export DO_COUPLED="YES" export DO_WAVE="YES" - export WAVE_CDUMP="both" + export WAVE_RUN="both" ;; NG-GODAS) export DO_ATM="NO" @@ -252,13 +252,13 @@ case "${APP}" in if [[ "${APP}" =~ A$ ]]; then export DO_AERO="YES" - export AERO_ANL_CDUMP="both" - export AERO_FCST_CDUMP="gdas" + export AERO_ANL_RUN="both" + export AERO_FCST_RUN="gdas" fi if [[ "${APP}" =~ ^S2SW ]]; then export DO_WAVE="YES" - export WAVE_CDUMP="both" + export WAVE_RUN="both" fi ;; *) @@ -268,10 +268,10 @@ case "${APP}" in esac # Surface cycle update frequency -if [[ "${CDUMP}" =~ "gdas" ]] ; then +if [[ "${RUN}" =~ "gdas" ]] ; then export FHCYC=1 export FTSFS=10 -elif [[ "${CDUMP}" =~ "gfs" ]] ; then +elif [[ "${RUN}" =~ "gfs" ]] ; then export FHCYC=24 fi diff --git a/parm/config/gfs/config.fcst b/parm/config/gfs/config.fcst index 36064d5f2b3..7967bc5aca8 100644 --- a/parm/config/gfs/config.fcst +++ b/parm/config/gfs/config.fcst @@ -9,13 +9,13 @@ export USE_ESMF_THREADING="YES" # Toggle to use ESMF-managed threading or tradi export COPY_FINAL_RESTARTS="NO" # Toggle to copy restarts from the end of GFS/GEFS Run (GDAS is handled seperately) # Turn off waves if not used for this RUN -case ${WAVE_CDUMP} in +case ${WAVE_RUN} in both | "${RUN/enkf}" ) ;; # Don't change *) DO_WAVE="NO" ;; # Turn waves off esac # Turn off aerosols if not used for this RUN -case ${AERO_FCST_CDUMP} in +case ${AERO_FCST_RUN} in both | "${RUN/enkf}" ) ;; # Don't change *) DO_AERO="NO" ;; # Turn aerosols off esac @@ -273,7 +273,7 @@ export FSICL="0" export FSICS="0" #--------------------------------------------------------------------- -if [[ "${CDUMP}" =~ "gdas" ]] ; then # GDAS cycle specific parameters +if [[ "${RUN}" =~ "gdas" ]] ; then # GDAS cycle specific parameters # Variables used in DA cycling export DIAG_TABLE="${PARMgfs}/ufs/fv3/diag_table_da" @@ -284,7 +284,7 @@ if [[ "${CDUMP}" =~ "gdas" ]] ; then # GDAS cycle specific parameters # Turn on dry mass adjustment in GDAS export adjust_dry_mass=".true." -elif [[ "${CDUMP}" =~ "gfs" ]] ; then # GFS cycle specific parameters +elif [[ "${RUN}" =~ "gfs" ]] ; then # GFS cycle specific parameters # Write more variables to output export DIAG_TABLE="${PARMgfs}/ufs/fv3/diag_table" diff --git a/parm/config/gfs/config.metp b/parm/config/gfs/config.metp index 8260d1c472c..a49debdc2f9 100644 --- a/parm/config/gfs/config.metp +++ b/parm/config/gfs/config.metp @@ -21,7 +21,7 @@ export HOMEverif_global=${HOMEgfs}/sorc/verif-global.fd export VERIF_GLOBALSH=${HOMEverif_global}/ush/run_verif_global_in_global_workflow.sh ## INPUT DATA SETTINGS export model=${PSLOT} -export model_file_format="pgbf{lead?fmt=%2H}.${CDUMP}.{init?fmt=%Y%m%d%H}.grib2" +export model_file_format="pgbf{lead?fmt=%2H}.${RUN}.{init?fmt=%Y%m%d%H}.grib2" export model_hpss_dir=${ATARDIR}/.. export model_dir=${ARCDIR}/.. export get_data_from_hpss="NO" @@ -39,19 +39,19 @@ export log_MET_output_to_METplus="yes" # GRID-TO-GRID STEP 1: gfsmetpg2g1 export g2g1_type_list="anom pres sfc" export g2g1_anom_truth_name="self_anl" -export g2g1_anom_truth_file_format="pgbanl.${CDUMP}.{valid?fmt=%Y%m%d%H}.grib2" +export g2g1_anom_truth_file_format="pgbanl.${RUN}.{valid?fmt=%Y%m%d%H}.grib2" export g2g1_anom_fhr_min=${FHMIN_GFS} export g2g1_anom_fhr_max=${FHMAX_GFS} export g2g1_anom_grid="G002" export g2g1_anom_gather_by="VSDB" export g2g1_pres_truth_name="self_anl" -export g2g1_pres_truth_file_format="pgbanl.${CDUMP}.{valid?fmt=%Y%m%d%H}.grib2" +export g2g1_pres_truth_file_format="pgbanl.${RUN}.{valid?fmt=%Y%m%d%H}.grib2" export g2g1_pres_fhr_min=${FHMIN_GFS} export g2g1_pres_fhr_max=${FHMAX_GFS} export g2g1_pres_grid="G002" export g2g1_pres_gather_by="VSDB" export g2g1_sfc_truth_name="self_f00" -export g2g1_sfc_truth_file_format="pgbf00.${CDUMP}.{valid?fmt=%Y%m%d%H}.grib2" +export g2g1_sfc_truth_file_format="pgbf00.${RUN}.{valid?fmt=%Y%m%d%H}.grib2" export g2g1_sfc_fhr_min=${FHMIN_GFS} export g2g1_sfc_fhr_max=${FHMAX_GFS} export g2g1_sfc_grid="G002" @@ -87,7 +87,7 @@ export g2o1_mv_database_desc="Grid-to-obs METplus data for global workflow exper export precip1_type_list="ccpa_accum24hr" export precip1_ccpa_accum24hr_model_bucket="06" export precip1_ccpa_accum24hr_model_var="APCP" -export precip1_ccpa_accum24hr_model_file_format="pgbf{lead?fmt=%2H}.${CDUMP}.{init?fmt=%Y%m%d%H}.grib2" +export precip1_ccpa_accum24hr_model_file_format="pgbf{lead?fmt=%2H}.${RUN}.{init?fmt=%Y%m%d%H}.grib2" export precip1_ccpa_accum24hr_fhr_min=${FHMIN_GFS} export precip1_ccpa_accum24hr_fhr_max="180" export precip1_ccpa_accum24hr_grid="G211" diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index ba9c85322fe..73168f02798 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -644,14 +644,14 @@ case ${step} in export is_exclusive=True if [[ "${step}" == "fcst" ]]; then - _CDUMP_LIST=${CDUMP:-"gdas gfs"} + _RUN_LIST=${RUN:-"gdas gfs"} elif [[ "${step}" == "efcs" ]]; then - _CDUMP_LIST=${CDUMP:-"enkfgdas enkfgfs"} + _RUN_LIST=${RUN:-"enkfgdas enkfgfs"} fi - # During workflow creation, we need resources for all CDUMPs and CDUMP is undefined - for _CDUMP in ${_CDUMP_LIST}; do - if [[ "${_CDUMP}" =~ "gfs" ]]; then + # During workflow creation, we need resources for all RUNs and RUN is undefined + for _RUN in ${_RUN_LIST}; do + if [[ "${_RUN}" =~ "gfs" ]]; then export layout_x=${layout_x_gfs} export layout_y=${layout_y_gfs} export WRITE_GROUP=${WRITE_GROUP_GFS} @@ -662,7 +662,7 @@ case ${step} in nthreads_ufs=${nthreads_ufs_gfs} # Will not be set if we are skipping the mediator nthreads_mediator=${nthreads_mediator_gfs:-} - elif [[ "${_CDUMP}" =~ "gdas" ]]; then + elif [[ "${_RUN}" =~ "gdas" ]]; then export layout_x=${layout_x_gdas} export layout_y=${layout_y_gdas} export WRITE_GROUP=${WRITE_GROUP_GDAS} @@ -764,11 +764,11 @@ case ${step} in fi export ICEPETS ICETHREADS - echo "Total PETS for ${_CDUMP} = ${NTASKS_TOT}" + echo "Total PETS for ${_RUN} = ${NTASKS_TOT}" - declare -x "npe_${_CDUMP}"="${NTASKS_TOT}" - declare -x "nth_${_CDUMP}"="${UFS_THREADS}" - declare -x "npe_node_${_CDUMP}"="${npe_node_max}" + declare -x "npe_${_RUN}"="${NTASKS_TOT}" + declare -x "nth_${_RUN}"="${UFS_THREADS}" + declare -x "npe_node_${_RUN}"="${npe_node_max}" done @@ -796,7 +796,7 @@ case ${step} in ;; esac - unset _CDUMP _CDUMP_LIST + unset _RUN _RUN_LIST unset NTASKS_TOT ;; diff --git a/parm/config/gfs/config.wave b/parm/config/gfs/config.wave index 568aeb1e1c1..db4eb9f7089 100644 --- a/parm/config/gfs/config.wave +++ b/parm/config/gfs/config.wave @@ -10,10 +10,10 @@ echo "BEGIN: config.wave" # Some others are also used across the workflow in wave component scripts # General runtime labels -export CDUMPwave="${RUN}wave" +export RUNwave="${RUN}wave" # In GFS/GDAS, restart files are generated/read from gdas runs -export CDUMPRSTwave="gdas" +export RUNRSTwave="gdas" #grid dependent variable defaults export waveGRDN='1' # grid number for ww3_multi diff --git a/parm/config/gfs/config.waveprep b/parm/config/gfs/config.waveprep index 1c9a40c1d81..1f746eab776 100644 --- a/parm/config/gfs/config.waveprep +++ b/parm/config/gfs/config.waveprep @@ -21,7 +21,7 @@ export WAV_CUR_CDO_SMOOTH="NO" export CDO_ROOT=${CDO_ROOT:-/usrx/local/dev/packages/cdo/1.9.8} if [ "${WW3ICEINP}" = "YES" ]; then - export WAVICEFILE=${CDUMP}.t${cyc}z.seaice.5min.grib2 + export WAVICEFILE=${RUN}.t${cyc}z.seaice.5min.grib2 fi echo "END: config.waveprep" diff --git a/scripts/exgdas_atmos_chgres_forenkf.sh b/scripts/exgdas_atmos_chgres_forenkf.sh index 183179fcdba..ba44d870596 100755 --- a/scripts/exgdas_atmos_chgres_forenkf.sh +++ b/scripts/exgdas_atmos_chgres_forenkf.sh @@ -24,7 +24,6 @@ pwd=$(pwd) # Base variables CDATE=${CDATE:-"2001010100"} -CDUMP=${CDUMP:-"enkfgdas"} GDUMP=${GDUMP:-"gdas"} # Derived base variables diff --git a/scripts/exgfs_aero_init_aerosol.py b/scripts/exgfs_aero_init_aerosol.py index 1c81880ca9b..d098368202b 100755 --- a/scripts/exgfs_aero_init_aerosol.py +++ b/scripts/exgfs_aero_init_aerosol.py @@ -14,7 +14,7 @@ CDATE: Initial time in YYYYMMDDHH format STEP_GFS: Forecast cadence (frequency) in hours FHMAX_GFS: Forecast length in hours -CDUMP: Forecast phase (gfs or gdas). Currently always expected to be gfs. +RUN: Forecast phase (gfs or gdas). Currently always expected to be gfs. ROTDIR: Rotating (COM) directory USHgfs: Path to global-workflow `ush` directory PARMgfs: Path to global-workflow `parm` directory @@ -41,14 +41,14 @@ from functools import partial # Constants -atm_base_pattern = "{rot_dir}/{cdump}.%Y%m%d/%H/model_data/atmos/input" # Location of atmosphere ICs +atm_base_pattern = "{rot_dir}/{run}.%Y%m%d/%H/model_data/atmos/input" # Location of atmosphere ICs atm_file_pattern = "{path}/gfs_data.{tile}.nc" # Atm IC file names atm_ctrl_pattern = "{path}/gfs_ctrl.nc" # Atm IC control file name -restart_base_pattern = "{rot_dir}/{cdump}.%Y%m%d/%H/model_data/atmos/restart" # Location of restart files (time of previous run) +restart_base_pattern = "{rot_dir}/{run}.%Y%m%d/%H/model_data/atmos/restart" # Location of restart files (time of previous run) restart_file_pattern = "{file_base}/{timestamp}fv_core.res.{tile}.nc" # Name of restart data files (time when restart is valid) tracer_file_pattern = "{file_base}/{timestamp}fv_tracer.res.{tile}.nc" # Name of restart tracer files (time when restart is valid) dycore_file_pattern = "{file_base}/{timestamp}fv_core.res.nc" # Name of restart dycore file (time when restart is valid) -tracer_list_file_pattern = "{parm_gfs}/ufs/gocart/gocart_tracer.list" # Text list of tracer names to copy +tracer_list_file_pattern = "{parm_gfs}/ufs/gocart/gocart_tracer.list" # Text list of tracer names to copy merge_script_pattern = "{ush_gfs}/merge_fv3_aerosol_tile.py" n_tiles = 6 max_lookback = 4 # Maximum number of past cycles to look for for tracer data @@ -68,7 +68,7 @@ def main() -> None: cdate = get_env_var("CDATE") incr = int(get_env_var('STEP_GFS')) fcst_length = int(get_env_var('FHMAX_GFS')) - cdump = get_env_var("CDUMP") + run = get_env_var("RUN") rot_dir = get_env_var("ROTDIR") ush_gfs = get_env_var("USHgfs") parm_gfs = get_env_var("PARMgfs") @@ -86,7 +86,7 @@ def main() -> None: print(f'{var} = {f"{var}"}') atm_files, ctrl_files = get_atm_files(atm_source_path) - tracer_files, rest_files, core_files = get_restart_files(time, incr, max_lookback, fcst_length, rot_dir, cdump) + tracer_files, rest_files, core_files = get_restart_files(time, incr, max_lookback, fcst_length, rot_dir, run) if (tracer_files is not None): merge_tracers(merge_script, atm_files, tracer_files, rest_files, core_files[0], ctrl_files[0], tracer_list_file) @@ -167,7 +167,7 @@ def get_atm_files(path: str) -> typing.List[typing.List[str]]: return file_list -def get_restart_files(time: datetime, incr: int, max_lookback: int, fcst_length: int, rot_dir: str, cdump: str) -> typing.List[typing.List[str]]: +def get_restart_files(time: datetime, incr: int, max_lookback: int, fcst_length: int, rot_dir: str, run: str) -> typing.List[typing.List[str]]: ''' Determines the last cycle where all the necessary restart files are available. Ideally the immediate previous cycle @@ -183,8 +183,8 @@ def get_restart_files(time: datetime, incr: int, max_lookback: int, fcst_length: Length of forecast in hours rot_dir : str Path to the ROTDIR (COM) directory - cdump : str - CDUMP of current forecast portion (currently should always be 'gfs') + run : str + RUN of current forecast portion (currently should always be 'gfs') Returns ---------- diff --git a/scripts/exgfs_wave_post_pnt.sh b/scripts/exgfs_wave_post_pnt.sh index 93bdbeaf32e..2a18d498799 100755 --- a/scripts/exgfs_wave_post_pnt.sh +++ b/scripts/exgfs_wave_post_pnt.sh @@ -40,7 +40,7 @@ source "${USHgfs}/preamble.sh" # Set wave model ID tag to include member number # if ensemble; waveMEMB var empty in deterministic - export WAV_MOD_TAG=${CDUMP}wave${waveMEMB} + export WAV_MOD_TAG=${RUN}wave${waveMEMB} echo "HAS BEGUN on $(hostname)" echo "Starting WAVE PNT POSTPROCESSOR SCRIPT for $WAV_MOD_TAG" diff --git a/scripts/exglobal_archive.py b/scripts/exglobal_archive.py index af396d382ef..ec8154317f3 100755 --- a/scripts/exglobal_archive.py +++ b/scripts/exglobal_archive.py @@ -29,7 +29,7 @@ def main(): 'DOIAU', 'OCNRES', 'ICERES', 'NUM_SND_COLLECTIVES', 'FHOUT_WAV', 'FHOUT_HF_WAV', 'FHMAX_WAV', 'FHMAX_HF_WAV', 'FHMAX_WAV_GFS', 'restart_interval_gdas', 'restart_interval_gfs', - 'AERO_ANL_CDUMP', 'AERO_FCST_CDUMP', 'DOIBP_WAV', 'DO_JEDIOCNVAR', + 'AERO_ANL_RUN', 'AERO_FCST_RUN', 'DOIBP_WAV', 'DO_JEDIOCNVAR', 'NMEM_ENS', 'DO_JEDIATMVAR', 'DO_VRFY_OCEANDA', 'FHMAX_FITS', 'IAUFHRS', 'DO_FIT2OBS'] diff --git a/scripts/exglobal_atmos_analysis.sh b/scripts/exglobal_atmos_analysis.sh index 0e78bed2e0f..2f4c786ae5a 100755 --- a/scripts/exglobal_atmos_analysis.sh +++ b/scripts/exglobal_atmos_analysis.sh @@ -26,7 +26,7 @@ pwd=$(pwd) # Base variables CDATE=${CDATE:-"2001010100"} -CDUMP=${CDUMP:-"gdas"} +RUN=${RUN:-"gdas"} GDUMP=${GDUMP:-"gdas"} # Derived base variables @@ -990,7 +990,7 @@ cd ${pwd} if [ ${SENDECF} = "YES" -a "${RUN}" != "enkf" ]; then ecflow_client --event release_fcst fi -echo "${CDUMP} ${CDATE} atminc done at $(date)" > ${COM_ATMOS_ANALYSIS}/${APREFIX}loginc.txt +echo "${RUN} ${CDATE} atminc done at $(date)" > ${COM_ATMOS_ANALYSIS}/${APREFIX}loginc.txt ################################################################################ diff --git a/scripts/exglobal_diag.sh b/scripts/exglobal_diag.sh index e1faa7b2eea..26d79aefcb7 100755 --- a/scripts/exglobal_diag.sh +++ b/scripts/exglobal_diag.sh @@ -26,7 +26,6 @@ pwd=$(pwd) # Base variables CDATE="${PDY}${cyc}" -CDUMP=${CDUMP:-"gdas"} GDUMP=${GDUMP:-"gdas"} # Utilities diff --git a/scripts/exglobal_forecast.sh b/scripts/exglobal_forecast.sh index e2bccd43dba..4ce9d7894dd 100755 --- a/scripts/exglobal_forecast.sh +++ b/scripts/exglobal_forecast.sh @@ -31,7 +31,7 @@ ## 1. restart file except sfc_data, $gmemdir/RESTART/$PDY.$cyc.*.nc ## 2. sfcanl_data, $memdir/RESTART/$PDY.$cyc.*.nc ## 3. coupler_res, $gmemdir/RESTART/$PDY.$cyc.coupler.res -## 4. increment file, $memdir/${CDUMP}.t${cyc}z.atminc.nc +## 4. increment file, $memdir/${RUN}.t${cyc}z.atminc.nc ## OR $DATA/INPUT/fv3_increment.nc ## Cold start files: ## 1. initial condition, $memdir/INPUT/*.nc @@ -54,9 +54,9 @@ ## ## Data output (location, name) ## If quilting=true and output grid is gaussian grid: -## 1. atmf data, $memdir/${CDUMP}.t${cyc}z.atmf${FH3}.$OUTPUT_FILE -## 2. sfcf data, $memdir/${CDUMP}.t${cyc}z.sfcf${FH3}.$OUTPUT_FILE -## 3. logf data, $memdir/${CDUMP}.t${cyc}z.logf${FH3}.$OUTPUT_FILE +## 1. atmf data, $memdir/${RUN}.t${cyc}z.atmf${FH3}.$OUTPUT_FILE +## 2. sfcf data, $memdir/${RUN}.t${cyc}z.sfcf${FH3}.$OUTPUT_FILE +## 3. logf data, $memdir/${RUN}.t${cyc}z.logf${FH3}.$OUTPUT_FILE ## If quilting=false and output grid is not gaussian grid: ## 1. NGGPS2D, $memdir/nggps2d.tile${n}.nc ## 2. NGGPS3D, $memdir/nggps3d.tile${n}.nc diff --git a/ush/calcanl_gfs.py b/ush/calcanl_gfs.py index ceb75104a20..ebb6e96c22a 100755 --- a/ush/calcanl_gfs.py +++ b/ush/calcanl_gfs.py @@ -19,7 +19,7 @@ def calcanl_gfs(DoIAU, l4DEnsVar, Write4Danl, ComOut, APrefix, ComIn_Ges, GPrefix, FixDir, atmges_ens_mean, RunDir, NThreads, NEMSGet, IAUHrs, - ExecCMD, ExecCMDMPI, ExecAnl, ExecChgresInc, Cdump, JEDI): + ExecCMD, ExecCMDMPI, ExecAnl, ExecChgresInc, Run, JEDI): print('calcanl_gfs beginning at: ', datetime.datetime.utcnow()) IAUHH = IAUHrs @@ -38,7 +38,7 @@ def calcanl_gfs(DoIAU, l4DEnsVar, Write4Danl, ComOut, APrefix, gsi_utils.link_file(RunDir + '/siganl', CalcAnlDir + '/anl.06') gsi_utils.copy_file(ExecChgresInc, CalcAnlDir + '/chgres_inc.x') # for ensemble res analysis - if Cdump in ["gdas", "gfs"]: + if Run in ["gdas", "gfs"]: CalcAnlDir = RunDir + '/calcanl_ensres_' + format(fh, '02') if not os.path.exists(CalcAnlDir): gsi_utils.make_dir(CalcAnlDir) @@ -298,7 +298,7 @@ def calcanl_gfs(DoIAU, l4DEnsVar, Write4Danl, ComOut, APrefix, sys.exit(exit_fullres) # compute determinstic analysis on ensemble resolution - if Cdump in ["gdas", "gfs"]: + if Run in ["gdas", "gfs"]: chgres_jobs = [] for fh in IAUHH: # first check to see if guess file exists @@ -359,7 +359,7 @@ def calcanl_gfs(DoIAU, l4DEnsVar, Write4Danl, ComOut, APrefix, ExecChgresInc = os.getenv('CHGRESINCEXEC', './interp_inc.x') NEMSGet = os.getenv('NEMSIOGET', 'nemsio_get') IAUHrs = list(map(int, os.getenv('IAUFHRS', '6').split(','))) - Cdump = os.getenv('CDUMP', 'gdas') + Run = os.getenv('RUN', 'gdas') JEDI = gsi_utils.isTrue(os.getenv('DO_JEDIATMVAR', 'YES')) print(locals()) @@ -367,4 +367,4 @@ def calcanl_gfs(DoIAU, l4DEnsVar, Write4Danl, ComOut, APrefix, ComIn_Ges, GPrefix, FixDir, atmges_ens_mean, RunDir, NThreads, NEMSGet, IAUHrs, ExecCMD, ExecCMDMPI, ExecAnl, ExecChgresInc, - Cdump, JEDI) + Run, JEDI) diff --git a/ush/forecast_predet.sh b/ush/forecast_predet.sh index 9183e86002e..ebf7cfd282c 100755 --- a/ush/forecast_predet.sh +++ b/ush/forecast_predet.sh @@ -72,8 +72,8 @@ FV3_restarts(){ common_predet(){ echo "SUB ${FUNCNAME[0]}: Defining variables for shared through model components" - CDUMP=${CDUMP:-gdas} - rCDUMP=${rCDUMP:-${CDUMP}} + RUN=${RUN:-gdas} + rCDUMP=${rCDUMP:-${RUN}} CDATE=${CDATE:-"${PDY}${cyc}"} ENSMEM=${ENSMEM:-000} diff --git a/ush/getdump.sh b/ush/getdump.sh index 58906cdedcf..12deb725e10 100755 --- a/ush/getdump.sh +++ b/ush/getdump.sh @@ -5,9 +5,9 @@ source "${USHgfs}/preamble.sh" COMPONENT=${COMPONENT:-atmos} CDATE=${1:-""} -CDUMP=${2:-""} -SOURCE_DIR=${3:-$DMPDIR/${CDUMP}${DUMP_SUFFIX}.${PDY}/${cyc}/${COMPONENT}} -TARGET_DIR=${4:-$ROTDIR/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} +RUN=${2:-""} +SOURCE_DIR=${3:-$DMPDIR/${RUN}${DUMP_SUFFIX}.${PDY}/${cyc}/${COMPONENT}} +TARGET_DIR=${4:-$ROTDIR/${RUN}.${PDY}/${cyc}/${COMPONENT}} DUMP_SUFFIX=${DUMP_SUFFIX:-""} @@ -24,7 +24,7 @@ if [ ! -s $TARGET_DIR ]; then mkdir -p $TARGET_DIR ;fi # Set file prefix cyc=$(echo $CDATE |cut -c 9-10) -prefix="$CDUMP.t${cyc}z." +prefix="$RUN.t${cyc}z." # Link dump files from SOURCE_DIR to TARGET_DIR diff --git a/ush/python/pygfs/task/aero_analysis.py b/ush/python/pygfs/task/aero_analysis.py index 16d27350905..e8b18d58276 100644 --- a/ush/python/pygfs/task/aero_analysis.py +++ b/ush/python/pygfs/task/aero_analysis.py @@ -32,7 +32,7 @@ def __init__(self, config): _res = int(self.config['CASE'][1:]) _res_anl = int(self.config['CASE_ANL'][1:]) _window_begin = add_to_datetime(self.runtime_config.current_cycle, -to_timedelta(f"{self.config['assim_freq']}H") / 2) - _jedi_yaml = os.path.join(self.runtime_config.DATA, f"{self.runtime_config.CDUMP}.t{self.runtime_config['cyc']:02d}z.aerovar.yaml") + _jedi_yaml = os.path.join(self.runtime_config.DATA, f"{self.runtime_config.RUN}.t{self.runtime_config['cyc']:02d}z.aerovar.yaml") # Create a local dictionary that is repeatedly used across this class local_dict = AttrDict( @@ -47,8 +47,8 @@ def __init__(self, config): 'AERO_WINDOW_BEGIN': _window_begin, 'AERO_WINDOW_LENGTH': f"PT{self.config['assim_freq']}H", 'aero_bkg_fhr': map(int, str(self.config['aero_bkg_times']).split(',')), - 'OPREFIX': f"{self.runtime_config.CDUMP}.t{self.runtime_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN - 'APREFIX': f"{self.runtime_config.CDUMP}.t{self.runtime_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN + 'OPREFIX': f"{self.runtime_config.RUN}.t{self.runtime_config.cyc:02d}z.", + 'APREFIX': f"{self.runtime_config.RUN}.t{self.runtime_config.cyc:02d}z.", 'GPREFIX': f"gdas.t{self.runtime_config.previous_cycle.hour:02d}z.", 'jedi_yaml': _jedi_yaml, } @@ -157,8 +157,8 @@ def finalize(self: Analysis) -> None: archive.add(diaggzip, arcname=os.path.basename(diaggzip)) # copy full YAML from executable to ROTDIR - src = os.path.join(self.task_config['DATA'], f"{self.task_config['CDUMP']}.t{self.runtime_config['cyc']:02d}z.aerovar.yaml") - dest = os.path.join(self.task_config.COM_CHEM_ANALYSIS, f"{self.task_config['CDUMP']}.t{self.runtime_config['cyc']:02d}z.aerovar.yaml") + src = os.path.join(self.task_config['DATA'], f"{self.task_config['RUN']}.t{self.runtime_config['cyc']:02d}z.aerovar.yaml") + dest = os.path.join(self.task_config.COM_CHEM_ANALYSIS, f"{self.task_config['RUN']}.t{self.runtime_config['cyc']:02d}z.aerovar.yaml") yaml_copy = { 'mkdir': [self.task_config.COM_CHEM_ANALYSIS], 'copy': [[src, dest]] diff --git a/ush/python/pygfs/task/aero_prepobs.py b/ush/python/pygfs/task/aero_prepobs.py index f2344241a92..bf081ba6623 100644 --- a/ush/python/pygfs/task/aero_prepobs.py +++ b/ush/python/pygfs/task/aero_prepobs.py @@ -64,7 +64,7 @@ def initialize(self) -> None: self.task_config.prepaero_config = self.get_obsproc_config(sensor) # generate converter YAML file - template = f"{self.runtime_config.CDUMP}.t{self.runtime_config['cyc']:02d}z.prepaero_viirs_{sensor}.yaml" + template = f"{self.runtime_config.RUN}.t{self.runtime_config['cyc']:02d}z.prepaero_viirs_{sensor}.yaml" _prepaero_yaml = os.path.join(self.runtime_config.DATA, template) self.task_config.prepaero_yaml.append(_prepaero_yaml) logger.debug(f"Generate PrepAeroObs YAML file: {_prepaero_yaml}") diff --git a/ush/python/pygfs/task/atm_analysis.py b/ush/python/pygfs/task/atm_analysis.py index 95545c57a44..2ff0ebcb778 100644 --- a/ush/python/pygfs/task/atm_analysis.py +++ b/ush/python/pygfs/task/atm_analysis.py @@ -31,7 +31,7 @@ def __init__(self, config): _res = int(self.config.CASE[1:]) _res_anl = int(self.config.CASE_ANL[1:]) _window_begin = add_to_datetime(self.runtime_config.current_cycle, -to_timedelta(f"{self.config.assim_freq}H") / 2) - _jedi_yaml = os.path.join(self.runtime_config.DATA, f"{self.runtime_config.CDUMP}.t{self.runtime_config.cyc:02d}z.atmvar.yaml") + _jedi_yaml = os.path.join(self.runtime_config.DATA, f"{self.runtime_config.RUN}.t{self.runtime_config.cyc:02d}z.atmvar.yaml") # Create a local dictionary that is repeatedly used across this class local_dict = AttrDict( @@ -45,8 +45,8 @@ def __init__(self, config): 'npz_anl': self.config.LEVS - 1, 'ATM_WINDOW_BEGIN': _window_begin, 'ATM_WINDOW_LENGTH': f"PT{self.config.assim_freq}H", - 'OPREFIX': f"{self.runtime_config.CDUMP}.t{self.runtime_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN - 'APREFIX': f"{self.runtime_config.CDUMP}.t{self.runtime_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN + 'OPREFIX': f"{self.runtime_config.RUN}.t{self.runtime_config.cyc:02d}z.", + 'APREFIX': f"{self.runtime_config.RUN}.t{self.runtime_config.cyc:02d}z.", 'GPREFIX': f"gdas.t{self.runtime_config.previous_cycle.hour:02d}z.", 'jedi_yaml': _jedi_yaml, 'atm_obsdatain_path': f"{self.runtime_config.DATA}/obs/", @@ -198,8 +198,8 @@ def finalize(self: Analysis) -> None: # copy full YAML from executable to ROTDIR logger.info(f"Copying {self.task_config.jedi_yaml} to {self.task_config.COM_ATMOS_ANALYSIS}") - src = os.path.join(self.task_config.DATA, f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.atmvar.yaml") - dest = os.path.join(self.task_config.COM_ATMOS_ANALYSIS, f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.atmvar.yaml") + src = os.path.join(self.task_config.DATA, f"{self.task_config.RUN}.t{self.task_config.cyc:02d}z.atmvar.yaml") + dest = os.path.join(self.task_config.COM_ATMOS_ANALYSIS, f"{self.task_config.RUN}.t{self.task_config.cyc:02d}z.atmvar.yaml") logger.debug(f"Copying {src} to {dest}") yaml_copy = { 'mkdir': [self.task_config.COM_ATMOS_ANALYSIS], @@ -244,7 +244,7 @@ def finalize(self: Analysis) -> None: cdate = to_fv3time(self.task_config.current_cycle) cdate_inc = cdate.replace('.', '_') src = os.path.join(self.task_config.DATA, 'anl', f"atminc.{cdate_inc}z.nc4") - dest = os.path.join(self.task_config.COM_ATMOS_ANALYSIS, f'{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.atminc.nc') + dest = os.path.join(self.task_config.COM_ATMOS_ANALYSIS, f'{self.task_config.RUN}.t{self.task_config.cyc:02d}z.atminc.nc') logger.debug(f"Copying {src} to {dest}") inc_copy = { 'copy': [[src, dest]] diff --git a/ush/python/pygfs/task/atmens_analysis.py b/ush/python/pygfs/task/atmens_analysis.py index 37ac6137364..5bb8ed142c4 100644 --- a/ush/python/pygfs/task/atmens_analysis.py +++ b/ush/python/pygfs/task/atmens_analysis.py @@ -31,7 +31,7 @@ def __init__(self, config): _res = int(self.config.CASE_ENS[1:]) _window_begin = add_to_datetime(self.runtime_config.current_cycle, -to_timedelta(f"{self.config.assim_freq}H") / 2) - _jedi_yaml = os.path.join(self.runtime_config.DATA, f"{self.runtime_config.CDUMP}.t{self.runtime_config.cyc:02d}z.atmens.yaml") + _jedi_yaml = os.path.join(self.runtime_config.DATA, f"{self.runtime_config.RUN}.t{self.runtime_config.cyc:02d}z.atmens.yaml") # Create a local dictionary that is repeatedly used across this class local_dict = AttrDict( @@ -42,8 +42,8 @@ def __init__(self, config): 'npz': self.config.LEVS - 1, 'ATM_WINDOW_BEGIN': _window_begin, 'ATM_WINDOW_LENGTH': f"PT{self.config.assim_freq}H", - 'OPREFIX': f"{self.config.EUPD_CYC}.t{self.runtime_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN - 'APREFIX': f"{self.runtime_config.CDUMP}.t{self.runtime_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN + 'OPREFIX': f"{self.config.EUPD_CYC}.t{self.runtime_config.cyc:02d}z.", + 'APREFIX': f"{self.runtime_config.RUN}.t{self.runtime_config.cyc:02d}z.", 'GPREFIX': f"gdas.t{self.runtime_config.previous_cycle.hour:02d}z.", 'jedi_yaml': _jedi_yaml, 'atm_obsdatain_path': f"./obs/", @@ -235,8 +235,8 @@ def finalize(self: Analysis) -> None: # copy full YAML from executable to ROTDIR logger.info(f"Copying {self.task_config.jedi_yaml} to {self.task_config.COM_ATMOS_ANALYSIS_ENS}") - src = os.path.join(self.task_config.DATA, f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.atmens.yaml") - dest = os.path.join(self.task_config.COM_ATMOS_ANALYSIS_ENS, f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.atmens.yaml") + src = os.path.join(self.task_config.DATA, f"{self.task_config.RUN}.t{self.task_config.cyc:02d}z.atmens.yaml") + dest = os.path.join(self.task_config.COM_ATMOS_ANALYSIS_ENS, f"{self.task_config.RUN}.t{self.task_config.cyc:02d}z.atmens.yaml") logger.debug(f"Copying {src} to {dest}") yaml_copy = { 'mkdir': [self.task_config.COM_ATMOS_ANALYSIS_ENS], @@ -265,7 +265,7 @@ def finalize(self: Analysis) -> None: tmpl_inc_dict['MEMDIR'] = memchar incdir = Template.substitute_structure(template_inc, TemplateConstants.DOLLAR_CURLY_BRACE, tmpl_inc_dict.get) src = os.path.join(self.task_config.DATA, 'anl', memchar, f"atminc.{cdate_inc}z.nc4") - dest = os.path.join(incdir, f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.atminc.nc") + dest = os.path.join(incdir, f"{self.task_config.RUN}.t{self.task_config.cyc:02d}z.atminc.nc") # copy increment logger.debug(f"Copying {src} to {dest}") diff --git a/workflow/applications/applications.py b/workflow/applications/applications.py index 6a4d240fe5f..2553ee43abd 100644 --- a/workflow/applications/applications.py +++ b/workflow/applications/applications.py @@ -31,7 +31,11 @@ def __init__(self, conf: Configuration) -> None: self.scheduler = Host().scheduler - _base = conf.parse_config('config.base') + # Save the configuration so we can source the config files when + # determining task resources + self.conf = conf + + _base = self.conf.parse_config('config.base') # Define here so the child __init__ functions can use it; will # be overwritten later during _init_finalize(). self._base = _base @@ -70,30 +74,30 @@ def __init__(self, conf: Configuration) -> None: self.nens = _base.get('NMEM_ENS', 0) - self.wave_cdumps = None + self.wave_runs = None if self.do_wave: - wave_cdump = _base.get('WAVE_CDUMP', 'BOTH').lower() - if wave_cdump in ['both']: - self.wave_cdumps = ['gfs', 'gdas'] - elif wave_cdump in ['gfs', 'gdas']: - self.wave_cdumps = [wave_cdump] + wave_run = _base.get('WAVE_RUN', 'BOTH').lower() + if wave_run in ['both']: + self.wave_runs = ['gfs', 'gdas'] + elif wave_run in ['gfs', 'gdas']: + self.wave_runs = [wave_run] - self.aero_anl_cdumps = None + self.aero_anl_runs = None if self.do_aero: - aero_anl_cdump = _base.get('AERO_ANL_CDUMP', 'BOTH').lower() - if aero_anl_cdump in ['both']: - self.aero_anl_cdumps = ['gfs', 'gdas'] - elif aero_anl_cdump in ['gfs', 'gdas']: - self.aero_anl_cdumps = [aero_anl_cdump] + aero_anl_run = _base.get('AERO_ANL_RUN', 'BOTH').lower() + if aero_anl_run in ['both']: + self.aero_anl_runs = ['gfs', 'gdas'] + elif aero_anl_run in ['gfs', 'gdas']: + self.aero_anl_runs = [aero_anl_run] - def _init_finalize(self, conf: Configuration): + def _init_finalize(self, *args): print("Finalizing initialize") # Get a list of all possible config_files that would be part of the application self.configs_names = self._get_app_configs() # Source the config_files for the jobs in the application - self.configs = self._source_configs(conf) + self.configs = self.source_configs() # Update the base config dictionary base on application self.configs['base'] = self._update_base(self.configs['base']) @@ -130,9 +134,9 @@ def _update_base(base_in: Dict[str, Any]) -> Dict[str, Any]: ''' pass - def _source_configs(self, conf: Configuration) -> Dict[str, Any]: + def source_configs(self, run: str = "gfs", log:bool = True) -> Dict[str, Any]: """ - Given the configuration object and jobs, + Given the configuration object used to initialize, source the configurations for each config and return a dictionary Every config depends on "config.base" """ @@ -140,7 +144,7 @@ def _source_configs(self, conf: Configuration) -> Dict[str, Any]: configs = dict() # Return config.base as well - configs['base'] = conf.parse_config('config.base') + configs['base'] = self.conf.parse_config('config.base') # Source the list of all config_files involved in the application for config in self.configs_names: @@ -163,15 +167,15 @@ def _source_configs(self, conf: Configuration) -> Dict[str, Any]: else: files += [f'config.{config}'] - print(f'sourcing config.{config}') - configs[config] = conf.parse_config(files) + print(f'sourcing config.{config}') if log else 0 + configs[config] = self.conf.parse_config(files, RUN=run) return configs @abstractmethod def get_task_names(self) -> Dict[str, List[str]]: ''' - Create a list of task names for each CDUMP valid for the configuation. + Create a list of task names for each RUN valid for the configuation. Parameters ---------- @@ -179,7 +183,7 @@ def get_task_names(self) -> Dict[str, List[str]]: Returns ------- - Dict[str, List[str]]: Lists of tasks for each CDUMP. + Dict[str, List[str]]: Lists of tasks for each RUN. ''' pass diff --git a/workflow/applications/gefs.py b/workflow/applications/gefs.py index c165f9d1cad..fc7f37e0b89 100644 --- a/workflow/applications/gefs.py +++ b/workflow/applications/gefs.py @@ -37,7 +37,7 @@ def _update_base(base_in): base_out = base_in.copy() base_out['INTERVAL_GFS'] = AppConfig.get_gfs_interval(base_in['gfs_cyc']) - base_out['CDUMP'] = 'gefs' + base_out['RUN'] = 'gefs' return base_out @@ -73,4 +73,4 @@ def get_task_names(self): tasks += ['wavepostbndpnt', 'wavepostbndpntbll'] tasks += ['wavepostpnt'] - return {f"{self._base['CDUMP']}": tasks} + return {f"{self._base['RUN']}": tasks} diff --git a/workflow/applications/gfs_cycled.py b/workflow/applications/gfs_cycled.py index 175ddb07bfa..c715507fe84 100644 --- a/workflow/applications/gfs_cycled.py +++ b/workflow/applications/gfs_cycled.py @@ -21,14 +21,14 @@ def __init__(self, conf: Configuration): self.do_vrfy_oceanda = self._base.get('DO_VRFY_OCEANDA', False) self.lobsdiag_forenkf = False - self.eupd_cdumps = None + self.eupd_runs = None if self.do_hybvar: self.lobsdiag_forenkf = self._base.get('lobsdiag_forenkf', False) - eupd_cdump = self._base.get('EUPD_CYC', 'gdas').lower() - if eupd_cdump in ['both']: - self.eupd_cdumps = ['gfs', 'gdas'] - elif eupd_cdump in ['gfs', 'gdas']: - self.eupd_cdumps = [eupd_cdump] + eupd_run = self._base.get('EUPD_CYC', 'gdas').lower() + if eupd_run in ['both']: + self.eupd_runs = ['gfs', 'gdas'] + elif eupd_run in ['gfs', 'gdas']: + self.eupd_runs = [eupd_run] def _get_app_configs(self): """ @@ -175,10 +175,10 @@ def get_task_names(self): if not self.do_jediatmvar: gdas_tasks += ['analdiag'] - if self.do_wave and 'gdas' in self.wave_cdumps: + if self.do_wave and 'gdas' in self.wave_runs: gdas_tasks += wave_prep_tasks - if self.do_aero and 'gdas' in self.aero_anl_cdumps: + if self.do_aero and 'gdas' in self.aero_anl_runs: gdas_tasks += ['aeroanlinit', 'aeroanlrun', 'aeroanlfinal'] if self.do_prep_obs_aero: gdas_tasks += ['prepobsaero'] @@ -189,7 +189,7 @@ def get_task_names(self): gdas_tasks += ['atmupp'] gdas_tasks += ['atmos_prod'] - if self.do_wave and 'gdas' in self.wave_cdumps: + if self.do_wave and 'gdas' in self.wave_runs: if self.do_wave_bnd: gdas_tasks += wave_bndpnt_tasks gdas_tasks += wave_post_tasks @@ -214,10 +214,10 @@ def get_task_names(self): # Collect "gfs" cycle tasks gfs_tasks = gdas_gfs_common_tasks_before_fcst.copy() - if self.do_wave and 'gfs' in self.wave_cdumps: + if self.do_wave and 'gfs' in self.wave_runs: gfs_tasks += wave_prep_tasks - if self.do_aero and 'gfs' in self.aero_anl_cdumps: + if self.do_aero and 'gfs' in self.aero_anl_runs: gfs_tasks += ['aeroanlinit', 'aeroanlrun', 'aeroanlfinal'] if self.do_prep_obs_aero: gfs_tasks += ['prepobsaero'] @@ -252,7 +252,7 @@ def get_task_names(self): if self.do_metp: gfs_tasks += ['metp'] - if self.do_wave and 'gfs' in self.wave_cdumps: + if self.do_wave and 'gfs' in self.wave_runs: if self.do_wave_bnd: gfs_tasks += wave_bndpnt_tasks gfs_tasks += wave_post_tasks @@ -286,15 +286,15 @@ def get_task_names(self): tasks = dict() tasks['gdas'] = gdas_tasks - if self.do_hybvar and 'gdas' in self.eupd_cdumps: + if self.do_hybvar and 'gdas' in self.eupd_runs: enkfgdas_tasks = hybrid_tasks + hybrid_after_eupd_tasks tasks['enkfgdas'] = enkfgdas_tasks - # Add CDUMP=gfs tasks if running early cycle + # Add RUN=gfs tasks if running early cycle if self.gfs_cyc > 0: tasks['gfs'] = gfs_tasks - if self.do_hybvar and 'gfs' in self.eupd_cdumps: + if self.do_hybvar and 'gfs' in self.eupd_runs: enkfgfs_tasks = hybrid_tasks + hybrid_after_eupd_tasks enkfgfs_tasks.remove("echgres") tasks['enkfgfs'] = enkfgfs_tasks diff --git a/workflow/applications/gfs_forecast_only.py b/workflow/applications/gfs_forecast_only.py index e219032551c..66cfd6600f1 100644 --- a/workflow/applications/gfs_forecast_only.py +++ b/workflow/applications/gfs_forecast_only.py @@ -73,7 +73,7 @@ def _update_base(base_in): base_out = base_in.copy() base_out['INTERVAL_GFS'] = AppConfig.get_gfs_interval(base_in['gfs_cyc']) - base_out['CDUMP'] = 'gfs' + base_out['RUN'] = 'gfs' return base_out @@ -87,8 +87,8 @@ def get_task_names(self): tasks = ['stage_ic'] if self.do_aero: - aero_fcst_cdump = _base.get('AERO_FCST_CDUMP', 'BOTH').lower() - if self._base['CDUMP'] in aero_fcst_cdump or aero_fcst_cdump == "both": + aero_fcst_run = _base.get('AERO_FCST_RUN', 'BOTH').lower() + if self._base['RUN'] in aero_fcst_run or aero_fcst_run == "both": tasks += ['aerosol_init'] if self.do_wave: @@ -151,4 +151,4 @@ def get_task_names(self): tasks += ['arch', 'cleanup'] # arch and cleanup **must** be the last tasks - return {f"{self._base['CDUMP']}": tasks} + return {f"{self._base['RUN']}": tasks} diff --git a/workflow/rocoto/gefs_tasks.py b/workflow/rocoto/gefs_tasks.py index cfd8fa70934..f008d945621 100644 --- a/workflow/rocoto/gefs_tasks.py +++ b/workflow/rocoto/gefs_tasks.py @@ -6,8 +6,8 @@ class GEFSTasks(Tasks): - def __init__(self, app_config: AppConfig, cdump: str) -> None: - super().__init__(app_config, cdump) + def __init__(self, app_config: AppConfig, run: str) -> None: + super().__init__(app_config, run) def stage_ic(self): cpl_ic = self._configs['stage_ic'] @@ -215,13 +215,13 @@ def _atmosoceaniceprod(self, component: str): fhout_ice_gfs = self._configs['base']['FHOUT_ICE_GFS'] products_dict = {'atmos': {'config': 'atmos_products', 'history_path_tmpl': 'COM_ATMOS_MASTER_TMPL', - 'history_file_tmpl': f'{self.cdump}.t@Hz.master.grb2f#fhr#'}, + 'history_file_tmpl': f'{self.run}.t@Hz.master.grb2f#fhr#'}, 'ocean': {'config': 'oceanice_products', 'history_path_tmpl': 'COM_OCEAN_HISTORY_TMPL', - 'history_file_tmpl': f'{self.cdump}.ocean.t@Hz.{fhout_ocn_gfs}hr_avg.f#fhr#.nc'}, + 'history_file_tmpl': f'{self.run}.ocean.t@Hz.{fhout_ocn_gfs}hr_avg.f#fhr#.nc'}, 'ice': {'config': 'oceanice_products', 'history_path_tmpl': 'COM_ICE_HISTORY_TMPL', - 'history_file_tmpl': f'{self.cdump}.ice.t@Hz.{fhout_ice_gfs}hr_avg.f#fhr#.nc'}} + 'history_file_tmpl': f'{self.run}.ice.t@Hz.{fhout_ice_gfs}hr_avg.f#fhr#.nc'}} component_dict = products_dict[component] config = component_dict['config'] @@ -407,7 +407,7 @@ def wavepostbndpntbll(self): # The wavepostbndpntbll job runs on forecast hours up to FHMAX_WAV_IBP last_fhr = self._configs['wave']['FHMAX_WAV_IBP'] - data = f'{atmos_hist_path}/{self.cdump}.t@Hz.atm.logf{last_fhr:03d}.txt' + data = f'{atmos_hist_path}/{self.run}.t@Hz.atm.logf{last_fhr:03d}.txt' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) diff --git a/workflow/rocoto/gfs_tasks.py b/workflow/rocoto/gfs_tasks.py index 60a08549b64..a7d59c8a662 100644 --- a/workflow/rocoto/gfs_tasks.py +++ b/workflow/rocoto/gfs_tasks.py @@ -7,13 +7,13 @@ class GFSTasks(Tasks): - def __init__(self, app_config: AppConfig, cdump: str) -> None: - super().__init__(app_config, cdump) + def __init__(self, app_config: AppConfig, run: str) -> None: + super().__init__(app_config, run) @staticmethod - def _is_this_a_gdas_task(cdump, task_name): - if cdump != 'enkfgdas': - raise TypeError(f'{task_name} must be part of the "enkfgdas" cycle and not {cdump}') + def _is_this_a_gdas_task(run, task_name): + if run != 'enkfgdas': + raise TypeError(f'{task_name} must be part of the "enkfgdas" cycle and not {run}') # Specific Tasks begin here def stage_ic(self): @@ -71,12 +71,12 @@ def stage_ic(self): dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('stage_ic') - task_name = f'{self.cdump}stage_ic' + task_name = f'{self.run}stage_ic' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump, + 'cycledef': self.run, 'command': f'{self.HOMEgfs}/jobs/rocoto/stage_ic.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -96,7 +96,7 @@ def prep(self): dump_path = self._template_to_rocoto_cycstring(self._base["COM_OBSDMP_TMPL"], {'DMPDIR': dmpdir, 'DUMP_SUFFIX': dump_suffix}) - gfs_enkf = True if self.app_config.do_hybvar and 'gfs' in self.app_config.eupd_cdumps else False + gfs_enkf = True if self.app_config.do_hybvar and 'gfs' in self.app_config.eupd_runs else False deps = [] dep_dict = {'type': 'metatask', 'name': 'gdasatmos_prod', 'offset': f"-{timedelta_to_HMS(self._base['cycle_interval'])}"} @@ -104,17 +104,17 @@ def prep(self): data = f'{atm_hist_path}/gdas.t@Hz.atmf009.nc' dep_dict = {'type': 'data', 'data': data, 'offset': f"-{timedelta_to_HMS(self._base['cycle_interval'])}"} deps.append(rocoto.add_dependency(dep_dict)) - data = f'{dump_path}/{self.cdump}.t@Hz.updated.status.tm00.bufr_d' + data = f'{dump_path}/{self.run}.t@Hz.updated.status.tm00.bufr_d' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) - cycledef = self.cdump - if self.cdump in ['gfs'] and gfs_enkf and gfs_cyc != 4: + cycledef = self.run + if self.run in ['gfs'] and gfs_enkf and gfs_cyc != 4: cycledef = 'gdas' resources = self.get_resource('prep') - task_name = f'{self.cdump}prep' + task_name = f'{self.run}prep' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, @@ -134,17 +134,17 @@ def waveinit(self): resources = self.get_resource('waveinit') dependencies = None - cycledef = 'gdas_half,gdas' if self.cdump in ['gdas'] else self.cdump + cycledef = 'gdas_half,gdas' if self.run in ['gdas'] else self.run if self.app_config.mode in ['cycled']: deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}prep'} + dep_dict = {'type': 'task', 'name': f'{self.run}prep'} deps.append(rocoto.add_dependency(dep_dict)) - if self.cdump in ['gdas']: + if self.run in ['gdas']: dep_dict = {'type': 'cycleexist', 'condition': 'not', 'offset': f"-{timedelta_to_HMS(self._base['cycle_interval'])}"} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='or', dep=deps) - task_name = f'{self.cdump}waveinit' + task_name = f'{self.run}waveinit' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, @@ -163,12 +163,12 @@ def waveinit(self): def waveprep(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}waveinit'} + dep_dict = {'type': 'task', 'name': f'{self.run}waveinit'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) - cycledef = 'gdas_half,gdas' if self.cdump in ['gdas'] else self.cdump + cycledef = 'gdas_half,gdas' if self.run in ['gdas'] else self.run resources = self.get_resource('waveprep') - task_name = f'{self.cdump}waveprep' + task_name = f'{self.run}waveprep' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, @@ -197,11 +197,11 @@ def aerosol_init(self): dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) - # Calculate offset based on CDUMP = gfs | gdas + # Calculate offset based on RUN = gfs | gdas interval = None - if self.cdump in ['gfs']: + if self.run in ['gfs']: interval = self._base['INTERVAL_GFS'] - elif self.cdump in ['gdas']: + elif self.run in ['gdas']: interval = self._base['INTERVAL'] offset = timedelta_to_HMS(-interval) @@ -219,7 +219,7 @@ def aerosol_init(self): cycledef = 'gfs_seq' resources = self.get_resource('aerosol_init') - task_name = f'{self.cdump}aerosol_init' + task_name = f'{self.run}aerosol_init' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, @@ -237,7 +237,7 @@ def aerosol_init(self): def anal(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}prep'} + dep_dict = {'type': 'task', 'name': f'{self.run}prep'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_hybvar: dep_dict = {'type': 'metatask', 'name': 'enkfgdasepmn', 'offset': f"-{timedelta_to_HMS(self._base['cycle_interval'])}"} @@ -247,12 +247,12 @@ def anal(self): dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('anal') - task_name = f'{self.cdump}anal' + task_name = f'{self.run}anal' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/anal.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -267,24 +267,24 @@ def sfcanl(self): deps = [] if self.app_config.do_jediatmvar: - dep_dict = {'type': 'task', 'name': f'{self.cdump}atmanlfinal'} + dep_dict = {'type': 'task', 'name': f'{self.run}atmanlfinal'} else: - dep_dict = {'type': 'task', 'name': f'{self.cdump}anal'} + dep_dict = {'type': 'task', 'name': f'{self.run}anal'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_jedisnowda: - dep_dict = {'type': 'task', 'name': f'{self.cdump}snowanl'} + dep_dict = {'type': 'task', 'name': f'{self.run}snowanl'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) else: dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('sfcanl') - task_name = f'{self.cdump}sfcanl' + task_name = f'{self.run}sfcanl' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/sfcanl.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -299,24 +299,24 @@ def analcalc(self): deps = [] if self.app_config.do_jediatmvar: - dep_dict = {'type': 'task', 'name': f'{self.cdump}atmanlfinal'} + dep_dict = {'type': 'task', 'name': f'{self.run}atmanlfinal'} else: - dep_dict = {'type': 'task', 'name': f'{self.cdump}anal'} + dep_dict = {'type': 'task', 'name': f'{self.run}anal'} deps.append(rocoto.add_dependency(dep_dict)) - dep_dict = {'type': 'task', 'name': f'{self.cdump}sfcanl'} + dep_dict = {'type': 'task', 'name': f'{self.run}sfcanl'} deps.append(rocoto.add_dependency(dep_dict)) - if self.app_config.do_hybvar and self.cdump in ['gdas']: + if self.app_config.do_hybvar and self.run in ['gdas']: dep_dict = {'type': 'task', 'name': 'enkfgdasechgres', 'offset': f"-{timedelta_to_HMS(self._base['cycle_interval'])}"} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('analcalc') - task_name = f'{self.cdump}analcalc' + task_name = f'{self.run}analcalc' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/analcalc.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -330,17 +330,17 @@ def analcalc(self): def analdiag(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}anal'} + dep_dict = {'type': 'task', 'name': f'{self.run}anal'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('analdiag') - task_name = f'{self.cdump}analdiag' + task_name = f'{self.run}analdiag' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/analdiag.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -354,17 +354,17 @@ def analdiag(self): def prepatmiodaobs(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}prep'} + dep_dict = {'type': 'task', 'name': f'{self.run}prep'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('prepatmiodaobs') - task_name = f'{self.cdump}prepatmiodaobs' + task_name = f'{self.run}prepatmiodaobs' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/prepatmiodaobs.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -378,7 +378,7 @@ def prepatmiodaobs(self): def atmanlinit(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}prepatmiodaobs'} + dep_dict = {'type': 'task', 'name': f'{self.run}prepatmiodaobs'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_hybvar: dep_dict = {'type': 'metatask', 'name': 'enkfgdasepmn', 'offset': f"-{timedelta_to_HMS(self._base['cycle_interval'])}"} @@ -388,14 +388,14 @@ def atmanlinit(self): dependencies = rocoto.create_dependency(dep=deps) gfs_cyc = self._base["gfs_cyc"] - gfs_enkf = True if self.app_config.do_hybvar and 'gfs' in self.app_config.eupd_cdumps else False + gfs_enkf = True if self.app_config.do_hybvar and 'gfs' in self.app_config.eupd_runs else False - cycledef = self.cdump - if self.cdump in ['gfs'] and gfs_enkf and gfs_cyc != 4: + cycledef = self.run + if self.run in ['gfs'] and gfs_enkf and gfs_cyc != 4: cycledef = 'gdas' resources = self.get_resource('atmanlinit') - task_name = f'{self.cdump}atmanlinit' + task_name = f'{self.run}atmanlinit' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, @@ -414,17 +414,17 @@ def atmanlinit(self): def atmanlvar(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}atmanlinit'} + dep_dict = {'type': 'task', 'name': f'{self.run}atmanlinit'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('atmanlvar') - task_name = f'{self.cdump}atmanlvar' + task_name = f'{self.run}atmanlvar' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/atmanlvar.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -438,17 +438,17 @@ def atmanlvar(self): def atmanlfv3inc(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}atmanlvar'} + dep_dict = {'type': 'task', 'name': f'{self.run}atmanlvar'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('atmanlfv3inc') - task_name = f'{self.cdump}atmanlfv3inc' + task_name = f'{self.run}atmanlfv3inc' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/atmanlfv3inc.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -462,17 +462,17 @@ def atmanlfv3inc(self): def atmanlfinal(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}atmanlfv3inc'} + dep_dict = {'type': 'task', 'name': f'{self.run}atmanlfv3inc'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('atmanlfinal') - task_name = f'{self.cdump}atmanlfinal' + task_name = f'{self.run}atmanlfinal' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/atmanlfinal.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -485,17 +485,17 @@ def atmanlfinal(self): def prepobsaero(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}prep'} + dep_dict = {'type': 'task', 'name': f'{self.run}prep'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('prepobsaero') - task_name = f'{self.cdump}prepobsaero' + task_name = f'{self.run}prepobsaero' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/prepobsaero.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -509,19 +509,19 @@ def prepobsaero(self): def aeroanlinit(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}prep'} + dep_dict = {'type': 'task', 'name': f'{self.run}prep'} if self.app_config.do_prep_obs_aero: - dep_dict = {'type': 'task', 'name': f'{self.cdump}prepobsaero'} + dep_dict = {'type': 'task', 'name': f'{self.run}prepobsaero'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('aeroanlinit') - task_name = f'{self.cdump}aeroanlinit' + task_name = f'{self.run}aeroanlinit' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/aeroanlinit.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -535,17 +535,17 @@ def aeroanlinit(self): def aeroanlrun(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}aeroanlinit'} + dep_dict = {'type': 'task', 'name': f'{self.run}aeroanlinit'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('aeroanlrun') - task_name = f'{self.cdump}aeroanlrun' + task_name = f'{self.run}aeroanlrun' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/aeroanlrun.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -559,17 +559,17 @@ def aeroanlrun(self): def aeroanlfinal(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}aeroanlrun'} + dep_dict = {'type': 'task', 'name': f'{self.run}aeroanlrun'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('aeroanlfinal') - task_name = f'{self.cdump}aeroanlfinal' + task_name = f'{self.run}aeroanlfinal' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/aeroanlfinal.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -583,17 +583,17 @@ def aeroanlfinal(self): def prepsnowobs(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}prep'} + dep_dict = {'type': 'task', 'name': f'{self.run}prep'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('prepsnowobs') - task_name = f'{self.cdump}prepsnowobs' + task_name = f'{self.run}prepsnowobs' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/prepsnowobs.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -607,17 +607,17 @@ def prepsnowobs(self): def snowanl(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}prepsnowobs'} + dep_dict = {'type': 'task', 'name': f'{self.run}prepsnowobs'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('snowanl') - task_name = f'{self.cdump}snowanl' + task_name = f'{self.run}snowanl' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/snowanl.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -638,12 +638,12 @@ def prepoceanobs(self): dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('prepoceanobs') - task_name = f'{self.cdump}prepoceanobs' + task_name = f'{self.run}prepoceanobs' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/prepoceanobs.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -657,17 +657,17 @@ def prepoceanobs(self): def ocnanalprep(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}prepoceanobs'} + dep_dict = {'type': 'task', 'name': f'{self.run}prepoceanobs'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('ocnanalprep') - task_name = f'{self.cdump}ocnanalprep' + task_name = f'{self.run}ocnanalprep' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/ocnanalprep.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -681,17 +681,17 @@ def ocnanalprep(self): def ocnanalbmat(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}ocnanalprep'} + dep_dict = {'type': 'task', 'name': f'{self.run}ocnanalprep'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('ocnanalbmat') - task_name = f'{self.cdump}ocnanalbmat' + task_name = f'{self.run}ocnanalbmat' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/ocnanalbmat.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -705,17 +705,17 @@ def ocnanalbmat(self): def ocnanalrun(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}ocnanalbmat'} + dep_dict = {'type': 'task', 'name': f'{self.run}ocnanalbmat'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('ocnanalrun') - task_name = f'{self.cdump}ocnanalrun' + task_name = f'{self.run}ocnanalrun' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/ocnanalrun.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -729,17 +729,17 @@ def ocnanalrun(self): def ocnanalecen(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}ocnanalrun'} + dep_dict = {'type': 'task', 'name': f'{self.run}ocnanalrun'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('ocnanalecen') - task_name = f'{self.cdump}ocnanalecen' + task_name = f'{self.run}ocnanalecen' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/ocnanalecen.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -754,23 +754,23 @@ def ocnanalchkpt(self): deps = [] if self.app_config.do_hybvar: - dep_dict = {'type': 'task', 'name': f'{self.cdump}ocnanalecen'} + dep_dict = {'type': 'task', 'name': f'{self.run}ocnanalecen'} else: - dep_dict = {'type': 'task', 'name': f'{self.cdump}ocnanalrun'} + dep_dict = {'type': 'task', 'name': f'{self.run}ocnanalrun'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_mergensst: - data = f'&ROTDIR;/{self.cdump}.@Y@m@d/@H/atmos/{self.cdump}.t@Hz.sfcanl.nc' + data = f'&ROTDIR;/{self.run}.@Y@m@d/@H/atmos/{self.run}.t@Hz.sfcanl.nc' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('ocnanalchkpt') - task_name = f'{self.cdump}ocnanalchkpt' + task_name = f'{self.run}ocnanalchkpt' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/ocnanalchkpt.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -784,17 +784,17 @@ def ocnanalchkpt(self): def ocnanalpost(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}ocnanalchkpt'} + dep_dict = {'type': 'task', 'name': f'{self.run}ocnanalchkpt'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('ocnanalpost') - task_name = f'{self.cdump}ocnanalpost' + task_name = f'{self.run}ocnanalpost' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/ocnanalpost.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -808,17 +808,17 @@ def ocnanalpost(self): def ocnanalvrfy(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}ocnanalpost'} + dep_dict = {'type': 'task', 'name': f'{self.run}ocnanalpost'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('ocnanalvrfy') - task_name = f'{self.cdump}ocnanalvrfy' + task_name = f'{self.run}ocnanalvrfy' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/ocnanalvrfy.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -846,24 +846,24 @@ def fcst(self): def _fcst_forecast_only(self): dependencies = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}stage_ic'} + dep_dict = {'type': 'task', 'name': f'{self.run}stage_ic'} dependencies.append(rocoto.add_dependency(dep_dict)) - if self.app_config.do_wave and self.cdump in self.app_config.wave_cdumps: + if self.app_config.do_wave and self.run in self.app_config.wave_runs: wave_job = 'waveprep' if self.app_config.model_app in ['ATMW'] else 'waveinit' - dep_dict = {'type': 'task', 'name': f'{self.cdump}{wave_job}'} + dep_dict = {'type': 'task', 'name': f'{self.run}{wave_job}'} dependencies.append(rocoto.add_dependency(dep_dict)) - if self.app_config.do_aero and self.cdump in self.app_config.aero_fcst_cdumps: - # Calculate offset based on CDUMP = gfs | gdas + if self.app_config.do_aero and self.run in self.app_config.aero_fcst_runs: + # Calculate offset based on RUN = gfs | gdas interval = None - if self.cdump in ['gfs']: + if self.run in ['gfs']: interval = self._base['INTERVAL_GFS'] - elif self.cdump in ['gdas']: + elif self.run in ['gdas']: interval = self._base['INTERVAL'] offset = timedelta_to_HMS(-interval) deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}aerosol_init'} + dep_dict = {'type': 'task', 'name': f'{self.run}aerosol_init'} deps.append(rocoto.add_dependency(dep_dict)) dep_dict = {'type': 'cycleexist', 'condition': 'not', 'offset': offset} deps.append(rocoto.add_dependency(dep_dict)) @@ -872,12 +872,12 @@ def _fcst_forecast_only(self): dependencies = rocoto.create_dependency(dep_condition='and', dep=dependencies) resources = self.get_resource('fcst') - task_name = f'{self.cdump}fcst' + task_name = f'{self.run}fcst' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/fcst.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -890,38 +890,38 @@ def _fcst_forecast_only(self): def _fcst_cycled(self): - dep_dict = {'type': 'task', 'name': f'{self.cdump}sfcanl'} + dep_dict = {'type': 'task', 'name': f'{self.run}sfcanl'} dep = rocoto.add_dependency(dep_dict) dependencies = rocoto.create_dependency(dep=dep) if self.app_config.do_jediocnvar: - dep_dict = {'type': 'task', 'name': f'{self.cdump}ocnanalpost'} + dep_dict = {'type': 'task', 'name': f'{self.run}ocnanalpost'} dependencies.append(rocoto.add_dependency(dep_dict)) - if self.app_config.do_aero and self.cdump in self.app_config.aero_anl_cdumps: - dep_dict = {'type': 'task', 'name': f'{self.cdump}aeroanlfinal'} + if self.app_config.do_aero and self.run in self.app_config.aero_anl_runs: + dep_dict = {'type': 'task', 'name': f'{self.run}aeroanlfinal'} dependencies.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_jedisnowda: - dep_dict = {'type': 'task', 'name': f'{self.cdump}snowanl'} + dep_dict = {'type': 'task', 'name': f'{self.run}snowanl'} dependencies.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=dependencies) - if self.cdump in ['gdas']: + if self.run in ['gdas']: dep_dict = {'type': 'cycleexist', 'condition': 'not', 'offset': f"-{timedelta_to_HMS(self._base['cycle_interval'])}"} dependencies.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='or', dep=dependencies) - if self.app_config.do_wave and self.cdump in self.app_config.wave_cdumps: - dep_dict = {'type': 'task', 'name': f'{self.cdump}waveprep'} + if self.app_config.do_wave and self.run in self.app_config.wave_runs: + dep_dict = {'type': 'task', 'name': f'{self.run}waveprep'} dependencies.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=dependencies) - cycledef = 'gdas_half,gdas' if self.cdump in ['gdas'] else self.cdump + cycledef = 'gdas_half,gdas' if self.run in ['gdas'] else self.run resources = self.get_resource('fcst') - task_name = f'{self.cdump}fcst' + task_name = f'{self.run}fcst' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, @@ -946,23 +946,23 @@ def atmanlupp(self): atm_anl_path = self._template_to_rocoto_cycstring(self._base["COM_ATMOS_ANALYSIS_TMPL"]) deps = [] - data = f'{atm_anl_path}/{self.cdump}.t@Hz.atmanl.nc' + data = f'{atm_anl_path}/{self.run}.t@Hz.atmanl.nc' dep_dict = {'type': 'data', 'data': data, 'age': 120} deps.append(rocoto.add_dependency(dep_dict)) - data = f'{atm_anl_path}/{self.cdump}.t@Hz.sfcanl.nc' + data = f'{atm_anl_path}/{self.run}.t@Hz.sfcanl.nc' dep_dict = {'type': 'data', 'data': data, 'age': 120} deps.append(rocoto.add_dependency(dep_dict)) - data = f'{atm_anl_path}/{self.cdump}.t@Hz.loganl.txt' + data = f'{atm_anl_path}/{self.run}.t@Hz.loganl.txt' dep_dict = {'type': 'data', 'data': data, 'age': 60} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps, dep_condition='and') resources = self.get_resource('upp') - task_name = f'{self.cdump}atmanlupp' + task_name = f'{self.run}atmanlupp' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': postenvars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/upp.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -981,17 +981,17 @@ def atmanlprod(self): atm_master_path = self._template_to_rocoto_cycstring(self._base["COM_ATMOS_MASTER_TMPL"]) deps = [] - data = f'{atm_master_path}/{self.cdump}.t@Hz.master.grb2anl' + data = f'{atm_master_path}/{self.run}.t@Hz.master.grb2anl' dep_dict = {'type': 'data', 'data': data, 'age': 120} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('atmos_products') - task_name = f'{self.cdump}atmanlprod' + task_name = f'{self.run}atmanlprod' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': postenvars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/atmos_products.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1022,20 +1022,20 @@ def _upptask(self, upp_run="forecast", task_id="atmupp"): atm_hist_path = self._template_to_rocoto_cycstring(self._base["COM_ATMOS_HISTORY_TMPL"]) deps = [] - data = f'{atm_hist_path}/{self.cdump}.t@Hz.atmf#fhr#.nc' + data = f'{atm_hist_path}/{self.run}.t@Hz.atmf#fhr#.nc' dep_dict = {'type': 'data', 'data': data, 'age': 120} deps.append(rocoto.add_dependency(dep_dict)) - data = f'{atm_hist_path}/{self.cdump}.t@Hz.sfcf#fhr#.nc' + data = f'{atm_hist_path}/{self.run}.t@Hz.sfcf#fhr#.nc' dep_dict = {'type': 'data', 'data': data, 'age': 120} deps.append(rocoto.add_dependency(dep_dict)) - data = f'{atm_hist_path}/{self.cdump}.t@Hz.atm.logf#fhr#.txt' + data = f'{atm_hist_path}/{self.run}.t@Hz.atm.logf#fhr#.txt' dep_dict = {'type': 'data', 'data': data, 'age': 60} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps, dep_condition='and') - cycledef = 'gdas_half,gdas' if self.cdump in ['gdas'] else self.cdump + cycledef = 'gdas_half,gdas' if self.run in ['gdas'] else self.run resources = self.get_resource('upp') - task_name = f'{self.cdump}{task_id}_f#fhr#' + task_name = f'{self.run}{task_id}_f#fhr#' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, @@ -1047,10 +1047,10 @@ def _upptask(self, upp_run="forecast", task_id="atmupp"): 'maxtries': '&MAXTRIES;' } - fhrs = self._get_forecast_hours(self.cdump, self._configs['upp']) + fhrs = self._get_forecast_hours(self.run, self._configs['upp']) fhr_var_dict = {'fhr': ' '.join([f"{fhr:03d}" for fhr in fhrs])} - metatask_dict = {'task_name': f'{self.cdump}{task_id}', + metatask_dict = {'task_name': f'{self.run}{task_id}', 'task_dict': task_dict, 'var_dict': fhr_var_dict } @@ -1072,13 +1072,13 @@ def _atmosoceaniceprod(self, component: str): products_dict = {'atmos': {'config': 'atmos_products', 'history_path_tmpl': 'COM_ATMOS_MASTER_TMPL', - 'history_file_tmpl': f'{self.cdump}.t@Hz.master.grb2f#fhr#'}, + 'history_file_tmpl': f'{self.run}.t@Hz.master.grb2f#fhr#'}, 'ocean': {'config': 'oceanice_products', 'history_path_tmpl': 'COM_OCEAN_HISTORY_TMPL', - 'history_file_tmpl': f'{self.cdump}.ocean.t@Hz.6hr_avg.f#fhr#.nc'}, + 'history_file_tmpl': f'{self.run}.ocean.t@Hz.6hr_avg.f#fhr#.nc'}, 'ice': {'config': 'oceanice_products', 'history_path_tmpl': 'COM_ICE_HISTORY_TMPL', - 'history_file_tmpl': f'{self.cdump}.ice.t@Hz.6hr_avg.f#fhr#.nc'}} + 'history_file_tmpl': f'{self.run}.ice.t@Hz.6hr_avg.f#fhr#.nc'}} component_dict = products_dict[component] config = component_dict['config'] @@ -1103,10 +1103,10 @@ def _atmosoceaniceprod(self, component: str): else: dependencies = rocoto.create_dependency(dep=deps) - cycledef = 'gdas_half,gdas' if self.cdump in ['gdas'] else self.cdump + cycledef = 'gdas_half,gdas' if self.run in ['gdas'] else self.run resources = self.get_resource(component_dict['config']) - task_name = f'{self.cdump}{component}_prod_f#fhr#' + task_name = f'{self.run}{component}_prod_f#fhr#' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, @@ -1118,9 +1118,9 @@ def _atmosoceaniceprod(self, component: str): 'maxtries': '&MAXTRIES;' } - fhrs = self._get_forecast_hours(self.cdump, self._configs[config], component) + fhrs = self._get_forecast_hours(self.run, self._configs[config], component) fhr_var_dict = {'fhr': ' '.join([f"{fhr:03d}" for fhr in fhrs])} - metatask_dict = {'task_name': f'{self.cdump}{component}_prod', + metatask_dict = {'task_name': f'{self.run}{component}_prod', 'task_dict': task_dict, 'var_dict': fhr_var_dict } @@ -1133,18 +1133,18 @@ def wavepostsbs(self): deps = [] for wave_grid in self._configs['wavepostsbs']['waveGRD'].split(): wave_hist_path = self._template_to_rocoto_cycstring(self._base["COM_WAVE_HISTORY_TMPL"]) - data = f'{wave_hist_path}/{self.cdump}wave.out_grd.{wave_grid}.@Y@m@d.@H0000' + data = f'{wave_hist_path}/{self.run}wave.out_grd.{wave_grid}.@Y@m@d.@H0000' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('wavepostsbs') - task_name = f'{self.cdump}wavepostsbs' + task_name = f'{self.run}wavepostsbs' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/wavepostsbs.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1157,17 +1157,17 @@ def wavepostsbs(self): def wavepostbndpnt(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}fcst'} + dep_dict = {'type': 'task', 'name': f'{self.run}fcst'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('wavepostbndpnt') - task_name = f'{self.cdump}wavepostbndpnt' + task_name = f'{self.run}wavepostbndpnt' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/wavepostbndpnt.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1185,18 +1185,18 @@ def wavepostbndpntbll(self): deps = [] atmos_hist_path = self._template_to_rocoto_cycstring(self._base["COM_ATMOS_HISTORY_TMPL"]) - data = f'{atmos_hist_path}/{self.cdump}.t@Hz.atm.logf{last_fhr:03d}.txt' + data = f'{atmos_hist_path}/{self.run}.t@Hz.atm.logf{last_fhr:03d}.txt' dep_dict = {'type': 'data', 'data': data} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('wavepostbndpntbll') - task_name = f'{self.cdump}wavepostbndpntbll' + task_name = f'{self.run}wavepostbndpntbll' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/wavepostbndpntbll.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1209,20 +1209,20 @@ def wavepostbndpntbll(self): def wavepostpnt(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}fcst'} + dep_dict = {'type': 'task', 'name': f'{self.run}fcst'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_wave_bnd: - dep_dict = {'type': 'task', 'name': f'{self.cdump}wavepostbndpntbll'} + dep_dict = {'type': 'task', 'name': f'{self.run}wavepostbndpntbll'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('wavepostpnt') - task_name = f'{self.cdump}wavepostpnt' + task_name = f'{self.run}wavepostpnt' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/wavepostpnt.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1235,17 +1235,17 @@ def wavepostpnt(self): def wavegempak(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}wavepostsbs'} + dep_dict = {'type': 'task', 'name': f'{self.run}wavepostsbs'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('wavegempak') - task_name = f'{self.cdump}wavegempak' + task_name = f'{self.run}wavegempak' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/wavegempak.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1258,19 +1258,19 @@ def wavegempak(self): def waveawipsbulls(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}wavepostsbs'} + dep_dict = {'type': 'task', 'name': f'{self.run}wavepostsbs'} deps.append(rocoto.add_dependency(dep_dict)) - dep_dict = {'type': 'task', 'name': f'{self.cdump}wavepostpnt'} + dep_dict = {'type': 'task', 'name': f'{self.run}wavepostpnt'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('waveawipsbulls') - task_name = f'{self.cdump}waveawipsbulls' + task_name = f'{self.run}waveawipsbulls' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/waveawipsbulls.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1283,17 +1283,17 @@ def waveawipsbulls(self): def waveawipsgridded(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}wavepostsbs'} + dep_dict = {'type': 'task', 'name': f'{self.run}wavepostsbs'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('waveawipsgridded') - task_name = f'{self.cdump}waveawipsgridded' + task_name = f'{self.run}waveawipsgridded' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/waveawipsgridded.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1306,17 +1306,17 @@ def waveawipsgridded(self): def postsnd(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}fcst'} + dep_dict = {'type': 'task', 'name': f'{self.run}fcst'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('postsnd') - task_name = f'{self.cdump}postsnd' + task_name = f'{self.run}postsnd' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/postsnd.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1329,15 +1329,15 @@ def postsnd(self): def fbwind(self): - atmos_prod_path = self._template_to_rocoto_cycstring(self._base["COM_ATMOS_GRIB_GRID_TMPL"], {'RUN': self.cdump, 'GRID': '0p25'}) + atmos_prod_path = self._template_to_rocoto_cycstring(self._base["COM_ATMOS_GRIB_GRID_TMPL"], {'RUN': self.run, 'GRID': '0p25'}) deps = [] - data = f'{atmos_prod_path}/{self.cdump}.t@Hz.pgrb2.0p25.f006' + data = f'{atmos_prod_path}/{self.run}.t@Hz.pgrb2.0p25.f006' dep_dict = {'type': 'data', 'data': data, 'age': 120} deps.append(rocoto.add_dependency(dep_dict)) - data = f'{atmos_prod_path}/{self.cdump}.t@Hz.pgrb2.0p25.f012' + data = f'{atmos_prod_path}/{self.run}.t@Hz.pgrb2.0p25.f012' dep_dict = {'type': 'data', 'data': data, 'age': 120} deps.append(rocoto.add_dependency(dep_dict)) - data = f'{atmos_prod_path}/{self.cdump}.t@Hz.pgrb2.0p25.f024' + data = f'{atmos_prod_path}/{self.run}.t@Hz.pgrb2.0p25.f024' dep_dict = {'type': 'data', 'data': data, 'age': 120} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps, dep_condition='and') @@ -1348,12 +1348,12 @@ def fbwind(self): # prematurely starting with partial files. Unfortunately, the # ability to "group" post would make this more convoluted than # it should be and not worth the complexity. - task_name = f'{self.cdump}fbwind' + task_name = f'{self.run}fbwind' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/fbwind.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1365,7 +1365,7 @@ def fbwind(self): return task @staticmethod - def _get_awipsgroups(cdump, config): + def _get_awipsgroups(run, config): fhmin = config['FHMIN'] fhmax = config['FHMAX'] @@ -1373,9 +1373,9 @@ def _get_awipsgroups(cdump, config): # Get a list of all forecast hours fhrs = [] - if cdump in ['gdas']: + if run in ['gdas']: fhrs = range(fhmin, fhmax + fhout, fhout) - elif cdump in ['gfs']: + elif run in ['gfs']: fhmax = config['FHMAX_GFS'] fhout = config['FHOUT_GFS'] fhmax_hf = config['FHMAX_HF_GFS'] @@ -1403,7 +1403,7 @@ def _get_awipsgroups(cdump, config): def awips_20km_1p0deg(self): deps = [] - dep_dict = {'type': 'metatask', 'name': f'{self.cdump}atmos_prod'} + dep_dict = {'type': 'metatask', 'name': f'{self.run}atmos_prod'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) @@ -1415,24 +1415,24 @@ def awips_20km_1p0deg(self): awipsenvars.append(rocoto.create_envar(name=key, value=str(value))) varname1, varname2, varname3 = 'grp', 'dep', 'lst' - varval1, varval2, varval3 = self._get_awipsgroups(self.cdump, self._configs['awips']) + varval1, varval2, varval3 = self._get_awipsgroups(self.run, self._configs['awips']) var_dict = {varname1: varval1, varname2: varval2, varname3: varval3} resources = self.get_resource('awips') - task_name = f'{self.cdump}awips_20km_1p0deg#{varname1}#' + task_name = f'{self.run}awips_20km_1p0deg#{varname1}#' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': awipsenvars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/awips_20km_1p0deg.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', 'maxtries': '&MAXTRIES;' } - metatask_dict = {'task_name': f'{self.cdump}awips_20km_1p0deg', + metatask_dict = {'task_name': f'{self.run}awips_20km_1p0deg', 'task_dict': task_dict, 'var_dict': var_dict } @@ -1444,17 +1444,17 @@ def awips_20km_1p0deg(self): def gempak(self): deps = [] - dep_dict = {'type': 'metatask', 'name': f'{self.cdump}atmos_prod'} + dep_dict = {'type': 'metatask', 'name': f'{self.run}atmos_prod'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('gempak') - task_name = f'{self.cdump}gempak' + task_name = f'{self.run}gempak' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/gempak.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1467,17 +1467,17 @@ def gempak(self): def gempakmeta(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}gempak'} + dep_dict = {'type': 'task', 'name': f'{self.run}gempak'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('gempak') - task_name = f'{self.cdump}gempakmeta' + task_name = f'{self.run}gempakmeta' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/gempakmeta.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1490,17 +1490,17 @@ def gempakmeta(self): def gempakmetancdc(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}gempak'} + dep_dict = {'type': 'task', 'name': f'{self.run}gempak'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('gempak') - task_name = f'{self.cdump}gempakmetancdc' + task_name = f'{self.run}gempakmetancdc' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/gempakmetancdc.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1513,17 +1513,17 @@ def gempakmetancdc(self): def gempakncdcupapgif(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}gempak'} + dep_dict = {'type': 'task', 'name': f'{self.run}gempak'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('gempak') - task_name = f'{self.cdump}gempakncdcupapgif' + task_name = f'{self.run}gempakncdcupapgif' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/gempakncdcupapgif.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1536,17 +1536,17 @@ def gempakncdcupapgif(self): def gempakpgrb2spec(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}npoess_pgrb2_0p5deg'} + dep_dict = {'type': 'task', 'name': f'{self.run}npoess_pgrb2_0p5deg'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('gempak') - task_name = f'{self.cdump}gempakgrb2spec' + task_name = f'{self.run}gempakgrb2spec' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/gempakgrb2spec.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1560,19 +1560,19 @@ def gempakpgrb2spec(self): def npoess_pgrb2_0p5deg(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}atmanlprod'} + dep_dict = {'type': 'task', 'name': f'{self.run}atmanlprod'} deps.append(rocoto.add_dependency(dep_dict)) - dep_dict = {'type': 'metatask', 'name': f'{self.cdump}goesupp'} + dep_dict = {'type': 'metatask', 'name': f'{self.run}goesupp'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps, dep_condition='and') resources = self.get_resource('npoess') - task_name = f'{self.cdump}npoess_pgrb2_0p5deg' + task_name = f'{self.run}npoess_pgrb2_0p5deg' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/npoess.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1585,17 +1585,17 @@ def npoess_pgrb2_0p5deg(self): def verfozn(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}analdiag'} + dep_dict = {'type': 'task', 'name': f'{self.run}analdiag'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('verfozn') - task_name = f'{self.cdump}verfozn' + task_name = f'{self.run}verfozn' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/verfozn.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1608,17 +1608,17 @@ def verfozn(self): def verfrad(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}analdiag'} + dep_dict = {'type': 'task', 'name': f'{self.run}analdiag'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('verfrad') - task_name = f'{self.cdump}verfrad' + task_name = f'{self.run}verfrad' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/verfrad.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1631,17 +1631,17 @@ def verfrad(self): def vminmon(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}anal'} + dep_dict = {'type': 'task', 'name': f'{self.run}anal'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('vminmon') - task_name = f'{self.cdump}vminmon' + task_name = f'{self.run}vminmon' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/vminmon.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1654,17 +1654,17 @@ def vminmon(self): def tracker(self): deps = [] - dep_dict = {'type': 'metatask', 'name': f'{self.cdump}atmos_prod'} + dep_dict = {'type': 'metatask', 'name': f'{self.run}atmos_prod'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('tracker') - task_name = f'{self.cdump}tracker' + task_name = f'{self.run}tracker' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/tracker.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1677,17 +1677,17 @@ def tracker(self): def genesis(self): deps = [] - dep_dict = {'type': 'metatask', 'name': f'{self.cdump}atmos_prod'} + dep_dict = {'type': 'metatask', 'name': f'{self.run}atmos_prod'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('genesis') - task_name = f'{self.cdump}genesis' + task_name = f'{self.run}genesis' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/genesis.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1700,17 +1700,17 @@ def genesis(self): def genesis_fsu(self): deps = [] - dep_dict = {'type': 'metatask', 'name': f'{self.cdump}atmos_prod'} + dep_dict = {'type': 'metatask', 'name': f'{self.run}atmos_prod'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('genesis_fsu') - task_name = f'{self.cdump}genesis_fsu' + task_name = f'{self.run}genesis_fsu' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/genesis_fsu.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1723,17 +1723,17 @@ def genesis_fsu(self): def fit2obs(self): deps = [] - dep_dict = {'type': 'metatask', 'name': f'{self.cdump}atmos_prod'} + dep_dict = {'type': 'metatask', 'name': f'{self.run}atmos_prod'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('fit2obs') - task_name = f'{self.cdump}fit2obs' + task_name = f'{self.run}fit2obs' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/fit2obs.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1746,7 +1746,7 @@ def fit2obs(self): def metp(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}arch'} + dep_dict = {'type': 'task', 'name': f'{self.run}arch'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) @@ -1765,19 +1765,19 @@ def metp(self): resources = self.get_resource('metp') - task_name = f'{self.cdump}metp#{varname1}#' + task_name = f'{self.run}metp#{varname1}#' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': metpenvars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/metp.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', 'maxtries': '&MAXTRIES;' } - metatask_dict = {'task_name': f'{self.cdump}metp', + metatask_dict = {'task_name': f'{self.run}metp', 'task_dict': task_dict, 'var_dict': var_dict } @@ -1788,17 +1788,17 @@ def metp(self): def mos_stn_prep(self): deps = [] - dep_dict = {'type': 'metatask', 'name': f'{self.cdump}atmos_prod'} + dep_dict = {'type': 'metatask', 'name': f'{self.run}atmos_prod'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('mos_stn_prep') - task_name = f'{self.cdump}mos_stn_prep' + task_name = f'{self.run}mos_stn_prep' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/mos_stn_prep.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1811,17 +1811,17 @@ def mos_stn_prep(self): def mos_grd_prep(self): deps = [] - dep_dict = {'type': 'metatask', 'name': f'{self.cdump}atmos_prod'} + dep_dict = {'type': 'metatask', 'name': f'{self.run}atmos_prod'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('mos_grd_prep') - task_name = f'{self.cdump}mos_grd_prep' + task_name = f'{self.run}mos_grd_prep' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/mos_grd_prep.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1834,17 +1834,17 @@ def mos_grd_prep(self): def mos_ext_stn_prep(self): deps = [] - dep_dict = {'type': 'metatask', 'name': f'{self.cdump}atmos_prod'} + dep_dict = {'type': 'metatask', 'name': f'{self.run}atmos_prod'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('mos_ext_stn_prep') - task_name = f'{self.cdump}mos_ext_stn_prep' + task_name = f'{self.run}mos_ext_stn_prep' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/mos_ext_stn_prep.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1857,17 +1857,17 @@ def mos_ext_stn_prep(self): def mos_ext_grd_prep(self): deps = [] - dep_dict = {'type': 'metatask', 'name': f'{self.cdump}atmos_prod'} + dep_dict = {'type': 'metatask', 'name': f'{self.run}atmos_prod'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('mos_ext_grd_prep') - task_name = f'{self.cdump}mos_ext_grd_prep' + task_name = f'{self.run}mos_ext_grd_prep' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/mos_ext_grd_prep.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1880,17 +1880,17 @@ def mos_ext_grd_prep(self): def mos_stn_fcst(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}mos_stn_prep'} + dep_dict = {'type': 'task', 'name': f'{self.run}mos_stn_prep'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('mos_stn_fcst') - task_name = f'{self.cdump}mos_stn_fcst' + task_name = f'{self.run}mos_stn_fcst' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/mos_stn_fcst.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1903,20 +1903,20 @@ def mos_stn_fcst(self): def mos_grd_fcst(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}mos_stn_prep'} + dep_dict = {'type': 'task', 'name': f'{self.run}mos_stn_prep'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) - dep_dict = {'type': 'task', 'name': f'{self.cdump}mos_grd_prep'} + dep_dict = {'type': 'task', 'name': f'{self.run}mos_grd_prep'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('mos_grd_fcst') - task_name = f'{self.cdump}mos_grd_fcst' + task_name = f'{self.run}mos_grd_fcst' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/mos_grd_fcst.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1929,20 +1929,20 @@ def mos_grd_fcst(self): def mos_ext_stn_fcst(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}mos_ext_stn_prep'} + dep_dict = {'type': 'task', 'name': f'{self.run}mos_ext_stn_prep'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) - dep_dict = {'type': 'task', 'name': f'{self.cdump}mos_stn_prdgen'} + dep_dict = {'type': 'task', 'name': f'{self.run}mos_stn_prdgen'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('mos_ext_stn_fcst') - task_name = f'{self.cdump}mos_ext_stn_fcst' + task_name = f'{self.run}mos_ext_stn_fcst' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/mos_ext_stn_fcst.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1955,23 +1955,23 @@ def mos_ext_stn_fcst(self): def mos_ext_grd_fcst(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}mos_ext_stn_prep'} + dep_dict = {'type': 'task', 'name': f'{self.run}mos_ext_stn_prep'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) - dep_dict = {'type': 'task', 'name': f'{self.cdump}mos_ext_grd_prep'} + dep_dict = {'type': 'task', 'name': f'{self.run}mos_ext_grd_prep'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) - dep_dict = {'type': 'task', 'name': f'{self.cdump}mos_grd_fcst'} + dep_dict = {'type': 'task', 'name': f'{self.run}mos_grd_fcst'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('mos_ext_grd_fcst') - task_name = f'{self.cdump}mos_ext_grd_fcst' + task_name = f'{self.run}mos_ext_grd_fcst' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/mos_ext_grd_fcst.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -1984,17 +1984,17 @@ def mos_ext_grd_fcst(self): def mos_stn_prdgen(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}mos_stn_fcst'} + dep_dict = {'type': 'task', 'name': f'{self.run}mos_stn_fcst'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('mos_stn_prdgen') - task_name = f'{self.cdump}mos_stn_prdgen' + task_name = f'{self.run}mos_stn_prdgen' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/mos_stn_prdgen.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -2007,20 +2007,20 @@ def mos_stn_prdgen(self): def mos_grd_prdgen(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}mos_grd_fcst'} + dep_dict = {'type': 'task', 'name': f'{self.run}mos_grd_fcst'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) - dep_dict = {'type': 'task', 'name': f'{self.cdump}mos_stn_prdgen'} + dep_dict = {'type': 'task', 'name': f'{self.run}mos_stn_prdgen'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('mos_grd_prdgen') - task_name = f'{self.cdump}mos_grd_prdgen' + task_name = f'{self.run}mos_grd_prdgen' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/mos_grd_prdgen.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -2033,20 +2033,20 @@ def mos_grd_prdgen(self): def mos_ext_stn_prdgen(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}mos_ext_stn_fcst'} + dep_dict = {'type': 'task', 'name': f'{self.run}mos_ext_stn_fcst'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) - dep_dict = {'type': 'task', 'name': f'{self.cdump}mos_stn_prdgen'} + dep_dict = {'type': 'task', 'name': f'{self.run}mos_stn_prdgen'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('mos_ext_stn_prdgen') - task_name = f'{self.cdump}mos_ext_stn_prdgen' + task_name = f'{self.run}mos_ext_stn_prdgen' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/mos_ext_stn_prdgen.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -2059,23 +2059,23 @@ def mos_ext_stn_prdgen(self): def mos_ext_grd_prdgen(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}mos_ext_grd_fcst'} + dep_dict = {'type': 'task', 'name': f'{self.run}mos_ext_grd_fcst'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) - dep_dict = {'type': 'task', 'name': f'{self.cdump}mos_grd_prdgen'} + dep_dict = {'type': 'task', 'name': f'{self.run}mos_grd_prdgen'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) - dep_dict = {'type': 'task', 'name': f'{self.cdump}mos_ext_stn_prdgen'} + dep_dict = {'type': 'task', 'name': f'{self.run}mos_ext_stn_prdgen'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('mos_ext_grd_prdgen') - task_name = f'{self.cdump}mos_ext_grd_prdgen' + task_name = f'{self.run}mos_ext_grd_prdgen' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/mos_ext_grd_prdgen.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -2088,17 +2088,17 @@ def mos_ext_grd_prdgen(self): def mos_wx_prdgen(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}mos_grd_prdgen'} + dep_dict = {'type': 'task', 'name': f'{self.run}mos_grd_prdgen'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('mos_wx_prdgen') - task_name = f'{self.cdump}mos_wx_prdgen' + task_name = f'{self.run}mos_wx_prdgen' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/mos_wx_prdgen.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -2111,20 +2111,20 @@ def mos_wx_prdgen(self): def mos_wx_ext_prdgen(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}mos_ext_grd_prdgen'} + dep_dict = {'type': 'task', 'name': f'{self.run}mos_ext_grd_prdgen'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) - dep_dict = {'type': 'task', 'name': f'{self.cdump}mos_wx_prdgen'} + dep_dict = {'type': 'task', 'name': f'{self.run}mos_wx_prdgen'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('mos_wx_ext_prdgen') - task_name = f'{self.cdump}mos_wx_ext_prdgen' + task_name = f'{self.run}mos_wx_ext_prdgen' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/mos_wx_ext_prdgen.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -2138,74 +2138,74 @@ def mos_wx_ext_prdgen(self): def arch(self): deps = [] if self.app_config.mode in ['cycled']: - if self.cdump in ['gfs']: - dep_dict = {'type': 'task', 'name': f'{self.cdump}atmanlprod'} + if self.run in ['gfs']: + dep_dict = {'type': 'task', 'name': f'{self.run}atmanlprod'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_vminmon: - dep_dict = {'type': 'task', 'name': f'{self.cdump}vminmon'} + dep_dict = {'type': 'task', 'name': f'{self.run}vminmon'} deps.append(rocoto.add_dependency(dep_dict)) - elif self.cdump in ['gdas']: - dep_dict = {'type': 'task', 'name': f'{self.cdump}atmanlprod'} + elif self.run in ['gdas']: + dep_dict = {'type': 'task', 'name': f'{self.run}atmanlprod'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_fit2obs: - dep_dict = {'type': 'task', 'name': f'{self.cdump}fit2obs'} + dep_dict = {'type': 'task', 'name': f'{self.run}fit2obs'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_verfozn: - dep_dict = {'type': 'task', 'name': f'{self.cdump}verfozn'} + dep_dict = {'type': 'task', 'name': f'{self.run}verfozn'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_verfrad: - dep_dict = {'type': 'task', 'name': f'{self.cdump}verfrad'} + dep_dict = {'type': 'task', 'name': f'{self.run}verfrad'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_vminmon: - dep_dict = {'type': 'task', 'name': f'{self.cdump}vminmon'} + dep_dict = {'type': 'task', 'name': f'{self.run}vminmon'} deps.append(rocoto.add_dependency(dep_dict)) - if self.cdump in ['gfs'] and self.app_config.do_tracker: - dep_dict = {'type': 'task', 'name': f'{self.cdump}tracker'} + if self.run in ['gfs'] and self.app_config.do_tracker: + dep_dict = {'type': 'task', 'name': f'{self.run}tracker'} deps.append(rocoto.add_dependency(dep_dict)) - if self.cdump in ['gfs'] and self.app_config.do_genesis: - dep_dict = {'type': 'task', 'name': f'{self.cdump}genesis'} + if self.run in ['gfs'] and self.app_config.do_genesis: + dep_dict = {'type': 'task', 'name': f'{self.run}genesis'} deps.append(rocoto.add_dependency(dep_dict)) - if self.cdump in ['gfs'] and self.app_config.do_genesis_fsu: - dep_dict = {'type': 'task', 'name': f'{self.cdump}genesis_fsu'} + if self.run in ['gfs'] and self.app_config.do_genesis_fsu: + dep_dict = {'type': 'task', 'name': f'{self.run}genesis_fsu'} deps.append(rocoto.add_dependency(dep_dict)) # Post job dependencies - dep_dict = {'type': 'metatask', 'name': f'{self.cdump}atmos_prod'} + dep_dict = {'type': 'metatask', 'name': f'{self.run}atmos_prod'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_wave: - dep_dict = {'type': 'task', 'name': f'{self.cdump}wavepostsbs'} + dep_dict = {'type': 'task', 'name': f'{self.run}wavepostsbs'} deps.append(rocoto.add_dependency(dep_dict)) - dep_dict = {'type': 'task', 'name': f'{self.cdump}wavepostpnt'} + dep_dict = {'type': 'task', 'name': f'{self.run}wavepostpnt'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_wave_bnd: - dep_dict = {'type': 'task', 'name': f'{self.cdump}wavepostbndpnt'} + dep_dict = {'type': 'task', 'name': f'{self.run}wavepostbndpnt'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_ocean: - if self.cdump in ['gfs']: - dep_dict = {'type': 'metatask', 'name': f'{self.cdump}ocean_prod'} + if self.run in ['gfs']: + dep_dict = {'type': 'metatask', 'name': f'{self.run}ocean_prod'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_ice: - if self.cdump in ['gfs']: - dep_dict = {'type': 'metatask', 'name': f'{self.cdump}ice_prod'} + if self.run in ['gfs']: + dep_dict = {'type': 'metatask', 'name': f'{self.run}ice_prod'} deps.append(rocoto.add_dependency(dep_dict)) # MOS job dependencies - if self.cdump in ['gfs'] and self.app_config.do_mos: + if self.run in ['gfs'] and self.app_config.do_mos: mos_jobs = ["stn_prep", "grd_prep", "ext_stn_prep", "ext_grd_prep", "stn_fcst", "grd_fcst", "ext_stn_fcst", "ext_grd_fcst", "stn_prdgen", "grd_prdgen", "ext_stn_prdgen", "ext_grd_prdgen", "wx_prdgen", "wx_ext_prdgen"] for job in mos_jobs: - dep_dict = {'type': 'task', 'name': f'{self.cdump}mos_{job}'} + dep_dict = {'type': 'task', 'name': f'{self.run}mos_{job}'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('arch') - task_name = f'{self.cdump}arch' + task_name = f'{self.run}arch' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/arch.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -2219,37 +2219,37 @@ def arch(self): # Cleanup def cleanup(self): deps = [] - if 'enkf' in self.cdump: - dep_dict = {'type': 'metatask', 'name': f'{self.cdump}eamn'} + if 'enkf' in self.run: + dep_dict = {'type': 'metatask', 'name': f'{self.run}eamn'} deps.append(rocoto.add_dependency(dep_dict)) else: - dep_dict = {'type': 'task', 'name': f'{self.cdump}arch'} + dep_dict = {'type': 'task', 'name': f'{self.run}arch'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_gempak: - if self.cdump in ['gdas']: - dep_dict = {'type': 'task', 'name': f'{self.cdump}gempakmetancdc'} + if self.run in ['gdas']: + dep_dict = {'type': 'task', 'name': f'{self.run}gempakmetancdc'} deps.append(rocoto.add_dependency(dep_dict)) - elif self.cdump in ['gfs']: - dep_dict = {'type': 'task', 'name': f'{self.cdump}gempakmeta'} + elif self.run in ['gfs']: + dep_dict = {'type': 'task', 'name': f'{self.run}gempakmeta'} deps.append(rocoto.add_dependency(dep_dict)) - dep_dict = {'type': 'task', 'name': f'{self.cdump}gempakncdcupapgif'} + dep_dict = {'type': 'task', 'name': f'{self.run}gempakncdcupapgif'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_goes: - dep_dict = {'type': 'task', 'name': f'{self.cdump}gempakgrb2spec'} + dep_dict = {'type': 'task', 'name': f'{self.run}gempakgrb2spec'} deps.append(rocoto.add_dependency(dep_dict)) - dep_dict = {'type': 'task', 'name': f'{self.cdump}npoess_pgrb2_0p5deg'} + dep_dict = {'type': 'task', 'name': f'{self.run}npoess_pgrb2_0p5deg'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('cleanup') - task_name = f'{self.cdump}cleanup' + task_name = f'{self.run}cleanup' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/cleanup.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -2263,19 +2263,19 @@ def cleanup(self): # Start of ensemble tasks def eobs(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump.replace("enkf","")}prep'} + dep_dict = {'type': 'task', 'name': f'{self.run.replace("enkf","")}prep'} deps.append(rocoto.add_dependency(dep_dict)) dep_dict = {'type': 'metatask', 'name': 'enkfgdasepmn', 'offset': f"-{timedelta_to_HMS(self._base['cycle_interval'])}"} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('eobs') - task_name = f'{self.cdump}eobs' + task_name = f'{self.run}eobs' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/eobs.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -2288,7 +2288,7 @@ def eobs(self): def eomg(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}eobs'} + dep_dict = {'type': 'task', 'name': f'{self.run}eobs'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) @@ -2300,12 +2300,12 @@ def eomg(self): eomgenvars.append(rocoto.create_envar(name=key, value=str(value))) resources = self.get_resource('eomg') - task_name = f'{self.cdump}eomg_mem#member#' + task_name = f'{self.run}eomg_mem#member#' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': eomgenvars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/eomg.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -2313,7 +2313,7 @@ def eomg(self): } member_var_dict = {'member': ' '.join([str(mem).zfill(3) for mem in range(1, self.nmem + 1)])} - metatask_dict = {'task_name': f'{self.cdump}eomg', + metatask_dict = {'task_name': f'{self.run}eomg', 'var_dict': member_var_dict, 'task_dict': task_dict, } @@ -2324,17 +2324,17 @@ def eomg(self): def ediag(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}eobs'} + dep_dict = {'type': 'task', 'name': f'{self.run}eobs'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('ediag') - task_name = f'{self.cdump}ediag' + task_name = f'{self.run}ediag' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/ediag.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -2348,19 +2348,19 @@ def ediag(self): def eupd(self): deps = [] if self.app_config.lobsdiag_forenkf: - dep_dict = {'type': 'task', 'name': f'{self.cdump}ediag'} + dep_dict = {'type': 'task', 'name': f'{self.run}ediag'} else: - dep_dict = {'type': 'metatask', 'name': f'{self.cdump}eomg'} + dep_dict = {'type': 'metatask', 'name': f'{self.run}eomg'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('eupd') - task_name = f'{self.cdump}eupd' + task_name = f'{self.run}eupd' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/eupd.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -2373,7 +2373,7 @@ def eupd(self): def atmensanlinit(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump.replace("enkf","")}prepatmiodaobs'} + dep_dict = {'type': 'task', 'name': f'{self.run.replace("enkf","")}prepatmiodaobs'} deps.append(rocoto.add_dependency(dep_dict)) dep_dict = {'type': 'metatask', 'name': 'enkfgdasepmn', 'offset': f"-{timedelta_to_HMS(self._base['cycle_interval'])}"} deps.append(rocoto.add_dependency(dep_dict)) @@ -2381,7 +2381,7 @@ def atmensanlinit(self): cycledef = "gdas" resources = self.get_resource('atmensanlinit') - task_name = f'{self.cdump}atmensanlinit' + task_name = f'{self.run}atmensanlinit' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, @@ -2400,19 +2400,19 @@ def atmensanlinit(self): def atmensanlletkf(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}atmensanlinit'} + dep_dict = {'type': 'task', 'name': f'{self.run}atmensanlinit'} deps.append(rocoto.add_dependency(dep_dict)) dep_dict = {'type': 'metatask', 'name': 'enkfgdasepmn', 'offset': f"-{timedelta_to_HMS(self._base['cycle_interval'])}"} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('atmensanlletkf') - task_name = f'{self.cdump}atmensanlletkf' + task_name = f'{self.run}atmensanlletkf' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/atmensanlletkf.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -2426,19 +2426,19 @@ def atmensanlletkf(self): def atmensanlfv3inc(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}atmensanlletkf'} + dep_dict = {'type': 'task', 'name': f'{self.run}atmensanlletkf'} deps.append(rocoto.add_dependency(dep_dict)) dep_dict = {'type': 'metatask', 'name': 'enkfgdasepmn', 'offset': f"-{timedelta_to_HMS(self._base['cycle_interval'])}"} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('atmensanlfv3inc') - task_name = f'{self.cdump}atmensanlfv3inc' + task_name = f'{self.run}atmensanlfv3inc' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/atmensanlfv3inc.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -2452,17 +2452,17 @@ def atmensanlfv3inc(self): def atmensanlfinal(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump}atmensanlfv3inc'} + dep_dict = {'type': 'task', 'name': f'{self.run}atmensanlfv3inc'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('atmensanlfinal') - task_name = f'{self.cdump}atmensanlfinal' + task_name = f'{self.run}atmensanlfinal' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/atmensanlfinal.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -2499,12 +2499,12 @@ def _get_ecengroups(): return grp, dep, lst deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump.replace("enkf","")}analcalc'} + dep_dict = {'type': 'task', 'name': f'{self.run.replace("enkf","")}analcalc'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_jediatmens: - dep_dict = {'type': 'task', 'name': f'{self.cdump}atmensanlfinal'} + dep_dict = {'type': 'task', 'name': f'{self.run}atmensanlfinal'} else: - dep_dict = {'type': 'task', 'name': f'{self.cdump}eupd'} + dep_dict = {'type': 'task', 'name': f'{self.run}eupd'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) @@ -2520,19 +2520,19 @@ def _get_ecengroups(): resources = self.get_resource('ecen') - task_name = f'{self.cdump}ecen#{varname1}#' + task_name = f'{self.run}ecen#{varname1}#' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': ecenenvars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/ecen.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', 'maxtries': '&MAXTRIES;' } - metatask_dict = {'task_name': f'{self.cdump}ecmn', + metatask_dict = {'task_name': f'{self.run}ecmn', 'var_dict': var_dict, 'task_dict': task_dict } @@ -2542,25 +2542,25 @@ def _get_ecengroups(): def esfc(self): - # eupd_cdump = 'gdas' if 'gdas' in self.app_config.eupd_cdumps else 'gfs' + # eupd_run = 'gdas' if 'gdas' in self.app_config.eupd_runs else 'gfs' deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump.replace("enkf","")}analcalc'} + dep_dict = {'type': 'task', 'name': f'{self.run.replace("enkf","")}analcalc'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_jediatmens: - dep_dict = {'type': 'task', 'name': f'{self.cdump}atmensanlfinal'} + dep_dict = {'type': 'task', 'name': f'{self.run}atmensanlfinal'} else: - dep_dict = {'type': 'task', 'name': f'{self.cdump}eupd'} + dep_dict = {'type': 'task', 'name': f'{self.run}eupd'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('esfc') - task_name = f'{self.cdump}esfc' + task_name = f'{self.run}esfc' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': self.envars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/esfc.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', @@ -2574,9 +2574,9 @@ def esfc(self): def efcs(self): deps = [] - dep_dict = {'type': 'metatask', 'name': f'{self.cdump}ecmn'} + dep_dict = {'type': 'metatask', 'name': f'{self.run}ecmn'} deps.append(rocoto.add_dependency(dep_dict)) - dep_dict = {'type': 'task', 'name': f'{self.cdump}esfc'} + dep_dict = {'type': 'task', 'name': f'{self.run}esfc'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) dep_dict = {'type': 'cycleexist', 'condition': 'not', 'offset': f"-{timedelta_to_HMS(self._base['cycle_interval'])}"} @@ -2590,10 +2590,10 @@ def efcs(self): for key, value in efcsenvars_dict.items(): efcsenvars.append(rocoto.create_envar(name=key, value=str(value))) - cycledef = 'gdas_half,gdas' if self.cdump in ['enkfgdas'] else self.cdump.replace('enkf', '') + cycledef = 'gdas_half,gdas' if self.run in ['enkfgdas'] else self.run.replace('enkf', '') resources = self.get_resource('efcs') - task_name = f'{self.cdump}fcst_mem#member#' + task_name = f'{self.run}fcst_mem#member#' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, @@ -2606,7 +2606,7 @@ def efcs(self): } member_var_dict = {'member': ' '.join([str(mem).zfill(3) for mem in range(1, self.nmem + 1)])} - metatask_dict = {'task_name': f'{self.cdump}fcst', + metatask_dict = {'task_name': f'{self.run}fcst', 'var_dict': member_var_dict, 'task_dict': task_dict } @@ -2617,19 +2617,19 @@ def efcs(self): def echgres(self): - self._is_this_a_gdas_task(self.cdump, 'echgres') + self._is_this_a_gdas_task(self.run, 'echgres') deps = [] - dep_dict = {'type': 'task', 'name': f'{self.cdump.replace("enkf","")}fcst'} + dep_dict = {'type': 'task', 'name': f'{self.run.replace("enkf","")}fcst'} deps.append(rocoto.add_dependency(dep_dict)) - dep_dict = {'type': 'task', 'name': f'{self.cdump}fcst_mem001'} + dep_dict = {'type': 'task', 'name': f'{self.run}fcst_mem001'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) - cycledef = 'gdas_half,gdas' if self.cdump in ['enkfgdas'] else self.cdump + cycledef = 'gdas_half,gdas' if self.run in ['enkfgdas'] else self.run resources = self.get_resource('echgres') - task_name = f'{self.cdump}echgres' + task_name = f'{self.run}echgres' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, @@ -2651,7 +2651,7 @@ def _get_eposgroups(epos): fhmin = epos['FHMIN_ENKF'] fhmax = epos['FHMAX_ENKF'] fhout = epos['FHOUT_ENKF'] - if self.cdump == "enkfgfs": + if self.run == "enkfgfs": fhmax = epos['FHMAX_ENKF_GFS'] fhout = epos['FHOUT_ENKF_GFS'] fhrs = range(fhmin, fhmax + fhout, fhout) @@ -2670,7 +2670,7 @@ def _get_eposgroups(epos): return grp, dep, lst deps = [] - dep_dict = {'type': 'metatask', 'name': f'{self.cdump}fcst'} + dep_dict = {'type': 'metatask', 'name': f'{self.run}fcst'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) @@ -2684,11 +2684,11 @@ def _get_eposgroups(epos): varval1, varval2, varval3 = _get_eposgroups(self._configs['epos']) var_dict = {varname1: varval1, varname2: varval2, varname3: varval3} - cycledef = 'gdas_half,gdas' if self.cdump in ['enkfgdas'] else self.cdump.replace('enkf', '') + cycledef = 'gdas_half,gdas' if self.run in ['enkfgdas'] else self.run.replace('enkf', '') resources = self.get_resource('epos') - task_name = f'{self.cdump}epos#{varname1}#' + task_name = f'{self.run}epos#{varname1}#' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, @@ -2700,7 +2700,7 @@ def _get_eposgroups(epos): 'maxtries': '&MAXTRIES;' } - metatask_dict = {'task_name': f'{self.cdump}epmn', + metatask_dict = {'task_name': f'{self.run}epmn', 'var_dict': var_dict, 'task_dict': task_dict } @@ -2712,7 +2712,7 @@ def _get_eposgroups(epos): def earc(self): deps = [] - dep_dict = {'type': 'metatask', 'name': f'{self.cdump}epmn'} + dep_dict = {'type': 'metatask', 'name': f'{self.run}epmn'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) @@ -2727,19 +2727,19 @@ def earc(self): var_dict = {'grp': groups} - task_name = f'{self.cdump}earc#grp#' + task_name = f'{self.run}earc#grp#' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, 'envars': earcenvars, - 'cycledef': self.cdump.replace('enkf', ''), + 'cycledef': self.run.replace('enkf', ''), 'command': f'{self.HOMEgfs}/jobs/rocoto/earc.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', 'maxtries': '&MAXTRIES;' } - metatask_dict = {'task_name': f'{self.cdump}eamn', + metatask_dict = {'task_name': f'{self.run}eamn', 'var_dict': var_dict, 'task_dict': task_dict } diff --git a/workflow/rocoto/tasks.py b/workflow/rocoto/tasks.py index 251368dea04..a95d91318e4 100644 --- a/workflow/rocoto/tasks.py +++ b/workflow/rocoto/tasks.py @@ -36,10 +36,13 @@ class Tasks: 'mos_stn_fcst', 'mos_grd_fcst', 'mos_ext_stn_fcst', 'mos_ext_grd_fcst', 'mos_stn_prdgen', 'mos_grd_prdgen', 'mos_ext_stn_prdgen', 'mos_ext_grd_prdgen', 'mos_wx_prdgen', 'mos_wx_ext_prdgen'] - def __init__(self, app_config: AppConfig, cdump: str) -> None: + def __init__(self, app_config: AppConfig, run: str) -> None: self.app_config = app_config - self.cdump = cdump + self.run = run + # Re-source the configs with RUN specified + print(f"Source configs with RUN={run}") + self.app_config.source_configs(run=run, log=False) # Save dict_configs and base in the internal state (never know where it may be needed) self._configs = self.app_config.configs @@ -47,7 +50,7 @@ def __init__(self, app_config: AppConfig, cdump: str) -> None: self.HOMEgfs = self._base['HOMEgfs'] self.rotdir = self._base['ROTDIR'] self.pslot = self._base['PSLOT'] - if self.cdump == "enkfgfs": + if self.run == "enkfgfs": self.nmem = int(self._base['NMEM_ENS_GFS']) else: self.nmem = int(self._base['NMEM_ENS']) @@ -59,8 +62,7 @@ def __init__(self, app_config: AppConfig, cdump: str) -> None: 'HOMEgfs': self.HOMEgfs, 'EXPDIR': self._base.get('EXPDIR'), 'NET': self._base.get('NET'), - 'CDUMP': self.cdump, - 'RUN': self.cdump, + 'RUN': self.run, 'CDATE': '@Y@m@d@H', 'PDY': '@Y@m@d', 'cyc': '@H', @@ -87,8 +89,8 @@ def _template_to_rocoto_cycstring(self, template: str, subs_dict: dict = {}) -> Variables substitued by default: ${ROTDIR} -> '&ROTDIR;' - ${RUN} -> self.cdump - ${DUMP} -> self.cdump + ${RUN} -> self.run + ${DUMP} -> self.run ${MEMDIR} -> '' ${YMD} -> '@Y@m@d' ${HH} -> '@H' @@ -110,8 +112,8 @@ def _template_to_rocoto_cycstring(self, template: str, subs_dict: dict = {}) -> # Defaults rocoto_conversion_dict = { 'ROTDIR': '&ROTDIR;', - 'RUN': self.cdump, - 'DUMP': self.cdump, + 'RUN': self.run, + 'DUMP': self.run, 'MEMDIR': '', 'YMD': '@Y@m@d', 'HH': '@H' @@ -124,7 +126,7 @@ def _template_to_rocoto_cycstring(self, template: str, subs_dict: dict = {}) -> rocoto_conversion_dict.get) @staticmethod - def _get_forecast_hours(cdump, config, component='atmos') -> List[str]: + def _get_forecast_hours(run, config, component='atmos') -> List[str]: # Make a local copy of the config to avoid modifying the original local_config = config.copy() @@ -146,11 +148,11 @@ def _get_forecast_hours(cdump, config, component='atmos') -> List[str]: # Get a list of all forecast hours fhrs = [] - if cdump in ['gdas']: + if run in ['gdas']: fhmax = local_config['FHMAX'] fhout = local_config['FHOUT'] fhrs = list(range(fhmin, fhmax + fhout, fhout)) - elif cdump in ['gfs', 'gefs']: + elif run in ['gfs', 'gefs']: fhmax = local_config['FHMAX_GFS'] fhout = local_config['FHOUT_GFS'] fhmax_hf = local_config['FHMAX_HF_GFS'] diff --git a/workflow/rocoto/workflow_tasks.py b/workflow/rocoto/workflow_tasks.py index 84af898d362..78c31dba1bb 100644 --- a/workflow/rocoto/workflow_tasks.py +++ b/workflow/rocoto/workflow_tasks.py @@ -14,10 +14,10 @@ def get_wf_tasks(app_config: AppConfig) -> List: """ tasks = [] - # Loop over all keys of cycles (CDUMP) - for cdump, cdump_tasks in app_config.task_names.items(): - task_obj = tasks_factory.create(app_config.net, app_config, cdump) # create Task object based on cdump - for task_name in cdump_tasks: + # Loop over all keys of cycles (RUN) + for run, run_tasks in app_config.task_names.items(): + task_obj = tasks_factory.create(app_config.net, app_config, run) # create Task object based on run + for task_name in run_tasks: tasks.append(task_obj.get_task(task_name)) return tasks diff --git a/workflow/setup_expt.py b/workflow/setup_expt.py index b44842b9824..3e70df0f021 100755 --- a/workflow/setup_expt.py +++ b/workflow/setup_expt.py @@ -73,10 +73,10 @@ def fill_ROTDIR_cycled(host, inputs): # Test if we are using the new COM structure or the old flat one for ICs if inputs.start in ['warm']: - pathstr = os.path.join(inputs.icsdir, f'{inputs.cdump}.{rdatestr[:8]}', + pathstr = os.path.join(inputs.icsdir, f'{inputs.run}.{rdatestr[:8]}', rdatestr[8:], 'model_data', 'atmos') else: - pathstr = os.path.join(inputs.icsdir, f'{inputs.cdump}.{idatestr[:8]}', + pathstr = os.path.join(inputs.icsdir, f'{inputs.run}.{idatestr[:8]}', idatestr[8:], 'model_data', 'atmos') if os.path.isdir(pathstr): @@ -132,8 +132,8 @@ def link_files_from_src_to_dst(src_dir, dst_dir): # Link ensemble member initial conditions if inputs.nens > 0: - previous_cycle_dir = f'enkf{inputs.cdump}.{rdatestr[:8]}/{rdatestr[8:]}' - current_cycle_dir = f'enkf{inputs.cdump}.{idatestr[:8]}/{idatestr[8:]}' + previous_cycle_dir = f'enkf{inputs.run}.{rdatestr[:8]}/{rdatestr[8:]}' + current_cycle_dir = f'enkf{inputs.run}.{idatestr[:8]}/{idatestr[8:]}' for ii in range(1, inputs.nens + 1): memdir = f'mem{ii:03d}' @@ -155,7 +155,7 @@ def link_files_from_src_to_dst(src_dir, dst_dir): link_files_from_src_to_dst(src_dir, dst_dir) # First 1/2 cycle needs a MOM6 increment - incfile = f'enkf{inputs.cdump}.t{idatestr[8:]}z.ocninc.nc' + incfile = f'enkf{inputs.run}.t{idatestr[8:]}z.ocninc.nc' src_file = os.path.join(inputs.icsdir, current_cycle_dir, memdir, src_ocn_anl_dir, incfile) dst_file = os.path.join(rotdir, current_cycle_dir, memdir, dst_ocn_anl_dir, incfile) makedirs_if_missing(os.path.join(rotdir, current_cycle_dir, memdir, dst_ocn_anl_dir)) @@ -176,8 +176,8 @@ def link_files_from_src_to_dst(src_dir, dst_dir): link_files_from_src_to_dst(src_dir, dst_dir) # Link deterministic initial conditions - previous_cycle_dir = f'{inputs.cdump}.{rdatestr[:8]}/{rdatestr[8:]}' - current_cycle_dir = f'{inputs.cdump}.{idatestr[:8]}/{idatestr[8:]}' + previous_cycle_dir = f'{inputs.run}.{rdatestr[:8]}/{rdatestr[8:]}' + current_cycle_dir = f'{inputs.run}.{idatestr[:8]}/{idatestr[8:]}' # Link atmospheric files if inputs.start in ['warm']: @@ -198,7 +198,7 @@ def link_files_from_src_to_dst(src_dir, dst_dir): link_files_from_src_to_dst(src_dir, dst_dir) # First 1/2 cycle needs a MOM6 increment - incfile = f'{inputs.cdump}.t{idatestr[8:]}z.ocninc.nc' + incfile = f'{inputs.run}.t{idatestr[8:]}z.ocninc.nc' src_file = os.path.join(inputs.icsdir, current_cycle_dir, src_ocn_anl_dir, incfile) dst_file = os.path.join(rotdir, current_cycle_dir, dst_ocn_anl_dir, incfile) makedirs_if_missing(os.path.join(rotdir, current_cycle_dir, dst_ocn_anl_dir)) @@ -224,26 +224,26 @@ def link_files_from_src_to_dst(src_dir, dst_dir): dst_dir = os.path.join(rotdir, current_cycle_dir, dst_atm_anl_dir) makedirs_if_missing(dst_dir) for ftype in ['abias', 'abias_pc', 'abias_air', 'radstat']: - fname = f'{inputs.cdump}.t{idatestr[8:]}z.{ftype}' + fname = f'{inputs.run}.t{idatestr[8:]}z.{ftype}' src_file = os.path.join(src_dir, fname) if os.path.exists(src_file): os.symlink(src_file, os.path.join(dst_dir, fname)) # First 1/2 cycle also needs a atmos increment if doing warm start if inputs.start in ['warm']: for ftype in ['atmi003.nc', 'atminc.nc', 'atmi009.nc']: - fname = f'{inputs.cdump}.t{idatestr[8:]}z.{ftype}' + fname = f'{inputs.run}.t{idatestr[8:]}z.{ftype}' src_file = os.path.join(src_dir, fname) if os.path.exists(src_file): os.symlink(src_file, os.path.join(dst_dir, fname)) if inputs.nens > 0: - current_cycle_dir = f'enkf{inputs.cdump}.{idatestr[:8]}/{idatestr[8:]}' + current_cycle_dir = f'enkf{inputs.run}.{idatestr[:8]}/{idatestr[8:]}' for ii in range(1, inputs.nens + 1): memdir = f'mem{ii:03d}' src_dir = os.path.join(inputs.icsdir, current_cycle_dir, memdir, src_atm_anl_dir) dst_dir = os.path.join(rotdir, current_cycle_dir, memdir, dst_atm_anl_dir) makedirs_if_missing(dst_dir) for ftype in ['ratmi003.nc', 'ratminc.nc', 'ratmi009.nc']: - fname = f'enkf{inputs.cdump}.t{idatestr[8:]}z.{ftype}' + fname = f'enkf{inputs.run}.t{idatestr[8:]}z.{ftype}' src_file = os.path.join(src_dir, fname) if os.path.exists(src_file): os.symlink(src_file, os.path.join(dst_dir, fname)) @@ -426,7 +426,7 @@ def _common_args(parser): def _gfs_args(parser): parser.add_argument('--start', help='restart mode: warm or cold', type=str, choices=['warm', 'cold'], required=False, default='cold') - parser.add_argument('--cdump', help='CDUMP to start the experiment', + parser.add_argument('--run', help='RUN to start the experiment', type=str, required=False, default='gdas') # --configdir is hidden from help parser.add_argument('--configdir', help=SUPPRESS, type=str, required=False, default=os.path.join(_top, 'parm/config/gfs')) From 50fc90ef57fe7683e97a0f41ac59b32194d3bd57 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Wed, 26 Jun 2024 19:35:29 +0000 Subject: [PATCH 11/73] Add whitespace --- workflow/applications/applications.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/applications/applications.py b/workflow/applications/applications.py index 2553ee43abd..5a1b455ae5a 100644 --- a/workflow/applications/applications.py +++ b/workflow/applications/applications.py @@ -134,7 +134,7 @@ def _update_base(base_in: Dict[str, Any]) -> Dict[str, Any]: ''' pass - def source_configs(self, run: str = "gfs", log:bool = True) -> Dict[str, Any]: + def source_configs(self, run: str = "gfs", log: bool = True) -> Dict[str, Any]: """ Given the configuration object used to initialize, source the configurations for each config and return a dictionary From a2b74f2402194e7f05618654871646cf80504acb Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Thu, 27 Jun 2024 13:44:44 +0000 Subject: [PATCH 12/73] Add call to update_base --- workflow/applications/applications.py | 4 ++-- workflow/applications/gfs_cycled.py | 2 +- workflow/rocoto/tasks.py | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/workflow/applications/applications.py b/workflow/applications/applications.py index 5a1b455ae5a..928532ee5e2 100644 --- a/workflow/applications/applications.py +++ b/workflow/applications/applications.py @@ -100,7 +100,7 @@ def _init_finalize(self, *args): self.configs = self.source_configs() # Update the base config dictionary base on application - self.configs['base'] = self._update_base(self.configs['base']) + self.configs['base'] = self.update_base(self.configs['base']) # Save base in the internal state since it is often needed self._base = self.configs['base'] @@ -117,7 +117,7 @@ def _get_app_configs(self): @staticmethod @abstractmethod - def _update_base(base_in: Dict[str, Any]) -> Dict[str, Any]: + def update_base(base_in: Dict[str, Any]) -> Dict[str, Any]: ''' Make final updates to base and return an updated copy diff --git a/workflow/applications/gfs_cycled.py b/workflow/applications/gfs_cycled.py index c715507fe84..b5da50515cb 100644 --- a/workflow/applications/gfs_cycled.py +++ b/workflow/applications/gfs_cycled.py @@ -123,7 +123,7 @@ def _get_app_configs(self): return configs @staticmethod - def _update_base(base_in): + def update_base(base_in): return GFSCycledAppConfig.get_gfs_cyc_dates(base_in) diff --git a/workflow/rocoto/tasks.py b/workflow/rocoto/tasks.py index a95d91318e4..fd590d5e69a 100644 --- a/workflow/rocoto/tasks.py +++ b/workflow/rocoto/tasks.py @@ -42,11 +42,13 @@ def __init__(self, app_config: AppConfig, run: str) -> None: self.run = run # Re-source the configs with RUN specified print(f"Source configs with RUN={run}") - self.app_config.source_configs(run=run, log=False) + self._configs = self.app_config.source_configs(run=run, log=False) + # Update the base config for the application + self._configs['base'] = self.app_config.update_base(self._configs['base']) # Save dict_configs and base in the internal state (never know where it may be needed) - self._configs = self.app_config.configs self._base = self._configs['base'] + self.HOMEgfs = self._base['HOMEgfs'] self.rotdir = self._base['ROTDIR'] self.pslot = self._base['PSLOT'] From f3746244417dfc017a015a062263b5ac472c55b3 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Thu, 27 Jun 2024 14:01:52 +0000 Subject: [PATCH 13/73] Update wxflow to enable setting envars before sourcing configs --- sorc/wxflow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/wxflow b/sorc/wxflow index 8406beeea41..837152d6deb 160000 --- a/sorc/wxflow +++ b/sorc/wxflow @@ -1 +1 @@ -Subproject commit 8406beeea410118cdfbd8300895b2b2878eadba6 +Subproject commit 837152d6deb5e97ecd938824d06330d830b2b6be From e373995d4ebe51e193a69063b17efa79ed9ac7df Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Thu, 27 Jun 2024 14:39:45 +0000 Subject: [PATCH 14/73] Update wxflow to include new test --- sorc/wxflow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/wxflow b/sorc/wxflow index 837152d6deb..dbe0ed54e91 160000 --- a/sorc/wxflow +++ b/sorc/wxflow @@ -1 +1 @@ -Subproject commit 837152d6deb5e97ecd938824d06330d830b2b6be +Subproject commit dbe0ed54e914d9ab44cd3b01d7c250f13590fb51 From 2fa33d9c65d79cc511e89e1b03dd06d2c92efade Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Thu, 27 Jun 2024 15:42:05 +0000 Subject: [PATCH 15/73] Revert wxflow --- sorc/wxflow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/wxflow b/sorc/wxflow index dbe0ed54e91..8406beeea41 160000 --- a/sorc/wxflow +++ b/sorc/wxflow @@ -1 +1 @@ -Subproject commit dbe0ed54e914d9ab44cd3b01d7c250f13590fb51 +Subproject commit 8406beeea410118cdfbd8300895b2b2878eadba6 From a7769859fff3738d5e859be32b3e66aaf36c5b79 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Thu, 27 Jun 2024 16:53:54 +0000 Subject: [PATCH 16/73] Create temporary 'config.run's to set RUN at setup time --- workflow/applications/applications.py | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/workflow/applications/applications.py b/workflow/applications/applications.py index 928532ee5e2..3eae1e357c9 100644 --- a/workflow/applications/applications.py +++ b/workflow/applications/applications.py @@ -3,6 +3,7 @@ from typing import Dict, List, Any from datetime import timedelta from hosts import Host +from pathlib import Path from wxflow import Configuration, to_timedelta from abc import ABC, ABCMeta, abstractmethod @@ -134,13 +135,23 @@ def update_base(base_in: Dict[str, Any]) -> Dict[str, Any]: ''' pass - def source_configs(self, run: str = "gfs", log: bool = True) -> Dict[str, Any]: + def source_configs(self, run: str = None, log: bool = True) -> Dict[str, Any]: """ - Given the configuration object used to initialize, + Given the configuration object used to initialize and the RUN, source the configurations for each config and return a dictionary Every config depends on "config.base" """ + if run: + # Write a temporary config file with RUN in it + config_run_file = Path(self.conf.config_dir, "config.run") + with open(config_run_file, "w") as config_run: + config_run.write(f"#!/usr/bin/env bash\n") + config_run.write(f"export RUN='{run}'\n") + + # Update the list of config files + self.conf.config_files = self.conf._get_configs + configs = dict() # Return config.base as well @@ -149,8 +160,8 @@ def source_configs(self, run: str = "gfs", log: bool = True) -> Dict[str, Any]: # Source the list of all config_files involved in the application for config in self.configs_names: - # All must source config.base first - files = ['config.base'] + # All must source config.run (if present) and config.base first + files = ['config.run', 'config.base'] if run else ['config.base'] if config in ['eobs', 'eomg']: files += ['config.anal', 'config.eobs'] @@ -168,7 +179,10 @@ def source_configs(self, run: str = "gfs", log: bool = True) -> Dict[str, Any]: files += [f'config.{config}'] print(f'sourcing config.{config}') if log else 0 - configs[config] = self.conf.parse_config(files, RUN=run) + configs[config] = self.conf.parse_config(files) + + # Delete config.run + Path.unlink(config_run_file) if run else 0 return configs From 467abbc96195c9f1e5a123f7ee5a359bfcc1dd7a Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Thu, 27 Jun 2024 17:18:24 +0000 Subject: [PATCH 17/73] Replace (()) with {} --- env/AWSPW.env | 4 ++-- env/GAEA.env | 6 +++--- env/HERA.env | 6 +++--- env/HERCULES.env | 6 +++--- env/JET.env | 4 ++-- env/ORION.env | 6 +++--- env/S4.env | 4 ++-- env/WCOSS2.env | 8 ++++---- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/env/AWSPW.env b/env/AWSPW.env index 52e66640dd2..cb038609fc1 100755 --- a/env/AWSPW.env +++ b/env/AWSPW.env @@ -21,8 +21,8 @@ ulimit -a # Calculate common variables nth_max=$((npe_node_max / npe_node)) -NTHREADSmax=$((nth:-${nth_max})) -NTHREADS1=$((nth:-1)) +NTHREADSmax=${nth:-${nth_max}} +NTHREADS1=${nth:-1} [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} APRUN="${launcher} -n ${npe}" diff --git a/env/GAEA.env b/env/GAEA.env index 0048788059d..c080453660b 100755 --- a/env/GAEA.env +++ b/env/GAEA.env @@ -17,8 +17,8 @@ ulimit -a # Calculate common variables nth_max=$((npe_node_max / npe_node)) -NTHREADSmax=$((nth:-${nth_max})) -NTHREADS1=$((nth:-1)) +NTHREADSmax=${nth:-${nth_max}} +NTHREADS1=${nth:-1} [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} APRUN="${launcher} -n ${npe}" @@ -33,7 +33,7 @@ if [[ "${step}" = "fcst" ]]; then (( nnodes = (${!nprocs}+${!ppn}-1)/${!ppn} )) (( ntasks = nnodes*${!ppn} )) # With ESMF threading, the model wants to use the full node - export APRUN_UFS="${launcher} -n ${ntasks}" + export APRUN_UFS="${APRUN}" unset nprocs ppn nnodes ntasks elif [[ "${step}" = "atmos_products" ]]; then diff --git a/env/HERA.env b/env/HERA.env index e4e004d87c3..b685f5f760b 100755 --- a/env/HERA.env +++ b/env/HERA.env @@ -33,9 +33,9 @@ fi # Calculate common variables nth_max=$((npe_node_max / npe_node)) -NTHREADSmax=$((nth:-${nth_max})) -NTHREADS1=$((nth:-1)) -NTHREADS2=$((nth:-2)) +NTHREADSmax=${nth:-${nth_max}} +NTHREADS1=${nth:-1} +NTHREADS2=${nth:-2} [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} [[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} diff --git a/env/HERCULES.env b/env/HERCULES.env index 47a0a1c8ccd..428fe96f686 100755 --- a/env/HERCULES.env +++ b/env/HERCULES.env @@ -30,9 +30,9 @@ ulimit -a # Calculate common variables nth_max=$((npe_node_max / npe_node)) -NTHREADSmax=$((nth:-${nth_max})) -NTHREADS1=$((nth:-1)) -NTHREADS2=$((nth:-2)) +NTHREADSmax=${nth:-${nth_max}} +NTHREADS1=${nth:-1} +NTHREADS2=${nth:-2} [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} [[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} diff --git a/env/JET.env b/env/JET.env index 0f902c700b4..d4bdf54e303 100755 --- a/env/JET.env +++ b/env/JET.env @@ -21,8 +21,8 @@ ulimit -a # Calculate common variables nth_max=$((npe_node_max / npe_node)) -NTHREADSmax=$((nth:-${nth_max})) -NTHREADS1=$((nth:-1)) +NTHREADSmax=${nth:-${nth_max}} +NTHREADS1=${nth:-1} [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} [[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} diff --git a/env/ORION.env b/env/ORION.env index 70dc125b663..da7db14d854 100755 --- a/env/ORION.env +++ b/env/ORION.env @@ -28,9 +28,9 @@ ulimit -a # Calculate common variables nth_max=$((npe_node_max / npe_node)) -NTHREADSmax=$((nth:-${nth_max})) -NTHREADS1=$((nth:-1)) -NTHREADS2=$((nth:-2)) +NTHREADSmax=${nth:-${nth_max}} +NTHREADS1=${nth:-1} +NTHREADS2=${nth:-2} [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} [[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} diff --git a/env/S4.env b/env/S4.env index b1a1d779766..83efbd76624 100755 --- a/env/S4.env +++ b/env/S4.env @@ -21,8 +21,8 @@ ulimit -a # Calculate common variables nth_max=$((npe_node_max / npe_node)) -NTHREADSmax=$((nth:-${nth_max})) -NTHREADS1=$((nth:-1)) +NTHREADSmax=${nth:-${nth_max}} +NTHREADS1=${nth:-1} [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} APRUN="${launcher} -n ${npe}" diff --git a/env/WCOSS2.env b/env/WCOSS2.env index 8e21f930fd9..568b1081188 100755 --- a/env/WCOSS2.env +++ b/env/WCOSS2.env @@ -15,9 +15,9 @@ export mpmd_opt="--cpu-bind verbose,core cfp" # Calculate common variables nth_max=$((npe_node_max / npe_node)) -NTHREADSmax=$((nth:-${nth_max})) -NTHREADS1=$((nth:-1)) -NTHREADS2=$((nth:-2)) +NTHREADSmax=${nth:-${nth_max}} +NTHREADS1=${nth:-1} +NTHREADS2=${nth:-2} [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} [[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} @@ -46,7 +46,7 @@ elif [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step} elif [[ "${step}" = "atmanlvar" ]]; then - export NTHREADS_ATMANLVAR=${NTHREADS} + export NTHREADS_ATMANLVAR=${NTHREADSmax} export APRUN_ATMANLVAR="${APRUN}" elif [[ "${step}" = "atmensanlletkf" ]]; then From 5ddd297e42035d9d6c758162fd2607cc93c20f54 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Thu, 27 Jun 2024 17:22:03 +0000 Subject: [PATCH 18/73] Ignore 'misspellings' --- jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT | 1 + jobs/JGLOBAL_STAGE_IC | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT b/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT index a2222ffeab5..1f1e8d411e5 100755 --- a/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT +++ b/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT @@ -9,6 +9,7 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "ocnanalchkpt" -c "base ocnanal ocnana # Set variables used in the script ############################################## # Ignore possible spelling error (nothing is misspelled) + # shellcheck disable=SC2153 export CDUMP=${CDUMP:-${RUN:-"gfs"}} GDATE=$(date --utc +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours") diff --git a/jobs/JGLOBAL_STAGE_IC b/jobs/JGLOBAL_STAGE_IC index 225e0e2a4fe..7172f14190c 100755 --- a/jobs/JGLOBAL_STAGE_IC +++ b/jobs/JGLOBAL_STAGE_IC @@ -6,7 +6,8 @@ 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} -[[ ${CDUMP} = "gfs" ]] && export rCDUMP="gdas" +# shellcheck disable=SC2153 +[[ ${CDUMP:-} = "gfs" ]] && export rCDUMP="gdas" export rCDUMP # Execute the Script From 3bb305ce2f52eabc317d6430c36f5fe15bfaae36 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Thu, 27 Jun 2024 17:23:03 +0000 Subject: [PATCH 19/73] Ignore 'unused' variables --- parm/config/gfs/config.resources | 1 + 1 file changed, 1 insertion(+) diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index 73168f02798..8145e14b851 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -1,4 +1,5 @@ #! /usr/bin/env bash +# shellcheck disable=SC2034 ########## config.resources ########## # Set resource information for job tasks From 14738306f38fd62931ecda705ea15521c47d2ba2 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Thu, 27 Jun 2024 17:30:04 +0000 Subject: [PATCH 20/73] Address shellcheck errors --- jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT | 2 +- parm/config/gfs/config.resources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT b/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT index 1f1e8d411e5..11c43ca4172 100755 --- a/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT +++ b/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT @@ -9,9 +9,9 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "ocnanalchkpt" -c "base ocnanal ocnana # Set variables used in the script ############################################## # Ignore possible spelling error (nothing is misspelled) - # shellcheck disable=SC2153 export CDUMP=${CDUMP:-${RUN:-"gfs"}} +# shellcheck disable=SC2153 GDATE=$(date --utc +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours") export GDATE export gPDY=${GDATE:0:8} diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index 8145e14b851..8f95d61166c 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -1304,7 +1304,7 @@ for resource_var in nth npe npe_node NTASKS memory wtime; do if [[ -n "${!run_resource_var+0}" ]]; then declare -x "${resource_var}"="${!run_resource_var}" elif [[ -n "${!resource_var+0}" ]]; then - export "${resource_var}" + export "${resource_var?}" fi done From db54acee5cf1342c55c032bf5be8d2f22ab1bc51 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Thu, 27 Jun 2024 17:30:34 +0000 Subject: [PATCH 21/73] Revert GAEA.env, remove unused APRUN --- env/GAEA.env | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/env/GAEA.env b/env/GAEA.env index c080453660b..98bce2b8a76 100755 --- a/env/GAEA.env +++ b/env/GAEA.env @@ -21,7 +21,6 @@ NTHREADSmax=${nth:-${nth_max}} NTHREADS1=${nth:-1} [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} -APRUN="${launcher} -n ${npe}" if [[ "${step}" = "fcst" ]]; then @@ -33,7 +32,7 @@ if [[ "${step}" = "fcst" ]]; then (( nnodes = (${!nprocs}+${!ppn}-1)/${!ppn} )) (( ntasks = nnodes*${!ppn} )) # With ESMF threading, the model wants to use the full node - export APRUN_UFS="${APRUN}" + export APRUN_UFS="${launcher} -n ${ntasks}" unset nprocs ppn nnodes ntasks elif [[ "${step}" = "atmos_products" ]]; then From b619e3554b042df6e5caea63c83e6dcd5602ae41 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Fri, 28 Jun 2024 11:41:34 +0000 Subject: [PATCH 22/73] Update gefs resources to clean resource variables --- parm/config/gefs/config.resources | 110 +++++++++++++----------------- 1 file changed, 48 insertions(+), 62 deletions(-) diff --git a/parm/config/gefs/config.resources b/parm/config/gefs/config.resources index 9f8cdea3625..a1e6aa2cdd9 100644 --- a/parm/config/gefs/config.resources +++ b/parm/config/gefs/config.resources @@ -80,7 +80,7 @@ case ${step} in "fcst" | "efcs") export is_exclusive=True - _RUN_LIST=${RUN:-"gdas gfs"} + _RUN_LIST=${RUN:-"gefs gfs"} # During workflow creation, we need resources for all RUNs and RUN is undefined for _RUN in ${_RUN_LIST}; do @@ -180,26 +180,20 @@ case ${step} in echo "Total PETS for ${_RUN} = ${NTASKS_TOT}" - if [[ "${_RUN}" =~ "gfs" ]]; then - declare -x "npe_${step}_gfs"="${NTASKS_TOT}" - declare -x "nth_${step}_gfs"="${UFS_THREADS}" - declare -x "npe_node_${step}_gfs"="${npe_node_max}" - else - declare -x "npe_${step}"="${NTASKS_TOT}" - declare -x "nth_${step}"="${UFS_THREADS}" - declare -x "npe_node_${step}"="${npe_node_max}" - fi + declare -x "npe_${_RUN}"="${NTASKS_TOT}" + declare -x "nth_${_RUN}"="${UFS_THREADS}" + declare -x "npe_node_${_RUN}"="${npe_node_max}" done case "${CASE}" in "C48" | "C96" | "C192") - declare -x "wtime_${step}"="03:00:00" - declare -x "wtime_${step}_gfs"="03:00:00" + declare -x "wtime_gefs"="03:00:00" + declare -x "wtime_gfs"="03:00:00" ;; "C384" | "C768" | "C1152") - declare -x "wtime_${step}"="06:00:00" - declare -x "wtime_${step}_gfs"="06:00:00" + declare -x "wtime_gefs"="06:00:00" + declare -x "wtime_gfs"="06:00:00" ;; *) echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${CASE}" @@ -212,85 +206,77 @@ case ${step} in ;; "atmos_products") - export wtime_atmos_products="00:15:00" - export npe_atmos_products=24 - export nth_atmos_products=1 - export npe_node_atmos_products="${npe_atmos_products}" - export wtime_atmos_products_gfs="${wtime_atmos_products}" - export npe_atmos_products_gfs="${npe_atmos_products}" - export nth_atmos_products_gfs="${nth_atmos_products}" - export npe_node_atmos_products_gfs="${npe_node_atmos_products}" + export wtime="00:15:00" + export npe=24 + export nth=1 + export npe_node="${npe}" export is_exclusive=True ;; "atmos_ensstat") - export wtime_atmos_ensstat="00:30:00" - export npe_atmos_ensstat=6 - export nth_atmos_ensstat=1 - export npe_node_atmos_ensstat="${npe_atmos_ensstat}" - export wtime_atmos_ensstat_gfs="${wtime_atmos_ensstat}" - export npe_atmos_ensstat_gfs="${npe_atmos_ensstat}" - export nth_atmos_ensstat_gfs="${nth_atmos_ensstat}" - export npe_node_atmos_ensstat_gfs="${npe_node_atmos_ensstat}" + export wtime="00:30:00" + export npe=6 + export nth=1 + export npe_node="${npe}" export is_exclusive=True ;; "oceanice_products") - export wtime_oceanice_products="00:15:00" - export npe_oceanice_products=1 - export npe_node_oceanice_products=1 - export nth_oceanice_products=1 - export memory_oceanice_products="96GB" + export wtime="00:15:00" + export npe=1 + export npe_node=1 + export nth=1 + export memory="96GB" ;; "wavepostsbs") - export wtime_wavepostsbs="03:00:00" - export npe_wavepostsbs=1 - export nth_wavepostsbs=1 - export npe_node_wavepostsbs=$(( npe_node_max / nth_wavepostsbs )) - export NTASKS=${npe_wavepostsbs} - export memory_wavepostsbs="10GB" + export wtime="03:00:00" + export npe=1 + export nth=1 + export npe_node=$(( npe_node_max / nth )) + export NTASKS=${npe} + export memory="10GB" ;; # The wavepost*pnt* jobs are I/O heavy and do not scale well to large nodes. # Limit the number of tasks/node to 40. "wavepostbndpnt") - export wtime_wavepostbndpnt="03:00:00" - export npe_wavepostbndpnt=240 - export nth_wavepostbndpnt=1 - export npe_node_wavepostbndpnt=$(( npe_node_max / nth_wavepostbndpnt )) + export wtime="03:00:00" + export npe=240 + export nth=1 + export npe_node=$(( npe_node_max / nth )) export is_exclusive=True - if [[ ${npe_node_wavepostbndpnt} -gt 40 ]]; then - export npe_node_wavepostbndpnt=40 + if [[ ${npe_node} -gt 40 ]]; then + export npe_node=40 export is_exclusive=False fi - export NTASKS=${npe_wavepostbndpnt} + export NTASKS=${npe} ;; "wavepostbndpntbll") - export wtime_wavepostbndpntbll="01:00:00" - export npe_wavepostbndpntbll=448 - export nth_wavepostbndpntbll=1 - export npe_node_wavepostbndpntbll=$(( npe_node_max / nth_wavepostbndpntbll )) + export wtime="01:00:00" + export npe=448 + export nth=1 + export npe_node=$(( npe_node_max / nth )) export is_exclusive=True - if [[ ${npe_node_wavepostbndpntbll} -gt 40 ]]; then - export npe_node_wavepostbndpntbll=40 + if [[ ${npe_node} -gt 40 ]]; then + export npe_node=40 export is_exclusive=False fi - export NTASKS=${npe_wavepostbndpntbll} + export NTASKS=${npe} ;; "wavepostpnt") - export wtime_wavepostpnt="04:00:00" - export npe_wavepostpnt=200 - export nth_wavepostpnt=1 - export npe_node_wavepostpnt=$(( npe_node_max / nth_wavepostpnt )) + export wtime="04:00:00" + export npe=200 + export nth=1 + export npe_node=$(( npe_node_max / nth )) export is_exclusive=True - if [[ ${npe_node_wavepostpnt} -gt 40 ]]; then - export npe_node_wavepostpnt=40 + if [[ ${npe_node} -gt 40 ]]; then + export npe_node=40 export is_exclusive=False fi - export NTASKS=${npe_wavepostpnt} + export NTASKS=${npe} ;; *) From f0faad419f77a6a62ce133515a143a71c8c1bf0f Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Fri, 28 Jun 2024 11:42:30 +0000 Subject: [PATCH 23/73] Redefine npe in analysis jobs --- parm/config/gfs/config.anal | 2 +- parm/config/gfs/config.eobs | 2 +- parm/config/gfs/config.eupd | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/parm/config/gfs/config.anal b/parm/config/gfs/config.anal index ee717a832bd..6d474fae975 100644 --- a/parm/config/gfs/config.anal +++ b/parm/config/gfs/config.anal @@ -19,7 +19,7 @@ if [[ "${RUN}" = "gfs" ]] ; then export DIAG_TARBALL="YES" fi -npe_var="npe_anal_${RUN/enkf}" +npe_var="npe_${RUN/enkf}" export npe_gsi="${!npe_var}" # Set parameters specific to L127 diff --git a/parm/config/gfs/config.eobs b/parm/config/gfs/config.eobs index 21f982addc2..81b28ea01d2 100644 --- a/parm/config/gfs/config.eobs +++ b/parm/config/gfs/config.eobs @@ -11,7 +11,7 @@ echo "BEGIN: config.eobs" # Number of enkf members per innovation job export NMEM_EOMGGRP=8 export RERUN_EOMGGRP="YES" -export npe_gsi=$npe_eobs +export npe_gsi=${npe} # GSI namelist options related to observer for EnKF export OBSINPUT_INVOBS="dmesh(1)=225.0,dmesh(2)=225.0,dmesh(3)=225.0,dmesh(4)=100.0" diff --git a/parm/config/gfs/config.eupd b/parm/config/gfs/config.eupd index 1ac90d2b75f..a6e3513558f 100644 --- a/parm/config/gfs/config.eupd +++ b/parm/config/gfs/config.eupd @@ -8,7 +8,7 @@ echo "BEGIN: config.eupd" # Get task specific resources . $EXPDIR/config.resources eupd -export npe_enkf=$npe_eupd +export npe_enkf=${npe} # Use NAM_ENKF below for serial EnKF ##export NAM_ENKF="analpertwtnh=0.9,analpertwtsh=0.9,analpertwttr=0.9" From e79915a1ca8e63cdcba25b9981ada57bb34e26b3 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Fri, 28 Jun 2024 11:43:25 +0000 Subject: [PATCH 24/73] Remove more references to CDUMP --- parm/config/gfs/config.base | 2 +- parm/config/gfs/config.prep | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/parm/config/gfs/config.base b/parm/config/gfs/config.base index eea44cfa230..b19f90e2ff2 100644 --- a/parm/config/gfs/config.base +++ b/parm/config/gfs/config.base @@ -134,7 +134,7 @@ export ATARDIR="@ATARDIR@" # Commonly defined parameters in JJOBS export envir=${envir:-"prod"} export NET="gfs" # NET is defined in the job-card (ecf) -export RUN=${RUN:-${RUN:-"gfs"}} # RUN is defined in the job-card (ecf) +export RUN=${RUN:-"gfs"} # RUN is defined in the job-card (ecf) # TODO: determine where is RUN actually used in the workflow other than here # TODO: is it possible to replace all instances of ${RUN} to ${RUN} to be # consistent w/ EE2? diff --git a/parm/config/gfs/config.prep b/parm/config/gfs/config.prep index 6009280db01..e719d03d1df 100644 --- a/parm/config/gfs/config.prep +++ b/parm/config/gfs/config.prep @@ -15,7 +15,7 @@ export cdate10=${PDY}${cyc} export PROCESS_TROPCY=${PROCESS_TROPCY:-NO} export TROPCYQCRELOSH="${SCRgfs}/exglobal_atmos_tropcy_qc_reloc.sh" -export COMINtcvital=${COMINtcvital:-${DMPDIR}/${CDUMP}.${PDY}/${cyc}/atmos} +export COMINtcvital=${COMINtcvital:-${DMPDIR}/${RUN}.${PDY}/${cyc}/atmos} export COMINsyn=${COMINsyn:-$(compath.py ${envir}/com/gfs/${gfs_ver})/syndat} # Adjust observation error for GFS v16 parallels From ece3ec759e4e72fee2459a31f7a0f57f8cbd83ca Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Fri, 28 Jun 2024 12:03:21 +0000 Subject: [PATCH 25/73] Update wxflow so CDUMP isn't required --- sorc/wxflow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/wxflow b/sorc/wxflow index 8406beeea41..5dad7dd61ce 160000 --- a/sorc/wxflow +++ b/sorc/wxflow @@ -1 +1 @@ -Subproject commit 8406beeea410118cdfbd8300895b2b2878eadba6 +Subproject commit 5dad7dd61cebd9b3f2b163b3b06bb75eae1860a9 From ea2f0d797da4b1b7773fd913c3709c67e604911f Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Fri, 28 Jun 2024 18:20:53 +0000 Subject: [PATCH 26/73] Add CDUMP cludge until wxflow is updated --- parm/config/gfs/config.base | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/parm/config/gfs/config.base b/parm/config/gfs/config.base index b19f90e2ff2..49847a43e5b 100644 --- a/parm/config/gfs/config.base +++ b/parm/config/gfs/config.base @@ -135,9 +135,12 @@ export ATARDIR="@ATARDIR@" export envir=${envir:-"prod"} export NET="gfs" # NET is defined in the job-card (ecf) export RUN=${RUN:-"gfs"} # RUN is defined in the job-card (ecf) -# TODO: determine where is RUN actually used in the workflow other than here -# TODO: is it possible to replace all instances of ${RUN} to ${RUN} to be +# TODO: determine where is CDUMP actually used in the workflow other than here +# TODO: is it possible to replace all instances of ${CDUMP} to ${RUN} to be # consistent w/ EE2? +# wxflow tasks need CDUMP defined but we no longer use it +# TODO Remove this kludge when wxflow is updated +export CDUMP=${CDUMP:-''} # Get all the COM path templates source "${EXPDIR}/config.com" From 5a7acd1f5e0d8d594173ae7409a0ad3ac2fc5ddb Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Fri, 28 Jun 2024 18:21:20 +0000 Subject: [PATCH 27/73] Separate wtimes for eobs and eomg --- parm/config/gfs/config.resources | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index 8f95d61166c..2717b8434e8 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -1010,8 +1010,12 @@ case ${step} in ;; "eobs" | "eomg") - wtime="00:15:00" - wtime="00:30:00" + if [[ "${step}" == "eobs" ]]; then + wtime="00:15:00" + else + wtime="00:30:00" + fi + case ${CASE} in "C768") npe=200;; "C384") npe=100;; From 1b332bff07859893bd7de3224f77758ff801ecc4 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Fri, 28 Jun 2024 18:21:45 +0000 Subject: [PATCH 28/73] Revert wxflow --- sorc/wxflow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/wxflow b/sorc/wxflow index 5dad7dd61ce..8406beeea41 160000 --- a/sorc/wxflow +++ b/sorc/wxflow @@ -1 +1 @@ -Subproject commit 5dad7dd61cebd9b3f2b163b3b06bb75eae1860a9 +Subproject commit 8406beeea410118cdfbd8300895b2b2878eadba6 From 5ba31b8585850d5d965ea139e264cf5cb836c85e Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Fri, 28 Jun 2024 18:22:27 +0000 Subject: [PATCH 29/73] Check stage RUN instead of CDUMP --- jobs/JGLOBAL_STAGE_IC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/JGLOBAL_STAGE_IC b/jobs/JGLOBAL_STAGE_IC index 7172f14190c..52225ac9d35 100755 --- a/jobs/JGLOBAL_STAGE_IC +++ b/jobs/JGLOBAL_STAGE_IC @@ -7,7 +7,7 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "stage_ic" -c "base stage_ic" # shellcheck disable=SC2153 rCDUMP=${RUN} # shellcheck disable=SC2153 -[[ ${CDUMP:-} = "gfs" ]] && export rCDUMP="gdas" +[[ ${RUN} = "gfs" ]] && export rCDUMP="gdas" export rCDUMP # Execute the Script From 1989dfa1d1c91fbbc914e6918d7fe857cbddbe08 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Fri, 28 Jun 2024 18:28:28 +0000 Subject: [PATCH 30/73] Rename update_base to match superclass --- workflow/applications/gefs.py | 2 +- workflow/applications/gfs_forecast_only.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/applications/gefs.py b/workflow/applications/gefs.py index fc7f37e0b89..4306ab3db12 100644 --- a/workflow/applications/gefs.py +++ b/workflow/applications/gefs.py @@ -33,7 +33,7 @@ def _get_app_configs(self): return configs @staticmethod - def _update_base(base_in): + def update_base(base_in): base_out = base_in.copy() base_out['INTERVAL_GFS'] = AppConfig.get_gfs_interval(base_in['gfs_cyc']) diff --git a/workflow/applications/gfs_forecast_only.py b/workflow/applications/gfs_forecast_only.py index 66cfd6600f1..52f4edc5b72 100644 --- a/workflow/applications/gfs_forecast_only.py +++ b/workflow/applications/gfs_forecast_only.py @@ -69,7 +69,7 @@ def _get_app_configs(self): return configs @staticmethod - def _update_base(base_in): + def update_base(base_in): base_out = base_in.copy() base_out['INTERVAL_GFS'] = AppConfig.get_gfs_interval(base_in['gfs_cyc']) From 515441edddc08b0cf0380e38c33ccc643ef8044a Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Fri, 28 Jun 2024 18:29:29 +0000 Subject: [PATCH 31/73] Make a copy of appconfig to for each RUN as it is modified --- workflow/rocoto/tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/workflow/rocoto/tasks.py b/workflow/rocoto/tasks.py index fd590d5e69a..6352a753d28 100644 --- a/workflow/rocoto/tasks.py +++ b/workflow/rocoto/tasks.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 +import copy import numpy as np from applications.applications import AppConfig import rocoto.rocoto as rocoto @@ -38,7 +39,7 @@ class Tasks: def __init__(self, app_config: AppConfig, run: str) -> None: - self.app_config = app_config + self.app_config = copy.deepcopy(app_config) self.run = run # Re-source the configs with RUN specified print(f"Source configs with RUN={run}") From 725a40f8751d232aefe2a233c0e92c3d97949e46 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Fri, 28 Jun 2024 18:30:12 +0000 Subject: [PATCH 32/73] Add envvar notes to create_experiment.py --- workflow/create_experiment.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/workflow/create_experiment.py b/workflow/create_experiment.py index c4e30ff79c6..1317f7be28d 100755 --- a/workflow/create_experiment.py +++ b/workflow/create_experiment.py @@ -11,6 +11,14 @@ The yaml file are simply the arguments for these two scripts. After this scripts runs the experiment is ready for launch. +Environmental variables +----------------------- + pslot + Name of the experiment + + RUNTESTS + Root directory where the test EXPDIR and COMROOT will be placed + Output ------ Functionally an experiment is setup as a result running the two scripts described above @@ -18,7 +26,6 @@ """ import os -import sys from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter from pathlib import Path From e4feecc10f01a75b5482892345dc787680b8f68b Mon Sep 17 00:00:00 2001 From: David Huber Date: Tue, 2 Jul 2024 12:44:36 +0000 Subject: [PATCH 33/73] Check that common variables are defined before using them --- env/AWSPW.env | 15 +++++++++------ env/GAEA.env | 14 +++++++++----- env/HERA.env | 19 +++++++++++-------- env/HERCULES.env | 19 +++++++++++-------- env/JET.env | 17 ++++++++++------- env/ORION.env | 19 +++++++++++-------- env/S4.env | 15 +++++++++------ env/WCOSS2.env | 24 ++++++++++++++---------- 8 files changed, 84 insertions(+), 58 deletions(-) diff --git a/env/AWSPW.env b/env/AWSPW.env index cb038609fc1..585c03828da 100755 --- a/env/AWSPW.env +++ b/env/AWSPW.env @@ -20,12 +20,15 @@ ulimit -s unlimited ulimit -a # Calculate common variables -nth_max=$((npe_node_max / npe_node)) -NTHREADSmax=${nth:-${nth_max}} -NTHREADS1=${nth:-1} -[[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} -[[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} -APRUN="${launcher} -n ${npe}" +# Check first if the dependent variables are set +if [[ -n "${npe:-}" && -n "${npe_node_max:-}" && -n "${npe_node:-}" ]]; then + nth_max=$((npe_node_max / npe_node)) + NTHREADSmax=${nth:-${nth_max}} + NTHREADS1=${nth:-1} + [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} + [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} + APRUN="${launcher} -n ${npe}" +fi if [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then diff --git a/env/GAEA.env b/env/GAEA.env index 98bce2b8a76..d71734a9b3e 100755 --- a/env/GAEA.env +++ b/env/GAEA.env @@ -16,11 +16,15 @@ ulimit -s unlimited ulimit -a # Calculate common variables -nth_max=$((npe_node_max / npe_node)) -NTHREADSmax=${nth:-${nth_max}} -NTHREADS1=${nth:-1} -[[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} -[[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} +# Check first if the dependent variables are set +if [[ -n "${npe:-}" && -n "${npe_node_max:-}" && -n "${npe_node:-}" ]]; then + nth_max=$((npe_node_max / npe_node)) + NTHREADSmax=${nth:-${nth_max}} + NTHREADS1=${nth:-1} + [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} + [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} + APRUN="${launcher} -n ${npe}" +fi if [[ "${step}" = "fcst" ]]; then diff --git a/env/HERA.env b/env/HERA.env index b685f5f760b..1554076b815 100755 --- a/env/HERA.env +++ b/env/HERA.env @@ -32,14 +32,17 @@ if [[ -n "${SLURM_JOB_ID:-}" ]]; then fi # Calculate common variables -nth_max=$((npe_node_max / npe_node)) -NTHREADSmax=${nth:-${nth_max}} -NTHREADS1=${nth:-1} -NTHREADS2=${nth:-2} -[[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} -[[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} -[[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} -APRUN="${launcher} -n ${npe}" +# Check first if the dependent variables are set +if [[ -n "${npe:-}" && -n "${npe_node_max:-}" && -n "${npe_node:-}" ]]; then + nth_max=$((npe_node_max / npe_node)) + NTHREADSmax=${nth:-${nth_max}} + NTHREADS1=${nth:-1} + NTHREADS2=${nth:-2} + [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} + [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} + [[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} + APRUN="${launcher} -n ${npe}" +fi if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then diff --git a/env/HERCULES.env b/env/HERCULES.env index 428fe96f686..6de46abef1e 100755 --- a/env/HERCULES.env +++ b/env/HERCULES.env @@ -29,14 +29,17 @@ ulimit -s unlimited ulimit -a # Calculate common variables -nth_max=$((npe_node_max / npe_node)) -NTHREADSmax=${nth:-${nth_max}} -NTHREADS1=${nth:-1} -NTHREADS2=${nth:-2} -[[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} -[[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} -[[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} -APRUN="${launcher} -n ${npe}" +# Check first if the dependent variables are set +if [[ -n "${npe:-}" && -n "${npe_node_max:-}" && -n "${npe_node:-}" ]]; then + nth_max=$((npe_node_max / npe_node)) + NTHREADSmax=${nth:-${nth_max}} + NTHREADS1=${nth:-1} + NTHREADS2=${nth:-2} + [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} + [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} + [[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} + APRUN="${launcher} -n ${npe}" +fi case ${step} in "prep" | "prepbufr") diff --git a/env/JET.env b/env/JET.env index d4bdf54e303..40d793fe02e 100755 --- a/env/JET.env +++ b/env/JET.env @@ -20,13 +20,16 @@ ulimit -s unlimited ulimit -a # Calculate common variables -nth_max=$((npe_node_max / npe_node)) -NTHREADSmax=${nth:-${nth_max}} -NTHREADS1=${nth:-1} -[[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} -[[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} -[[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} -APRUN="${launcher} -n ${npe}" +# Check first if the dependent variables are set +if [[ -n "${npe:-}" && -n "${npe_node_max:-}" && -n "${npe_node:-}" ]]; then + nth_max=$((npe_node_max / npe_node)) + NTHREADSmax=${nth:-${nth_max}} + NTHREADS1=${nth:-1} + [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} + [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} + [[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} + APRUN="${launcher} -n ${npe}" +fi if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then diff --git a/env/ORION.env b/env/ORION.env index da7db14d854..472112ce1d2 100755 --- a/env/ORION.env +++ b/env/ORION.env @@ -27,14 +27,17 @@ ulimit -s unlimited ulimit -a # Calculate common variables -nth_max=$((npe_node_max / npe_node)) -NTHREADSmax=${nth:-${nth_max}} -NTHREADS1=${nth:-1} -NTHREADS2=${nth:-2} -[[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} -[[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} -[[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} -APRUN="${launcher} -n ${npe}" +# Check first if the dependent variables are set +if [[ -n "${npe:-}" && -n "${npe_node_max:-}" && -n "${npe_node:-}" ]]; then + nth_max=$((npe_node_max / npe_node)) + NTHREADSmax=${nth:-${nth_max}} + NTHREADS1=${nth:-1} + NTHREADS2=${nth:-2} + [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} + [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} + [[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} + APRUN="${launcher} -n ${npe}" +fi if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then diff --git a/env/S4.env b/env/S4.env index 83efbd76624..48fa4ce5357 100755 --- a/env/S4.env +++ b/env/S4.env @@ -20,12 +20,15 @@ ulimit -s unlimited ulimit -a # Calculate common variables -nth_max=$((npe_node_max / npe_node)) -NTHREADSmax=${nth:-${nth_max}} -NTHREADS1=${nth:-1} -[[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} -[[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} -APRUN="${launcher} -n ${npe}" +# Check first if the dependent variables are set +if [[ -n "${npe:-}" && -n "${npe_node_max:-}" && -n "${npe_node:-}" ]]; then + nth_max=$((npe_node_max / npe_node)) + NTHREADSmax=${nth:-${nth_max}} + NTHREADS1=${nth:-1} + [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} + [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} + APRUN="${launcher} -n ${npe}" +fi if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then diff --git a/env/WCOSS2.env b/env/WCOSS2.env index 568b1081188..3f97c610586 100755 --- a/env/WCOSS2.env +++ b/env/WCOSS2.env @@ -13,15 +13,18 @@ step=$1 export launcher="mpiexec -l" export mpmd_opt="--cpu-bind verbose,core cfp" -# Calculate common variables -nth_max=$((npe_node_max / npe_node)) -NTHREADSmax=${nth:-${nth_max}} -NTHREADS1=${nth:-1} -NTHREADS2=${nth:-2} -[[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} -[[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} -[[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} -APRUN="${launcher} -n ${npe}" +# Calculate common resource variables +# Check first if the dependent variables are set +if [[ -n "${npe:-}" && -n "${npe_node_max:-}" && -n "${npe_node:-}" ]]; then + nth_max=$((npe_node_max / npe_node)) + NTHREADSmax=${nth:-${nth_max}} + NTHREADS1=${nth:-1} + NTHREADS2=${nth:-2} + [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} + [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} + [[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} + APRUN="${launcher} -n ${npe}" +fi if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then @@ -96,7 +99,8 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export NTHREADS_GSI=${NTHREADSmax} export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_GSI}" - export NTHREADS_CALCINC=${NTHREADS1} + export NTHREADS_CALCINC=${nth_calcinc:-1} + [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} export APRUN_CALCINC="${launcher} \$ncmd" export NTHREADS_CYCLE=${nth_cycle:-14} From 8cd3bbc5e9eb4560286d32327c91a0fb29baeae5 Mon Sep 17 00:00:00 2001 From: David Huber Date: Tue, 2 Jul 2024 12:45:42 +0000 Subject: [PATCH 34/73] Switch analcalc CDUMP to RUN --- scripts/exglobal_atmos_analysis_calc.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/exglobal_atmos_analysis_calc.sh b/scripts/exglobal_atmos_analysis_calc.sh index f94ebb02fa7..ea29dfbdbdf 100755 --- a/scripts/exglobal_atmos_analysis_calc.sh +++ b/scripts/exglobal_atmos_analysis_calc.sh @@ -25,7 +25,7 @@ source "${USHgfs}/preamble.sh" pwd=$(pwd) # Base variables -CDUMP=${CDUMP:-"gdas"} +RUN=${RUN:-"gdas"} GDUMP=${GDUMP:-"gdas"} # Utilities @@ -181,7 +181,7 @@ if [ $DOGAUSFCANL = "YES" ]; then export err=$?; err_chk fi -echo "${CDUMP} ${PDY}${cyc} atmanl and sfcanl done at $(date)" > "${COM_ATMOS_ANALYSIS}/${APREFIX}loganl.txt" +echo "${RUN} ${PDY}${cyc} atmanl and sfcanl done at $(date)" > "${COM_ATMOS_ANALYSIS}/${APREFIX}loganl.txt" ################################################################################ # Postprocessing From 38f820d33448d07ff1d4b2d2bb3708d0263fb654 Mon Sep 17 00:00:00 2001 From: David Huber Date: Tue, 2 Jul 2024 13:32:35 +0000 Subject: [PATCH 35/73] Fix postsndcfp resource declaration --- parm/config/gfs/config.resources | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index 2717b8434e8..81c98359336 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -1107,8 +1107,8 @@ case ${step} in npe=40 nth=8 npe_node=10 - npe=9 - npe_node=1 + npe_postsndcfp=9 + npe_node_postsndcfp=1 postsnd_req_cores=$(( npe_node * nth )) if (( postsnd_req_cores > npe_node_max )); then npe_node=$(( npe_node_max / nth )) From e2b0e318a4c8b7d8923a319316426525010bf09a Mon Sep 17 00:00:00 2001 From: David Huber Date: Tue, 2 Jul 2024 13:33:41 +0000 Subject: [PATCH 36/73] Further simplify analysis resources --- env/HERA.env | 4 ++-- env/HERCULES.env | 4 ++-- env/JET.env | 4 ++-- env/ORION.env | 4 ++-- env/S4.env | 4 ++-- env/WCOSS2.env | 4 ++-- parm/config/gfs/config.anal | 3 --- parm/config/gfs/config.eobs | 1 - scripts/exglobal_atmos_analysis.sh | 2 +- 9 files changed, 13 insertions(+), 17 deletions(-) diff --git a/env/HERA.env b/env/HERA.env index 1554076b815..087c9b6d59e 100755 --- a/env/HERA.env +++ b/env/HERA.env @@ -143,7 +143,7 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" export NTHREADS_GSI=${NTHREADSmax} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} --cpus-per-task=${NTHREADS_GSI}" + export APRUN_GSI="${APRUN} --cpus-per-task=${NTHREADS_GSI}" export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} @@ -169,7 +169,7 @@ elif [[ "${step}" = "eobs" ]]; then export MKL_CBWR=AUTO export NTHREADS_GSI=${NTHREADSmax} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} --cpus-per-task=${NTHREADS_GSI}" + export APRUN_GSI="${APRUN} --cpus-per-task=${NTHREADS_GSI}" export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} diff --git a/env/HERCULES.env b/env/HERCULES.env index 6de46abef1e..d8ee4445bd3 100755 --- a/env/HERCULES.env +++ b/env/HERCULES.env @@ -136,7 +136,7 @@ case ${step} in export NTHREADS_GSI=${nth_anal:-${nth_max}} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} --cpus-per-task=${NTHREADS_GSI}" + export APRUN_GSI="${APRUN} --cpus-per-task=${NTHREADS_GSI}" export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} @@ -169,7 +169,7 @@ case ${step} in export NTHREADS_GSI=${NTHREADSmax} [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} --cpus-per-task=${NTHREADS_GSI}" + export APRUN_GSI="${APRUN} --cpus-per-task=${NTHREADS_GSI}" ;; "eupd") diff --git a/env/JET.env b/env/JET.env index 40d793fe02e..495cc4bc573 100755 --- a/env/JET.env +++ b/env/JET.env @@ -116,7 +116,7 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" export NTHREADS_GSI=${nth_anal:-${nth_max}} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}}" + export APRUN_GSI="${APRUN}" export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} @@ -142,7 +142,7 @@ elif [[ "${step}" = "eobs" ]]; then export MKL_CBWR=AUTO export NTHREADS_GSI=${NTHREADSmax} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}}" + export APRUN_GSI="${APRUN}" export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} diff --git a/env/ORION.env b/env/ORION.env index 472112ce1d2..4613f346fba 100755 --- a/env/ORION.env +++ b/env/ORION.env @@ -142,7 +142,7 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" export NTHREADS_GSI=${NTHREADSmax} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} --cpus-per-task=${NTHREADS_GSI}" + export APRUN_GSI="${APRUN} --cpus-per-task=${NTHREADS_GSI}" export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} @@ -173,7 +173,7 @@ elif [[ "${step}" = "eobs" ]]; then export NTHREADS_GSI=${NTHREADSmax} [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} --cpus-per-task=${NTHREADS_GSI}" + export APRUN_GSI="${APRUN} --cpus-per-task=${NTHREADS_GSI}" elif [[ "${step}" = "eupd" ]]; then diff --git a/env/S4.env b/env/S4.env index 48fa4ce5357..dcecae4664e 100755 --- a/env/S4.env +++ b/env/S4.env @@ -107,7 +107,7 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" export NTHREADS_GSI=${NTHREADSmax} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}}" + export APRUN_GSI="${APRUN}" export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} @@ -134,7 +134,7 @@ elif [[ "${step}" = "eobs" ]]; then export MKL_CBWR=AUTO export NTHREADS_GSI=${NTHREADSmax} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}}" + export APRUN_GSI="${APRUN}" export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} diff --git a/env/WCOSS2.env b/env/WCOSS2.env index 3f97c610586..1cd5c9adee5 100755 --- a/env/WCOSS2.env +++ b/env/WCOSS2.env @@ -97,7 +97,7 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then fi export NTHREADS_GSI=${NTHREADSmax} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_GSI}" + export APRUN_GSI="${APRUN} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_GSI}" export NTHREADS_CALCINC=${nth_calcinc:-1} [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} @@ -133,7 +133,7 @@ elif [[ "${step}" = "eobs" ]]; then export FI_OFI_RXM_SAR_LIMIT=3145728 export NTHREADS_GSI=${NTHREADSmax} - export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe}} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_GSI}" + export APRUN_GSI="${APRUN} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_GSI}" export CFP_MP=${CFP_MP:-"NO"} export USE_CFP=${USE_CFP:-"YES"} diff --git a/parm/config/gfs/config.anal b/parm/config/gfs/config.anal index 6d474fae975..d2852101978 100644 --- a/parm/config/gfs/config.anal +++ b/parm/config/gfs/config.anal @@ -19,9 +19,6 @@ if [[ "${RUN}" = "gfs" ]] ; then export DIAG_TARBALL="YES" fi -npe_var="npe_${RUN/enkf}" -export npe_gsi="${!npe_var}" - # Set parameters specific to L127 if [[ ${LEVS} = "128" ]]; then export GRIDOPTS="nlayers(63)=1,nlayers(64)=1," diff --git a/parm/config/gfs/config.eobs b/parm/config/gfs/config.eobs index 81b28ea01d2..fba07271a55 100644 --- a/parm/config/gfs/config.eobs +++ b/parm/config/gfs/config.eobs @@ -11,7 +11,6 @@ echo "BEGIN: config.eobs" # Number of enkf members per innovation job export NMEM_EOMGGRP=8 export RERUN_EOMGGRP="YES" -export npe_gsi=${npe} # GSI namelist options related to observer for EnKF export OBSINPUT_INVOBS="dmesh(1)=225.0,dmesh(2)=225.0,dmesh(3)=225.0,dmesh(4)=100.0" diff --git a/scripts/exglobal_atmos_analysis.sh b/scripts/exglobal_atmos_analysis.sh index 2f4c786ae5a..ab22681b6bd 100755 --- a/scripts/exglobal_atmos_analysis.sh +++ b/scripts/exglobal_atmos_analysis.sh @@ -581,7 +581,7 @@ if [ ${GENDIAG} = "YES" ] ; then if [ -d ${DIAG_DIR} ]; then rm -rf ${DIAG_DIR} fi - npe_m1="$((${npe_gsi}-1))" + npe_m1="$((npe-1))" for pe in $(seq 0 ${npe_m1}); do pedir="dir."$(printf %04i ${pe}) mkdir -p ${DIAG_DIR}/${pedir} From 35da922b8b4321630602ff1703ba7800cca05e9a Mon Sep 17 00:00:00 2001 From: David Huber Date: Tue, 2 Jul 2024 13:48:14 +0000 Subject: [PATCH 37/73] Ignore 'unused' SC warning --- env/GAEA.env | 2 ++ 1 file changed, 2 insertions(+) diff --git a/env/GAEA.env b/env/GAEA.env index d71734a9b3e..554ab24d4d7 100755 --- a/env/GAEA.env +++ b/env/GAEA.env @@ -23,6 +23,8 @@ if [[ -n "${npe:-}" && -n "${npe_node_max:-}" && -n "${npe_node:-}" ]]; then NTHREADS1=${nth:-1} [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} + # This may be useful when Gaea is fully ported, so ignore SC warning + # shellcheck disable=SC2034 APRUN="${launcher} -n ${npe}" fi From c3542e970212ffe3fc9c29bca75efa045ae19f64 Mon Sep 17 00:00:00 2001 From: David Huber Date: Tue, 2 Jul 2024 17:33:31 +0000 Subject: [PATCH 38/73] Replace CDUMP with RUN in docs --- docs/doxygen/mainpage.h | 4 ++-- docs/source/init.rst | 2 +- docs/source/setup.rst | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/doxygen/mainpage.h b/docs/doxygen/mainpage.h index 19a51be2723..92d602aa82a 100644 --- a/docs/doxygen/mainpage.h +++ b/docs/doxygen/mainpage.h @@ -24,7 +24,7 @@ To setup an experiment, a python script \c setup_expt.py (located in \ usage: setup_expt.py [-h] --pslot PSLOT [--configdir CONFIGDIR] [--idate IDATE] [--icsdir ICSDIR] [--resdetatmos RESDET] [--resensatmos RESENS] [--comroot COMROOT] - [--expdir EXPDIR] [--nens NENS] [--cdump CDUMP] + [--expdir EXPDIR] [--nens NENS] [--run RUN] Setup files and directories to start a GFS parallel. Create EXPDIR, copy config files Create ROTDIR experiment directory structure, link initial @@ -52,7 +52,7 @@ To setup an experiment, a python script \c setup_expt.py (located in \ (default: None) --nens number of ensemble members (default: 80) - --cdump CDUMP to start the experiment + --run RUN to start the experiment (default: gdas) The above script creates directories \c EXPDIR and \c ROTDIR. It will make links for initial conditions from a location provided via the \c --icsdir argument for a chosen resolution for the control \c --resdetatmos and the ensemble \c --resensatmos. Experiment name is controlled by the input argument \c --pslot. The script will ask user input in case any of the directories already exist. It will copy experiment configuration files into the \c EXPDIR from \c CONFIGDIR. diff --git a/docs/source/init.rst b/docs/source/init.rst index ac900e1be23..69e43f9bb00 100644 --- a/docs/source/init.rst +++ b/docs/source/init.rst @@ -384,7 +384,7 @@ The warm starts and other output from production are at C768 deterministic and C What files should you pull for starting a new experiment with warm starts from production? ------------------------------------------------------------------------------------------ -That depends on what mode you want to run -- forecast-only or cycled. Whichever mode, navigate to the top of your ``ROTDIR`` and pull the entirety of the tarball(s) listed below for your mode. The files within the tarball are already in the ``$CDUMP.$PDY/$CYC/$ATMOS`` folder format expected by the system. +That depends on what mode you want to run -- forecast-only or cycled. Whichever mode, navigate to the top of your ``ROTDIR`` and pull the entirety of the tarball(s) listed below for your mode. The files within the tarball are already in the ``$RUN.$PDY/$CYC/$ATMOS`` folder format expected by the system. For forecast-only there are two tarballs to pull diff --git a/docs/source/setup.rst b/docs/source/setup.rst index de5cfa099af..1715899927d 100644 --- a/docs/source/setup.rst +++ b/docs/source/setup.rst @@ -145,7 +145,7 @@ The following command examples include variables for reference but users should cd workflow ./setup_expt.py gfs cycled --idate $IDATE --edate $EDATE [--app $APP] [--start $START] [--gfs_cyc $GFS_CYC] - [--resdetatmos $RESDETATMOS] [--resdetocean $RESDETOCEAN] [--resensatmos $RESENSATMOS] [--nens $NENS] [--cdump $CDUMP] + [--resdetatmos $RESDETATMOS] [--resdetocean $RESDETOCEAN] [--resensatmos $RESENSATMOS] [--nens $NENS] [--run $RUN] [--pslot $PSLOT] [--configdir $CONFIGDIR] [--comroot $COMROOT] [--expdir $EXPDIR] [--icsdir $ICSDIR] where: @@ -170,7 +170,7 @@ where: * ``$RESDETOCEAN`` is the resolution of the ocean component of the deterministic forecast [default: 0.; determined based on atmosphere resolution] * ``$RESENSATMOS`` is the resolution of the atmosphere component of the ensemble forecast [default: 192] * ``$NENS`` is the number of ensemble members [default: 20] - * ``$CDUMP`` is the starting phase [default: gdas] + * ``$RUN`` is the starting phase [default: gdas] * ``$PSLOT`` is the name of your experiment [default: test] * ``$CONFIGDIR`` is the path to the config folder under the copy of the system you're using [default: $TOP_OF_CLONE/parm/config/] * ``$COMROOT`` is the path to your experiment output directory. Your ``ROTDIR`` (rotating com directory) will be created using ``COMROOT`` and ``PSLOT``. [default: $HOME] From b692c3bc191377e5d30fa3e76fdc7d00f5ae515e Mon Sep 17 00:00:00 2001 From: David Huber Date: Tue, 2 Jul 2024 17:37:43 +0000 Subject: [PATCH 39/73] Remove unused CDUMP references --- jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT | 4 +--- jobs/JGLOBAL_WAVE_PREP | 2 -- parm/config/gfs/config.base | 6 ------ 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT b/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT index 11c43ca4172..875fe9d0ee4 100755 --- a/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT +++ b/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT @@ -10,8 +10,6 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "ocnanalchkpt" -c "base ocnanal ocnana ############################################## # Ignore possible spelling error (nothing is misspelled) # shellcheck disable=SC2153 -export CDUMP=${CDUMP:-${RUN:-"gfs"}} -# shellcheck disable=SC2153 GDATE=$(date --utc +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours") export GDATE export gPDY=${GDATE:0:8} @@ -21,7 +19,7 @@ export GDUMP=${GDUMP:-"gdas"} export GPREFIX="${GDUMP}.t${gcyc}z." # Ignore possible spelling error (nothing is misspelled) # shellcheck disable=SC2153 -export APREFIX="${CDUMP}.t${cyc}z." +export APREFIX="${RUN}.t${cyc}z." # Generate COM variables from templates YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_ATMOS_ANALYSIS diff --git a/jobs/JGLOBAL_WAVE_PREP b/jobs/JGLOBAL_WAVE_PREP index 65928b870de..5d4e76dc8a2 100755 --- a/jobs/JGLOBAL_WAVE_PREP +++ b/jobs/JGLOBAL_WAVE_PREP @@ -6,8 +6,6 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "waveprep" -c "base wave waveprep" # Add default errchk = err_chk export errchk=${errchk:-err_chk} -export CDUMP=${RUN/enkf} - # Set rtofs PDY export RPDY=${PDY} diff --git a/parm/config/gfs/config.base b/parm/config/gfs/config.base index 49847a43e5b..f431abfe502 100644 --- a/parm/config/gfs/config.base +++ b/parm/config/gfs/config.base @@ -135,12 +135,6 @@ export ATARDIR="@ATARDIR@" export envir=${envir:-"prod"} export NET="gfs" # NET is defined in the job-card (ecf) export RUN=${RUN:-"gfs"} # RUN is defined in the job-card (ecf) -# TODO: determine where is CDUMP actually used in the workflow other than here -# TODO: is it possible to replace all instances of ${CDUMP} to ${RUN} to be -# consistent w/ EE2? -# wxflow tasks need CDUMP defined but we no longer use it -# TODO Remove this kludge when wxflow is updated -export CDUMP=${CDUMP:-''} # Get all the COM path templates source "${EXPDIR}/config.com" From 6b6029e49cd8bd5d6ce78aa7894ce39e31c55dee Mon Sep 17 00:00:00 2001 From: David Huber Date: Tue, 2 Jul 2024 17:38:21 +0000 Subject: [PATCH 40/73] Revert CDUMP in analysis scripts to strip 'enkf' --- scripts/exglobal_atmos_analysis.sh | 4 ++-- scripts/exglobal_atmos_analysis_calc.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/exglobal_atmos_analysis.sh b/scripts/exglobal_atmos_analysis.sh index ab22681b6bd..0d7f88ad2a7 100755 --- a/scripts/exglobal_atmos_analysis.sh +++ b/scripts/exglobal_atmos_analysis.sh @@ -26,7 +26,7 @@ pwd=$(pwd) # Base variables CDATE=${CDATE:-"2001010100"} -RUN=${RUN:-"gdas"} +CDUMP=${CDUMP:-"gdas"} GDUMP=${GDUMP:-"gdas"} # Derived base variables @@ -990,7 +990,7 @@ cd ${pwd} if [ ${SENDECF} = "YES" -a "${RUN}" != "enkf" ]; then ecflow_client --event release_fcst fi -echo "${RUN} ${CDATE} atminc done at $(date)" > ${COM_ATMOS_ANALYSIS}/${APREFIX}loginc.txt +echo "${CDUMP} ${CDATE} atminc done at $(date)" > ${COM_ATMOS_ANALYSIS}/${APREFIX}loginc.txt ################################################################################ diff --git a/scripts/exglobal_atmos_analysis_calc.sh b/scripts/exglobal_atmos_analysis_calc.sh index ea29dfbdbdf..f94ebb02fa7 100755 --- a/scripts/exglobal_atmos_analysis_calc.sh +++ b/scripts/exglobal_atmos_analysis_calc.sh @@ -25,7 +25,7 @@ source "${USHgfs}/preamble.sh" pwd=$(pwd) # Base variables -RUN=${RUN:-"gdas"} +CDUMP=${CDUMP:-"gdas"} GDUMP=${GDUMP:-"gdas"} # Utilities @@ -181,7 +181,7 @@ if [ $DOGAUSFCANL = "YES" ]; then export err=$?; err_chk fi -echo "${RUN} ${PDY}${cyc} atmanl and sfcanl done at $(date)" > "${COM_ATMOS_ANALYSIS}/${APREFIX}loganl.txt" +echo "${CDUMP} ${PDY}${cyc} atmanl and sfcanl done at $(date)" > "${COM_ATMOS_ANALYSIS}/${APREFIX}loganl.txt" ################################################################################ # Postprocessing From 0d4fafa90a27593bc92db010c040db7d56987f44 Mon Sep 17 00:00:00 2001 From: David Huber Date: Tue, 2 Jul 2024 18:52:51 +0000 Subject: [PATCH 41/73] Export RUN before sourcing configs --- parm/config/gfs/config.resources | 19 ++++++------------- sorc/wxflow | 2 +- workflow/applications/applications.py | 23 +++++------------------ 3 files changed, 12 insertions(+), 32 deletions(-) diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index 81c98359336..e2c4da26512 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -170,7 +170,6 @@ case ${step} in wtime="00:10:00" npe_gdas=5 npe_gfs=65 - nth_gdas=1 nth_gfs=1 npe_node_gdas=$(( npe_node_max / nth_gdas )) npe_node_gfs=$(( npe_node_max / nth_gfs )) @@ -976,12 +975,9 @@ case ${step} in export layout_y=${layout_y_atmensanl} wtime="00:30:00" - npe_enkfgdas=$(( layout_x * layout_y * 6 )) - npe_enkfgfs=$(( layout_x * layout_y * 6 )) - nth_enkfgdas=1 - nth_enkfgfs=${nth_enkfgdas} - npe_node_enkfgdas=$(( npe_node_max / nth_enkfgdas )) - npe_node_enkfgfs=$(( npe_node_max / nth_enkfgfs )) + npe=$(( layout_x * layout_y * 6 )) + nth=1 + npe_node=$(( npe_node_max / nth )) memory="96GB" export is_exclusive=True ;; @@ -991,12 +987,9 @@ case ${step} in export layout_y=${layout_y_atmensanl} wtime="00:30:00" - npe_enkfgdas=$(( layout_x * layout_y * 6 )) - npe_enkfgfs=$(( layout_x * layout_y * 6 )) - nth_enkfgdas=1 - nth_enkfgfs=${nth_enkfgdas} - npe_node_enkfgdas=$(( npe_node_max / nth_enkfgdas )) - npe_node_enkfgfs=$(( npe_node_max / nth_enkfgfs )) + npe=$(( layout_x * layout_y * 6 )) + nth=1 + npe_node=$(( npe_node_max / nth )) memory="96GB" export is_exclusive=True ;; diff --git a/sorc/wxflow b/sorc/wxflow index 5dad7dd61ce..29c1a3ccb81 160000 --- a/sorc/wxflow +++ b/sorc/wxflow @@ -1 +1 @@ -Subproject commit 5dad7dd61cebd9b3f2b163b3b06bb75eae1860a9 +Subproject commit 29c1a3ccb8122e967d716937195e627e35544824 diff --git a/workflow/applications/applications.py b/workflow/applications/applications.py index 3eae1e357c9..164cc9cd93b 100644 --- a/workflow/applications/applications.py +++ b/workflow/applications/applications.py @@ -135,23 +135,13 @@ def update_base(base_in: Dict[str, Any]) -> Dict[str, Any]: ''' pass - def source_configs(self, run: str = None, log: bool = True) -> Dict[str, Any]: + def source_configs(self, run: str = "gfs", log: bool = True) -> Dict[str, Any]: """ - Given the configuration object used to initialize and the RUN, + Given the configuration object used to initialize this application, source the configurations for each config and return a dictionary Every config depends on "config.base" """ - if run: - # Write a temporary config file with RUN in it - config_run_file = Path(self.conf.config_dir, "config.run") - with open(config_run_file, "w") as config_run: - config_run.write(f"#!/usr/bin/env bash\n") - config_run.write(f"export RUN='{run}'\n") - - # Update the list of config files - self.conf.config_files = self.conf._get_configs - configs = dict() # Return config.base as well @@ -160,8 +150,8 @@ def source_configs(self, run: str = None, log: bool = True) -> Dict[str, Any]: # Source the list of all config_files involved in the application for config in self.configs_names: - # All must source config.run (if present) and config.base first - files = ['config.run', 'config.base'] if run else ['config.base'] + # All must source config.base first + files = ['config.base'] if config in ['eobs', 'eomg']: files += ['config.anal', 'config.eobs'] @@ -179,10 +169,7 @@ def source_configs(self, run: str = None, log: bool = True) -> Dict[str, Any]: files += [f'config.{config}'] print(f'sourcing config.{config}') if log else 0 - configs[config] = self.conf.parse_config(files) - - # Delete config.run - Path.unlink(config_run_file) if run else 0 + configs[config] = self.conf.parse_config(files, RUN=run) return configs From 112b91bc5a3c9cfe63a61007ee7b7a23fcaaa5e8 Mon Sep 17 00:00:00 2001 From: David Huber Date: Tue, 2 Jul 2024 19:08:45 +0000 Subject: [PATCH 42/73] Update GEFS resources after last merge --- parm/config/gefs/config.resources | 45 ++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/parm/config/gefs/config.resources b/parm/config/gefs/config.resources index a1e6aa2cdd9..4a2831fa970 100644 --- a/parm/config/gefs/config.resources +++ b/parm/config/gefs/config.resources @@ -53,28 +53,28 @@ export npe_node_max case ${step} in "stage_ic") - export wtime_stage_ic="00:15:00" - export npe_stage_ic=1 - export npe_node_stage_ic=1 - export nth_stage_ic=1 + export wtime="00:15:00" + export npe=1 + export npe_node=1 + export nth=1 export is_exclusive=True ;; "waveinit") - export wtime_waveinit="00:10:00" - export npe_waveinit=12 - export nth_waveinit=1 - export npe_node_waveinit=$(( npe_node_max / nth_waveinit )) - export NTASKS=${npe_waveinit} - export memory_waveinit="2GB" + export wtime="00:10:00" + export npe=12 + export nth=1 + export npe_node=$(( npe_node_max / nth )) + export NTASKS=${npe} + export memory="2GB" ;; "prep_emissions") - export wtime_prep_emissions="00:10:00" - export npe_prep_emissions=1 - export nth_prep_emissions=1 - export npe_node_prep_emissions=$(( npe_node_max / nth_prep_emissions )) - export memory_prep_emissions="1GB" + export wtime="00:10:00" + export npe=1 + export nth=1 + export npe_node=$(( npe_node_max / nth )) + export memory="1GB" ;; "fcst" | "efcs") @@ -286,4 +286,19 @@ case ${step} in esac +# Get machine-specific resources, overriding/extending the above assignments +if [[ -f "${EXPDIR}/config.resources.${machine}" ]]; then + source "${EXPDIR}/config.resources.${machine}" +fi + +# Check for RUN-specific variables and export them +for resource_var in nth npe npe_node NTASKS memory wtime; do + run_resource_var="${resource_var}_${RUN}" + if [[ -n "${!run_resource_var+0}" ]]; then + declare -x "${resource_var}"="${!run_resource_var}" + elif [[ -n "${!resource_var+0}" ]]; then + export "${resource_var?}" + fi +done + echo "END: config.resources" From 766eb1defe11e3fac155eb6d1d9183188a26f6e2 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Wed, 3 Jul 2024 18:32:05 +0000 Subject: [PATCH 43/73] Add todo to remove CDUMP from the ocean_analysis_post j-job --- jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_POST | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_POST b/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_POST index c87dc6b34fe..00597f14f8e 100755 --- a/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_POST +++ b/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_POST @@ -8,6 +8,9 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "ocnanalpost" -c "base ocnanalpost" ############################################## # Set variables used in the script ############################################## +# TODO remove this CDUMP declaration when the GDAS script +# exgdas_global_marine_analysis_post.py is updated to look for RUN instead +# of CDUMP. export CDUMP=${CDUMP:-${RUN:-"gfs"}} export CDATE=${CDATE:-${PDY}${cyc}} export GDUMP=${GDUMP:-"gdas"} From ab68f9f0eb26c0265fbb6a95b3fb1d2e2faa3314 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Wed, 3 Jul 2024 18:39:17 +0000 Subject: [PATCH 44/73] Rename CDUMP to rCDUMP for analysis jobs that need exporting --- jobs/JGLOBAL_ATMOS_ANALYSIS | 6 +++--- jobs/JGLOBAL_ATMOS_ANALYSIS_CALC | 6 +++--- scripts/exglobal_atmos_analysis.sh | 4 ++-- scripts/exglobal_atmos_analysis_calc.sh | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/jobs/JGLOBAL_ATMOS_ANALYSIS b/jobs/JGLOBAL_ATMOS_ANALYSIS index 1586109c661..5776aa6d133 100755 --- a/jobs/JGLOBAL_ATMOS_ANALYSIS +++ b/jobs/JGLOBAL_ATMOS_ANALYSIS @@ -8,7 +8,7 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "anal" -c "base anal" # Set variables used in the script ############################################## export CDATE=${CDATE:-${PDY}${cyc}} -export CDUMP=${RUN/enkf} +export rCDUMP=${RUN/enkf} export COMPONENT="atmos" export DO_CALC_ANALYSIS=${DO_CALC_ANALYSIS:-"YES"} export MAKE_NSSTBUFR=${MAKE_NSSTBUFR:-"NO"} @@ -25,9 +25,9 @@ export gcyc=${GDATE:8:2} export GDUMP="gdas" export GDUMP_ENS="enkf${GDUMP}" -export OPREFIX="${CDUMP}.t${cyc}z." +export OPREFIX="${rCDUMP}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." -export APREFIX="${CDUMP}.t${cyc}z." +export APREFIX="${rCDUMP}.t${cyc}z." export GPREFIX_ENS="${GDUMP_ENS}.t${gcyc}z." # Generate COM variables from templates diff --git a/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC b/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC index 4b346385815..5b6073254ad 100755 --- a/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC +++ b/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC @@ -7,7 +7,7 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "analcalc" -c "base anal analcalc" ############################################## # Set variables used in the script ############################################## -export CDUMP="${RUN/enkf}" +export rCDUMP="${RUN/enkf}" export DO_CALC_ANALYSIS=${DO_CALC_ANALYSIS:-"YES"} @@ -23,12 +23,12 @@ export gcyc=${GDATE:8:2} export GDUMP="gdas" export GDUMP_ENS="enkf${GDUMP}" -export OPREFIX="${CDUMP}.t${cyc}z." +export OPREFIX="${rCDUMP}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export APREFIX="${RUN}.t${cyc}z." export GPREFIX_ENS="${GDUMP_ENS}.t${gcyc}z." -RUN=${CDUMP} YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_OBS +RUN=${rCDUMP} YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_OBS YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_ATMOS_ANALYSIS COM_ATMOS_RESTART diff --git a/scripts/exglobal_atmos_analysis.sh b/scripts/exglobal_atmos_analysis.sh index 0d7f88ad2a7..6053fb66b30 100755 --- a/scripts/exglobal_atmos_analysis.sh +++ b/scripts/exglobal_atmos_analysis.sh @@ -26,7 +26,7 @@ pwd=$(pwd) # Base variables CDATE=${CDATE:-"2001010100"} -CDUMP=${CDUMP:-"gdas"} +rCDUMP=${rCDUMP:-"gdas"} GDUMP=${GDUMP:-"gdas"} # Derived base variables @@ -990,7 +990,7 @@ cd ${pwd} if [ ${SENDECF} = "YES" -a "${RUN}" != "enkf" ]; then ecflow_client --event release_fcst fi -echo "${CDUMP} ${CDATE} atminc done at $(date)" > ${COM_ATMOS_ANALYSIS}/${APREFIX}loginc.txt +echo "${rCDUMP} ${CDATE} atminc done at $(date)" > ${COM_ATMOS_ANALYSIS}/${APREFIX}loginc.txt ################################################################################ diff --git a/scripts/exglobal_atmos_analysis_calc.sh b/scripts/exglobal_atmos_analysis_calc.sh index f94ebb02fa7..423e800879c 100755 --- a/scripts/exglobal_atmos_analysis_calc.sh +++ b/scripts/exglobal_atmos_analysis_calc.sh @@ -25,7 +25,7 @@ source "${USHgfs}/preamble.sh" pwd=$(pwd) # Base variables -CDUMP=${CDUMP:-"gdas"} +rCDUMP=${rCDUMP:-"gdas"} GDUMP=${GDUMP:-"gdas"} # Utilities @@ -181,7 +181,7 @@ if [ $DOGAUSFCANL = "YES" ]; then export err=$?; err_chk fi -echo "${CDUMP} ${PDY}${cyc} atmanl and sfcanl done at $(date)" > "${COM_ATMOS_ANALYSIS}/${APREFIX}loganl.txt" +echo "${rCDUMP} ${PDY}${cyc} atmanl and sfcanl done at $(date)" > "${COM_ATMOS_ANALYSIS}/${APREFIX}loganl.txt" ################################################################################ # Postprocessing From 8af3716d44267e85ee374e1a7fd08f9c83521d60 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Wed, 3 Jul 2024 19:03:29 +0000 Subject: [PATCH 45/73] Remove CDUMP from ecf files; do not export CDUMP in J-Jobs --- ecf/scripts/enkfgdas/analysis/create/jenkfgdas_diag.ecf | 1 - .../enkfgdas/analysis/create/jenkfgdas_select_obs.ecf | 1 - ecf/scripts/enkfgdas/analysis/create/jenkfgdas_update.ecf | 1 - .../enkfgdas/analysis/recenter/ecen/jenkfgdas_ecen.ecf | 1 - ecf/scripts/enkfgdas/analysis/recenter/jenkfgdas_sfc.ecf | 1 - ecf/scripts/enkfgdas/forecast/jenkfgdas_fcst.ecf | 1 - ecf/scripts/enkfgdas/post/jenkfgdas_post_master.ecf | 1 - ecf/scripts/gdas/atmos/analysis/jgdas_atmos_analysis.ecf | 1 - .../gdas/atmos/analysis/jgdas_atmos_analysis_calc.ecf | 1 - .../gdas/atmos/analysis/jgdas_atmos_analysis_diag.ecf | 1 - ecf/scripts/gdas/atmos/gempak/jgdas_atmos_gempak.ecf | 1 - .../gdas/atmos/gempak/jgdas_atmos_gempak_meta_ncdc.ecf | 1 - .../gdas/atmos/obsproc/dump/jgdas_atmos_tropcy_qc_reloc.ecf | 1 - .../gdas/atmos/obsproc/prep/jgdas_atmos_emcsfc_sfc_prep.ecf | 1 - ecf/scripts/gdas/atmos/post/jgdas_atmos_post_manager.ecf | 1 - ecf/scripts/gdas/atmos/post/jgdas_atmos_post_master.ecf | 1 - .../atmos/post_processing/jgdas_atmos_chgres_forenkf.ecf | 1 - ecf/scripts/gdas/atmos/verf/jgdas_atmos_verfozn.ecf | 1 - ecf/scripts/gdas/atmos/verf/jgdas_atmos_verfrad.ecf | 1 - ecf/scripts/gdas/atmos/verf/jgdas_atmos_vminmon.ecf | 1 - ecf/scripts/gdas/jgdas_forecast.ecf | 1 - ecf/scripts/gdas/wave/init/jgdas_wave_init.ecf | 1 - ecf/scripts/gdas/wave/post/jgdas_wave_postpnt.ecf | 1 - ecf/scripts/gdas/wave/post/jgdas_wave_postsbs.ecf | 1 - ecf/scripts/gdas/wave/prep/jgdas_wave_prep.ecf | 1 - ecf/scripts/gfs/atmos/analysis/jgfs_atmos_analysis.ecf | 1 - ecf/scripts/gfs/atmos/analysis/jgfs_atmos_analysis_calc.ecf | 1 - ecf/scripts/gfs/atmos/gempak/jgfs_atmos_gempak.ecf | 1 - ecf/scripts/gfs/atmos/gempak/jgfs_atmos_gempak_meta.ecf | 1 - .../gfs/atmos/gempak/jgfs_atmos_gempak_ncdc_upapgif.ecf | 1 - .../gfs/atmos/gempak/jgfs_atmos_npoess_pgrb2_0p5deg.ecf | 1 - .../gfs/atmos/gempak/jgfs_atmos_pgrb2_spec_gempak.ecf | 1 - .../gfs/atmos/obsproc/dump/jgfs_atmos_tropcy_qc_reloc.ecf | 1 - .../gfs/atmos/obsproc/prep/jgfs_atmos_emcsfc_sfc_prep.ecf | 1 - ecf/scripts/gfs/atmos/post/jgfs_atmos_post_manager.ecf | 1 - ecf/scripts/gfs/atmos/post/jgfs_atmos_post_master.ecf | 1 - .../awips_20km_1p0/jgfs_atmos_awips_master.ecf | 1 - .../post_processing/bufr_sounding/jgfs_atmos_postsnd.ecf | 1 - .../atmos/post_processing/bulletins/jgfs_atmos_fbwind.ecf | 1 - ecf/scripts/gfs/atmos/verf/jgfs_atmos_vminmon.ecf | 1 - ecf/scripts/gfs/jgfs_forecast.ecf | 1 - ecf/scripts/gfs/wave/gempak/jgfs_wave_gempak.ecf | 1 - ecf/scripts/gfs/wave/init/jgfs_wave_init.ecf | 1 - ecf/scripts/gfs/wave/post/jgfs_wave_post_bndpnt.ecf | 1 - ecf/scripts/gfs/wave/post/jgfs_wave_post_bndpntbll.ecf | 1 - ecf/scripts/gfs/wave/post/jgfs_wave_postpnt.ecf | 1 - ecf/scripts/gfs/wave/post/jgfs_wave_postsbs.ecf | 1 - ecf/scripts/gfs/wave/post/jgfs_wave_prdgen_bulls.ecf | 1 - ecf/scripts/gfs/wave/post/jgfs_wave_prdgen_gridded.ecf | 1 - ecf/scripts/gfs/wave/prep/jgfs_wave_prep.ecf | 1 - jobs/JGDAS_ATMOS_ANALYSIS_DIAG | 2 +- jobs/JGDAS_ATMOS_CHGRES_FORENKF | 2 +- jobs/JGDAS_ENKF_DIAG | 2 +- jobs/JGDAS_ENKF_ECEN | 2 +- jobs/JGDAS_ENKF_POST | 1 - jobs/JGDAS_ENKF_SELECT_OBS | 2 +- jobs/JGDAS_ENKF_SFC | 2 +- jobs/JGDAS_FIT2OBS | 4 +--- jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_PREP | 5 ++--- jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_VRFY | 1 - jobs/JGFS_ATMOS_CYCLONE_TRACKER | 2 +- jobs/JGFS_ATMOS_FSU_GENESIS | 1 - jobs/JGFS_ATMOS_POSTSND | 1 - jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC | 1 - jobs/rocoto/prep.sh | 2 +- 65 files changed, 11 insertions(+), 69 deletions(-) diff --git a/ecf/scripts/enkfgdas/analysis/create/jenkfgdas_diag.ecf b/ecf/scripts/enkfgdas/analysis/create/jenkfgdas_diag.ecf index 08d01853991..03835172b9c 100755 --- a/ecf/scripts/enkfgdas/analysis/create/jenkfgdas_diag.ecf +++ b/ecf/scripts/enkfgdas/analysis/create/jenkfgdas_diag.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/enkfgdas/analysis/create/jenkfgdas_select_obs.ecf b/ecf/scripts/enkfgdas/analysis/create/jenkfgdas_select_obs.ecf index b94e3a18e39..bc289b8006b 100755 --- a/ecf/scripts/enkfgdas/analysis/create/jenkfgdas_select_obs.ecf +++ b/ecf/scripts/enkfgdas/analysis/create/jenkfgdas_select_obs.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/enkfgdas/analysis/create/jenkfgdas_update.ecf b/ecf/scripts/enkfgdas/analysis/create/jenkfgdas_update.ecf index 6611afff524..91eef7fb74b 100755 --- a/ecf/scripts/enkfgdas/analysis/create/jenkfgdas_update.ecf +++ b/ecf/scripts/enkfgdas/analysis/create/jenkfgdas_update.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/enkfgdas/analysis/recenter/ecen/jenkfgdas_ecen.ecf b/ecf/scripts/enkfgdas/analysis/recenter/ecen/jenkfgdas_ecen.ecf index 1ed2568d610..044a65c8433 100755 --- a/ecf/scripts/enkfgdas/analysis/recenter/ecen/jenkfgdas_ecen.ecf +++ b/ecf/scripts/enkfgdas/analysis/recenter/ecen/jenkfgdas_ecen.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/enkfgdas/analysis/recenter/jenkfgdas_sfc.ecf b/ecf/scripts/enkfgdas/analysis/recenter/jenkfgdas_sfc.ecf index d0957421936..954ca495331 100755 --- a/ecf/scripts/enkfgdas/analysis/recenter/jenkfgdas_sfc.ecf +++ b/ecf/scripts/enkfgdas/analysis/recenter/jenkfgdas_sfc.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/enkfgdas/forecast/jenkfgdas_fcst.ecf b/ecf/scripts/enkfgdas/forecast/jenkfgdas_fcst.ecf index 923d2083500..2fd692d1dfe 100755 --- a/ecf/scripts/enkfgdas/forecast/jenkfgdas_fcst.ecf +++ b/ecf/scripts/enkfgdas/forecast/jenkfgdas_fcst.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/enkfgdas/post/jenkfgdas_post_master.ecf b/ecf/scripts/enkfgdas/post/jenkfgdas_post_master.ecf index 6627b97c106..4f682a7a0a8 100755 --- a/ecf/scripts/enkfgdas/post/jenkfgdas_post_master.ecf +++ b/ecf/scripts/enkfgdas/post/jenkfgdas_post_master.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gdas/atmos/analysis/jgdas_atmos_analysis.ecf b/ecf/scripts/gdas/atmos/analysis/jgdas_atmos_analysis.ecf index 36b9272204e..cc6eee326d1 100755 --- a/ecf/scripts/gdas/atmos/analysis/jgdas_atmos_analysis.ecf +++ b/ecf/scripts/gdas/atmos/analysis/jgdas_atmos_analysis.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gdas/atmos/analysis/jgdas_atmos_analysis_calc.ecf b/ecf/scripts/gdas/atmos/analysis/jgdas_atmos_analysis_calc.ecf index 41601c4de8a..92c8c0551ef 100755 --- a/ecf/scripts/gdas/atmos/analysis/jgdas_atmos_analysis_calc.ecf +++ b/ecf/scripts/gdas/atmos/analysis/jgdas_atmos_analysis_calc.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gdas/atmos/analysis/jgdas_atmos_analysis_diag.ecf b/ecf/scripts/gdas/atmos/analysis/jgdas_atmos_analysis_diag.ecf index f7663332729..53d9daf734e 100755 --- a/ecf/scripts/gdas/atmos/analysis/jgdas_atmos_analysis_diag.ecf +++ b/ecf/scripts/gdas/atmos/analysis/jgdas_atmos_analysis_diag.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gdas/atmos/gempak/jgdas_atmos_gempak.ecf b/ecf/scripts/gdas/atmos/gempak/jgdas_atmos_gempak.ecf index 754d921f956..b3bb579ca33 100755 --- a/ecf/scripts/gdas/atmos/gempak/jgdas_atmos_gempak.ecf +++ b/ecf/scripts/gdas/atmos/gempak/jgdas_atmos_gempak.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gdas/atmos/gempak/jgdas_atmos_gempak_meta_ncdc.ecf b/ecf/scripts/gdas/atmos/gempak/jgdas_atmos_gempak_meta_ncdc.ecf index 9d66f4bda1f..312d3dcdaa6 100755 --- a/ecf/scripts/gdas/atmos/gempak/jgdas_atmos_gempak_meta_ncdc.ecf +++ b/ecf/scripts/gdas/atmos/gempak/jgdas_atmos_gempak_meta_ncdc.ecf @@ -17,7 +17,6 @@ set -x export model=%model:gdas% export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gdas/atmos/obsproc/dump/jgdas_atmos_tropcy_qc_reloc.ecf b/ecf/scripts/gdas/atmos/obsproc/dump/jgdas_atmos_tropcy_qc_reloc.ecf index 2dd0bdf06ca..c5f838fb5f9 100755 --- a/ecf/scripts/gdas/atmos/obsproc/dump/jgdas_atmos_tropcy_qc_reloc.ecf +++ b/ecf/scripts/gdas/atmos/obsproc/dump/jgdas_atmos_tropcy_qc_reloc.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gdas/atmos/obsproc/prep/jgdas_atmos_emcsfc_sfc_prep.ecf b/ecf/scripts/gdas/atmos/obsproc/prep/jgdas_atmos_emcsfc_sfc_prep.ecf index 7e3282bc952..6ebae609247 100755 --- a/ecf/scripts/gdas/atmos/obsproc/prep/jgdas_atmos_emcsfc_sfc_prep.ecf +++ b/ecf/scripts/gdas/atmos/obsproc/prep/jgdas_atmos_emcsfc_sfc_prep.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gdas/atmos/post/jgdas_atmos_post_manager.ecf b/ecf/scripts/gdas/atmos/post/jgdas_atmos_post_manager.ecf index 1da24c0d46b..9792253ec88 100755 --- a/ecf/scripts/gdas/atmos/post/jgdas_atmos_post_manager.ecf +++ b/ecf/scripts/gdas/atmos/post/jgdas_atmos_post_manager.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gdas/atmos/post/jgdas_atmos_post_master.ecf b/ecf/scripts/gdas/atmos/post/jgdas_atmos_post_master.ecf index f88fdcdaf94..b65be6586ee 100755 --- a/ecf/scripts/gdas/atmos/post/jgdas_atmos_post_master.ecf +++ b/ecf/scripts/gdas/atmos/post/jgdas_atmos_post_master.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gdas/atmos/post_processing/jgdas_atmos_chgres_forenkf.ecf b/ecf/scripts/gdas/atmos/post_processing/jgdas_atmos_chgres_forenkf.ecf index 33fa481a29f..32b024f6632 100755 --- a/ecf/scripts/gdas/atmos/post_processing/jgdas_atmos_chgres_forenkf.ecf +++ b/ecf/scripts/gdas/atmos/post_processing/jgdas_atmos_chgres_forenkf.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gdas/atmos/verf/jgdas_atmos_verfozn.ecf b/ecf/scripts/gdas/atmos/verf/jgdas_atmos_verfozn.ecf index 9c7a1609e74..938611b4bce 100755 --- a/ecf/scripts/gdas/atmos/verf/jgdas_atmos_verfozn.ecf +++ b/ecf/scripts/gdas/atmos/verf/jgdas_atmos_verfozn.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gdas/atmos/verf/jgdas_atmos_verfrad.ecf b/ecf/scripts/gdas/atmos/verf/jgdas_atmos_verfrad.ecf index e2d3bb3463f..dd0c19d6f09 100755 --- a/ecf/scripts/gdas/atmos/verf/jgdas_atmos_verfrad.ecf +++ b/ecf/scripts/gdas/atmos/verf/jgdas_atmos_verfrad.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gdas/atmos/verf/jgdas_atmos_vminmon.ecf b/ecf/scripts/gdas/atmos/verf/jgdas_atmos_vminmon.ecf index 9afd0b50838..b538a18a3dc 100755 --- a/ecf/scripts/gdas/atmos/verf/jgdas_atmos_vminmon.ecf +++ b/ecf/scripts/gdas/atmos/verf/jgdas_atmos_vminmon.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gdas/jgdas_forecast.ecf b/ecf/scripts/gdas/jgdas_forecast.ecf index 69c8e178010..392d5f362fa 100755 --- a/ecf/scripts/gdas/jgdas_forecast.ecf +++ b/ecf/scripts/gdas/jgdas_forecast.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gdas/wave/init/jgdas_wave_init.ecf b/ecf/scripts/gdas/wave/init/jgdas_wave_init.ecf index 208ed2cc529..1f73e43eb11 100755 --- a/ecf/scripts/gdas/wave/init/jgdas_wave_init.ecf +++ b/ecf/scripts/gdas/wave/init/jgdas_wave_init.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ ## Load modules diff --git a/ecf/scripts/gdas/wave/post/jgdas_wave_postpnt.ecf b/ecf/scripts/gdas/wave/post/jgdas_wave_postpnt.ecf index 1899dc152f5..fb45d8fda54 100755 --- a/ecf/scripts/gdas/wave/post/jgdas_wave_postpnt.ecf +++ b/ecf/scripts/gdas/wave/post/jgdas_wave_postpnt.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ ## Load modules diff --git a/ecf/scripts/gdas/wave/post/jgdas_wave_postsbs.ecf b/ecf/scripts/gdas/wave/post/jgdas_wave_postsbs.ecf index 31cca40beda..5212a026d93 100755 --- a/ecf/scripts/gdas/wave/post/jgdas_wave_postsbs.ecf +++ b/ecf/scripts/gdas/wave/post/jgdas_wave_postsbs.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ ## Load modules diff --git a/ecf/scripts/gdas/wave/prep/jgdas_wave_prep.ecf b/ecf/scripts/gdas/wave/prep/jgdas_wave_prep.ecf index 77b44634a90..b1fd9fe32e3 100755 --- a/ecf/scripts/gdas/wave/prep/jgdas_wave_prep.ecf +++ b/ecf/scripts/gdas/wave/prep/jgdas_wave_prep.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ ## Load modules diff --git a/ecf/scripts/gfs/atmos/analysis/jgfs_atmos_analysis.ecf b/ecf/scripts/gfs/atmos/analysis/jgfs_atmos_analysis.ecf index a30eceae576..12653d0e95d 100755 --- a/ecf/scripts/gfs/atmos/analysis/jgfs_atmos_analysis.ecf +++ b/ecf/scripts/gfs/atmos/analysis/jgfs_atmos_analysis.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gfs/atmos/analysis/jgfs_atmos_analysis_calc.ecf b/ecf/scripts/gfs/atmos/analysis/jgfs_atmos_analysis_calc.ecf index 41601c4de8a..92c8c0551ef 100755 --- a/ecf/scripts/gfs/atmos/analysis/jgfs_atmos_analysis_calc.ecf +++ b/ecf/scripts/gfs/atmos/analysis/jgfs_atmos_analysis_calc.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gfs/atmos/gempak/jgfs_atmos_gempak.ecf b/ecf/scripts/gfs/atmos/gempak/jgfs_atmos_gempak.ecf index e01fa35e57e..5f56e7ac17f 100755 --- a/ecf/scripts/gfs/atmos/gempak/jgfs_atmos_gempak.ecf +++ b/ecf/scripts/gfs/atmos/gempak/jgfs_atmos_gempak.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gfs/atmos/gempak/jgfs_atmos_gempak_meta.ecf b/ecf/scripts/gfs/atmos/gempak/jgfs_atmos_gempak_meta.ecf index e9833baa411..4798e2a06ac 100755 --- a/ecf/scripts/gfs/atmos/gempak/jgfs_atmos_gempak_meta.ecf +++ b/ecf/scripts/gfs/atmos/gempak/jgfs_atmos_gempak_meta.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gfs/atmos/gempak/jgfs_atmos_gempak_ncdc_upapgif.ecf b/ecf/scripts/gfs/atmos/gempak/jgfs_atmos_gempak_ncdc_upapgif.ecf index 08686dbca3a..25659058f8c 100755 --- a/ecf/scripts/gfs/atmos/gempak/jgfs_atmos_gempak_ncdc_upapgif.ecf +++ b/ecf/scripts/gfs/atmos/gempak/jgfs_atmos_gempak_ncdc_upapgif.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gfs/atmos/gempak/jgfs_atmos_npoess_pgrb2_0p5deg.ecf b/ecf/scripts/gfs/atmos/gempak/jgfs_atmos_npoess_pgrb2_0p5deg.ecf index 1ff597411a6..da66dfe7f6d 100755 --- a/ecf/scripts/gfs/atmos/gempak/jgfs_atmos_npoess_pgrb2_0p5deg.ecf +++ b/ecf/scripts/gfs/atmos/gempak/jgfs_atmos_npoess_pgrb2_0p5deg.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gfs/atmos/gempak/jgfs_atmos_pgrb2_spec_gempak.ecf b/ecf/scripts/gfs/atmos/gempak/jgfs_atmos_pgrb2_spec_gempak.ecf index df53868b054..df0f9f90f18 100755 --- a/ecf/scripts/gfs/atmos/gempak/jgfs_atmos_pgrb2_spec_gempak.ecf +++ b/ecf/scripts/gfs/atmos/gempak/jgfs_atmos_pgrb2_spec_gempak.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gfs/atmos/obsproc/dump/jgfs_atmos_tropcy_qc_reloc.ecf b/ecf/scripts/gfs/atmos/obsproc/dump/jgfs_atmos_tropcy_qc_reloc.ecf index 2dd0bdf06ca..c5f838fb5f9 100755 --- a/ecf/scripts/gfs/atmos/obsproc/dump/jgfs_atmos_tropcy_qc_reloc.ecf +++ b/ecf/scripts/gfs/atmos/obsproc/dump/jgfs_atmos_tropcy_qc_reloc.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gfs/atmos/obsproc/prep/jgfs_atmos_emcsfc_sfc_prep.ecf b/ecf/scripts/gfs/atmos/obsproc/prep/jgfs_atmos_emcsfc_sfc_prep.ecf index bb0bcf8db74..f2b21cb1680 100755 --- a/ecf/scripts/gfs/atmos/obsproc/prep/jgfs_atmos_emcsfc_sfc_prep.ecf +++ b/ecf/scripts/gfs/atmos/obsproc/prep/jgfs_atmos_emcsfc_sfc_prep.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gfs/atmos/post/jgfs_atmos_post_manager.ecf b/ecf/scripts/gfs/atmos/post/jgfs_atmos_post_manager.ecf index d2e315bcef1..50a71a44ba6 100755 --- a/ecf/scripts/gfs/atmos/post/jgfs_atmos_post_manager.ecf +++ b/ecf/scripts/gfs/atmos/post/jgfs_atmos_post_manager.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gfs/atmos/post/jgfs_atmos_post_master.ecf b/ecf/scripts/gfs/atmos/post/jgfs_atmos_post_master.ecf index ad717147fc6..d8b1e2b5310 100755 --- a/ecf/scripts/gfs/atmos/post/jgfs_atmos_post_master.ecf +++ b/ecf/scripts/gfs/atmos/post/jgfs_atmos_post_master.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% export FHRGRP=%FHRGRP% export FHRLST=%FHRLST% diff --git a/ecf/scripts/gfs/atmos/post_processing/awips_20km_1p0/jgfs_atmos_awips_master.ecf b/ecf/scripts/gfs/atmos/post_processing/awips_20km_1p0/jgfs_atmos_awips_master.ecf index e146f8df329..9108b879a53 100755 --- a/ecf/scripts/gfs/atmos/post_processing/awips_20km_1p0/jgfs_atmos_awips_master.ecf +++ b/ecf/scripts/gfs/atmos/post_processing/awips_20km_1p0/jgfs_atmos_awips_master.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gfs/atmos/post_processing/bufr_sounding/jgfs_atmos_postsnd.ecf b/ecf/scripts/gfs/atmos/post_processing/bufr_sounding/jgfs_atmos_postsnd.ecf index e2ddf7a1e5f..3322aceeb1f 100755 --- a/ecf/scripts/gfs/atmos/post_processing/bufr_sounding/jgfs_atmos_postsnd.ecf +++ b/ecf/scripts/gfs/atmos/post_processing/bufr_sounding/jgfs_atmos_postsnd.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gfs/atmos/post_processing/bulletins/jgfs_atmos_fbwind.ecf b/ecf/scripts/gfs/atmos/post_processing/bulletins/jgfs_atmos_fbwind.ecf index 7443002a0b4..4afac0d2734 100755 --- a/ecf/scripts/gfs/atmos/post_processing/bulletins/jgfs_atmos_fbwind.ecf +++ b/ecf/scripts/gfs/atmos/post_processing/bulletins/jgfs_atmos_fbwind.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gfs/atmos/verf/jgfs_atmos_vminmon.ecf b/ecf/scripts/gfs/atmos/verf/jgfs_atmos_vminmon.ecf index e9922e0751a..2d9e8814ab2 100755 --- a/ecf/scripts/gfs/atmos/verf/jgfs_atmos_vminmon.ecf +++ b/ecf/scripts/gfs/atmos/verf/jgfs_atmos_vminmon.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gfs/jgfs_forecast.ecf b/ecf/scripts/gfs/jgfs_forecast.ecf index 370cd9342d8..26d0c3b80d0 100755 --- a/ecf/scripts/gfs/jgfs_forecast.ecf +++ b/ecf/scripts/gfs/jgfs_forecast.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ # Load modules diff --git a/ecf/scripts/gfs/wave/gempak/jgfs_wave_gempak.ecf b/ecf/scripts/gfs/wave/gempak/jgfs_wave_gempak.ecf index 2cb7f759495..8406f0449c9 100755 --- a/ecf/scripts/gfs/wave/gempak/jgfs_wave_gempak.ecf +++ b/ecf/scripts/gfs/wave/gempak/jgfs_wave_gempak.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ ## Load modules diff --git a/ecf/scripts/gfs/wave/init/jgfs_wave_init.ecf b/ecf/scripts/gfs/wave/init/jgfs_wave_init.ecf index 208ed2cc529..1f73e43eb11 100755 --- a/ecf/scripts/gfs/wave/init/jgfs_wave_init.ecf +++ b/ecf/scripts/gfs/wave/init/jgfs_wave_init.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ ## Load modules diff --git a/ecf/scripts/gfs/wave/post/jgfs_wave_post_bndpnt.ecf b/ecf/scripts/gfs/wave/post/jgfs_wave_post_bndpnt.ecf index 2871a0f1a17..d4de0a97251 100755 --- a/ecf/scripts/gfs/wave/post/jgfs_wave_post_bndpnt.ecf +++ b/ecf/scripts/gfs/wave/post/jgfs_wave_post_bndpnt.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ ## Load modules diff --git a/ecf/scripts/gfs/wave/post/jgfs_wave_post_bndpntbll.ecf b/ecf/scripts/gfs/wave/post/jgfs_wave_post_bndpntbll.ecf index 73015f869fc..528068f0574 100755 --- a/ecf/scripts/gfs/wave/post/jgfs_wave_post_bndpntbll.ecf +++ b/ecf/scripts/gfs/wave/post/jgfs_wave_post_bndpntbll.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ ## Load modules diff --git a/ecf/scripts/gfs/wave/post/jgfs_wave_postpnt.ecf b/ecf/scripts/gfs/wave/post/jgfs_wave_postpnt.ecf index 39e58f01c32..d09204cb2d0 100755 --- a/ecf/scripts/gfs/wave/post/jgfs_wave_postpnt.ecf +++ b/ecf/scripts/gfs/wave/post/jgfs_wave_postpnt.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ ## Load modules diff --git a/ecf/scripts/gfs/wave/post/jgfs_wave_postsbs.ecf b/ecf/scripts/gfs/wave/post/jgfs_wave_postsbs.ecf index 0b0e516bc25..52179a56e2f 100755 --- a/ecf/scripts/gfs/wave/post/jgfs_wave_postsbs.ecf +++ b/ecf/scripts/gfs/wave/post/jgfs_wave_postsbs.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ ## Load modules diff --git a/ecf/scripts/gfs/wave/post/jgfs_wave_prdgen_bulls.ecf b/ecf/scripts/gfs/wave/post/jgfs_wave_prdgen_bulls.ecf index 00f005a877c..f7d0ea1be7a 100755 --- a/ecf/scripts/gfs/wave/post/jgfs_wave_prdgen_bulls.ecf +++ b/ecf/scripts/gfs/wave/post/jgfs_wave_prdgen_bulls.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ ## Load modules diff --git a/ecf/scripts/gfs/wave/post/jgfs_wave_prdgen_gridded.ecf b/ecf/scripts/gfs/wave/post/jgfs_wave_prdgen_gridded.ecf index 8197d580209..1c6ba47c93e 100755 --- a/ecf/scripts/gfs/wave/post/jgfs_wave_prdgen_gridded.ecf +++ b/ecf/scripts/gfs/wave/post/jgfs_wave_prdgen_gridded.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ ## Load modules diff --git a/ecf/scripts/gfs/wave/prep/jgfs_wave_prep.ecf b/ecf/scripts/gfs/wave/prep/jgfs_wave_prep.ecf index 8f93f6d0989..171e737692c 100755 --- a/ecf/scripts/gfs/wave/prep/jgfs_wave_prep.ecf +++ b/ecf/scripts/gfs/wave/prep/jgfs_wave_prep.ecf @@ -16,7 +16,6 @@ set -x export NET=%NET:gfs% export RUN=%RUN% -export CDUMP=%RUN% ############################################################ ## Load modules diff --git a/jobs/JGDAS_ATMOS_ANALYSIS_DIAG b/jobs/JGDAS_ATMOS_ANALYSIS_DIAG index 04655abd4e3..d1c62799a58 100755 --- a/jobs/JGDAS_ATMOS_ANALYSIS_DIAG +++ b/jobs/JGDAS_ATMOS_ANALYSIS_DIAG @@ -7,7 +7,6 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "anal" -c "base anal analdiag" ############################################## # Set variables used in the script ############################################## -export CDUMP="${RUN/enkf}" export DO_CALC_ANALYSIS=${DO_CALC_ANALYSIS:-"YES"} @@ -24,6 +23,7 @@ export gcyc=${GDATE:8:2} export GDUMP="gdas" export GDUMP_ENS="enkf${GDUMP}" +CDUMP="${RUN/enkf}" export OPREFIX="${CDUMP}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export APREFIX="${RUN}.t${cyc}z." diff --git a/jobs/JGDAS_ATMOS_CHGRES_FORENKF b/jobs/JGDAS_ATMOS_CHGRES_FORENKF index eb8f0737330..d69fa3043c9 100755 --- a/jobs/JGDAS_ATMOS_CHGRES_FORENKF +++ b/jobs/JGDAS_ATMOS_CHGRES_FORENKF @@ -7,7 +7,6 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "anal" -c "base anal echgres" ############################################## # Set variables used in the script ############################################## -export CDUMP=${RUN/enkf} export DO_CALC_ANALYSIS=${DO_CALC_ANALYSIS:-"YES"} @@ -15,6 +14,7 @@ export DO_CALC_ANALYSIS=${DO_CALC_ANALYSIS:-"YES"} # Begin JOB SPECIFIC work ############################################## +CDUMP=${RUN/enkf} export APREFIX="${CDUMP}.t${cyc}z." export APREFIX_ENS="${RUN}.t${cyc}z." diff --git a/jobs/JGDAS_ENKF_DIAG b/jobs/JGDAS_ENKF_DIAG index cdf258379f7..ef229e5a621 100755 --- a/jobs/JGDAS_ENKF_DIAG +++ b/jobs/JGDAS_ENKF_DIAG @@ -7,7 +7,6 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "eobs" -c "base anal eobs analdiag edi ############################################## # Set variables used in the script ############################################## -export CDUMP="${RUN/enkf}" export MAKE_NSSTBUFR=${MAKE_NSSTBUFR:-"NO"} export MAKE_ACFTBUFR=${MAKE_ACFTBUFR:-"NO"} @@ -26,6 +25,7 @@ export GDUMP_ENS="enkf${GDUMP}" export CASE=${CASE_ENS} +CDUMP="${RUN/enkf}" export OPREFIX="${CDUMP}.t${cyc}z." export APREFIX="${RUN}.t${cyc}z." export GPREFIX="${GDUMP_ENS}.t${gcyc}z." diff --git a/jobs/JGDAS_ENKF_ECEN b/jobs/JGDAS_ENKF_ECEN index 20a818f6e9f..80cb73947bf 100755 --- a/jobs/JGDAS_ENKF_ECEN +++ b/jobs/JGDAS_ENKF_ECEN @@ -7,7 +7,6 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "ecen" -c "base ecen" ############################################## # Set variables used in the script ############################################## -export CDUMP="${RUN/enkf}" ############################################## # Begin JOB SPECIFIC work @@ -23,6 +22,7 @@ export GDUMP_ENS="enkf${GDUMP}" export CASE=${CASE_ENS} +CDUMP="${RUN/enkf}" export OPREFIX="${CDUMP}.t${cyc}z." export APREFIX="${CDUMP}.t${cyc}z." export APREFIX_ENS="${RUN}.t${cyc}z." diff --git a/jobs/JGDAS_ENKF_POST b/jobs/JGDAS_ENKF_POST index 0f7039d6142..3a3b5b0c719 100755 --- a/jobs/JGDAS_ENKF_POST +++ b/jobs/JGDAS_ENKF_POST @@ -7,7 +7,6 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "epos" -c "base epos" ############################################## # Set variables used in the script ############################################## -export CDUMP=${RUN/enkf} ############################################## diff --git a/jobs/JGDAS_ENKF_SELECT_OBS b/jobs/JGDAS_ENKF_SELECT_OBS index 5f08dadffd6..182a5a04fed 100755 --- a/jobs/JGDAS_ENKF_SELECT_OBS +++ b/jobs/JGDAS_ENKF_SELECT_OBS @@ -7,7 +7,6 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "eobs" -c "base anal eobs" ############################################## # Set variables used in the script ############################################## -export CDUMP=${RUN/enkf} export MAKE_NSSTBUFR=${MAKE_NSSTBUFR:-"NO"} export MAKE_ACFTBUFR=${MAKE_ACFTBUFR:-"NO"} @@ -24,6 +23,7 @@ export gcyc=${GDATE:8:2} export GDUMP="gdas" export GDUMP_ENS="enkf${GDUMP}" +CDUMP=${RUN/enkf} export OPREFIX="${CDUMP}.t${cyc}z." export APREFIX="${RUN}.t${cyc}z." export GPREFIX="${GDUMP_ENS}.t${gcyc}z." diff --git a/jobs/JGDAS_ENKF_SFC b/jobs/JGDAS_ENKF_SFC index d859abeb579..0188c2f12c6 100755 --- a/jobs/JGDAS_ENKF_SFC +++ b/jobs/JGDAS_ENKF_SFC @@ -7,7 +7,6 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "esfc" -c "base esfc" ############################################## # Set variables used in the script ############################################## -export CDUMP="${RUN/enkf}" ############################################## # Begin JOB SPECIFIC work @@ -21,6 +20,7 @@ export gcyc=${GDATE:8:2} export GDUMP="gdas" export GDUMP_ENS="enkf${GDUMP}" +CDUMP="${RUN/enkf}" export OPREFIX="${CDUMP}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export APREFIX="${CDUMP}.t${cyc}z." diff --git a/jobs/JGDAS_FIT2OBS b/jobs/JGDAS_FIT2OBS index 1b371680930..40c6b7347c5 100755 --- a/jobs/JGDAS_FIT2OBS +++ b/jobs/JGDAS_FIT2OBS @@ -8,8 +8,6 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "fit2obs" -c "base fit2obs" # Set variables used in the script ############################################## -export CDUMP=${RUN/enkf} - # Ignore spelling warning; nothing is misspelled # shellcheck disable=SC2153 CDATE=$(${NDATE} -"${VBACKUP_FITS}" "${PDY}${cyc}") # set CDATE to lookback cycle for use in fit2obs package @@ -20,7 +18,7 @@ vcyc=${CDATE:8:2} # These are used by fit2obs, so we can't change them to the standard COM variable names # shellcheck disable=SC2153 YMD=${vday} HH=${vcyc} declare_from_tmpl -rx COM_INA:COM_ATMOS_ANALYSIS_TMPL -RUN=${CDUMP} YMD=${vday} HH=${vcyc} declare_from_tmpl -rx COM_PRP:COM_OBS_TMPL +RUN=${RUN} YMD=${vday} HH=${vcyc} declare_from_tmpl -rx COM_PRP:COM_OBS_TMPL # We want to defer variable expansion, so ignore warning about single quotes # shellcheck disable=SC2016 diff --git a/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_PREP b/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_PREP index 73c5c4db754..28e30ebd728 100755 --- a/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_PREP +++ b/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_PREP @@ -7,7 +7,6 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "ocnanalprep" -c "base ocnanal ocnanal ############################################## # Set variables used in the script ############################################## -export CDUMP=${CDUMP:-${RUN:-"gfs"}} # Ignore possible spelling error (nothing is misspelled) # shellcheck disable=SC2153 GDATE=$(date --utc +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours") @@ -16,9 +15,9 @@ export gPDY=${GDATE:0:8} export gcyc=${GDATE:8:2} export GDUMP=${GDUMP:-"gdas"} -export OPREFIX="${CDUMP}.t${cyc}z." +export OPREFIX="${RUN}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." -export APREFIX="${CDUMP}.t${cyc}z." +export APREFIX="${RUN}.t${cyc}z." # Generate COM variables from templates YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_OBS diff --git a/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_VRFY b/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_VRFY index 96aa9a23a70..0d90c461847 100755 --- a/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_VRFY +++ b/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_VRFY @@ -6,7 +6,6 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "ocnanalprep" -c "base ocnanal ocnanal ############################################## # Set variables used in the script ############################################## -export CDUMP=${CDUMP:-${RUN:-"gfs"}} export GDUMP=${GDUMP:-"gdas"} # Ignore possible spelling error (nothing is misspelled) # shellcheck disable=SC2153 diff --git a/jobs/JGFS_ATMOS_CYCLONE_TRACKER b/jobs/JGFS_ATMOS_CYCLONE_TRACKER index 16a51d5c332..561984a9f2f 100755 --- a/jobs/JGFS_ATMOS_CYCLONE_TRACKER +++ b/jobs/JGFS_ATMOS_CYCLONE_TRACKER @@ -15,7 +15,7 @@ export COMPONENT="atmos" # Set variables used in the exglobal script ############################################## export CDATE=${CDATE:-${PDY}${cyc}} -export CDUMP=${RUN/enkf} +CDUMP=${RUN/enkf} #################################### diff --git a/jobs/JGFS_ATMOS_FSU_GENESIS b/jobs/JGFS_ATMOS_FSU_GENESIS index 89788e6d23e..1b92816b619 100755 --- a/jobs/JGFS_ATMOS_FSU_GENESIS +++ b/jobs/JGFS_ATMOS_FSU_GENESIS @@ -15,7 +15,6 @@ export COMPONENT="atmos" # Set variables used in the exglobal script ############################################## export CDATE=${CDATE:-${PDY}${cyc}} -export CDUMP=${CDUMP:-${RUN:-"gfs"}} #################################### diff --git a/jobs/JGFS_ATMOS_POSTSND b/jobs/JGFS_ATMOS_POSTSND index a038fca9e67..13adb11d7d3 100755 --- a/jobs/JGFS_ATMOS_POSTSND +++ b/jobs/JGFS_ATMOS_POSTSND @@ -7,7 +7,6 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "postsnd" -c "base postsnd" ############################################## # Set variables used in the exglobal script ############################################## -export CDUMP=${RUN/enkf} ######################################## # Runs GFS BUFR SOUNDINGS diff --git a/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC b/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC index 7e30b8ab7f4..906c195164d 100755 --- a/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC +++ b/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC @@ -8,7 +8,6 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "prep" -c "base prep" # Set variables used in the exglobal script ############################################## export CDATE=${CDATE:-${PDY}${cyc}} -export CDUMP=${RUN/enkf} ############################################## diff --git a/jobs/rocoto/prep.sh b/jobs/rocoto/prep.sh index 4c07157b5d8..a885bd1c7f0 100755 --- a/jobs/rocoto/prep.sh +++ b/jobs/rocoto/prep.sh @@ -13,7 +13,7 @@ export job="prep" export jobid="${job}.$$" source "${HOMEgfs}/ush/jjob_header.sh" -e "prep" -c "base prep" -export CDUMP="${RUN/enkf}" +CDUMP="${RUN/enkf}" ############################################################### # Set script and dependency variables From 27879781756beabdff8d9b8436ae4cd995f030f6 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Wed, 3 Jul 2024 19:09:10 +0000 Subject: [PATCH 46/73] Restore CDUMP to Fit2Obs J-job --- jobs/JGDAS_FIT2OBS | 1 + 1 file changed, 1 insertion(+) diff --git a/jobs/JGDAS_FIT2OBS b/jobs/JGDAS_FIT2OBS index 40c6b7347c5..80959221949 100755 --- a/jobs/JGDAS_FIT2OBS +++ b/jobs/JGDAS_FIT2OBS @@ -7,6 +7,7 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "fit2obs" -c "base fit2obs" ############################################## # Set variables used in the script ############################################## +CDUMP=${RUN/enkf} # Ignore spelling warning; nothing is misspelled # shellcheck disable=SC2153 From fbee66b468337a5c1d7f16ae49da5e4d11f0f520 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Wed, 3 Jul 2024 19:14:23 +0000 Subject: [PATCH 47/73] Restore CDUMP to Fit2Obs (part 2). --- jobs/JGDAS_FIT2OBS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/JGDAS_FIT2OBS b/jobs/JGDAS_FIT2OBS index 80959221949..a18b24c594a 100755 --- a/jobs/JGDAS_FIT2OBS +++ b/jobs/JGDAS_FIT2OBS @@ -19,7 +19,7 @@ vcyc=${CDATE:8:2} # These are used by fit2obs, so we can't change them to the standard COM variable names # shellcheck disable=SC2153 YMD=${vday} HH=${vcyc} declare_from_tmpl -rx COM_INA:COM_ATMOS_ANALYSIS_TMPL -RUN=${RUN} YMD=${vday} HH=${vcyc} declare_from_tmpl -rx COM_PRP:COM_OBS_TMPL +RUN=${CDUMP} YMD=${vday} HH=${vcyc} declare_from_tmpl -rx COM_PRP:COM_OBS_TMPL # We want to defer variable expansion, so ignore warning about single quotes # shellcheck disable=SC2016 From 348023c88205fb3edbbc21212e5557276dac54c8 Mon Sep 17 00:00:00 2001 From: David Huber <69919478+DavidHuber-NOAA@users.noreply.github.com> Date: Wed, 3 Jul 2024 15:28:38 -0400 Subject: [PATCH 48/73] Update parm/config/gfs/config.resources --- parm/config/gfs/config.resources | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index 0ae5a902047..90162471e0e 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -170,9 +170,9 @@ case ${step} in wtime="00:10:00" npe_gdas=5 npe_gfs=65 - nth_gfs=1 - npe_node_gdas=$(( npe_node_max / nth_gdas )) - npe_node_gfs=$(( npe_node_max / nth_gfs )) + nth=1 + + npe_node=$(( npe_node_max / nth )) NTASKS_gdas=${npe_gdas} NTASKS_gfs=${npe_gfs} memory_gdas="100GB" From c2783a77da7f6a1076d880d7926c27f296498052 Mon Sep 17 00:00:00 2001 From: David Huber <69919478+DavidHuber-NOAA@users.noreply.github.com> Date: Wed, 3 Jul 2024 15:33:16 -0400 Subject: [PATCH 49/73] Update parm/config/gfs/config.resources --- parm/config/gfs/config.resources | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index 90162471e0e..c00402acef7 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -409,12 +409,9 @@ case ${step} in export layout_y wtime="00:30:00" - npe_gdas=$(( layout_x * layout_y * 6 )) - npe_gfs=$(( layout_x * layout_y * 6 )) - nth_gdas=1 - nth_gfs=1 - npe_node_gdas=$(( npe_node_max / nth_gdas )) - npe_node_gfs=$(( npe_node_max / nth_gfs )) + npe=$(( layout_x * layout_y * 6 )) + nth=1 + npe_node=$(( npe_node_max / nth )) export is_exclusive=True ;; From 4af747dc887a3cdf4f19696a6a9414a4c4eca8c1 Mon Sep 17 00:00:00 2001 From: David Huber <69919478+DavidHuber-NOAA@users.noreply.github.com> Date: Wed, 3 Jul 2024 15:40:10 -0400 Subject: [PATCH 50/73] Export postsndcfp resource variables --- parm/config/gfs/config.resources | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index c00402acef7..bc703939775 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -1097,8 +1097,8 @@ case ${step} in npe=40 nth=8 npe_node=10 - npe_postsndcfp=9 - npe_node_postsndcfp=1 + export npe_postsndcfp=9 + export npe_node_postsndcfp=1 postsnd_req_cores=$(( npe_node * nth )) if (( postsnd_req_cores > npe_node_max )); then npe_node=$(( npe_node_max / nth )) From 408a366664fdcd9c02e8147ecf98d7a97273e582 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Fri, 5 Jul 2024 14:03:08 +0000 Subject: [PATCH 51/73] Remove additional CDUMP references --- jobs/JGDAS_ATMOS_ANALYSIS_DIAG | 3 +-- jobs/JGDAS_ATMOS_CHGRES_FORENKF | 5 ++--- jobs/JGDAS_ENKF_DIAG | 5 ++--- jobs/JGDAS_ENKF_ECEN | 7 +++---- jobs/JGDAS_ENKF_SELECT_OBS | 9 ++++----- jobs/JGDAS_ENKF_SFC | 11 +++++------ jobs/JGDAS_FIT2OBS | 3 +-- jobs/JGFS_ATMOS_CYCLONE_TRACKER | 3 +-- jobs/JGFS_ATMOS_VERIFICATION | 2 +- 9 files changed, 20 insertions(+), 28 deletions(-) diff --git a/jobs/JGDAS_ATMOS_ANALYSIS_DIAG b/jobs/JGDAS_ATMOS_ANALYSIS_DIAG index d1c62799a58..a1e0c9f1d57 100755 --- a/jobs/JGDAS_ATMOS_ANALYSIS_DIAG +++ b/jobs/JGDAS_ATMOS_ANALYSIS_DIAG @@ -23,8 +23,7 @@ export gcyc=${GDATE:8:2} export GDUMP="gdas" export GDUMP_ENS="enkf${GDUMP}" -CDUMP="${RUN/enkf}" -export OPREFIX="${CDUMP}.t${cyc}z." +export OPREFIX="${RUN/enkf}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export APREFIX="${RUN}.t${cyc}z." diff --git a/jobs/JGDAS_ATMOS_CHGRES_FORENKF b/jobs/JGDAS_ATMOS_CHGRES_FORENKF index d69fa3043c9..5747675fe21 100755 --- a/jobs/JGDAS_ATMOS_CHGRES_FORENKF +++ b/jobs/JGDAS_ATMOS_CHGRES_FORENKF @@ -14,11 +14,10 @@ export DO_CALC_ANALYSIS=${DO_CALC_ANALYSIS:-"YES"} # Begin JOB SPECIFIC work ############################################## -CDUMP=${RUN/enkf} -export APREFIX="${CDUMP}.t${cyc}z." +export APREFIX="${RUN/enkf}.t${cyc}z." export APREFIX_ENS="${RUN}.t${cyc}z." -RUN=${CDUMP} YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_ATMOS_HISTORY +RUN=${RUN/enkf} YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_ATMOS_HISTORY MEMDIR="mem001" YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_ATMOS_HISTORY_MEM:COM_ATMOS_HISTORY_TMPL ############################################################### diff --git a/jobs/JGDAS_ENKF_DIAG b/jobs/JGDAS_ENKF_DIAG index ef229e5a621..cc8c933cc81 100755 --- a/jobs/JGDAS_ENKF_DIAG +++ b/jobs/JGDAS_ENKF_DIAG @@ -25,13 +25,12 @@ export GDUMP_ENS="enkf${GDUMP}" export CASE=${CASE_ENS} -CDUMP="${RUN/enkf}" -export OPREFIX="${CDUMP}.t${cyc}z." +export OPREFIX="${RUN/enkf}.t${cyc}z." export APREFIX="${RUN}.t${cyc}z." export GPREFIX="${GDUMP_ENS}.t${gcyc}z." GPREFIX_DET="${GDUMP}.t${gcyc}z." -RUN=${CDUMP} YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_OBS +RUN=${RUN/enkf} YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_OBS MEMDIR="ensstat" YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_ATMOS_ANALYSIS RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \ diff --git a/jobs/JGDAS_ENKF_ECEN b/jobs/JGDAS_ENKF_ECEN index 80cb73947bf..38bf847b383 100755 --- a/jobs/JGDAS_ENKF_ECEN +++ b/jobs/JGDAS_ENKF_ECEN @@ -22,14 +22,13 @@ export GDUMP_ENS="enkf${GDUMP}" export CASE=${CASE_ENS} -CDUMP="${RUN/enkf}" -export OPREFIX="${CDUMP}.t${cyc}z." -export APREFIX="${CDUMP}.t${cyc}z." +export OPREFIX="${RUN/enkf}.t${cyc}z." +export APREFIX="${RUN/enkf}.t${cyc}z." export APREFIX_ENS="${RUN}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export GPREFIX_ENS="${GDUMP_ENS}.t${gcyc}z." -RUN=${CDUMP} YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \ +RUN=${RUN/enkf} YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \ COM_ATMOS_ANALYSIS_DET:COM_ATMOS_ANALYSIS_TMPL MEMDIR="ensstat" YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \ diff --git a/jobs/JGDAS_ENKF_SELECT_OBS b/jobs/JGDAS_ENKF_SELECT_OBS index 182a5a04fed..3cfe48bb2bf 100755 --- a/jobs/JGDAS_ENKF_SELECT_OBS +++ b/jobs/JGDAS_ENKF_SELECT_OBS @@ -23,21 +23,20 @@ export gcyc=${GDATE:8:2} export GDUMP="gdas" export GDUMP_ENS="enkf${GDUMP}" -CDUMP=${RUN/enkf} -export OPREFIX="${CDUMP}.t${cyc}z." +export OPREFIX="${RUN/enkf}.t${cyc}z." export APREFIX="${RUN}.t${cyc}z." export GPREFIX="${GDUMP_ENS}.t${gcyc}z." -APREFIX_DET="${CDUMP}.t${cyc}z." +APREFIX_DET="${RUN/enkf}.t${cyc}z." GPREFIX_DET="${GDUMP}.t${gcyc}z." export GSUFFIX=".ensmean.nc" # Generate COM variables from templates -RUN=${CDUMP} YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_OBS +RUN=${RUN/enkf} YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_OBS MEMDIR='ensstat' YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_ATMOS_ANALYSIS declare -rx COM_ATMOS_ANALYSIS_ENS="${COM_ATMOS_ANALYSIS}" -RUN=${CDUMP} YMD=${PDY} HH=${cyc} declare_from_tmpl -r COM_ATMOS_ANALYSIS_DET:COM_ATMOS_ANALYSIS_TMPL +RUN=${RUN/enkf} YMD=${PDY} HH=${cyc} declare_from_tmpl -r COM_ATMOS_ANALYSIS_DET:COM_ATMOS_ANALYSIS_TMPL MEMDIR='ensstat' RUN=${GDUMP_ENS} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \ COM_ATMOS_ANALYSIS_PREV:COM_ATMOS_ANALYSIS_TMPL \ diff --git a/jobs/JGDAS_ENKF_SFC b/jobs/JGDAS_ENKF_SFC index 0188c2f12c6..1ed10f20c0f 100755 --- a/jobs/JGDAS_ENKF_SFC +++ b/jobs/JGDAS_ENKF_SFC @@ -20,20 +20,19 @@ export gcyc=${GDATE:8:2} export GDUMP="gdas" export GDUMP_ENS="enkf${GDUMP}" -CDUMP="${RUN/enkf}" -export OPREFIX="${CDUMP}.t${cyc}z." +export OPREFIX="${RUN/enkf}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." -export APREFIX="${CDUMP}.t${cyc}z." +export APREFIX="${RUN/enkf}.t${cyc}z." export CASE=${CASE_ENS} -export OPREFIX="${CDUMP}.t${cyc}z." -export APREFIX="${CDUMP}.t${cyc}z." +export OPREFIX="${RUN/enkf}.t${cyc}z." +export APREFIX="${RUN/enkf}.t${cyc}z." export APREFIX_ENS="${RUN}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export GPREFIX_ENS="${GDUMP_ENS}.t${gcyc}z." -RUN=${CDUMP} YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_OBS \ +RUN=${RUN/enkf} YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_OBS \ COM_ATMOS_ANALYSIS_DET:COM_ATMOS_ANALYSIS_TMPL RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \ diff --git a/jobs/JGDAS_FIT2OBS b/jobs/JGDAS_FIT2OBS index a18b24c594a..7e000c95cf2 100755 --- a/jobs/JGDAS_FIT2OBS +++ b/jobs/JGDAS_FIT2OBS @@ -7,7 +7,6 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "fit2obs" -c "base fit2obs" ############################################## # Set variables used in the script ############################################## -CDUMP=${RUN/enkf} # Ignore spelling warning; nothing is misspelled # shellcheck disable=SC2153 @@ -19,7 +18,7 @@ vcyc=${CDATE:8:2} # These are used by fit2obs, so we can't change them to the standard COM variable names # shellcheck disable=SC2153 YMD=${vday} HH=${vcyc} declare_from_tmpl -rx COM_INA:COM_ATMOS_ANALYSIS_TMPL -RUN=${CDUMP} YMD=${vday} HH=${vcyc} declare_from_tmpl -rx COM_PRP:COM_OBS_TMPL +RUN=${RUN/enkf} YMD=${vday} HH=${vcyc} declare_from_tmpl -rx COM_PRP:COM_OBS_TMPL # We want to defer variable expansion, so ignore warning about single quotes # shellcheck disable=SC2016 diff --git a/jobs/JGFS_ATMOS_CYCLONE_TRACKER b/jobs/JGFS_ATMOS_CYCLONE_TRACKER index 561984a9f2f..067de2c4aa5 100755 --- a/jobs/JGFS_ATMOS_CYCLONE_TRACKER +++ b/jobs/JGFS_ATMOS_CYCLONE_TRACKER @@ -15,7 +15,6 @@ export COMPONENT="atmos" # Set variables used in the exglobal script ############################################## export CDATE=${CDATE:-${PDY}${cyc}} -CDUMP=${RUN/enkf} #################################### @@ -70,7 +69,7 @@ fi ############################################################# # Execute the script export pert="p01" -export cmodel=${CDUMP} +export cmodel=${RUN/enkf} export loopnum=1 #-----------input data checking ----------------- diff --git a/jobs/JGFS_ATMOS_VERIFICATION b/jobs/JGFS_ATMOS_VERIFICATION index 85b1c734a83..48133364e5b 100755 --- a/jobs/JGFS_ATMOS_VERIFICATION +++ b/jobs/JGFS_ATMOS_VERIFICATION @@ -9,8 +9,8 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "metp" -c "base metp" ## HOMEgfs : /full/path/to/workflow ## EXPDIR : /full/path/to/config/files ## CDATE : current analysis date (YYYYMMDDHH) -## CDUMP : cycle name (gdas / gfs) ## PDY : current date (YYYYMMDD) +## RUN : cycle name (gdas / gfs) ## cyc : current cycle (HH) ## SDATE_GFS : first date of GFS cycle (YYYYMMDDHHMM) ## METPCASE : METplus verification use case (g2g1 | g2o1 | pcp1) From e34d4e04d7e1847ea26b78a0642f64918b250f91 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Fri, 5 Jul 2024 18:00:02 +0000 Subject: [PATCH 52/73] Rename resource variables npe=>ntasks npe_node=>tasks_per_node npe_node_max=>max_tasks_per_node nth=>threads_per_task wtime=>walltime --- env/AWSPW.env | 45 +- env/GAEA.env | 27 +- env/HERA.env | 77 +- env/HERCULES.env | 83 +- env/JET.env | 75 +- env/ORION.env | 73 +- env/S4.env | 61 +- env/WCOSS2.env | 118 ++- parm/config/gefs/config.resources | 140 ++-- parm/config/gfs/config.eupd | 2 +- parm/config/gfs/config.resources | 931 +++++++++++----------- parm/config/gfs/config.resources.GAEA | 4 +- parm/config/gfs/config.resources.HERA | 18 +- parm/config/gfs/config.resources.HERCULES | 2 +- parm/config/gfs/config.resources.JET | 20 +- parm/config/gfs/config.resources.S4 | 30 +- parm/config/gfs/config.resources.WCOSS2 | 22 +- scripts/exgdas_atmos_chgres_forenkf.sh | 2 +- scripts/exgdas_enkf_update.sh | 2 +- scripts/exglobal_atmos_analysis.sh | 6 +- scripts/exglobal_atmos_products.sh | 4 +- scripts/exglobal_diag.sh | 2 +- workflow/rocoto/tasks.py | 14 +- 23 files changed, 860 insertions(+), 898 deletions(-) diff --git a/env/AWSPW.env b/env/AWSPW.env index 585c03828da..0598c01f259 100755 --- a/env/AWSPW.env +++ b/env/AWSPW.env @@ -21,48 +21,43 @@ ulimit -a # Calculate common variables # Check first if the dependent variables are set -if [[ -n "${npe:-}" && -n "${npe_node_max:-}" && -n "${npe_node:-}" ]]; then - nth_max=$((npe_node_max / npe_node)) - NTHREADSmax=${nth:-${nth_max}} - NTHREADS1=${nth:-1} - [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} - [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} - APRUN="${launcher} -n ${npe}" +if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:-}" ]]; then + max_threads_per_task=$((max_tasks_per_node / tasks_per_node)) + NTHREADSmax=${threads_per_task:-${max_threads_per_task}} + NTHREADS1=${threads_per_task:-1} + [[ ${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}" fi if [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then - ppn="npe_node_${RUN}" - [[ -z "${!ppn+0}" ]] && ppn="npe_node" - nprocs="npe_${RUN}" - [[ -z ${!nprocs+0} ]] && nprocs="npe" - - (( nnodes = (${!nprocs}+${!ppn}-1)/${!ppn} )) - (( ntasks = nnodes*${!ppn} )) + (( 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 - export APRUN_UFS="${launcher} -n ${ntasks}" - unset nprocs ppn nnodes ntasks + export APRUN_UFS="${launcher} -n ${ufs_ntasks}" + unset nnodes ufs_ntasks elif [[ "${step}" = "post" ]]; then export NTHREADS_NP=${NTHREADS1} export APRUN_NP="${APRUN}" - export NTHREADS_DWN=${nth_dwn:-1} - [[ ${NTHREADS_DWN} -gt ${nth_max} ]] && export NTHREADS_DWN=${nth_max} - export APRUN_DWN="${launcher} -n ${npe_dwn}" + export NTHREADS_DWN=${threads_per_task_dwn:-1} + [[ ${NTHREADS_DWN} -gt ${max_threads_per_task} ]] && export NTHREADS_DWN=${max_threads_per_task} + export APRUN_DWN="${launcher} -n ${ntasks_dwn}" elif [[ "${step}" = "ecen" ]]; then export NTHREADS_ECEN=${NTHREADSmax} export APRUN_ECEN="${APRUN}" - export NTHREADS_CHGRES=${nth_chgres:-12} - [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} + export NTHREADS_CHGRES=${threads_per_task_chgres:-12} + [[ ${NTHREADS_CHGRES} -gt ${max_tasks_per_node} ]] && export NTHREADS_CHGRES=${max_tasks_per_node} export APRUN_CHGRES="time" - export NTHREADS_CALCINC=${nth_calcinc:-1} - [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} + export NTHREADS_CALCINC=${threads_per_task_calcinc:-1} + [[ ${NTHREADS_CALCINC} -gt ${max_threads_per_task} ]] && export NTHREADS_CALCINC=${max_threads_per_task} export APRUN_CALCINC="${APRUN}" elif [[ "${step}" = "esfc" ]]; then @@ -70,8 +65,8 @@ elif [[ "${step}" = "esfc" ]]; then export NTHREADS_ESFC=${NTHREADSmax} export APRUN_ESFC="${APRUN}" - export NTHREADS_CYCLE=${nth_cycle:-14} - [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} + export NTHREADS_CYCLE=${threads_per_task_cycle:-14} + [[ ${NTHREADS_CYCLE} -gt ${max_tasks_per_node} ]] && export NTHREADS_CYCLE=${max_tasks_per_node} export APRUN_CYCLE="${APRUN}" elif [[ "${step}" = "epos" ]]; then diff --git a/env/GAEA.env b/env/GAEA.env index 280abca1545..9a9d8b914f3 100755 --- a/env/GAEA.env +++ b/env/GAEA.env @@ -20,15 +20,15 @@ ulimit -a # Calculate common variables # Check first if the dependent variables are set -if [[ -n "${npe:-}" && -n "${npe_node_max:-}" && -n "${npe_node:-}" ]]; then - nth_max=$((npe_node_max / npe_node)) - NTHREADSmax=${nth:-${nth_max}} - NTHREADS1=${nth:-1} - [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} - [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} +if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:-}" ]]; then + max_threads_per_task=$((max_tasks_per_node / tasks_per_node)) + NTHREADSmax=${threads_per_task:-${max_threads_per_task}} + NTHREADS1=${threads_per_task:-1} + [[ ${NTHREADSmax} -gt ${max_threads_per_task} ]] && NTHREADSmax=${max_threads_per_task} + [[ ${NTHREADS1} -gt ${max_threads_per_task} ]] && NTHREADS1=${max_threads_per_task} # This may be useful when Gaea is fully ported, so ignore SC warning # shellcheck disable=SC2034 - APRUN="${launcher} -n ${npe}" + APRUN="${launcher} -n ${ntasks}" fi if [[ "${step}" = "waveinit" ]]; then @@ -40,16 +40,11 @@ if [[ "${step}" = "waveinit" ]]; then elif [[ "${step}" = "fcst" ]]; then - ppn="npe_node_${RUN}" - [[ -z "${!ppn+0}" ]] && ppn="npe_node" - nprocs="npe_${RUN}" - [[ -z ${!nprocs+0} ]] && nprocs="npe" - - (( nnodes = (${!nprocs}+${!ppn}-1)/${!ppn} )) - (( ntasks = nnodes*${!ppn} )) + (( 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 - export APRUN_UFS="${launcher} -n ${ntasks}" - unset nprocs ppn nnodes ntasks + export APRUN_UFS="${launcher} -n ${ufs_ntasks}" + unset nnodes ufs_ntasks elif [[ "${step}" = "atmos_products" ]]; then diff --git a/env/HERA.env b/env/HERA.env index 087c9b6d59e..4b9ce0a3c16 100755 --- a/env/HERA.env +++ b/env/HERA.env @@ -33,15 +33,15 @@ fi # Calculate common variables # Check first if the dependent variables are set -if [[ -n "${npe:-}" && -n "${npe_node_max:-}" && -n "${npe_node:-}" ]]; then - nth_max=$((npe_node_max / npe_node)) - NTHREADSmax=${nth:-${nth_max}} - NTHREADS1=${nth:-1} - NTHREADS2=${nth:-2} - [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} - [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} - [[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} - APRUN="${launcher} -n ${npe}" +if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:-}" ]]; then + max_threads_per_task=$((max_tasks_per_node / tasks_per_node)) + NTHREADSmax=${threads_per_task:-${max_threads_per_task}} + NTHREADS1=${threads_per_task:-1} + NTHREADS2=${threads_per_task:-2} + [[ ${NTHREADSmax} -gt ${max_threads_per_task} ]] && NTHREADSmax=${max_threads_per_task} + [[ ${NTHREADS1} -gt ${max_threads_per_task} ]] && NTHREADS1=${max_threads_per_task} + [[ ${NTHREADS2} -gt ${max_threads_per_task} ]] && NTHREADS2=${max_threads_per_task} + APRUN="${launcher} -n ${ntasks}" fi if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then @@ -145,22 +145,22 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export NTHREADS_GSI=${NTHREADSmax} export APRUN_GSI="${APRUN} --cpus-per-task=${NTHREADS_GSI}" - export NTHREADS_CALCINC=${nth_calcinc:-1} - [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} + export NTHREADS_CALCINC=${threads_per_task_calcinc:-1} + [[ ${NTHREADS_CALCINC} -gt ${max_threads_per_task} ]] && export NTHREADS_CALCINC=${max_threads_per_task} export APRUN_CALCINC="${launcher} \$ncmd --cpus-per-task=${NTHREADS_CALCINC}" - export NTHREADS_CYCLE=${nth_cycle:-12} - [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - npe_cycle=${ntiles:-6} - export APRUN_CYCLE="${launcher} -n ${npe_cycle} --cpus-per-task=${NTHREADS_CYCLE}" + export NTHREADS_CYCLE=${threads_per_task_cycle:-12} + [[ ${NTHREADS_CYCLE} -gt ${max_tasks_per_node} ]] && export NTHREADS_CYCLE=${max_tasks_per_node} + ntasks_cycle=${ntiles:-6} + export APRUN_CYCLE="${launcher} -n ${ntasks_cycle} --cpus-per-task=${NTHREADS_CYCLE}" export NTHREADS_GAUSFCANL=1 - npe_gausfcanl=${npe_gausfcanl:-1} - export APRUN_GAUSFCANL="${launcher} -n ${npe_gausfcanl} --cpus-per-task=${NTHREADS_GAUSFCANL}" + ntasks_gausfcanl=${ntasks_gausfcanl:-1} + export APRUN_GAUSFCANL="${launcher} -n ${ntasks_gausfcanl} --cpus-per-task=${NTHREADS_GAUSFCANL}" elif [[ "${step}" = "sfcanl" ]]; then - export NTHREADS_CYCLE=${nth:-14} + export NTHREADS_CYCLE=${threads_per_task:-14} export APRUN_CYCLE="${APRUN} --cpus-per-task=${NTHREADS_CYCLE}" elif [[ "${step}" = "eobs" ]]; then @@ -178,7 +178,7 @@ elif [[ "${step}" = "eobs" ]]; then elif [[ "${step}" = "eupd" ]]; then export NTHREADS_ENKF=${NTHREADSmax} - export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe}} --cpus-per-task=${NTHREADS_ENKF}" + export APRUN_ENKF="${launcher} -n ${ntasks_enkf:-${ntasks}} --cpus-per-task=${NTHREADS_ENKF}" export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} @@ -186,17 +186,16 @@ elif [[ "${step}" = "eupd" ]]; then elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then - ppn="npe_node_${RUN}" - [[ -z "${!ppn+0}" ]] && ppn="npe_node" - nprocs="npe_${RUN}" - [[ -z ${!nprocs+0} ]] && nprocs="npe" + ppn="tasks_per_node" + [[ -z "${!ppn+0}" ]] && ppn="tasks_per_node" + nprocs="ntasks" + [[ -z ${!nprocs+0} ]] && nprocs="ntasks" - (( nnodes = (${!nprocs}+${!ppn}-1)/${!ppn} )) - (( ntasks = nnodes*${!ppn} )) + (( 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 - export APRUN_UFS="${launcher} -n ${ntasks}" - unset nprocs ppn nnodes ntasks - + export APRUN_UFS="${launcher} -n ${ufs_ntasks}" + unset nnodes ufs_ntasks elif [[ "${step}" = "upp" ]]; then @@ -217,21 +216,21 @@ elif [[ "${step}" = "ecen" ]]; then export NTHREADS_ECEN=${NTHREADSmax} export APRUN_ECEN="${APRUN} --cpus-per-task=${NTHREADS_ECEN}" - export NTHREADS_CHGRES=${nth_chgres:-12} - [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} + export NTHREADS_CHGRES=${threads_per_task_chgres:-12} + [[ ${NTHREADS_CHGRES} -gt ${max_tasks_per_node} ]] && export NTHREADS_CHGRES=${max_tasks_per_node} export APRUN_CHGRES="time" - export NTHREADS_CALCINC=${nth_calcinc:-1} - [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} + export NTHREADS_CALCINC=${threads_per_task_calcinc:-1} + [[ ${NTHREADS_CALCINC} -gt ${max_threads_per_task} ]] && export NTHREADS_CALCINC=${max_threads_per_task} export APRUN_CALCINC="${APRUN} --cpus-per-task=${NTHREADS_CALCINC}" elif [[ "${step}" = "esfc" ]]; then - export NTHREADS_ESFC=${nth_esfc:-${nth_max}} + export NTHREADS_ESFC=${threads_per_task_esfc:-${max_threads_per_task}} export APRUN_ESFC="${APRUN} --cpus-per-task=${NTHREADS_ESFC}" - export NTHREADS_CYCLE=${nth_cycle:-14} - [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} + export NTHREADS_CYCLE=${threads_per_task_cycle:-14} + [[ ${NTHREADS_CYCLE} -gt ${max_tasks_per_node} ]] && export NTHREADS_CYCLE=${max_tasks_per_node} export APRUN_CYCLE="${APRUN} --cpus-per-task=${NTHREADS_CYCLE}" elif [[ "${step}" = "epos" ]]; then @@ -246,9 +245,9 @@ elif [[ "${step}" = "postsnd" ]]; then export NTHREADS_POSTSND=${NTHREADS1} export APRUN_POSTSND="${APRUN} --cpus-per-task=${NTHREADS_POSTSND}" - export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} - [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} - export APRUN_POSTSNDCFP="${launcher} -n ${npe_postsndcfp} ${mpmd_opt}" + export NTHREADS_POSTSNDCFP=${threads_per_task_postsndcfp:-1} + [[ ${NTHREADS_POSTSNDCFP} -gt ${max_threads_per_task} ]] && export NTHREADS_POSTSNDCFP=${max_threads_per_task} + export APRUN_POSTSNDCFP="${launcher} -n ${ntasks_postsndcfp} ${mpmd_opt}" elif [[ "${step}" = "awips" ]]; then @@ -260,7 +259,7 @@ elif [[ "${step}" = "gempak" ]]; then export CFP_MP="YES" export NTHREADS_GEMPAK=${NTHREADS1} - [[ ${NTHREADS_GEMPAK} -gt ${nth_max} ]] && export NTHREADS_GEMPAK=${nth_max} + [[ ${NTHREADS_GEMPAK} -gt ${max_threads_per_task} ]] && export NTHREADS_GEMPAK=${max_threads_per_task} elif [[ "${step}" = "fit2obs" ]]; then diff --git a/env/HERCULES.env b/env/HERCULES.env index 4143c7065d7..1133c3c8c5f 100755 --- a/env/HERCULES.env +++ b/env/HERCULES.env @@ -30,15 +30,15 @@ ulimit -a # Calculate common variables # Check first if the dependent variables are set -if [[ -n "${npe:-}" && -n "${npe_node_max:-}" && -n "${npe_node:-}" ]]; then - nth_max=$((npe_node_max / npe_node)) - NTHREADSmax=${nth:-${nth_max}} - NTHREADS1=${nth:-1} - NTHREADS2=${nth:-2} - [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} - [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} - [[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} - APRUN="${launcher} -n ${npe}" +if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:-}" ]]; then + max_threads_per_task=$((max_tasks_per_node / tasks_per_node)) + NTHREADSmax=${threads_per_task:-${max_threads_per_task}} + NTHREADS1=${threads_per_task:-1} + NTHREADS2=${threads_per_task:-2} + [[ ${NTHREADSmax} -gt ${max_threads_per_task} ]] && NTHREADSmax=${max_threads_per_task} + [[ ${NTHREADS1} -gt ${max_threads_per_task} ]] && NTHREADS1=${max_threads_per_task} + [[ ${NTHREADS2} -gt ${max_threads_per_task} ]] && NTHREADS2=${max_threads_per_task} + APRUN="${launcher} -n ${ntasks}" fi case ${step} in @@ -122,11 +122,11 @@ case ${step} in export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_ocnanalecen)) + max_threads_per_task=$((max_tasks_per_node / tasks_per_node_ocnanalecen)) - export NTHREADS_OCNANALECEN=${nth_ocnanalecen:-${nth_max}} - [[ ${NTHREADS_OCNANALECEN} -gt ${nth_max} ]] && export NTHREADS_OCNANALECEN=${nth_max} - export APRUN_OCNANALECEN="${launcher} -n ${npe_ocnanalecen} --cpus-per-task=${NTHREADS_OCNANALECEN}" + export NTHREADS_OCNANALECEN=${threads_per_task_ocnanalecen:-${max_threads_per_task}} + [[ ${NTHREADS_OCNANALECEN} -gt ${max_threads_per_task} ]] && export NTHREADS_OCNANALECEN=${max_threads_per_task} + export APRUN_OCNANALECEN="${launcher} -n ${ntasks_ocnanalecen} --cpus-per-task=${NTHREADS_OCNANALECEN}" ;; "ocnanalchkpt") @@ -145,26 +145,26 @@ case ${step} in export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - export NTHREADS_GSI=${nth_anal:-${nth_max}} + export NTHREADS_GSI=${threads_per_task_anal:-${max_threads_per_task}} export APRUN_GSI="${APRUN} --cpus-per-task=${NTHREADS_GSI}" - export NTHREADS_CALCINC=${nth_calcinc:-1} - [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} + export NTHREADS_CALCINC=${threads_per_task_calcinc:-1} + [[ ${NTHREADS_CALCINC} -gt ${max_threads_per_task} ]] && export NTHREADS_CALCINC=${max_threads_per_task} export APRUN_CALCINC="${launcher} \$ncmd --cpus-per-task=${NTHREADS_CALCINC}" - export NTHREADS_CYCLE=${nth_cycle:-12} - [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - npe_cycle=${ntiles:-6} - export APRUN_CYCLE="${launcher} -n ${npe_cycle} --cpus-per-task=${NTHREADS_CYCLE}" + export NTHREADS_CYCLE=${threads_per_task_cycle:-12} + [[ ${NTHREADS_CYCLE} -gt ${max_tasks_per_node} ]] && export NTHREADS_CYCLE=${max_tasks_per_node} + ntasks_cycle=${ntiles:-6} + export APRUN_CYCLE="${launcher} -n ${ntasks_cycle} --cpus-per-task=${NTHREADS_CYCLE}" export NTHREADS_GAUSFCANL=1 - npe_gausfcanl=${npe_gausfcanl:-1} - export APRUN_GAUSFCANL="${launcher} -n ${npe_gausfcanl} --cpus-per-task=${NTHREADS_GAUSFCANL}" + ntasks_gausfcanl=${ntasks_gausfcanl:-1} + export APRUN_GAUSFCANL="${launcher} -n ${ntasks_gausfcanl} --cpus-per-task=${NTHREADS_GAUSFCANL}" ;; "sfcanl") - export NTHREADS_CYCLE=${nth:-14} - [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} + export NTHREADS_CYCLE=${threads_per_task:-14} + [[ ${NTHREADS_CYCLE} -gt ${max_tasks_per_node} ]] && export NTHREADS_CYCLE=${max_tasks_per_node} export APRUN_CYCLE="${APRUN} --cpus-per-task=${NTHREADS_CYCLE}" ;; "eobs") @@ -178,7 +178,7 @@ case ${step} in export NTHREADS_GSI=${NTHREADSmax} - [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} + [[ ${NTHREADS_GSI} -gt ${max_threads_per_task} ]] && export NTHREADS_GSI=${max_threads_per_task} export APRUN_GSI="${APRUN} --cpus-per-task=${NTHREADS_GSI}" ;; "eupd") @@ -189,22 +189,17 @@ case ${step} in export NTHREADS_ENKF=${NTHREADSmax} - export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe}} --cpus-per-task=${NTHREADS_ENKF}" + export APRUN_ENKF="${launcher} -n ${ntasks_enkf:-${ntasks}} --cpus-per-task=${NTHREADS_ENKF}" ;; "fcst" | "efcs") export OMP_STACKSIZE=512M - ppn="npe_node_${RUN}" - [[ -z "${!ppn+0}" ]] && ppn="npe_node" - nprocs="npe_${RUN}" - [[ -z ${!nprocs+0} ]] && nprocs="npe" - - (( nnodes = (${!nprocs}+${!ppn}-1)/${!ppn} )) - (( ntasks = nnodes*${!ppn} )) + (( 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 - export APRUN_UFS="${launcher} -n ${ntasks}" - unset nprocs ppn nnodes ntasks + export APRUN_UFS="${launcher} -n ${ufs_ntasks}" + unset nnodes ufs_ntasks ;; "upp") @@ -229,12 +224,12 @@ case ${step} in export NTHREADS_ECEN=${NTHREADSmax} export APRUN_ECEN="${APRUN} --cpus-per-task=${NTHREADS_ECEN}" - export NTHREADS_CHGRES=${nth_chgres:-12} - [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} + export NTHREADS_CHGRES=${threads_per_task_chgres:-12} + [[ ${NTHREADS_CHGRES} -gt ${max_tasks_per_node} ]] && export NTHREADS_CHGRES=${max_tasks_per_node} export APRUN_CHGRES="time" - export NTHREADS_CALCINC=${nth_calcinc:-1} - [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} + export NTHREADS_CALCINC=${threads_per_task_calcinc:-1} + [[ ${NTHREADS_CALCINC} -gt ${max_threads_per_task} ]] && export NTHREADS_CALCINC=${max_threads_per_task} export APRUN_CALCINC="${APRUN} --cpus-per-task=${NTHREADS_CALCINC}" ;; @@ -243,8 +238,8 @@ case ${step} in export NTHREADS_ESFC=${NTHREADSmax} export APRUN_ESFC="${APRUN} --cpus-per-task=${NTHREADS_ESFC}" - export NTHREADS_CYCLE=${nth_cycle:-14} - [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} + export NTHREADS_CYCLE=${threads_per_task_cycle:-14} + [[ ${NTHREADS_CYCLE} -gt ${max_tasks_per_node} ]] && export NTHREADS_CYCLE=${max_tasks_per_node} export APRUN_CYCLE="${APRUN} --cpus-per-task=${NTHREADS_CYCLE}" ;; @@ -261,9 +256,9 @@ case ${step} in export NTHREADS_POSTSND=${NTHREADS1} export APRUN_POSTSND="${APRUN} --cpus-per-task=${NTHREADS_POSTSND}" - export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} - [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} - export APRUN_POSTSNDCFP="${launcher} -n ${npe_postsndcfp} ${mpmd_opt}" + export NTHREADS_POSTSNDCFP=${threads_per_task_postsndcfp:-1} + [[ ${NTHREADS_POSTSNDCFP} -gt ${max_threads_per_task} ]] && export NTHREADS_POSTSNDCFP=${max_threads_per_task} + export APRUN_POSTSNDCFP="${launcher} -n ${ntasks_postsndcfp} ${mpmd_opt}" ;; "awips") diff --git a/env/JET.env b/env/JET.env index 495cc4bc573..9108df7ad00 100755 --- a/env/JET.env +++ b/env/JET.env @@ -21,14 +21,14 @@ ulimit -a # Calculate common variables # Check first if the dependent variables are set -if [[ -n "${npe:-}" && -n "${npe_node_max:-}" && -n "${npe_node:-}" ]]; then - nth_max=$((npe_node_max / npe_node)) - NTHREADSmax=${nth:-${nth_max}} - NTHREADS1=${nth:-1} - [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} - [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} - [[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} - APRUN="${launcher} -n ${npe}" +if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:-}" ]]; then + max_threads_per_task=$((max_tasks_per_node / tasks_per_node)) + NTHREADSmax=${threads_per_task:-${max_threads_per_task}} + NTHREADS1=${threads_per_task:-1} + [[ ${NTHREADSmax} -gt ${max_threads_per_task} ]] && NTHREADSmax=${max_threads_per_task} + [[ ${NTHREADS1} -gt ${max_threads_per_task} ]] && NTHREADS1=${max_threads_per_task} + [[ ${NTHREADS2} -gt ${max_threads_per_task} ]] && NTHREADS2=${max_threads_per_task} + APRUN="${launcher} -n ${ntasks}" fi if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then @@ -61,12 +61,12 @@ elif [[ "${step}" = "atmanlvar" ]]; then elif [[ "${step}" = "atmensanlletkf" ]]; then export NTHREADS_ATMENSANLLETKF=${NTHREADSmax} - export APRUN_ATMENSANLLETKF="${launcher} ${npe}" + export APRUN_ATMENSANLLETKF="${launcher} ${ntasks}" elif [[ "${step}" = "atmensanlfv3inc" ]]; then export NTHREADS_ATMENSANLFV3INC=${NTHREADSmax} - export APRUN_ATMENSANLFV3INC="${launcher} ${npe}" + export APRUN_ATMENSANLFV3INC="${launcher} ${ntasks}" elif [[ "${step}" = "aeroanlrun" ]]; then @@ -115,25 +115,25 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export USE_CFP=${USE_CFP:-"YES"} export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - export NTHREADS_GSI=${nth_anal:-${nth_max}} + export NTHREADS_GSI=${threads_per_task_anal:-${max_threads_per_task}} export APRUN_GSI="${APRUN}" - export NTHREADS_CALCINC=${nth_calcinc:-1} - [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} + export NTHREADS_CALCINC=${threads_per_task_calcinc:-1} + [[ ${NTHREADS_CALCINC} -gt ${max_threads_per_task} ]] && export NTHREADS_CALCINC=${max_threads_per_task} export APRUN_CALCINC="${launcher} \$ncmd" - export NTHREADS_CYCLE=${nth_cycle:-12} - [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - npe_cycle=${ntiles:-6} - export APRUN_CYCLE="${launcher} -n ${npe_cycle}" + export NTHREADS_CYCLE=${threads_per_task_cycle:-12} + [[ ${NTHREADS_CYCLE} -gt ${max_tasks_per_node} ]] && export NTHREADS_CYCLE=${max_tasks_per_node} + ntasks_cycle=${ntiles:-6} + export APRUN_CYCLE="${launcher} -n ${ntasks_cycle}" export NTHREADS_GAUSFCANL=1 - npe_gausfcanl=${npe_gausfcanl:-1} - export APRUN_GAUSFCANL="${launcher} -n ${npe_gausfcanl}" + ntasks_gausfcanl=${ntasks_gausfcanl:-1} + export APRUN_GAUSFCANL="${launcher} -n ${ntasks_gausfcanl}" elif [[ "${step}" = "sfcanl" ]]; then - export NTHREADS_CYCLE=${nth:-14} - [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} + export NTHREADS_CYCLE=${threads_per_task:-14} + [[ ${NTHREADS_CYCLE} -gt ${max_tasks_per_node} ]] && export NTHREADS_CYCLE=${max_tasks_per_node} export APRUN_CYCLE="${APRUN}" elif [[ "${step}" = "eobs" ]]; then @@ -151,7 +151,7 @@ elif [[ "${step}" = "eobs" ]]; then elif [[ "${step}" = "eupd" ]]; then export NTHREADS_ENKF=${NTHREADSmax} - export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe}}" + export APRUN_ENKF="${launcher} -n ${ntasks_enkf:-${ntasks}}" export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} @@ -159,16 +159,11 @@ elif [[ "${step}" = "eupd" ]]; then elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then - ppn="npe_node_${RUN}" - [[ -z "${!ppn+0}" ]] && ppn="npe_node" - nprocs="npe_${RUN}" - [[ -z ${!nprocs+0} ]] && nprocs="npe" - - (( nnodes = (${!nprocs}+${!ppn}-1)/${!ppn} )) - (( ntasks = nnodes*${!ppn} )) + (( 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 - export APRUN_UFS="${launcher} -n ${ntasks}" - unset nprocs ppn nnodes ntasks + export APRUN_UFS="${launcher} -n ${ufs_ntasks}" + unset nnodes ufs_ntasks elif [[ "${step}" = "upp" ]]; then @@ -189,12 +184,12 @@ elif [[ "${step}" = "ecen" ]]; then export NTHREADS_ECEN=${NTHREADSmax} export APRUN_ECEN="${APRUN}" - export NTHREADS_CHGRES=${nth_chgres:-12} - [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} + export NTHREADS_CHGRES=${threads_per_task_chgres:-12} + [[ ${NTHREADS_CHGRES} -gt ${max_tasks_per_node} ]] && export NTHREADS_CHGRES=${max_tasks_per_node} export APRUN_CHGRES="time" - export NTHREADS_CALCINC=${nth_calcinc:-1} - [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} + export NTHREADS_CALCINC=${threads_per_task_calcinc:-1} + [[ ${NTHREADS_CALCINC} -gt ${max_threads_per_task} ]] && export NTHREADS_CALCINC=${max_threads_per_task} export APRUN_CALCINC="${APRUN}" elif [[ "${step}" = "esfc" ]]; then @@ -202,8 +197,8 @@ elif [[ "${step}" = "esfc" ]]; then export NTHREADS_ESFC=${NTHREADSmax} export APRUN_ESFC="${APRUN}" - export NTHREADS_CYCLE=${nth_cycle:-14} - [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} + export NTHREADS_CYCLE=${threads_per_task_cycle:-14} + [[ ${NTHREADS_CYCLE} -gt ${max_tasks_per_node} ]] && export NTHREADS_CYCLE=${max_tasks_per_node} export APRUN_CYCLE="${APRUN}" elif [[ "${step}" = "epos" ]]; then @@ -218,9 +213,9 @@ elif [[ "${step}" = "postsnd" ]]; then export NTHREADS_POSTSND=${NTHREADS1} export APRUN_POSTSND="${APRUN}" - export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} - [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} - export APRUN_POSTSNDCFP="${launcher} -n ${npe_postsndcfp} ${mpmd_opt}" + export NTHREADS_POSTSNDCFP=${threads_per_task_postsndcfp:-1} + [[ ${NTHREADS_POSTSNDCFP} -gt ${max_threads_per_task} ]] && export NTHREADS_POSTSNDCFP=${max_threads_per_task} + export APRUN_POSTSNDCFP="${launcher} -n ${ntasks_postsndcfp} ${mpmd_opt}" elif [[ "${step}" = "awips" ]]; then diff --git a/env/ORION.env b/env/ORION.env index 4613f346fba..e991194d212 100755 --- a/env/ORION.env +++ b/env/ORION.env @@ -28,15 +28,15 @@ ulimit -a # Calculate common variables # Check first if the dependent variables are set -if [[ -n "${npe:-}" && -n "${npe_node_max:-}" && -n "${npe_node:-}" ]]; then - nth_max=$((npe_node_max / npe_node)) - NTHREADSmax=${nth:-${nth_max}} - NTHREADS1=${nth:-1} - NTHREADS2=${nth:-2} - [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} - [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} - [[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} - APRUN="${launcher} -n ${npe}" +if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:-}" ]]; then + max_threads_per_task=$((max_tasks_per_node / tasks_per_node)) + NTHREADSmax=${threads_per_task:-${max_threads_per_task}} + NTHREADS1=${threads_per_task:-1} + NTHREADS2=${threads_per_task:-2} + [[ ${NTHREADSmax} -gt ${max_threads_per_task} ]] && NTHREADSmax=${max_threads_per_task} + [[ ${NTHREADS1} -gt ${max_threads_per_task} ]] && NTHREADS1=${max_threads_per_task} + [[ ${NTHREADS2} -gt ${max_threads_per_task} ]] && NTHREADS2=${max_threads_per_task} + APRUN="${launcher} -n ${ntasks}" fi if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then @@ -144,22 +144,22 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export NTHREADS_GSI=${NTHREADSmax} export APRUN_GSI="${APRUN} --cpus-per-task=${NTHREADS_GSI}" - export NTHREADS_CALCINC=${nth_calcinc:-1} - [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} + export NTHREADS_CALCINC=${threads_per_task_calcinc:-1} + [[ ${NTHREADS_CALCINC} -gt ${max_threads_per_task} ]] && export NTHREADS_CALCINC=${max_threads_per_task} export APRUN_CALCINC="${launcher} \$ncmd --cpus-per-task=${NTHREADS_CALCINC}" - export NTHREADS_CYCLE=${nth_cycle:-12} - [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - npe_cycle=${ntiles:-6} - export APRUN_CYCLE="${launcher} -n ${npe_cycle} --cpus-per-task=${NTHREADS_CYCLE}" + export NTHREADS_CYCLE=${threads_per_task_cycle:-12} + [[ ${NTHREADS_CYCLE} -gt ${max_tasks_per_node} ]] && export NTHREADS_CYCLE=${max_tasks_per_node} + ntasks_cycle=${ntiles:-6} + export APRUN_CYCLE="${launcher} -n ${ntasks_cycle} --cpus-per-task=${NTHREADS_CYCLE}" export NTHREADS_GAUSFCANL=1 - npe_gausfcanl=${npe_gausfcanl:-1} - export APRUN_GAUSFCANL="${launcher} -n ${npe_gausfcanl} --cpus-per-task=${NTHREADS_GAUSFCANL}" + ntasks_gausfcanl=${ntasks_gausfcanl:-1} + export APRUN_GAUSFCANL="${launcher} -n ${ntasks_gausfcanl} --cpus-per-task=${NTHREADS_GAUSFCANL}" elif [[ "${step}" = "sfcanl" ]]; then - export NTHREADS_CYCLE=${nth:-14} - [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} + export NTHREADS_CYCLE=${threads_per_task:-14} + [[ ${NTHREADS_CYCLE} -gt ${max_tasks_per_node} ]] && export NTHREADS_CYCLE=${max_tasks_per_node} export APRUN_CYCLE="${APRUN} --cpus-per-task=${NTHREADS_CYCLE}" elif [[ "${step}" = "eobs" ]]; then @@ -172,7 +172,7 @@ elif [[ "${step}" = "eobs" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" export NTHREADS_GSI=${NTHREADSmax} - [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} + [[ ${NTHREADS_GSI} -gt ${max_threads_per_task} ]] && export NTHREADS_GSI=${max_threads_per_task} export APRUN_GSI="${APRUN} --cpus-per-task=${NTHREADS_GSI}" elif [[ "${step}" = "eupd" ]]; then @@ -182,20 +182,15 @@ elif [[ "${step}" = "eupd" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" export NTHREADS_ENKF=${NTHREADSmax} - export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe}} --cpus-per-task=${NTHREADS_ENKF}" + export APRUN_ENKF="${launcher} -n ${ntasks_enkf:-${ntasks}} --cpus-per-task=${NTHREADS_ENKF}" elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then - ppn="npe_node_${RUN}" - [[ -z "${!ppn+0}" ]] && ppn="npe_node" - nprocs="npe_${RUN}" - [[ -z ${!nprocs+0} ]] && nprocs="npe" - - (( nnodes = (${!nprocs}+${!ppn}-1)/${!ppn} )) - (( ntasks = nnodes*${!ppn} )) + (( 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 - export APRUN_UFS="${launcher} -n ${ntasks}" - unset nprocs ppn nnodes ntasks + export APRUN_UFS="${launcher} -n ${ufs_ntasks}" + unset nnodes ufs_ntasks elif [[ "${step}" = "upp" ]]; then @@ -216,12 +211,12 @@ elif [[ "${step}" = "ecen" ]]; then export NTHREADS_ECEN=${NTHREADSmax} export APRUN_ECEN="${APRUN} --cpus-per-task=${NTHREADS_ECEN}" - export NTHREADS_CHGRES=${nth:-12} - [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} + export NTHREADS_CHGRES=${threads_per_task:-12} + [[ ${NTHREADS_CHGRES} -gt ${max_tasks_per_node} ]] && export NTHREADS_CHGRES=${max_tasks_per_node} export APRUN_CHGRES="time" - export NTHREADS_CALCINC=${nth_calcinc:-1} - [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} + export NTHREADS_CALCINC=${threads_per_task_calcinc:-1} + [[ ${NTHREADS_CALCINC} -gt ${max_threads_per_task} ]] && export NTHREADS_CALCINC=${max_threads_per_task} export APRUN_CALCINC="${APRUN} --cpus-per-task=${NTHREADS_CALCINC}" elif [[ "${step}" = "esfc" ]]; then @@ -229,8 +224,8 @@ elif [[ "${step}" = "esfc" ]]; then export NTHREADS_ESFC=${NTHREADSmax} export APRUN_ESFC="${APRUN} --cpus-per-task=${NTHREADS_ESFC}" - export NTHREADS_CYCLE=${nth_cycle:-14} - [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} + export NTHREADS_CYCLE=${threads_per_task_cycle:-14} + [[ ${NTHREADS_CYCLE} -gt ${max_tasks_per_node} ]] && export NTHREADS_CYCLE=${max_tasks_per_node} export APRUN_CYCLE="${APRUN} --cpus-per-task=${NTHREADS_CYCLE}" elif [[ "${step}" = "epos" ]]; then @@ -245,9 +240,9 @@ elif [[ "${step}" = "postsnd" ]]; then export NTHREADS_POSTSND=${NTHREADS1} export APRUN_POSTSND="${APRUN} --cpus-per-task=${NTHREADS_POSTSND}" - export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} - [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} - export APRUN_POSTSNDCFP="${launcher} -n ${npe_postsndcfp} ${mpmd_opt}" + export NTHREADS_POSTSNDCFP=${threads_per_task_postsndcfp:-1} + [[ ${NTHREADS_POSTSNDCFP} -gt ${max_threads_per_task} ]] && export NTHREADS_POSTSNDCFP=${max_threads_per_task} + export APRUN_POSTSNDCFP="${launcher} -n ${ntasks_postsndcfp} ${mpmd_opt}" elif [[ "${step}" = "awips" ]]; then diff --git a/env/S4.env b/env/S4.env index dcecae4664e..5b1644a242e 100755 --- a/env/S4.env +++ b/env/S4.env @@ -21,13 +21,13 @@ ulimit -a # Calculate common variables # Check first if the dependent variables are set -if [[ -n "${npe:-}" && -n "${npe_node_max:-}" && -n "${npe_node:-}" ]]; then - nth_max=$((npe_node_max / npe_node)) - NTHREADSmax=${nth:-${nth_max}} - NTHREADS1=${nth:-1} - [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} - [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} - APRUN="${launcher} -n ${npe}" +if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:-}" ]]; then + max_threads_per_task=$((max_tasks_per_node / tasks_per_node)) + NTHREADSmax=${threads_per_task:-${max_threads_per_task}} + NTHREADS1=${threads_per_task:-1} + [[ ${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}" fi if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then @@ -109,23 +109,23 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export NTHREADS_GSI=${NTHREADSmax} export APRUN_GSI="${APRUN}" - export NTHREADS_CALCINC=${nth_calcinc:-1} - [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} + export NTHREADS_CALCINC=${threads_per_task_calcinc:-1} + [[ ${NTHREADS_CALCINC} -gt ${max_threads_per_task} ]] && export NTHREADS_CALCINC=${max_threads_per_task} export APRUN_CALCINC="${launcher} \$ncmd" - export NTHREADS_CYCLE=${nth_cycle:-12} - [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - npe_cycle=${ntiles:-6} - export APRUN_CYCLE="${launcher} -n ${npe_cycle}" + export NTHREADS_CYCLE=${threads_per_task_cycle:-12} + [[ ${NTHREADS_CYCLE} -gt ${max_tasks_per_node} ]] && export NTHREADS_CYCLE=${max_tasks_per_node} + ntasks_cycle=${ntiles:-6} + export APRUN_CYCLE="${launcher} -n ${ntasks_cycle}" export NTHREADS_GAUSFCANL=1 - npe_gausfcanl=${npe_gausfcanl:-1} - export APRUN_GAUSFCANL="${launcher} -n ${npe_gausfcanl}" + ntasks_gausfcanl=${ntasks_gausfcanl:-1} + export APRUN_GAUSFCANL="${launcher} -n ${ntasks_gausfcanl}" elif [[ "${step}" = "sfcanl" ]]; then - export NTHREADS_CYCLE=${nth:-14} - [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} + export NTHREADS_CYCLE=${threads_per_task:-14} + [[ ${NTHREADS_CYCLE} -gt ${max_tasks_per_node} ]] && export NTHREADS_CYCLE=${max_tasks_per_node} export APRUN_CYCLE="${APRUN}" elif [[ "${step}" = "eobs" ]]; then @@ -143,7 +143,7 @@ elif [[ "${step}" = "eobs" ]]; then elif [[ "${step}" = "eupd" ]]; then export NTHREADS_ENKF=${NTHREADSmax} - export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe}}" + export APRUN_ENKF="${launcher} -n ${ntasks_enkf:-${ntasks}}" export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} @@ -151,16 +151,11 @@ elif [[ "${step}" = "eupd" ]]; then elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then - ppn="npe_node_${RUN}" - [[ -z "${!ppn+0}" ]] && ppn="npe_node" - nprocs="npe_${RUN}" - [[ -z ${!nprocs+0} ]] && nprocs="npe" - - (( nnodes = (${!nprocs}+${!ppn}-1)/${!ppn} )) - (( ntasks = nnodes*${!ppn} )) + (( 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 - export APRUN_UFS="${launcher} -n ${ntasks}" - unset nprocs ppn nnodes ntasks + export APRUN_UFS="${launcher} -n ${ufs_ntasks}" + unset nnodes ufs_ntasks elif [[ "${step}" = "upp" ]]; then @@ -182,12 +177,12 @@ elif [[ "${step}" = "ecen" ]]; then export NTHREADS_ECEN=${NTHREADSmax} export APRUN_ECEN="${APRUN}" - export NTHREADS_CHGRES=${nth_chgres:-12} - [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} + export NTHREADS_CHGRES=${threads_per_task_chgres:-12} + [[ ${NTHREADS_CHGRES} -gt ${max_tasks_per_node} ]] && export NTHREADS_CHGRES=${max_tasks_per_node} export APRUN_CHGRES="time" - export NTHREADS_CALCINC=${nth_calcinc:-1} - [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} + export NTHREADS_CALCINC=${threads_per_task_calcinc:-1} + [[ ${NTHREADS_CALCINC} -gt ${max_threads_per_task} ]] && export NTHREADS_CALCINC=${max_threads_per_task} export APRUN_CALCINC="${APRUN}" elif [[ "${step}" = "esfc" ]]; then @@ -195,8 +190,8 @@ elif [[ "${step}" = "esfc" ]]; then export NTHREADS_ESFC=${NTHREADSmax} export APRUN_ESFC="${APRUN}" - export NTHREADS_CYCLE=${nth_cycle:-14} - [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} + export NTHREADS_CYCLE=${threads_per_task_cycle:-14} + [[ ${NTHREADS_CYCLE} -gt ${max_tasks_per_node} ]] && export NTHREADS_CYCLE=${max_tasks_per_node} export APRUN_CYCLE="${APRUN}" elif [[ "${step}" = "epos" ]]; then diff --git a/env/WCOSS2.env b/env/WCOSS2.env index 1cd5c9adee5..5828fa53377 100755 --- a/env/WCOSS2.env +++ b/env/WCOSS2.env @@ -15,15 +15,15 @@ export mpmd_opt="--cpu-bind verbose,core cfp" # Calculate common resource variables # Check first if the dependent variables are set -if [[ -n "${npe:-}" && -n "${npe_node_max:-}" && -n "${npe_node:-}" ]]; then - nth_max=$((npe_node_max / npe_node)) - NTHREADSmax=${nth:-${nth_max}} - NTHREADS1=${nth:-1} - NTHREADS2=${nth:-2} - [[ ${NTHREADSmax} -gt ${nth_max} ]] && NTHREADSmax=${nth_max} - [[ ${NTHREADS1} -gt ${nth_max} ]] && NTHREADS1=${nth_max} - [[ ${NTHREADS2} -gt ${nth_max} ]] && NTHREADS2=${nth_max} - APRUN="${launcher} -n ${npe}" +if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:-}" ]]; then + max_threads_per_task=$((max_tasks_per_node / tasks_per_node)) + NTHREADSmax=${threads_per_task:-${max_threads_per_task}} + NTHREADS1=${threads_per_task:-1} + NTHREADS2=${threads_per_task:-2} + [[ ${NTHREADSmax} -gt ${max_threads_per_task} ]] && NTHREADSmax=${max_threads_per_task} + [[ ${NTHREADS1} -gt ${max_threads_per_task} ]] && NTHREADS1=${max_threads_per_task} + [[ ${NTHREADS2} -gt ${max_threads_per_task} ]] && NTHREADS2=${max_threads_per_task} + APRUN="${launcher} -n ${ntasks}" fi if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then @@ -72,7 +72,7 @@ elif [[ "${step}" = "aeroanlrun" ]]; then elif [[ "${step}" = "prepobsaero" ]]; then export NTHREADS_PREPOBSAERO=${NTHREADS1} - export APRUN_PREPOBSAERO="${APRUN} --ppn ${npe_node}--cpu-bind depth --depth=${NTHREADS_PREPOBSAERO}" + export APRUN_PREPOBSAERO="${APRUN} --ppn ${tasks_per_node}--cpu-bind depth --depth=${NTHREADS_PREPOBSAERO}" elif [[ "${step}" = "snowanl" ]]; then @@ -97,23 +97,23 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then fi export NTHREADS_GSI=${NTHREADSmax} - export APRUN_GSI="${APRUN} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_GSI}" + export APRUN_GSI="${APRUN} -ppn ${tasks_per_node} --cpu-bind depth --depth ${NTHREADS_GSI}" - export NTHREADS_CALCINC=${nth_calcinc:-1} - [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} + export NTHREADS_CALCINC=${threads_per_task_calcinc:-1} + [[ ${NTHREADS_CALCINC} -gt ${max_threads_per_task} ]] && export NTHREADS_CALCINC=${max_threads_per_task} export APRUN_CALCINC="${launcher} \$ncmd" - export NTHREADS_CYCLE=${nth_cycle:-14} - [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - npe_cycle=${ntiles:-6} - export APRUN_CYCLE="${launcher} -n ${npe_cycle} -ppn ${npe_node_cycle} --cpu-bind depth --depth ${NTHREADS_CYCLE}" + export NTHREADS_CYCLE=${threads_per_task_cycle:-14} + [[ ${NTHREADS_CYCLE} -gt ${max_tasks_per_node} ]] && export NTHREADS_CYCLE=${max_tasks_per_node} + ntasks_cycle=${ntiles:-6} + export APRUN_CYCLE="${launcher} -n ${ntasks_cycle} -ppn ${tasks_per_node_cycle} --cpu-bind depth --depth ${NTHREADS_CYCLE}" export NTHREADS_GAUSFCANL=1 - npe_gausfcanl=${npe_gausfcanl:-1} - export APRUN_GAUSFCANL="${launcher} -n ${npe_gausfcanl}" + ntasks_gausfcanl=${ntasks_gausfcanl:-1} + export APRUN_GAUSFCANL="${launcher} -n ${ntasks_gausfcanl}" - export NTHREADS_CHGRES=${nth_echgres:-14} - [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} + export NTHREADS_CHGRES=${threads_per_task_echgres:-14} + [[ ${NTHREADS_CHGRES} -gt ${max_tasks_per_node} ]] && export NTHREADS_CHGRES=${max_tasks_per_node} export APRUN_CHGRES="" export CFP_MP=${CFP_MP:-"NO"} @@ -122,8 +122,8 @@ elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then elif [[ "${step}" = "sfcanl" ]]; then - export NTHREADS_CYCLE=${nth:-14} - [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} + export NTHREADS_CYCLE=${threads_per_task:-14} + [[ ${NTHREADS_CYCLE} -gt ${max_tasks_per_node} ]] && export NTHREADS_CYCLE=${max_tasks_per_node} export APRUN_CYCLE="${APRUN}" elif [[ "${step}" = "eobs" ]]; then @@ -133,7 +133,7 @@ elif [[ "${step}" = "eobs" ]]; then export FI_OFI_RXM_SAR_LIMIT=3145728 export NTHREADS_GSI=${NTHREADSmax} - export APRUN_GSI="${APRUN} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_GSI}" + export APRUN_GSI="${APRUN} -ppn ${tasks_per_node} --cpu-bind depth --depth ${NTHREADS_GSI}" export CFP_MP=${CFP_MP:-"NO"} export USE_CFP=${USE_CFP:-"YES"} @@ -147,7 +147,7 @@ elif [[ "${step}" = "eupd" ]]; then export FI_OFI_RXM_SAR_LIMIT=3145728 export NTHREADS_ENKF=${NTHREADSmax} - export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe}} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_ENKF}" + export APRUN_ENKF="${launcher} -n ${ntasks_enkf:-${ntasks}} -ppn ${tasks_per_node} --cpu-bind depth --depth ${NTHREADS_ENKF}" export CFP_MP=${CFP_MP:-"NO"} export USE_CFP=${USE_CFP:-"YES"} @@ -155,33 +155,31 @@ elif [[ "${step}" = "eupd" ]]; then elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then - ppn="npe_node_${RUN}" - [[ -z "${!ppn+0}" ]] && ppn="npe_node" - nprocs="npe_${RUN}" - [[ -z ${!nprocs+0} ]] && nprocs="npe" + ppn="tasks_per_node" + [[ -z "${!ppn+0}" ]] && ppn="tasks_per_node" + nprocs="ntasks" + [[ -z ${!nprocs+0} ]] && nprocs="ntasks" - (( nnodes = (${!nprocs}+${!ppn}-1)/${!ppn} )) - (( ntasks = nnodes*${!ppn} )) + (( 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 - export APRUN_UFS="${launcher} -n ${ntasks} -ppn ${!ppn} --cpu-bind depth --depth 1" - unset nprocs ppn nnodes ntasks + export APRUN_UFS="${launcher} -n ${ntasks} -ppn ${ntasks} --cpu-bind depth --depth 1" + unset nnodes ufs_ntasks # TODO: Why are fcst and efcs so different on WCOSS2? # TODO: Compare these with the ufs-weather-model regression test job card at: # https://github.com/ufs-community/ufs-weather-model/blob/develop/tests/fv3_conf/fv3_qsub.IN_wcoss2 export FI_OFI_RXM_RX_SIZE=40000 export FI_OFI_RXM_TX_SIZE=40000 - if [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then - export OMP_PLACES=cores - export OMP_STACKSIZE=2048M - export MPICH_MPIIO_HINTS="*:romio_cb_write=disable" - export FI_OFI_RXM_SAR_LIMIT=3145728 - fi + export OMP_PLACES=cores + export OMP_STACKSIZE=2048M + export MPICH_MPIIO_HINTS="*:romio_cb_write=disable" + export FI_OFI_RXM_SAR_LIMIT=3145728 elif [[ "${step}" = "upp" ]]; then export NTHREADS_UPP=${NTHREADS1} - export APRUN_UPP="${APRUN} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_UPP}" + export APRUN_UPP="${APRUN} -ppn ${tasks_per_node} --cpu-bind depth --depth ${NTHREADS_UPP}" elif [[ "${step}" = "atmos_products" ]]; then @@ -190,38 +188,38 @@ elif [[ "${step}" = "atmos_products" ]]; then elif [[ "${step}" = "oceanice_products" ]]; then export NTHREADS_OCNICEPOST=${NTHREADS1} - export APRUN_OCNICEPOST="${launcher} -n 1 -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_OCNICEPOST}" + export APRUN_OCNICEPOST="${launcher} -n 1 -ppn ${tasks_per_node} --cpu-bind depth --depth ${NTHREADS_OCNICEPOST}" elif [[ "${step}" = "ecen" ]]; then export NTHREADS_ECEN=${NTHREADSmax} - export APRUN_ECEN="${APRUN} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_ECEN}" + export APRUN_ECEN="${APRUN} -ppn ${tasks_per_node} --cpu-bind depth --depth ${NTHREADS_ECEN}" - export NTHREADS_CHGRES=${nth_chgres:-14} - [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} + export NTHREADS_CHGRES=${threads_per_task_chgres:-14} + [[ ${NTHREADS_CHGRES} -gt ${max_tasks_per_node} ]] && export NTHREADS_CHGRES=${max_tasks_per_node} export APRUN_CHGRES="time" - export NTHREADS_CALCINC=${nth_calcinc:-1} - [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} + export NTHREADS_CALCINC=${threads_per_task_calcinc:-1} + [[ ${NTHREADS_CALCINC} -gt ${max_threads_per_task} ]] && export NTHREADS_CALCINC=${max_threads_per_task} export APRUN_CALCINC="${APRUN}" - export NTHREADS_CYCLE=${nth_cycle:-14} - [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - export APRUN_CYCLE="${APRUN} -ppn ${npe_node_cycle} --cpu-bind depth --depth ${NTHREADS_CYCLE}" + export NTHREADS_CYCLE=${threads_per_task_cycle:-14} + [[ ${NTHREADS_CYCLE} -gt ${max_tasks_per_node} ]] && export NTHREADS_CYCLE=${max_tasks_per_node} + export APRUN_CYCLE="${APRUN} -ppn ${tasks_per_node_cycle} --cpu-bind depth --depth ${NTHREADS_CYCLE}" elif [[ "${step}" = "esfc" ]]; then export NTHREADS_ESFC=${NTHREADSmax} - export APRUN_ESFC="${APRUN} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_ESFC}" + export APRUN_ESFC="${APRUN} -ppn ${tasks_per_node} --cpu-bind depth --depth ${NTHREADS_ESFC}" - export NTHREADS_CYCLE=${nth_cycle:-14} - [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} - export APRUN_CYCLE="${APRUN} -ppn ${npe_node_cycle} --cpu-bind depth --depth ${NTHREADS_CYCLE}" + export NTHREADS_CYCLE=${threads_per_task_cycle:-14} + [[ ${NTHREADS_CYCLE} -gt ${max_tasks_per_node} ]] && export NTHREADS_CYCLE=${max_tasks_per_node} + export APRUN_CYCLE="${APRUN} -ppn ${tasks_per_node_cycle} --cpu-bind depth --depth ${NTHREADS_CYCLE}" elif [[ "${step}" = "epos" ]]; then export NTHREADS_EPOS=${NTHREADSmax} - export APRUN_EPOS="${APRUN} -ppn ${npe_node} --cpu-bind depth --depth ${NTHREADS_EPOS}" + export APRUN_EPOS="${APRUN} -ppn ${tasks_per_node} --cpu-bind depth --depth ${NTHREADS_EPOS}" elif [[ "${step}" = "postsnd" ]]; then @@ -231,24 +229,24 @@ elif [[ "${step}" = "postsnd" ]]; then export NTHREADS_POSTSND=${NTHREADS1} export APRUN_POSTSND="${APRUN} --depth=${NTHREADS_POSTSND} --cpu-bind depth" - export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} - [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} - export APRUN_POSTSNDCFP="${launcher} -np ${npe_postsndcfp} ${mpmd_opt}" + export NTHREADS_POSTSNDCFP=${threads_per_task_postsndcfp:-1} + [[ ${NTHREADS_POSTSNDCFP} -gt ${max_threads_per_task} ]] && export NTHREADS_POSTSNDCFP=${max_threads_per_task} + export APRUN_POSTSNDCFP="${launcher} -np ${ntasks_postsndcfp} ${mpmd_opt}" elif [[ "${step}" = "awips" ]]; then export NTHREADS_AWIPS=${NTHREADS2} - export APRUN_AWIPSCFP="${launcher} -np ${npe} ${mpmd_opt}" + export APRUN_AWIPSCFP="${launcher} -np ${ntasks} ${mpmd_opt}" elif [[ "${step}" = "gempak" ]]; then export NTHREADS_GEMPAK=${NTHREADS1} - export APRUN_GEMPAKCFP="${launcher} -np ${npe} ${mpmd_opt}" + export APRUN_GEMPAKCFP="${launcher} -np ${ntasks} ${mpmd_opt}" elif [[ "${step}" = "fit2obs" ]]; then export NTHREADS_FIT2OBS=${NTHREADS1} - export MPIRUN="${launcher} -np ${npe}" + export MPIRUN="${launcher} -np ${ntasks}" elif [[ "${step}" = "waveawipsbulls" ]]; then diff --git a/parm/config/gefs/config.resources b/parm/config/gefs/config.resources index 4a2831fa970..183829eeb31 100644 --- a/parm/config/gefs/config.resources +++ b/parm/config/gefs/config.resources @@ -16,15 +16,15 @@ step=$1 echo "BEGIN: config.resources" case ${machine} in - "WCOSS2") npe_node_max=128;; - "HERA") npe_node_max=40;; - "ORION") npe_node_max=40;; - "HERCULES") npe_node_max=80;; + "WCOSS2") max_tasks_per_node=128;; + "HERA") max_tasks_per_node=40;; + "ORION") max_tasks_per_node=40;; + "HERCULES") max_tasks_per_node=80;; "JET") case ${PARTITION_BATCH} in - "xjet") npe_node_max=24;; - "vjet" | "sjet") npe_node_max=16;; - "kjet") npe_node_max=40;; + "xjet") max_tasks_per_node=24;; + "vjet" | "sjet") max_tasks_per_node=16;; + "kjet") max_tasks_per_node=40;; *) echo "FATAL ERROR: Unknown partition ${PARTITION_BATCH} specified for ${machine}" exit 3 @@ -32,8 +32,8 @@ case ${machine} in ;; "S4") case ${PARTITION_BATCH} in - "s4") npe_node_max=32;; - "ivy") npe_node_max=20;; + "s4") max_tasks_per_node=32;; + "ivy") max_tasks_per_node=20;; *) echo "FATAL ERROR: Unknown partition ${PARTITION_BATCH} specified for ${machine}" exit 3 @@ -41,39 +41,39 @@ case ${machine} in ;; "AWSPW") export PARTITION_BATCH="compute" - npe_node_max=40 + max_tasks_per_node=40 ;; *) echo "FATAL ERROR: Unknown machine encountered by ${BASH_SOURCE[0]}" exit 2 ;; esac -export npe_node_max +export max_tasks_per_node case ${step} in "stage_ic") - export wtime="00:15:00" - export npe=1 - export npe_node=1 - export nth=1 + export walltime="00:15:00" + export ntasks=1 + export tasks_per_node=1 + export threads=1 export is_exclusive=True ;; "waveinit") - export wtime="00:10:00" - export npe=12 - export nth=1 - export npe_node=$(( npe_node_max / nth )) - export NTASKS=${npe} + export walltime="00:10:00" + export ntasks=12 + export threads=1 + export tasks_per_node=$(( max_tasks_per_node / threads )) + export NTASKS=${ntasks} export memory="2GB" ;; "prep_emissions") - export wtime="00:10:00" - export npe=1 - export nth=1 - export npe_node=$(( npe_node_max / nth )) + export walltime="00:10:00" + export ntasks=1 + export threads=1 + export tasks_per_node=$(( max_tasks_per_node / threads )) export memory="1GB" ;; @@ -180,20 +180,20 @@ case ${step} in echo "Total PETS for ${_RUN} = ${NTASKS_TOT}" - declare -x "npe_${_RUN}"="${NTASKS_TOT}" - declare -x "nth_${_RUN}"="${UFS_THREADS}" - declare -x "npe_node_${_RUN}"="${npe_node_max}" + declare -x "ntasks_${_RUN}"="${NTASKS_TOT}" + declare -x "threads_per_task_${_RUN}"="${UFS_THREADS}" + declare -x "tasks_per_node_${_RUN}"="${max_tasks_per_node}" done case "${CASE}" in "C48" | "C96" | "C192") - declare -x "wtime_gefs"="03:00:00" - declare -x "wtime_gfs"="03:00:00" + declare -x "walltime_gefs"="03:00:00" + declare -x "walltime_gfs"="03:00:00" ;; "C384" | "C768" | "C1152") - declare -x "wtime_gefs"="06:00:00" - declare -x "wtime_gfs"="06:00:00" + declare -x "walltime_gefs"="06:00:00" + declare -x "walltime_gfs"="06:00:00" ;; *) echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${CASE}" @@ -206,77 +206,77 @@ case ${step} in ;; "atmos_products") - export wtime="00:15:00" - export npe=24 - export nth=1 - export npe_node="${npe}" + export walltime="00:15:00" + export ntasks=24 + export threads_per_task=1 + export tasks_per_node="${ntasks}" export is_exclusive=True ;; "atmos_ensstat") - export wtime="00:30:00" - export npe=6 - export nth=1 - export npe_node="${npe}" + export walltime="00:30:00" + export ntasks=6 + export threads_per_task=1 + export tasks_per_node="${ntasks}" export is_exclusive=True ;; "oceanice_products") - export wtime="00:15:00" - export npe=1 - export npe_node=1 - export nth=1 + export walltime="00:15:00" + export ntasks=1 + export tasks_per_node=1 + export threads_per_task=1 export memory="96GB" ;; "wavepostsbs") - export wtime="03:00:00" - export npe=1 - export nth=1 - export npe_node=$(( npe_node_max / nth )) - export NTASKS=${npe} + export walltime="03:00:00" + export ntasks=1 + export threads_per_task=1 + export tasks_per_node=$(( max_tasks_per_node / threads_per_task )) + export NTASKS=${ntasks} export memory="10GB" ;; # The wavepost*pnt* jobs are I/O heavy and do not scale well to large nodes. # Limit the number of tasks/node to 40. "wavepostbndpnt") - export wtime="03:00:00" - export npe=240 - export nth=1 - export npe_node=$(( npe_node_max / nth )) + export walltime="03:00:00" + export ntasks=240 + export threads_per_task=1 + export tasks_per_node=$(( max_tasks_per_node / threads_per_task )) export is_exclusive=True - if [[ ${npe_node} -gt 40 ]]; then - export npe_node=40 + if [[ ${tasks_per_node} -gt 40 ]]; then + export tasks_per_node=40 export is_exclusive=False fi - export NTASKS=${npe} + export NTASKS=${ntasks} ;; "wavepostbndpntbll") - export wtime="01:00:00" - export npe=448 - export nth=1 - export npe_node=$(( npe_node_max / nth )) + export walltime="01:00:00" + export ntasks=448 + export threads_per_task=1 + export tasks_per_node=$(( max_tasks_per_node / threads_per_task )) export is_exclusive=True - if [[ ${npe_node} -gt 40 ]]; then - export npe_node=40 + if [[ ${tasks_per_node} -gt 40 ]]; then + export tasks_per_node=40 export is_exclusive=False fi - export NTASKS=${npe} + export NTASKS=${ntasks} ;; "wavepostpnt") - export wtime="04:00:00" - export npe=200 - export nth=1 - export npe_node=$(( npe_node_max / nth )) + export walltime="04:00:00" + export ntasks=200 + export threads_per_task=1 + export tasks_per_node=$(( max_tasks_per_node / threads_per_task )) export is_exclusive=True - if [[ ${npe_node} -gt 40 ]]; then - export npe_node=40 + if [[ ${tasks_per_node} -gt 40 ]]; then + export tasks_per_node=40 export is_exclusive=False fi - export NTASKS=${npe} + export NTASKS=${ntasks} ;; *) @@ -292,7 +292,7 @@ if [[ -f "${EXPDIR}/config.resources.${machine}" ]]; then fi # Check for RUN-specific variables and export them -for resource_var in nth npe npe_node NTASKS memory wtime; do +for resource_var in threads_per_task ntasks tasks_per_node NTASKS memory walltime; do run_resource_var="${resource_var}_${RUN}" if [[ -n "${!run_resource_var+0}" ]]; then declare -x "${resource_var}"="${!run_resource_var}" diff --git a/parm/config/gfs/config.eupd b/parm/config/gfs/config.eupd index a6e3513558f..2ff48240aed 100644 --- a/parm/config/gfs/config.eupd +++ b/parm/config/gfs/config.eupd @@ -8,7 +8,7 @@ echo "BEGIN: config.eupd" # Get task specific resources . $EXPDIR/config.resources eupd -export npe_enkf=${npe} +export ntasks_enkf=${ntasks} # Use NAM_ENKF below for serial EnKF ##export NAM_ENKF="analpertwtnh=0.9,analpertwtsh=0.9,analpertwttr=0.9" diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index bc703939775..1d64bc1d567 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -37,49 +37,49 @@ echo "BEGIN: config.resources" case ${machine} in "WCOSS2") - npe_node_max=128 + max_tasks_per_node=128 # shellcheck disable=SC2034 mem_node_max="500GB" ;; "HERA") - npe_node_max=40 + max_tasks_per_node=40 # shellcheck disable=SC2034 mem_node_max="96GB" ;; "GAEA") - npe_node_max=128 + max_tasks_per_node=128 # shellcheck disable=SC2034 mem_node_max="251GB" ;; "ORION") - npe_node_max=40 + max_tasks_per_node=40 # shellcheck disable=SC2034 mem_node_max="192GB" ;; "HERCULES") - npe_node_max=80 + max_tasks_per_node=80 # shellcheck disable=SC2034 mem_node_max="512GB" ;; "JET") case ${PARTITION_BATCH} in "xjet") - npe_node_max=24 + max_tasks_per_node=24 # shellcheck disable=SC2034 mem_node_max="61GB" ;; "vjet") - npe_node_max=16 + max_tasks_per_node=16 # shellcheck disable=SC2034 mem_node_max="61GB" ;; "sjet") - npe_node_max=16 + max_tasks_per_node=16 # shellcheck disable=SC2034 mem_node_max="29GB" ;; "kjet") - npe_node_max=40 + max_tasks_per_node=40 # shellcheck disable=SC2034 mem_node_max="88GB" ;; @@ -90,12 +90,12 @@ case ${machine} in ;; "S4") case ${PARTITION_BATCH} in - "s4") npe_node_max=32 + "s4") max_tasks_per_node=32 # shellcheck disable=SC2034 mem_node_max="168GB" ;; "ivy") - npe_node_max=20 + max_tasks_per_node=20 # shellcheck disable=SC2034 mem_node_max="128GB" ;; @@ -106,13 +106,13 @@ case ${machine} in ;; "AWSPW") export PARTITION_BATCH="compute" - npe_node_max=40 + max_tasks_per_node=40 # TODO Supply a max mem/node value for AWS # shellcheck disable=SC2034 mem_node_max="" ;; "CONTAINER") - npe_node_max=1 + max_tasks_per_node=1 # TODO Supply a max mem/node value for a container # shellcheck disable=SC2034 mem_node_max="" @@ -123,69 +123,69 @@ case ${machine} in ;; esac -export npe_node_max +export max_tasks_per_node case ${step} in "prep") - wtime='00:30:00' - npe=4 - npe_node=2 - nth=1 + walltime='00:30:00' + ntasks=4 + tasks_per_node=2 + threads_per_task=1 memory="40GB" ;; "prepsnowobs") - wtime="00:05:00" - npe=1 - nth=1 - npe_node=1 + walltime="00:05:00" + ntasks=1 + threads_per_task=1 + tasks_per_node=1 ;; "prepatmiodaobs") - wtime="00:30:00" - npe=1 - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="00:30:00" + ntasks=1 + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) ;; "aerosol_init") - wtime="00:05:00" - npe=1 - nth=1 - npe_node=$(( npe_node_max / nth )) - NTASKS=${npe} + walltime="00:05:00" + ntasks=1 + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) + NTASKS=${ntasks} memory="6GB" ;; "waveinit") - wtime="00:10:00" - npe=12 - nth=1 - npe_node=$(( npe_node_max / nth )) - NTASKS=${npe} + walltime="00:10:00" + ntasks=12 + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) + NTASKS=${ntasks} memory="2GB" ;; "waveprep") - wtime="00:10:00" - npe_gdas=5 - npe_gfs=65 - nth=1 - - npe_node=$(( npe_node_max / nth )) - NTASKS_gdas=${npe_gdas} - NTASKS_gfs=${npe_gfs} + walltime="00:10:00" + ntasks_gdas=5 + ntasks_gfs=65 + threads_per_task=1 + + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) + NTASKS_gdas=${ntasks_gdas} + NTASKS_gfs=${ntasks_gfs} memory_gdas="100GB" memory_gfs="150GB" ;; "wavepostsbs") - wtime_gdas="00:20:00" - wtime_gfs="03:00:00" - npe=8 - nth=1 - npe_node=$(( npe_node_max / nth )) - NTASKS=${npe} + walltime_gdas="00:20:00" + walltime_gfs="03:00:00" + ntasks=8 + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) + NTASKS=${ntasks} memory_gdas="10GB" memory_gfs="10GB" ;; @@ -193,68 +193,68 @@ case ${step} in # The wavepost*pnt* jobs are I/O heavy and do not scale well to large nodes. # Limit the number of tasks/node to 40. "wavepostbndpnt") - wtime="03:00:00" - npe=240 - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="03:00:00" + ntasks=240 + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) export is_exclusive=True - if [[ ${npe_node} -gt 40 ]]; then - npe_node=40 + if [[ ${tasks_per_node} -gt 40 ]]; then + tasks_per_node=40 export is_exclusive=False fi - NTASKS=${npe} + NTASKS=${ntasks} ;; "wavepostbndpntbll") - wtime="01:00:00" - npe=448 - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="01:00:00" + ntasks=448 + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) export is_exclusive=True - if [[ ${npe_node} -gt 40 ]]; then - npe_node=40 + if [[ ${tasks_per_node} -gt 40 ]]; then + tasks_per_node=40 export is_exclusive=False fi - NTASKS=${npe} + NTASKS=${ntasks} ;; "wavepostpnt") - wtime="04:00:00" - npe=200 - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="04:00:00" + ntasks=200 + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) export is_exclusive=True - if [[ ${npe_node} -gt 40 ]]; then - npe_node=40 + if [[ ${tasks_per_node} -gt 40 ]]; then + tasks_per_node=40 export is_exclusive=False fi - NTASKS=${npe} + NTASKS=${ntasks} ;; "wavegempak") - wtime="02:00:00" - npe=1 - nth=1 - npe_node=$(( npe_node_max / nth )) - NTASKS=${npe} + walltime="02:00:00" + ntasks=1 + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) + NTASKS=${ntasks} memory="1GB" ;; "waveawipsbulls") - wtime="00:20:00" - npe=1 - nth=1 - npe_node=$(( npe_node_max / nth )) - NTASKS=${npe} + walltime="00:20:00" + ntasks=1 + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) + NTASKS=${ntasks} export is_exclusive=True ;; "waveawipsgridded") - wtime="02:00:00" - npe=1 - nth=1 - npe_node=$(( npe_node_max / nth )) - NTASKS=${npe} + walltime="02:00:00" + ntasks=1 + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) + NTASKS=${ntasks} memory_gfs="1GB" ;; @@ -265,10 +265,10 @@ case ${step} in export layout_gsib_x=$(( layout_x * 3 )) export layout_gsib_y=$(( layout_y * 2 )) - wtime="00:10:00" - npe=1 - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="00:10:00" + ntasks=1 + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) memory="3072M" ;; @@ -276,13 +276,13 @@ case ${step} in export layout_x=${layout_x_atmanl} export layout_y=${layout_y_atmanl} - wtime="00:30:00" - npe_gdas=$(( layout_x * layout_y * 6 )) - npe_gfs=$(( layout_x * layout_y * 6 )) - nth_gdas=1 - nth_gfs=${nth_gdas} - npe_node_gdas=$(( npe_node_max / nth_gdas )) - npe_node_gfs=$(( npe_node_max / nth_gfs )) + walltime="00:30:00" + ntasks_gdas=$(( layout_x * layout_y * 6 )) + ntasks_gfs=$(( layout_x * layout_y * 6 )) + threads_per_task_gdas=1 + threads_per_task_gfs=${threads_per_task_gdas} + tasks_per_node_gdas=$(( max_tasks_per_node / threads_per_task_gdas )) + tasks_per_node_gfs=$(( max_tasks_per_node / threads_per_task_gfs )) memory="96GB" export is_exclusive=True ;; @@ -291,22 +291,22 @@ case ${step} in export layout_x=${layout_x_atmanl} export layout_y=${layout_y_atmanl} - wtime="00:30:00" - npe_gdas=$(( layout_x * layout_y * 6 )) - npe_gfs=$(( layout_x * layout_y * 6 )) - nth_gdas=1 - nth_gfs=${nth_gdas} - npe_node_gdas=$(( npe_node_max / nth_gdas )) - npe_node_gfs=$(( npe_node_max / nth_gfs )) + walltime="00:30:00" + ntasks_gdas=$(( layout_x * layout_y * 6 )) + ntasks_gfs=$(( layout_x * layout_y * 6 )) + threads_per_task_gdas=1 + threads_per_task_gfs=${threads_per_task_gdas} + tasks_per_node_gdas=$(( max_tasks_per_node / threads_per_task_gdas )) + tasks_per_node_gfs=$(( max_tasks_per_node / threads_per_task_gfs )) memory="96GB" export is_exclusive=True ;; "atmanlfinal") - wtime="00:30:00" - npe=${npe_node_max} - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="00:30:00" + ntasks=${tasks_per_node_max} + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) export is_exclusive=True ;; @@ -333,17 +333,17 @@ case ${step} in export layout_x export layout_y - wtime="00:15:00" - npe=$(( layout_x * layout_y * 6 )) - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="00:15:00" + ntasks=$(( layout_x * layout_y * 6 )) + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) ;; "prepobsaero") - wtime="00:30:00" - npe=1 - nth=1 - npe_node=1 + walltime="00:30:00" + ntasks=1 + threads_per_task=1 + tasks_per_node=1 memory="96GB" ;; @@ -374,10 +374,10 @@ case ${step} in export layout_x export layout_y - wtime="00:10:00" - npe=1 - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="00:10:00" + ntasks=1 + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) memory="3072M" ;; @@ -408,68 +408,67 @@ case ${step} in export layout_x export layout_y - wtime="00:30:00" - npe=$(( layout_x * layout_y * 6 )) - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="00:30:00" + ntasks=$(( layout_x * layout_y * 6 )) + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) export is_exclusive=True ;; "aeroanlfinal") - wtime="00:10:00" - npe=1 - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="00:10:00" + ntasks=1 + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) memory="3072M" ;; "ocnanalprep") - wtime="00:10:00" - npe=1 - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="00:10:00" + ntasks=1 + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) memory="24GB" ;; "prepoceanobs") - wtime="00:10:00" - npe=1 - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="00:10:00" + ntasks=1 + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) memory="48GB" ;; "ocnanalbmat") - npes=16 + ntasks=16 case ${OCNRES} in - "025") npes=480;; - "050") npes=16;; - "500") npes=16;; + "025") ntasks=480;; + "050") ntasks=16;; + "500") ntasks=16;; *) echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${OCNRES}" exit 4 esac - wtime="00:30:00" - npe=${npes} - nth=1 + walltime="00:30:00" + threads_per_task=1 export is_exclusive=True - npe_node=$(( npe_node_max / nth )) + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) ;; "ocnanalrun") - npes=16 + ntasks=16 case ${OCNRES} in "025") - npes=480 + ntasks=480 memory="96GB" ;; "050") - npes=16 + ntasks=16 memory="96GB" ;; "500") - npes=16 + ntasks=16 memory="24GB" ;; *) @@ -477,26 +476,25 @@ case ${step} in exit 4 esac - wtime="00:15:00" - npe=${npes} - nth=1 + walltime="00:15:00" + threads_per_task=1 export is_exclusive=True - npe_node=$(( npe_node_max / nth )) + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) ;; "ocnanalecen") - npes=16 + ntasks=16 case ${OCNRES} in "025") - npes=40 + ntasks=40 memory="96GB" ;; "050") - npes=16 + ntasks=16 memory="96GB" ;; "500") - npes=16 + ntasks=16 memory="24GB" ;; *) @@ -504,26 +502,25 @@ case ${step} in exit 4 esac - wtime="00:10:00" - npe=${npes} - nth=1 + walltime="00:10:00" + threads_per_task=1 export is_exclusive=True - npe_node=$(( npe_node_max / nth )) + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) ;; "ocnanalletkf") - npes=16 + ntasks=16 case ${OCNRES} in "025") - npes=480 + ntasks=480 memory="96GB" ;; "050") - npes=16 + ntasks=16 memory="96GB" ;; "500") - npes=16 + ntasks=16 memory="24GB" ;; *) @@ -531,89 +528,87 @@ case ${step} in exit 4 esac - wtime="00:10:00" - npe=${npes} - nth=1 + walltime="00:10:00" + threads_per_task=1 export is_exclusive=True - npe_node=$(( npe_node_max / nth )) + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) ;; "ocnanalchkpt") - wtime="00:10:00" - npe=1 - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="00:10:00" + ntasks=1 + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) case ${OCNRES} in "025") memory="128GB" - npes=40;; + ntasks=40;; "050") memory="32GB" - npes=16;; + ntasks=16;; "500") memory="32GB" - npes=8;; + ntasks=8;; *) echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${OCNRES}" exit 4 esac - npe=${npes} ;; "ocnanalpost") - wtime="00:30:00" - npe=${npe_node_max} - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="00:30:00" + ntasks=${max_tasks_per_node} + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) ;; "ocnanalvrfy") - wtime="00:35:00" - npe=1 - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="00:35:00" + ntasks=1 + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) memory="24GB" ;; "anal") - wtime_gdas="01:20:00" - wtime_gfs="01:00:00" + walltime_gdas="01:20:00" + walltime_gfs="01:00:00" case ${CASE} in "C768") - npe_gdas=780 - npe_gfs=825 - nth=5 + ntasks_gdas=780 + ntasks_gfs=825 + threads_per_task=5 ;; "C384") - npe_gdas=160 - npe_gfs=160 - nth=10 + ntasks_gdas=160 + ntasks_gfs=160 + threads_per_task=10 ;; "C192" | "C96" | "C48") - npe_gdas=84 - npe_gfs=84 - nth=5 + ntasks_gdas=84 + ntasks_gfs=84 + threads_per_task=5 ;; *) echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${CASE}" exit 4 ;; esac - npe_node=$(( npe_node_max / nth )) - export nth_cycle=${nth} - export npe_node_cycle=$(( npe_node_max / nth_cycle )) + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) + export threads_per_task_cycle=${threads_per_task} + export tasks_per_node_cycle=$(( max_tasks_per_node / threads_per_task_cycle )) export is_exclusive=True ;; "analcalc") - wtime="00:15:00" - npe=127 - export ntasks="${npe}" - nth=1 - npe_node=$(( npe_node_max / nth )) - export nth_echgres_gdas=4 - export nth_echgres_gfs=12 + walltime="00:15:00" + ntasks=127 + export ntasks="${ntasks}" + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) + export threads_per_task_echgres_gdas=4 + export threads_per_task_echgres_gfs=12 export is_exclusive=True memory="48GB" if [[ "${CASE}" == "C384" || "${CASE}" == "C768" ]]; then @@ -622,18 +617,18 @@ case ${step} in ;; "analdiag") - wtime="00:15:00" - npe=96 # Should be at least twice npe - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="00:15:00" + ntasks=96 # Should be at least twice ediag's tasks + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) memory="48GB" ;; "sfcanl") - wtime="00:20:00" - npe=${ntiles:-6} - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="00:20:00" + ntasks=${ntiles:-6} + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) export is_exclusive=True ;; @@ -763,29 +758,29 @@ case ${step} in echo "Total PETS for ${_RUN} = ${NTASKS_TOT}" - declare -x "npe_${_RUN}"="${NTASKS_TOT}" - declare -x "nth_${_RUN}"="${UFS_THREADS}" - declare -x "npe_node_${_RUN}"="${npe_node_max}" + declare -x "ntasks_${_RUN}"="${NTASKS_TOT}" + declare -x "threads_per_task_${_RUN}"="${UFS_THREADS}" + declare -x "tasks_per_node_${_RUN}"="${max_tasks_per_node}" done case "${CASE}" in "C48" | "C96" | "C192") - declare -x "wtime_gdas"="00:20:00" - declare -x "wtime_enkfgdas"="00:20:00" - declare -x "wtime_gfs"="03:00:00" - declare -x "wtime_enkfgfs"="00:20:00" + declare -x "walltime_gdas"="00:20:00" + declare -x "walltime_enkfgdas"="00:20:00" + declare -x "walltime_gfs"="03:00:00" + declare -x "walltime_enkfgfs"="00:20:00" ;; "C384") - declare -x "wtime_gdas"="00:30:00" - declare -x "wtime_enkfgdas"="00:30:00" - declare -x "wtime_gfs"="06:00:00" - declare -x "wtime_enkfgfs"="00:30:00" + declare -x "walltime_gdas"="00:30:00" + declare -x "walltime_enkfgdas"="00:30:00" + declare -x "walltime_gfs"="06:00:00" + declare -x "walltime_enkfgfs"="00:30:00" ;; "C768" | "C1152") # Not valid resolutions for ensembles - declare -x "wtime_gdas"="00:40:00" - declare -x "wtime_gfs"="06:00:00" + declare -x "walltime_gdas"="00:40:00" + declare -x "walltime_gfs"="06:00:00" ;; *) echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${CASE}" @@ -798,20 +793,20 @@ case ${step} in ;; "oceanice_products") - wtime="00:15:00" - npe=1 - npe_node=1 - nth=1 + walltime="00:15:00" + ntasks=1 + tasks_per_node=1 + threads_per_task=1 memory="96GB" ;; "upp") case "${CASE}" in "C48" | "C96") - npe=${CASE:1} + ntasks=${CASE:1} ;; "C192" | "C384" | "C768" ) - npe=120 + ntasks=120 memory="${mem_node_max}" ;; *) @@ -819,140 +814,140 @@ case ${step} in exit 4 ;; esac - npe_node=${npe} + tasks_per_node=${ntasks} - nth=1 + threads_per_task=1 - wtime="00:15:00" - if (( npe_node > npe_node_max )); then - npe_node=${npe_node_max} + walltime="00:15:00" + if (( tasks_per_node > max_tasks_per_node )); then + tasks_per_node=${max_tasks_per_node} fi export is_exclusive=True ;; "atmos_products") - wtime="00:15:00" - npe=24 - nth=1 - npe_node="${npe}" + walltime="00:15:00" + ntasks=24 + threads_per_task=1 + tasks_per_node="${ntasks}" export is_exclusive=True ;; "verfozn") - wtime="00:05:00" - npe=1 - nth=1 - npe_node=1 + walltime="00:05:00" + ntasks=1 + threads_per_task=1 + tasks_per_node=1 memory="1G" ;; "verfrad") - wtime="00:40:00" - npe=1 - nth=1 - npe_node=1 + walltime="00:40:00" + ntasks=1 + threads_per_task=1 + tasks_per_node=1 memory="5G" ;; "vminmon") - wtime="00:05:00" - npe=1 - nth=1 - npe_node=1 + walltime="00:05:00" + ntasks=1 + threads_per_task=1 + tasks_per_node=1 memory="1G" ;; "tracker") - wtime="00:10:00" - npe=1 - nth=1 - npe_node=1 + walltime="00:10:00" + ntasks=1 + threads_per_task=1 + tasks_per_node=1 memory="4G" ;; "genesis") - wtime="00:25:00" - npe=1 - nth=1 - npe_node=1 + walltime="00:25:00" + ntasks=1 + threads_per_task=1 + tasks_per_node=1 memory="10G" ;; "genesis_fsu") - wtime="00:10:00" - npe=1 - nth=1 - npe_node=1 + walltime="00:10:00" + ntasks=1 + threads_per_task=1 + tasks_per_node=1 memory="10G" ;; "fit2obs") - wtime="00:20:00" - npe=3 - nth=1 - npe_node=1 + walltime="00:20:00" + ntasks=3 + threads_per_task=1 + tasks_per_node=1 memory="20G" ;; "metp") - nth=1 - wtime_gdas="03:00:00" - wtime_gfs="06:00:00" - npe=4 - npe_node=4 + threads_per_task=1 + walltime_gdas="03:00:00" + walltime_gfs="06:00:00" + ntasks=4 + tasks_per_node=4 export is_exclusive=True ;; "echgres") - wtime="00:10:00" - npe=3 - nth=${npe_node_max} - npe_node=1 + walltime="00:10:00" + ntasks=3 + threads_per_task=${max_tasks_per_node} + tasks_per_node=1 ;; "init") - wtime="00:30:00" - npe=24 - nth=1 - npe_node=6 + walltime="00:30:00" + ntasks=24 + threads_per_task=1 + tasks_per_node=6 memory="70GB" ;; "init_chem") - wtime="00:30:00" - npe=1 - npe_node=1 + walltime="00:30:00" + ntasks=1 + tasks_per_node=1 export is_exclusive=True ;; "mom6ic") - wtime="00:30:00" - npe=24 - npe_node=24 + walltime="00:30:00" + ntasks=24 + tasks_per_node=24 export is_exclusive=True ;; "arch" | "earc" | "getic") - wtime="06:00:00" - npe=1 - npe_node=1 - nth=1 + walltime="06:00:00" + ntasks=1 + tasks_per_node=1 + threads_per_task=1 memory="4096M" ;; "cleanup") - wtime="00:15:00" - npe=1 - npe_node=1 - nth=1 + walltime="00:15:00" + ntasks=1 + tasks_per_node=1 + threads_per_task=1 memory="4096M" ;; "stage_ic") - wtime="00:15:00" - npe=1 - npe_node=1 - nth=1 + walltime="00:15:00" + ntasks=1 + tasks_per_node=1 + threads_per_task=1 export is_exclusive=True ;; @@ -960,10 +955,10 @@ case ${step} in export layout_x=${layout_x_atmensanl} export layout_y=${layout_y_atmensanl} - wtime="00:10:00" - npe=1 - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="00:10:00" + ntasks=1 + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) memory="3072M" ;; @@ -971,10 +966,10 @@ case ${step} in export layout_x=${layout_x_atmensanl} export layout_y=${layout_y_atmensanl} - wtime="00:30:00" - npe=$(( layout_x * layout_y * 6 )) - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="00:30:00" + ntasks=$(( layout_x * layout_y * 6 )) + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) memory="96GB" export is_exclusive=True ;; @@ -983,301 +978,301 @@ case ${step} in export layout_x=${layout_x_atmensanl} export layout_y=${layout_y_atmensanl} - wtime="00:30:00" - npe=$(( layout_x * layout_y * 6 )) - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="00:30:00" + ntasks=$(( layout_x * layout_y * 6 )) + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) memory="96GB" export is_exclusive=True ;; "atmensanlfinal") - wtime="00:30:00" - npe=${npe_node_max} - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="00:30:00" + ntasks=${max_tasks_per_node} + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) export is_exclusive=True ;; "eobs" | "eomg") if [[ "${step}" == "eobs" ]]; then - wtime="00:15:00" + walltime="00:15:00" else - wtime="00:30:00" + walltime="00:30:00" fi case ${CASE} in - "C768") npe=200;; - "C384") npe=100;; - "C192" | "C96" | "C48") npe=40;; + "C768") ntasks=200;; + "C384") ntasks=100;; + "C192" | "C96" | "C48") ntasks=40;; *) echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${CASE}" exit 4 ;; esac - nth=2 + threads_per_task=2 # NOTE The number of tasks and cores used must be the same for eobs # See https://github.com/NOAA-EMC/global-workflow/issues/2092 for details - npe_node=$(( npe_node_max / nth )) + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) export is_exclusive=True - # Unset npe_node if it is not a multiple of npe_node_max + # Unset tasks_per_node if it is not a multiple of max_tasks_per_node # to prevent dropping data on the floor. This should be set int # config.resources.{machine} instead. This will result in an error at # experiment setup time if not set in config.resources.{machine}. - if [[ $(( npe_node_max % npe_node )) != 0 ]]; then - unset npe_node_max + if [[ $(( max_tasks_per_node % tasks_per_node )) != 0 ]]; then + unset max_tasks_per_node fi ;; "ediag") - wtime="00:15:00" - npe=48 - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="00:15:00" + ntasks=48 + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) memory="30GB" ;; "eupd") - wtime="00:30:00" + walltime="00:30:00" case ${CASE} in "C768") - npe=480 - nth=6 + ntasks=480 + threads_per_task=6 ;; "C384") - npe=270 - nth=8 + ntasks=270 + threads_per_task=8 ;; "C192" | "C96" | "C48") - npe=42 - nth=2 + ntasks=42 + threads_per_task=2 ;; *) echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${CASE}" exit 4 ;; esac - npe_node=$(( npe_node_max / nth )) + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) export is_exclusive=True ;; "ecen") - wtime="00:10:00" - npe=80 - nth=4 + walltime="00:10:00" + ntasks=80 + threads_per_task=4 if [[ ${CASE} == "C384" || ${CASE} == "C192" || ${CASE} == "C96" || ${CASE} == "C48" ]]; then - nth=2 + threads_per_task=2 fi - npe_node=$(( npe_node_max / nth )) - export nth_cycle=${nth} - export npe_node_cycle=${npe_node} + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) + export threads_per_task_cycle=${threads_per_task} + export tasks_per_node_cycle=${tasks_per_node} export is_exclusive=True ;; "esfc") - wtime="00:15:00" - npe=80 - nth=1 - npe_node=$(( npe_node_max / nth )) - nth_cycle=${nth} - npe_node_cycle=$(( npe_node_max / nth_cycle )) + walltime="00:15:00" + ntasks=80 + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) + threads_per_task_cycle=${threads_per_task} + tasks_per_node_cycle=$(( max_tasks_per_node / threads_per_task_cycle )) ;; "epos") - wtime="00:15:00" - [[ ${CASE} == "C768" ]] && wtime="00:25:00" - npe=80 - nth=1 - npe_node=$(( npe_node_max / nth )) + walltime="00:15:00" + [[ ${CASE} == "C768" ]] && walltime="00:25:00" + ntasks=80 + threads_per_task=1 + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) export is_exclusive=True ;; "postsnd") - wtime="02:00:00" - npe=40 - nth=8 - npe_node=10 - export npe_postsndcfp=9 - export npe_node_postsndcfp=1 - postsnd_req_cores=$(( npe_node * nth )) - if (( postsnd_req_cores > npe_node_max )); then - npe_node=$(( npe_node_max / nth )) + walltime="02:00:00" + ntasks=40 + threads_per_task=8 + tasks_per_node=10 + export ntasks_postsndcfp=9 + export tasks_per_node_postsndcfp=1 + postsnd_req_cores=$(( tasks_per_node * threads_per_task )) + if (( postsnd_req_cores > max_tasks_per_node )); then + tasks_per_node=$(( max_tasks_per_node / threads_per_task )) fi export is_exclusive=True ;; "awips") - wtime="03:30:00" - npe=1 - npe_node=1 - nth=1 + walltime="03:30:00" + ntasks=1 + tasks_per_node=1 + threads_per_task=1 memory="3GB" ;; "npoess") - wtime="03:30:00" - npe=1 - npe_node=1 - nth=1 + walltime="03:30:00" + ntasks=1 + tasks_per_node=1 + threads_per_task=1 memory="3GB" ;; "gempak") - wtime="00:30:00" - npe_gdas=2 - npe_gfs=28 - npe_node_gdas=2 - npe_node_gfs=28 - nth=1 + walltime="00:30:00" + ntasks_gdas=2 + ntasks_gfs=28 + tasks_per_node_gdas=2 + tasks_per_node_gfs=28 + threads_per_task=1 memory_gdas="4GB" memory_gfs="2GB" ;; "mos_stn_prep") - wtime="00:10:00" - npe=3 - npe_node=3 - nth=1 + walltime="00:10:00" + ntasks=3 + tasks_per_node=3 + threads_per_task=1 memory="5GB" - NTASK="${npe}" - export PTILE="${npe_node}" + NTASK="${ntasks}" + export PTILE="${tasks_per_node}" ;; "mos_grd_prep") - wtime="00:10:00" - npe=4 - npe_node=4 - nth=1 + walltime="00:10:00" + ntasks=4 + tasks_per_node=4 + threads_per_task=1 memory="16GB" - NTASK="${npe}" - export PTILE="${npe_node}" + NTASK="${ntasks}" + export PTILE="${tasks_per_node}" ;; "mos_ext_stn_prep") - wtime="00:15:00" - npe=2 - npe_node=2 - nth=1 + walltime="00:15:00" + ntasks=2 + tasks_per_node=2 + threads_per_task=1 memory="5GB" - NTASK="${npe}" - export PTILE="${npe_node}" + NTASK="${ntasks}" + export PTILE="${tasks_per_node}" ;; "mos_ext_grd_prep") - wtime="00:10:00" - npe=7 - npe_node=7 - nth=1 + walltime="00:10:00" + ntasks=7 + tasks_per_node=7 + threads_per_task=1 memory="3GB" - NTASK="${npe}" - export PTILE="${npe_node}" + NTASK="${ntasks}" + export PTILE="${tasks_per_node}" ;; "mos_stn_fcst") - wtime="00:10:00" - npe=5 - npe_node=5 - nth=1 + walltime="00:10:00" + ntasks=5 + tasks_per_node=5 + threads_per_task=1 memory="40GB" - NTASK="${npe}" - export PTILE="${npe_node}" + NTASK="${ntasks}" + export PTILE="${tasks_per_node}" ;; "mos_grd_fcst") - wtime="00:10:00" - npe=7 - npe_node=7 - nth=1 + walltime="00:10:00" + ntasks=7 + tasks_per_node=7 + threads_per_task=1 memory="50GB" - NTASK="${npe}" - export PTILE="${npe_node}" + NTASK="${ntasks}" + export PTILE="${tasks_per_node}" ;; "mos_ext_stn_fcst") - wtime="00:20:00" - npe=3 - npe_node=3 - nth=1 + walltime="00:20:00" + ntasks=3 + tasks_per_node=3 + threads_per_task=1 memory="50GB" - NTASK="${npe}" - export PTILE="${npe_node}" + NTASK="${ntasks}" + export PTILE="${tasks_per_node}" export prepost=True ;; "mos_ext_grd_fcst") - wtime="00:10:00" - npe=7 - npe_node=7 - nth=1 + walltime="00:10:00" + ntasks=7 + tasks_per_node=7 + threads_per_task=1 memory="50GB" - NTASK="${npe}" - export PTILE="${npe_node}" + NTASK="${ntasks}" + export PTILE="${tasks_per_node}" ;; "mos_stn_prdgen") - wtime="00:10:00" - npe=1 - npe_node=1 - nth=1 + walltime="00:10:00" + ntasks=1 + tasks_per_node=1 + threads_per_task=1 memory="15GB" - NTASK="${npe}" - export PTILE="${npe_node}" + NTASK="${ntasks}" + export PTILE="${tasks_per_node}" export prepost=True ;; "mos_grd_prdgen") - wtime="00:40:00" - npe=72 - npe_node=18 - nth=4 + walltime="00:40:00" + ntasks=72 + tasks_per_node=18 + threads_per_task=4 memory="20GB" - NTASK="${npe}" - export PTILE="${npe_node}" - export OMP_NUM_THREADS="${nth}" + NTASK="${ntasks}" + export PTILE="${tasks_per_node}" + export OMP_NUM_THREADS="${threads_per_task}" ;; "mos_ext_stn_prdgen") - wtime="00:10:00" - npe=1 - npe_node=1 - nth=1 + walltime="00:10:00" + ntasks=1 + tasks_per_node=1 + threads_per_task=1 memory="15GB" - NTASK="${npe}" - export PTILE="${npe_node}" + NTASK="${ntasks}" + export PTILE="${tasks_per_node}" export prepost=True ;; "mos_ext_grd_prdgen") - wtime="00:30:00" - npe=96 - npe_node=6 - nth=16 + walltime="00:30:00" + ntasks=96 + tasks_per_node=6 + threads_per_task=16 memory="30GB" - NTASK="${npe}" - export PTILE="${npe_node}" - export OMP_NUM_THREADS="${nth}" + NTASK="${ntasks}" + export PTILE="${tasks_per_node}" + export OMP_NUM_THREADS="${threads_per_task}" ;; "mos_wx_prdgen") - wtime="00:10:00" - npe=4 - npe_node=2 - nth=2 + walltime="00:10:00" + ntasks=4 + tasks_per_node=2 + threads_per_task=2 memory="10GB" - NTASK="${npe}" - export PTILE="${npe_node}" - export OMP_NUM_THREADS="${nth}" + NTASK="${ntasks}" + export PTILE="${tasks_per_node}" + export OMP_NUM_THREADS="${threads_per_task}" ;; "mos_wx_ext_prdgen") - wtime="00:10:00" - npe=4 - npe_node=2 - nth=2 + walltime="00:10:00" + ntasks=4 + tasks_per_node=2 + threads_per_task=2 memory="10GB" - NTASK="${npe}" - export PTILE="${npe_node}" - export OMP_NUM_THREADS="${nth}" + NTASK="${ntasks}" + export PTILE="${tasks_per_node}" + export OMP_NUM_THREADS="${threads_per_task}" ;; *) @@ -1293,7 +1288,7 @@ if [[ -f "${EXPDIR}/config.resources.${machine}" ]]; then fi # Check for RUN-specific variables and export them -for resource_var in nth npe npe_node NTASKS memory wtime; do +for resource_var in threads_per_task ntasks tasks_per_node NTASKS memory walltime; do run_resource_var="${resource_var}_${RUN}" if [[ -n "${!run_resource_var+0}" ]]; then declare -x "${resource_var}"="${!run_resource_var}" diff --git a/parm/config/gfs/config.resources.GAEA b/parm/config/gfs/config.resources.GAEA index 7b8e9c931b2..51007b5b4f4 100644 --- a/parm/config/gfs/config.resources.GAEA +++ b/parm/config/gfs/config.resources.GAEA @@ -8,10 +8,10 @@ case ${step} in # See https://github.com/NOAA-EMC/global-workflow/issues/2092 for details case ${CASE} in "C768" | "C384") - export npe_node=50 + export tasks_per_node=50 ;; *) - export npe_node=40 + export tasks_per_node=40 ;; esac ;; diff --git a/parm/config/gfs/config.resources.HERA b/parm/config/gfs/config.resources.HERA index 2b1b3ab7478..a683bc79e7b 100644 --- a/parm/config/gfs/config.resources.HERA +++ b/parm/config/gfs/config.resources.HERA @@ -5,30 +5,30 @@ case ${step} in "anal") if [[ "${CASE}" == "C384" ]]; then - export npe_gdas=270 - export npe_gfs=270 - export nth_anal=8 - export npe_node=$(( npe_node_max / nth )) + export ntasks_gdas=270 + export ntasks_gfs=270 + export threads_per_task_anal=8 + export tasks_per_node=$(( max_tasks_per_node / threads_per_task )) fi ;; "eupd") case ${CASE} in "C384") - export npe=80 + export ntasks=80 ;; "C192" | "C96" | "C48") - export nth=4 + export threads_per_task=4 ;; *) ;; esac - export npe_node=$(( npe_node_max / nth )) + export tasks_per_node=$(( max_tasks_per_node / threads_per_task )) ;; "ecen") - if [[ "${CASE}" == "C768" ]]; then export nth=6; fi - export npe_node=$(( npe_node_max / nth )) + if [[ "${CASE}" == "C768" ]]; then export threads_per_task=6; fi + export tasks_per_node=$(( max_tasks_per_node / threads_per_task )) ;; *) diff --git a/parm/config/gfs/config.resources.HERCULES b/parm/config/gfs/config.resources.HERCULES index 9c8e9cc1d5b..7a5a74f69c8 100644 --- a/parm/config/gfs/config.resources.HERCULES +++ b/parm/config/gfs/config.resources.HERCULES @@ -8,7 +8,7 @@ case ${step} in # See https://github.com/NOAA-EMC/global-workflow/issues/2092 for details # For Hercules, this is only an issue at C384; use 20 tasks/node if [[ ${CASE} = "C384" ]]; then - export npe_node=20 + export tasks_per_node=20 fi ;; *) diff --git a/parm/config/gfs/config.resources.JET b/parm/config/gfs/config.resources.JET index 33ece47073b..9463e8357bb 100644 --- a/parm/config/gfs/config.resources.JET +++ b/parm/config/gfs/config.resources.JET @@ -5,10 +5,10 @@ case ${step} in "anal") if [[ "${CASE}" == "C384" ]]; then - export npe_gdas=270 - export npe_gfs=270 - export nth=8 - export npe_node=$(( npe_node_max / nth )) + export ntasks_gdas=270 + export ntasks_gfs=270 + export threads_per_task=8 + export tasks_per_node=$(( max_tasks_per_node / threads_per_task )) fi ;; @@ -17,27 +17,27 @@ case ${step} in # The number of tasks and cores used must be the same for eobs # See https://github.com/NOAA-EMC/global-workflow/issues/2092 for details # This would also be an issues for vjet and sjet if anyone runs on those nodes. - export npe_node=10 + export tasks_per_node=10 fi ;; "eupd") case ${CASE} in "C384") - export npe=80 + export ntasks=80 ;; "C192" | "C96" | "C48") - export nth=4 + export threads_per_task=4 ;; *) ;; esac - export npe_node=$(( npe_node_max / nth )) + export tasks_per_node=$(( max_tasks_per_node / threads_per_task )) ;; "ecen") - if [[ "${CASE}" == "C768" ]]; then export nth=6; fi - export npe_node=$(( npe_node_max / nth )) + if [[ "${CASE}" == "C768" ]]; then export threads_per_task=6; fi + export tasks_per_node=$(( max_tasks_per_node / threads_per_task )) ;; "upp") diff --git a/parm/config/gfs/config.resources.S4 b/parm/config/gfs/config.resources.S4 index c20d99e38a9..1af64bf250e 100644 --- a/parm/config/gfs/config.resources.S4 +++ b/parm/config/gfs/config.resources.S4 @@ -11,43 +11,43 @@ case ${step} in #On the S4-s4 partition, this is accomplished by increasing the task #count to a multiple of 32 if [[ ${PARTITION_BATCH} = "s4" ]]; then - export npe_gdas=416 - export npe_gfs=416 + export ntasks_gdas=416 + export ntasks_gfs=416 fi #S4 is small, so run this task with just 1 thread - export nth=1 - export wtime_gdas="02:00:00" - export wtime_gfs="02:00:00" + export threads_per_task=1 + export walltime_gdas="02:00:00" + export walltime_gfs="02:00:00" ;; "C192" | "C96" | "C48") - export nth=4 + export threads_per_task=4 if [[ ${PARTITION_BATCH} == "s4" ]]; then - export npe_gdas=88 - export npe_gfs=88 + export ntasks_gdas=88 + export ntasks_gfs=88 elif [[ ${PARTITION_BATCH} == "ivy" ]]; then - export npe_gdas=90 - export npe_gfs=90 + export ntasks_gdas=90 + export ntasks_gfs=90 fi ;; *) ;; esac - export npe_node=$(( npe_node_max / nth )) + export tasks_node=$(( max_tasks_per_node / threads_per_task )) ;; "eobs") # The number of tasks and cores used must be the same for eobs # See https://github.com/NOAA-EMC/global-workflow/issues/2092 for details # For S4, this is accomplished by running 10 tasks/node - export npe_node=10 + export tasks_per_node=10 ;; "eupd") if [[ "${CASE}" == "C384" ]]; then - export npe=160 - export nth=2 + export ntasks=160 + export threads_per_task=2 fi - export npe_node=$(( npe_node_max / nth )) + export tasks_per_node=$(( max_tasks_per_node / threads_per_task )) ;; "ediag") diff --git a/parm/config/gfs/config.resources.WCOSS2 b/parm/config/gfs/config.resources.WCOSS2 index 0dd6dfe2109..a0a69fa8d10 100644 --- a/parm/config/gfs/config.resources.WCOSS2 +++ b/parm/config/gfs/config.resources.WCOSS2 @@ -10,16 +10,16 @@ case ${step} in "anal") if [[ "${CASE}" == "C768" ]]; then - export nth=8 - # Make npe a multiple of 16 - export npe_gdas=784 - export npe_gfs=832 - export npe_node=$(( npe_node_max / nth )) + export threads_per_task=8 + # Make ntasks a multiple of 16 + export ntasks_gdas=784 + export ntasks_gfs=832 + export tasks_per_node=$(( max_tasks_per_node / threads_per_task )) fi ;; "fit2obs") - export npe_node=3 + export tasks_per_node=3 ;; "echgres") @@ -33,22 +33,22 @@ case ${step} in "eupd") case ${CASE} in "C768" | "C384") - export npe=315 - export nth=14 + export ntasks=315 + export threads_per_task=14 ;; *) ;; esac - export npe_node=$(( npe_node_max / nth )) + export tasks_per_node=$(( max_tasks_per_node / threads_per_task )) ;; "eobs") case ${CASE} in "C768" | "C384") - export npe_node=50 + export tasks_per_node=50 ;; *) - export npe_node=40 + export tasks_per_node=40 ;; esac ;; diff --git a/scripts/exgdas_atmos_chgres_forenkf.sh b/scripts/exgdas_atmos_chgres_forenkf.sh index ba44d870596..1833ed7b1f8 100755 --- a/scripts/exgdas_atmos_chgres_forenkf.sh +++ b/scripts/exgdas_atmos_chgres_forenkf.sh @@ -163,7 +163,7 @@ EOF chmod 755 $DATA/mp_chgres.sh ncmd=$(cat $DATA/mp_chgres.sh | wc -l) if [ $ncmd -gt 0 ]; then - ncmd_max=$((ncmd < npe_node_max ? ncmd : npe_node_max)) + ncmd_max=$((ncmd < max_tasks_per_node ? ncmd : max_tasks_per_node)) APRUNCFP_CHGRES=$(eval echo $APRUNCFP) export pgm=$CHGRESNCEXEC diff --git a/scripts/exgdas_enkf_update.sh b/scripts/exgdas_enkf_update.sh index c878dc721b1..e924274d395 100755 --- a/scripts/exgdas_enkf_update.sh +++ b/scripts/exgdas_enkf_update.sh @@ -259,7 +259,7 @@ if [[ $USE_CFP = "YES" ]]; then chmod 755 $DATA/mp_untar.sh ncmd=$(cat $DATA/mp_untar.sh | wc -l) if [[ $ncmd -gt 0 ]]; then - ncmd_max=$((ncmd < npe_node_max ? ncmd : npe_node_max)) + ncmd_max=$((ncmd < max_tasks_per_node ? ncmd : max_tasks_per_node)) APRUNCFP=$(eval echo $APRUNCFP) $APRUNCFP $DATA/mp_untar.sh export err=$?; err_chk diff --git a/scripts/exglobal_atmos_analysis.sh b/scripts/exglobal_atmos_analysis.sh index 6053fb66b30..932adf8e10e 100755 --- a/scripts/exglobal_atmos_analysis.sh +++ b/scripts/exglobal_atmos_analysis.sh @@ -581,8 +581,8 @@ if [ ${GENDIAG} = "YES" ] ; then if [ -d ${DIAG_DIR} ]; then rm -rf ${DIAG_DIR} fi - npe_m1="$((npe-1))" - for pe in $(seq 0 ${npe_m1}); do + ntasks_m1="$((ntasks-1))" + for pe in $(seq 0 ${ntasks_m1}); do pedir="dir."$(printf %04i ${pe}) mkdir -p ${DIAG_DIR}/${pedir} ${NLN} ${DIAG_DIR}/${pedir} ${pedir} @@ -675,7 +675,7 @@ EOFunzip chmod 755 ${DATA}/mp_unzip.sh ncmd=$(cat ${DATA}/mp_unzip.sh | wc -l) if [ ${ncmd} -gt 0 ]; then - ncmd_max=$((ncmd < npe_node_max ? ncmd : npe_node_max)) + ncmd_max=$((ncmd < max_tasks_per_node ? ncmd : max_tasks_per_node)) APRUNCFP_UNZIP=$(eval echo ${APRUNCFP}) ${APRUNCFP_UNZIP} ${DATA}/mp_unzip.sh export err=$?; err_chk diff --git a/scripts/exglobal_atmos_products.sh b/scripts/exglobal_atmos_products.sh index 90678193803..51e1a108bb8 100755 --- a/scripts/exglobal_atmos_products.sh +++ b/scripts/exglobal_atmos_products.sh @@ -11,7 +11,7 @@ INTERP_ATMOS_SFLUXSH=${INTERP_ATMOS_SFLUXSH:-"${USHgfs}/interp_atmos_sflux.sh"} # Variables used in this job downset=${downset:-1} # No. of groups of pressure grib2 products to create -npe_atmos_products=${npe_atmos_products:-8} # no. of processors available to process each group +ntasks_atmos_products=${ntasks_atmos_products:-8} # no. of processors available to process each group # WGNE related options WGNE=${WGNE:-NO} # Create WGNE products @@ -72,7 +72,7 @@ for (( nset=1 ; nset <= downset ; nset++ )); do echo "Begin processing nset = ${nset}" # Number of processors available to process $nset - nproc=${npe_atmos_products} + nproc=${ntasks} # Each set represents a group of files if (( nset == 1 )); then diff --git a/scripts/exglobal_diag.sh b/scripts/exglobal_diag.sh index 26d79aefcb7..ed9bef05dfa 100755 --- a/scripts/exglobal_diag.sh +++ b/scripts/exglobal_diag.sh @@ -221,7 +221,7 @@ EOFdiag chmod 755 $DATA/mp_diag.sh ncmd=$(cat $DATA/mp_diag.sh | wc -l) if [ $ncmd -gt 0 ]; then - ncmd_max=$((ncmd < npe_node_max ? ncmd : npe_node_max)) + ncmd_max=$((ncmd < max_tasks_per_node ? ncmd : max_tasks_per_node)) APRUNCFP_DIAG=$(eval echo $APRUNCFP) $APRUNCFP_DIAG $DATA/mp_diag.sh export err=$?; err_chk diff --git a/workflow/rocoto/tasks.py b/workflow/rocoto/tasks.py index 8baf1de92dd..bd88826555b 100644 --- a/workflow/rocoto/tasks.py +++ b/workflow/rocoto/tasks.py @@ -174,7 +174,7 @@ def get_resource(self, task_name): Given a task name (task_name) and its configuration (task_names), return a dictionary of resources (task_resource) used by the task. Task resource dictionary includes: - account, walltime, cores, nodes, ppn, threads, memory, queue, partition, native + account, walltime, ntasks, nodes, ppn, threads, memory, queue, partition, native """ scheduler = self.app_config.scheduler @@ -183,13 +183,13 @@ def get_resource(self, task_name): account = task_config['ACCOUNT_SERVICE'] if task_name in Tasks.SERVICE_TASKS else task_config['ACCOUNT'] - walltime = task_config[f'wtime'] - cores = task_config[f'npe'] - ppn = task_config[f'npe_node'] + walltime = task_config[f'walltime'] + ntasks = task_config[f'ntasks'] + ppn = task_config[f'tasks_per_node'] - nodes = int(np.ceil(float(cores) / float(ppn))) + nodes = int(np.ceil(float(ntasks) / float(ppn))) - threads = task_config[f'nth'] + threads = task_config[f'threads_per_task'] # Memory is not required memory = task_config.get(f'memory', None) @@ -227,7 +227,7 @@ def get_resource(self, task_name): task_resource = {'account': account, 'walltime': walltime, 'nodes': nodes, - 'cores': cores, + 'ntasks': ntasks, 'ppn': ppn, 'threads': threads, 'memory': memory, From d283fa9d41576557ed3741c1b91f158db88761c4 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Fri, 5 Jul 2024 18:23:25 +0000 Subject: [PATCH 53/73] Disambiguate calcanl ntasks --- parm/config/gfs/config.resources | 2 +- ush/calcanl_gfs.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index 1d64bc1d567..670ba412571 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -604,7 +604,7 @@ case ${step} in "analcalc") walltime="00:15:00" ntasks=127 - export ntasks="${ntasks}" + export ntasks_calcanl="${ntasks}" threads_per_task=1 tasks_per_node=$(( max_tasks_per_node / threads_per_task )) export threads_per_task_echgres_gdas=4 diff --git a/ush/calcanl_gfs.py b/ush/calcanl_gfs.py index ebb6e96c22a..ea97cacf907 100755 --- a/ush/calcanl_gfs.py +++ b/ush/calcanl_gfs.py @@ -166,7 +166,7 @@ def calcanl_gfs(DoIAU, l4DEnsVar, Write4Danl, ComOut, APrefix, [hosts.append(x) for x in hosts_tmp if x not in hosts] nhosts = len(hosts) ExecCMDMPI_host = 'mpiexec -l -n ' + str(nFH) - tasks = int(os.getenv('ntasks', 1)) + tasks = int(os.getenv('ntasks_calcanl', 1)) print('nhosts,tasks=', nhosts, tasks) if levs > tasks: ExecCMDMPILevs_host = 'mpiexec -l -n ' + str(tasks) From ba139692302d3235edd8ae0f5e2244914b9110dc Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Fri, 5 Jul 2024 18:29:57 +0000 Subject: [PATCH 54/73] Correct WCOSS2 mpiexec call for fcst/efcs jobs --- env/WCOSS2.env | 2 +- parm/config/gfs/config.eobs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/env/WCOSS2.env b/env/WCOSS2.env index 5828fa53377..a28c6df2728 100755 --- a/env/WCOSS2.env +++ b/env/WCOSS2.env @@ -163,7 +163,7 @@ elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then (( 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 - export APRUN_UFS="${launcher} -n ${ntasks} -ppn ${ntasks} --cpu-bind depth --depth 1" + export APRUN_UFS="${launcher} -n ${ufs_ntasks} -ppn ${ntasks} --cpu-bind depth --depth 1" unset nnodes ufs_ntasks # TODO: Why are fcst and efcs so different on WCOSS2? diff --git a/parm/config/gfs/config.eobs b/parm/config/gfs/config.eobs index fba07271a55..2f61b3bd427 100644 --- a/parm/config/gfs/config.eobs +++ b/parm/config/gfs/config.eobs @@ -15,7 +15,7 @@ export RERUN_EOMGGRP="YES" # GSI namelist options related to observer for EnKF export OBSINPUT_INVOBS="dmesh(1)=225.0,dmesh(2)=225.0,dmesh(3)=225.0,dmesh(4)=100.0" export OBSQC_INVOBS="tcp_width=60.0,tcp_ermin=2.0,tcp_ermax=12.0" -if [ $LEVS = "128" ]; then +if [ ${LEVS} = "128" ]; then export GRIDOPTS_INVOBS="nlayers(63)=1,nlayers(64)=1," export SETUP_INVOBS="gpstop=55,nsig_ext=56," fi From 972cf2b9d49c0f225199e90d112503ded89b461d Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Fri, 5 Jul 2024 18:33:09 +0000 Subject: [PATCH 55/73] Remove NTHREADS2 --- env/HERA.env | 4 +--- env/HERCULES.env | 4 +--- env/JET.env | 1 - env/ORION.env | 4 +--- env/WCOSS2.env | 4 +--- 5 files changed, 4 insertions(+), 13 deletions(-) diff --git a/env/HERA.env b/env/HERA.env index 4b9ce0a3c16..6959d4e0a50 100755 --- a/env/HERA.env +++ b/env/HERA.env @@ -37,10 +37,8 @@ if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:- max_threads_per_task=$((max_tasks_per_node / tasks_per_node)) NTHREADSmax=${threads_per_task:-${max_threads_per_task}} NTHREADS1=${threads_per_task:-1} - NTHREADS2=${threads_per_task:-2} [[ ${NTHREADSmax} -gt ${max_threads_per_task} ]] && NTHREADSmax=${max_threads_per_task} [[ ${NTHREADS1} -gt ${max_threads_per_task} ]] && NTHREADS1=${max_threads_per_task} - [[ ${NTHREADS2} -gt ${max_threads_per_task} ]] && NTHREADS2=${max_threads_per_task} APRUN="${launcher} -n ${ntasks}" fi @@ -251,7 +249,7 @@ elif [[ "${step}" = "postsnd" ]]; then elif [[ "${step}" = "awips" ]]; then - export NTHREADS_AWIPS=${NTHREADS2} + export NTHREADS_AWIPS=${NTHREADS1} export APRUN_AWIPSCFP="${APRUN} ${mpmd_opt}" elif [[ "${step}" = "gempak" ]]; then diff --git a/env/HERCULES.env b/env/HERCULES.env index 1133c3c8c5f..6afdc4c5d50 100755 --- a/env/HERCULES.env +++ b/env/HERCULES.env @@ -34,10 +34,8 @@ if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:- max_threads_per_task=$((max_tasks_per_node / tasks_per_node)) NTHREADSmax=${threads_per_task:-${max_threads_per_task}} NTHREADS1=${threads_per_task:-1} - NTHREADS2=${threads_per_task:-2} [[ ${NTHREADSmax} -gt ${max_threads_per_task} ]] && NTHREADSmax=${max_threads_per_task} [[ ${NTHREADS1} -gt ${max_threads_per_task} ]] && NTHREADS1=${max_threads_per_task} - [[ ${NTHREADS2} -gt ${max_threads_per_task} ]] && NTHREADS2=${max_threads_per_task} APRUN="${launcher} -n ${ntasks}" fi @@ -263,7 +261,7 @@ case ${step} in ;; "awips") - export NTHREADS_AWIPS=${NTHREADS2} + export NTHREADS_AWIPS=${NTHREADS1} export APRUN_AWIPSCFP="${APRUN} ${mpmd_opt}" ;; diff --git a/env/JET.env b/env/JET.env index 9108df7ad00..f2fb4ed9762 100755 --- a/env/JET.env +++ b/env/JET.env @@ -27,7 +27,6 @@ if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:- NTHREADS1=${threads_per_task:-1} [[ ${NTHREADSmax} -gt ${max_threads_per_task} ]] && NTHREADSmax=${max_threads_per_task} [[ ${NTHREADS1} -gt ${max_threads_per_task} ]] && NTHREADS1=${max_threads_per_task} - [[ ${NTHREADS2} -gt ${max_threads_per_task} ]] && NTHREADS2=${max_threads_per_task} APRUN="${launcher} -n ${ntasks}" fi diff --git a/env/ORION.env b/env/ORION.env index e991194d212..ecaaf3f8728 100755 --- a/env/ORION.env +++ b/env/ORION.env @@ -32,10 +32,8 @@ if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:- max_threads_per_task=$((max_tasks_per_node / tasks_per_node)) NTHREADSmax=${threads_per_task:-${max_threads_per_task}} NTHREADS1=${threads_per_task:-1} - NTHREADS2=${threads_per_task:-2} [[ ${NTHREADSmax} -gt ${max_threads_per_task} ]] && NTHREADSmax=${max_threads_per_task} [[ ${NTHREADS1} -gt ${max_threads_per_task} ]] && NTHREADS1=${max_threads_per_task} - [[ ${NTHREADS2} -gt ${max_threads_per_task} ]] && NTHREADS2=${max_threads_per_task} APRUN="${launcher} -n ${ntasks}" fi @@ -246,7 +244,7 @@ elif [[ "${step}" = "postsnd" ]]; then elif [[ "${step}" = "awips" ]]; then - export NTHREADS_AWIPS=${NTHREADS2} + export NTHREADS_AWIPS=${NTHREADS1} export APRUN_AWIPSCFP="${APRUN} ${mpmd_opt}" elif [[ "${step}" = "gempak" ]]; then diff --git a/env/WCOSS2.env b/env/WCOSS2.env index a28c6df2728..07a7541a06a 100755 --- a/env/WCOSS2.env +++ b/env/WCOSS2.env @@ -19,10 +19,8 @@ if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:- max_threads_per_task=$((max_tasks_per_node / tasks_per_node)) NTHREADSmax=${threads_per_task:-${max_threads_per_task}} NTHREADS1=${threads_per_task:-1} - NTHREADS2=${threads_per_task:-2} [[ ${NTHREADSmax} -gt ${max_threads_per_task} ]] && NTHREADSmax=${max_threads_per_task} [[ ${NTHREADS1} -gt ${max_threads_per_task} ]] && NTHREADS1=${max_threads_per_task} - [[ ${NTHREADS2} -gt ${max_threads_per_task} ]] && NTHREADS2=${max_threads_per_task} APRUN="${launcher} -n ${ntasks}" fi @@ -235,7 +233,7 @@ elif [[ "${step}" = "postsnd" ]]; then elif [[ "${step}" = "awips" ]]; then - export NTHREADS_AWIPS=${NTHREADS2} + export NTHREADS_AWIPS=${NTHREADS1} export APRUN_AWIPSCFP="${launcher} -np ${ntasks} ${mpmd_opt}" elif [[ "${step}" = "gempak" ]]; then From 2498286a77d4eec6ea0961871e68e03e926c8ede Mon Sep 17 00:00:00 2001 From: David Huber Date: Mon, 8 Jul 2024 14:39:20 -0500 Subject: [PATCH 56/73] Rename threads to threads_per_task for a few gefs jobs --- parm/config/gefs/config.resources | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/parm/config/gefs/config.resources b/parm/config/gefs/config.resources index 183829eeb31..850d9177dc6 100644 --- a/parm/config/gefs/config.resources +++ b/parm/config/gefs/config.resources @@ -56,15 +56,15 @@ case ${step} in export walltime="00:15:00" export ntasks=1 export tasks_per_node=1 - export threads=1 + export threads_per_task=1 export is_exclusive=True ;; "waveinit") export walltime="00:10:00" export ntasks=12 - export threads=1 - export tasks_per_node=$(( max_tasks_per_node / threads )) + export threads_per_task=1 + export tasks_per_node=$(( max_tasks_per_node / threads_per_task )) export NTASKS=${ntasks} export memory="2GB" ;; @@ -72,8 +72,8 @@ case ${step} in "prep_emissions") export walltime="00:10:00" export ntasks=1 - export threads=1 - export tasks_per_node=$(( max_tasks_per_node / threads )) + export threads_per_task=1 + export tasks_per_node=$(( max_tasks_per_node / threads_per_task )) export memory="1GB" ;; From 760ff33d5a6b7c0c464ddba16444d8377b7f48ce Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Mon, 15 Jul 2024 13:06:39 +0000 Subject: [PATCH 57/73] Fix tasks per node variable name --- parm/config/gfs/config.resources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index 1bf9b942a11..9ef96bf62b1 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -304,7 +304,7 @@ case ${step} in "atmanlfinal") walltime="00:30:00" - ntasks=${tasks_per_node_max} + ntasks=${max_tasks_per_node} threads_per_task=1 tasks_per_node=$(( max_tasks_per_node / threads_per_task )) export is_exclusive=True From 047a58504635241e2738de6c17895cece52c6785 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Tue, 16 Jul 2024 11:47:05 +0000 Subject: [PATCH 58/73] Empty commit to trigger CI unit tests From 1f2e18a3f8dc0642dc0956d404f3d2df55afb458 Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Tue, 16 Jul 2024 12:09:52 +0000 Subject: [PATCH 59/73] Revert wxflow and applications.py From 83b4b6f6f0a75e2dcc55ec4b10e3ae36dc0bb519 Mon Sep 17 00:00:00 2001 From: David Huber Date: Tue, 16 Jul 2024 08:21:52 -0500 Subject: [PATCH 60/73] Check for NoneType after calling which; rename rocotostat to prevent nameclash with rocotostat module --- ci/scripts/tests/test_rocotostat.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/ci/scripts/tests/test_rocotostat.py b/ci/scripts/tests/test_rocotostat.py index f43f8df2f84..a3c56df9881 100755 --- a/ci/scripts/tests/test_rocotostat.py +++ b/ci/scripts/tests/test_rocotostat.py @@ -25,17 +25,16 @@ database_destination = os.path.join(testdata_full_path, 'database.db') wget.download(database_url, database_destination) -try: - rocotostat = which('rocotostat') -except CommandNotFoundError: +rocotostat_cmd = which('rocotostat') +if not rocotostat_cmd: raise CommandNotFoundError("rocotostat not found in PATH") -rocotostat.add_default_arg(['-w', os.path.join(testdata_path, 'workflow.xml'), '-d', os.path.join(testdata_path, 'database.db')]) +rocotostat_cmd.add_default_arg(['-w', os.path.join(testdata_path, 'workflow.xml'), '-d', os.path.join(testdata_path, 'database.db')]) def test_rocoto_statcount(): - result = rocoto_statcount(rocotostat) + result = rocoto_statcount(rocotostat_cmd) assert result['SUCCEEDED'] == 20 assert result['FAIL'] == 0 @@ -47,7 +46,7 @@ def test_rocoto_statcount(): def test_rocoto_summary(): - result = rocotostat_summary(rocotostat) + result = rocotostat_summary(rocotostat_cmd) assert result['CYCLES_TOTAL'] == 1 assert result['CYCLES_DONE'] == 1 @@ -55,7 +54,7 @@ def test_rocoto_summary(): def test_rocoto_done(): - result = rocotostat_summary(rocotostat) + result = rocotostat_summary(rocotostat_cmd) assert is_done(result) @@ -79,10 +78,10 @@ def test_rocoto_stalled(): database_destination = os.path.join(testdata_full_path, 'stalled.db') wget.download(database_url, database_destination) - rocotostat = which('rocotostat') - rocotostat.add_default_arg(['-w', xml, '-d', db]) + rocotostat_cmd = which('rocotostat') + rocotostat_cmd.add_default_arg(['-w', xml, '-d', db]) - result = rocoto_statcount(rocotostat) + result = rocoto_statcount(rocotostat_cmd) assert result['SUCCEEDED'] == 11 assert is_stalled(result) From 9f27c8ccb11ca12ce020d2da7378b29041f57c17 Mon Sep 17 00:00:00 2001 From: David Huber Date: Tue, 16 Jul 2024 08:58:28 -0500 Subject: [PATCH 61/73] Update wxflow hash --- sorc/wxflow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/wxflow b/sorc/wxflow index 29c1a3ccb81..d314e065101 160000 --- a/sorc/wxflow +++ b/sorc/wxflow @@ -1 +1 @@ -Subproject commit 29c1a3ccb8122e967d716937195e627e35544824 +Subproject commit d314e065101041a4d45e5a11ec19cd2dc5f38c67 From 88224bad72232a270fee9917a09a06f8ea2469f6 Mon Sep 17 00:00:00 2001 From: David Huber Date: Tue, 16 Jul 2024 09:47:46 -0500 Subject: [PATCH 62/73] Try unsetting for CI test --- .github/workflows/ci_unit_tests.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_unit_tests.yaml b/.github/workflows/ci_unit_tests.yaml index e22f63bf566..2437c90c21b 100644 --- a/.github/workflows/ci_unit_tests.yaml +++ b/.github/workflows/ci_unit_tests.yaml @@ -51,6 +51,7 @@ jobs: ./link_workflow.sh cd $GITHUB_WORKSPACE/ci/scripts/tests ln -s ../wxflow + unset EXPDIR pytest -v --junitxml $GITHUB_WORKSPACE/ci/scripts/tests/test-results.xml From fb1f371082e3cef6414c0431ca0a98849b5c2df1 Mon Sep 17 00:00:00 2001 From: David Huber Date: Tue, 16 Jul 2024 10:01:54 -0500 Subject: [PATCH 63/73] Revert unset --- .github/workflows/ci_unit_tests.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci_unit_tests.yaml b/.github/workflows/ci_unit_tests.yaml index 2437c90c21b..e22f63bf566 100644 --- a/.github/workflows/ci_unit_tests.yaml +++ b/.github/workflows/ci_unit_tests.yaml @@ -51,7 +51,6 @@ jobs: ./link_workflow.sh cd $GITHUB_WORKSPACE/ci/scripts/tests ln -s ../wxflow - unset EXPDIR pytest -v --junitxml $GITHUB_WORKSPACE/ci/scripts/tests/test-results.xml From 1bb1a1939923aa23d88f80a0b4d900f046765215 Mon Sep 17 00:00:00 2001 From: David Huber Date: Tue, 16 Jul 2024 18:22:38 +0000 Subject: [PATCH 64/73] Fix tasks/node variable for WCOSS2 fcst/efcs jobs --- env/WCOSS2.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env/WCOSS2.env b/env/WCOSS2.env index 07a7541a06a..27e5c667bf3 100755 --- a/env/WCOSS2.env +++ b/env/WCOSS2.env @@ -161,7 +161,7 @@ elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then (( 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 - export APRUN_UFS="${launcher} -n ${ufs_ntasks} -ppn ${ntasks} --cpu-bind depth --depth 1" + export APRUN_UFS="${launcher} -n ${ufs_ntasks} -ppn ${tasks_per_node} --cpu-bind depth --depth 1" unset nnodes ufs_ntasks # TODO: Why are fcst and efcs so different on WCOSS2? From 970c92a2e7d040d47f25282d17f6f884eaa29248 Mon Sep 17 00:00:00 2001 From: David Huber Date: Wed, 17 Jul 2024 18:17:03 +0000 Subject: [PATCH 65/73] Increase fit2obs memory at high res --- parm/config/gfs/config.resources | 1 + 1 file changed, 1 insertion(+) diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index 9ef96bf62b1..81677d15029 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -887,6 +887,7 @@ case ${step} in threads_per_task=1 tasks_per_node=1 memory="20G" + [[ ${CASE} == "C768" ]] && memory="80GB" ;; "metp") From ab8774b9cefb457c2f0280cb27a336fc46712ede Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Tue, 23 Jul 2024 15:54:04 +0000 Subject: [PATCH 66/73] Remove reference to account_service --- parm/config/gefs/config.base | 1 - parm/config/gfs/config.base | 1 - 2 files changed, 2 deletions(-) diff --git a/parm/config/gefs/config.base b/parm/config/gefs/config.base index 5901a0bd6ef..d43ea092065 100644 --- a/parm/config/gefs/config.base +++ b/parm/config/gefs/config.base @@ -13,7 +13,6 @@ export RUN_ENVIR="emc" # Account, queue, etc. export ACCOUNT="@ACCOUNT@" -export ACCOUNT_SERVICE="@ACCOUNT_SERVICE@" export QUEUE="@QUEUE@" export QUEUE_SERVICE="@QUEUE_SERVICE@" export PARTITION_BATCH="@PARTITION_BATCH@" diff --git a/parm/config/gfs/config.base b/parm/config/gfs/config.base index 2db0dee88eb..4ce3c8f45c0 100644 --- a/parm/config/gfs/config.base +++ b/parm/config/gfs/config.base @@ -13,7 +13,6 @@ export RUN_ENVIR="emc" # Account, queue, etc. export ACCOUNT="@ACCOUNT@" -export ACCOUNT_SERVICE="@ACCOUNT_SERVICE@" export QUEUE="@QUEUE@" export QUEUE_SERVICE="@QUEUE_SERVICE@" export PARTITION_BATCH="@PARTITION_BATCH@" From aae19f430d1c6448a7f25c3ae8a17ba19ce2fc41 Mon Sep 17 00:00:00 2001 From: David Huber Date: Thu, 25 Jul 2024 14:36:18 +0000 Subject: [PATCH 67/73] Remove unused ppn and nprocs from env files --- env/HERA.env | 5 ----- env/WCOSS2.env | 9 ++------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/env/HERA.env b/env/HERA.env index 8b6550ec7b7..c39451a5f8c 100755 --- a/env/HERA.env +++ b/env/HERA.env @@ -184,11 +184,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 diff --git a/env/WCOSS2.env b/env/WCOSS2.env index 27e5c667bf3..d98ad48fb35 100755 --- a/env/WCOSS2.env +++ b/env/WCOSS2.env @@ -15,14 +15,14 @@ export mpmd_opt="--cpu-bind verbose,core cfp" # Calculate common resource variables # Check first if the dependent variables are set -if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:-}" ]]; then +#if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:-}" ]]; then max_threads_per_task=$((max_tasks_per_node / tasks_per_node)) NTHREADSmax=${threads_per_task:-${max_threads_per_task}} NTHREADS1=${threads_per_task:-1} [[ ${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}" -fi +#fi if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then @@ -153,11 +153,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 From cc0a050cb3aef396365f1cdb1abc881630c242ff Mon Sep 17 00:00:00 2001 From: David Huber Date: Thu, 25 Jul 2024 15:05:55 +0000 Subject: [PATCH 68/73] Require config.resources to be sourced for each job --- env/AWSPW.env | 3 +++ env/GAEA.env | 3 +++ env/HERA.env | 3 +++ env/HERCULES.env | 3 +++ env/JET.env | 3 +++ env/ORION.env | 3 +++ env/S4.env | 3 +++ env/WCOSS2.env | 7 +++++-- jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF | 2 +- jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS | 2 +- 10 files changed, 28 insertions(+), 4 deletions(-) diff --git a/env/AWSPW.env b/env/AWSPW.env index 0598c01f259..867b9220baa 100755 --- a/env/AWSPW.env +++ b/env/AWSPW.env @@ -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 diff --git a/env/GAEA.env b/env/GAEA.env index 9a9d8b914f3..6809a9b1869 100755 --- a/env/GAEA.env +++ b/env/GAEA.env @@ -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 diff --git a/env/HERA.env b/env/HERA.env index c39451a5f8c..cb893c087c6 100755 --- a/env/HERA.env +++ b/env/HERA.env @@ -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 diff --git a/env/HERCULES.env b/env/HERCULES.env index 6afdc4c5d50..c8d817fc591 100755 --- a/env/HERCULES.env +++ b/env/HERCULES.env @@ -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 diff --git a/env/JET.env b/env/JET.env index f2fb4ed9762..7deda3b9646 100755 --- a/env/JET.env +++ b/env/JET.env @@ -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 diff --git a/env/ORION.env b/env/ORION.env index 5d6889c9cf4..be9d0e6ae9f 100755 --- a/env/ORION.env +++ b/env/ORION.env @@ -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 diff --git a/env/S4.env b/env/S4.env index 5b1644a242e..27a6ff840c6 100755 --- a/env/S4.env +++ b/env/S4.env @@ -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 diff --git a/env/WCOSS2.env b/env/WCOSS2.env index d98ad48fb35..18caf1bc037 100755 --- a/env/WCOSS2.env +++ b/env/WCOSS2.env @@ -15,14 +15,17 @@ export mpmd_opt="--cpu-bind verbose,core cfp" # Calculate common resource variables # Check first if the dependent variables are set -#if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:-}" ]]; then +if [[ -n "${ntasks:-}" && -n "${max_tasks_per_node:-}" && -n "${tasks_per_node:-}" ]]; then max_threads_per_task=$((max_tasks_per_node / tasks_per_node)) NTHREADSmax=${threads_per_task:-${max_threads_per_task}} NTHREADS1=${threads_per_task:-1} [[ ${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}" -#fi +else + echo "ERROR config.resources must be sourced before sourcing WCOSS2.env" + exit 2 +fi if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then diff --git a/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF b/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF index cd8c76eaddf..d62c3320a13 100755 --- a/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF +++ b/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF @@ -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 diff --git a/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS b/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS index 1b2cfd9f0cf..72dba0679d5 100755 --- a/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS +++ b/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS @@ -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} From 9948f71084935a8ab3287bea5e2667b41dadac25 Mon Sep 17 00:00:00 2001 From: David Huber Date: Thu, 25 Jul 2024 15:25:20 +0000 Subject: [PATCH 69/73] Replace CDUMP with RUN_local/RUN --- jobs/rocoto/awips_20km_1p0deg.sh | 2 +- jobs/rocoto/prep.sh | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/jobs/rocoto/awips_20km_1p0deg.sh b/jobs/rocoto/awips_20km_1p0deg.sh index b2a291e37ef..af08b461110 100755 --- a/jobs/rocoto/awips_20km_1p0deg.sh +++ b/jobs/rocoto/awips_20km_1p0deg.sh @@ -8,7 +8,7 @@ source "${HOMEgfs}/ush/preamble.sh" ## HOMEgfs : /full/path/to/workflow ## EXPDIR : /full/path/to/config/files ## CDATE : current analysis date (YYYYMMDDHH) -## CDUMP : cycle name (gdas / gfs) +## RUN : cycle name (gdas / gfs) ## PDY : current date (YYYYMMDD) ## cyc : current cycle (HH) ############################################################### diff --git a/jobs/rocoto/prep.sh b/jobs/rocoto/prep.sh index a885bd1c7f0..48e5a461608 100755 --- a/jobs/rocoto/prep.sh +++ b/jobs/rocoto/prep.sh @@ -13,7 +13,8 @@ export job="prep" export jobid="${job}.$$" source "${HOMEgfs}/ush/jjob_header.sh" -e "prep" -c "base prep" -CDUMP="${RUN/enkf}" +# Strip 'enkf' from RUN for pulling data +local RUN_local="${RUN/enkf}" ############################################################### # Set script and dependency variables @@ -25,9 +26,9 @@ gPDY=${GDATE:0:8} gcyc=${GDATE:8:2} GDUMP="gdas" -export OPREFIX="${CDUMP}.t${cyc}z." +export OPREFIX="${RUN_local}.t${cyc}z." -YMD=${PDY} HH=${cyc} DUMP=${CDUMP} declare_from_tmpl -rx COM_OBS COM_OBSDMP +YMD=${PDY} HH=${cyc} DUMP=${RUN_local} declare_from_tmpl -rx COM_OBS COM_OBSDMP RUN=${GDUMP} DUMP=${GDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \ COM_OBS_PREV:COM_OBS_TMPL \ @@ -39,7 +40,7 @@ if [[ ! -d "${COM_OBS}" ]]; then mkdir -p "${COM_OBS}"; fi ############################################################### # If ROTDIR_DUMP=YES, copy dump files to rotdir if [[ ${ROTDIR_DUMP} = "YES" ]]; then - "${HOMEgfs}/ush/getdump.sh" "${PDY}${cyc}" "${CDUMP}" "${COM_OBSDMP}" "${COM_OBS}" + "${HOMEgfs}/ush/getdump.sh" "${PDY}${cyc}" "${RUN_local}" "${COM_OBSDMP}" "${COM_OBS}" status=$? [[ ${status} -ne 0 ]] && exit ${status} @@ -73,14 +74,14 @@ if [[ ${PROCESS_TROPCY} = "YES" ]]; then done fi - if [[ ${ROTDIR_DUMP} = "YES" ]]; then rm "${COM_OBS}/${CDUMP}.t${cyc}z.syndata.tcvitals.tm00"; fi + if [[ ${ROTDIR_DUMP} = "YES" ]]; then rm "${COM_OBS}/${RUN_local}.t${cyc}z.syndata.tcvitals.tm00"; fi "${HOMEgfs}/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC" status=$? [[ ${status} -ne 0 ]] && exit ${status} else - if [[ ${ROTDIR_DUMP} = "NO" ]]; then cp "${COM_OBSDMP}/${CDUMP}.t${cyc}z.syndata.tcvitals.tm00" "${COM_OBS}/"; fi + if [[ ${ROTDIR_DUMP} = "NO" ]]; then cp "${COM_OBSDMP}/${RUN_local}.t${cyc}z.syndata.tcvitals.tm00" "${COM_OBS}/"; fi fi @@ -93,17 +94,17 @@ if [[ ${MAKE_PREPBUFR} = "YES" ]]; then rm -f "${COM_OBS}/${OPREFIX}nsstbufr" fi - export job="j${CDUMP}_prep_${cyc}" + export job="j${RUN_local}_prep_${cyc}" export COMIN=${COM_OBS} export COMOUT=${COM_OBS} RUN="gdas" YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COMINgdas:COM_ATMOS_HISTORY_TMPL RUN="gfs" YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COMINgfs:COM_ATMOS_HISTORY_TMPL if [[ ${ROTDIR_DUMP} = "NO" ]]; then - export COMSP=${COMSP:-"${COM_OBSDMP}/${CDUMP}.t${cyc}z."} + export COMSP=${COMSP:-"${COM_OBSDMP}/${RUN_local}.t${cyc}z."} else - export COMSP=${COMSP:-"${COM_OBS}/${CDUMP}.t${cyc}z."} + export COMSP=${COMSP:-"${COM_OBS}/${RUN_local}.t${cyc}z."} fi - export COMSP=${COMSP:-${COMIN_OBS}/${CDUMP}.t${cyc}z.} + export COMSP=${COMSP:-${COMIN_OBS}/${RUN_local}.t${cyc}z.} # Disable creating NSSTBUFR if desired, copy from DMPDIR instead if [[ ${MAKE_NSSTBUFR:-"NO"} = "NO" ]]; then From 851899445bb2d84852741c48381753d59d76747e Mon Sep 17 00:00:00 2001 From: David Huber Date: Thu, 25 Jul 2024 15:27:39 +0000 Subject: [PATCH 70/73] Remove 'gefs' from default _RUN_LIST --- parm/config/gefs/config.resources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parm/config/gefs/config.resources b/parm/config/gefs/config.resources index 7510d38839b..f6e2715b42a 100644 --- a/parm/config/gefs/config.resources +++ b/parm/config/gefs/config.resources @@ -80,7 +80,7 @@ case ${step} in "fcst" | "efcs") export is_exclusive=True - _RUN_LIST=${RUN:-"gefs gfs"} + _RUN_LIST=${RUN:-"gfs"} # During workflow creation, we need resources for all RUNs and RUN is undefined for _RUN in ${_RUN_LIST}; do From be4a76cab1a2a66702fba59c5a2494dc94621e50 Mon Sep 17 00:00:00 2001 From: David Huber <69919478+DavidHuber-NOAA@users.noreply.github.com> Date: Thu, 25 Jul 2024 15:30:30 +0000 Subject: [PATCH 71/73] Apply suggestions from code review Co-authored-by: Walter Kolczynski - NOAA --- parm/config/gfs/config.anal | 2 +- parm/config/gfs/config.eobs | 2 +- parm/config/gfs/config.resources.HERA | 3 +-- parm/config/gfs/config.resources.JET | 3 +-- ush/calcanl_gfs.py | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/parm/config/gfs/config.anal b/parm/config/gfs/config.anal index d2852101978..27ff8742e49 100644 --- a/parm/config/gfs/config.anal +++ b/parm/config/gfs/config.anal @@ -12,7 +12,7 @@ if [[ ${DONST} = "YES" ]]; then . ${EXPDIR}/config.nsst fi -if [[ "${RUN}" = "gfs" ]] ; then +if [[ "${RUN}" == "gfs" ]] ; then export USE_RADSTAT="NO" # This can be only used when bias correction is not-zero. export GENDIAG="NO" export SETUP='diag_rad=.false.,diag_pcp=.false.,diag_conv=.false.,diag_ozone=.false.,write_diag(3)=.false.,niter(2)=100,' diff --git a/parm/config/gfs/config.eobs b/parm/config/gfs/config.eobs index 2f61b3bd427..7b7823e7643 100644 --- a/parm/config/gfs/config.eobs +++ b/parm/config/gfs/config.eobs @@ -15,7 +15,7 @@ export RERUN_EOMGGRP="YES" # GSI namelist options related to observer for EnKF export OBSINPUT_INVOBS="dmesh(1)=225.0,dmesh(2)=225.0,dmesh(3)=225.0,dmesh(4)=100.0" export OBSQC_INVOBS="tcp_width=60.0,tcp_ermin=2.0,tcp_ermax=12.0" -if [ ${LEVS} = "128" ]; then +if (( LEVS == 128 )); then export GRIDOPTS_INVOBS="nlayers(63)=1,nlayers(64)=1," export SETUP_INVOBS="gpstop=55,nsig_ext=56," fi diff --git a/parm/config/gfs/config.resources.HERA b/parm/config/gfs/config.resources.HERA index a683bc79e7b..36f50508c3f 100644 --- a/parm/config/gfs/config.resources.HERA +++ b/parm/config/gfs/config.resources.HERA @@ -5,8 +5,7 @@ case ${step} in "anal") if [[ "${CASE}" == "C384" ]]; then - export ntasks_gdas=270 - export ntasks_gfs=270 + export ntasks=270 export threads_per_task_anal=8 export tasks_per_node=$(( max_tasks_per_node / threads_per_task )) fi diff --git a/parm/config/gfs/config.resources.JET b/parm/config/gfs/config.resources.JET index 9463e8357bb..47b953c0f49 100644 --- a/parm/config/gfs/config.resources.JET +++ b/parm/config/gfs/config.resources.JET @@ -5,8 +5,7 @@ case ${step} in "anal") if [[ "${CASE}" == "C384" ]]; then - export ntasks_gdas=270 - export ntasks_gfs=270 + export ntasks=270 export threads_per_task=8 export tasks_per_node=$(( max_tasks_per_node / threads_per_task )) fi diff --git a/ush/calcanl_gfs.py b/ush/calcanl_gfs.py index ea97cacf907..5d97d25dfd4 100755 --- a/ush/calcanl_gfs.py +++ b/ush/calcanl_gfs.py @@ -19,7 +19,7 @@ def calcanl_gfs(DoIAU, l4DEnsVar, Write4Danl, ComOut, APrefix, ComIn_Ges, GPrefix, FixDir, atmges_ens_mean, RunDir, NThreads, NEMSGet, IAUHrs, - ExecCMD, ExecCMDMPI, ExecAnl, ExecChgresInc, Run, JEDI): + ExecCMD, ExecCMDMPI, ExecAnl, ExecChgresInc, run, JEDI): print('calcanl_gfs beginning at: ', datetime.datetime.utcnow()) IAUHH = IAUHrs From cf51599d786e063c78a8b5c17e8d669986f721f1 Mon Sep 17 00:00:00 2001 From: David Huber Date: Thu, 25 Jul 2024 17:46:46 +0000 Subject: [PATCH 72/73] Remove unneeded _RUN_LIST --- parm/config/gefs/config.resources | 209 +++++++++++++------------- parm/config/gfs/config.resources | 236 +++++++++++++++--------------- 2 files changed, 214 insertions(+), 231 deletions(-) diff --git a/parm/config/gefs/config.resources b/parm/config/gefs/config.resources index f6e2715b42a..81d2a206358 100644 --- a/parm/config/gefs/config.resources +++ b/parm/config/gefs/config.resources @@ -80,120 +80,110 @@ case ${step} in "fcst" | "efcs") export is_exclusive=True - _RUN_LIST=${RUN:-"gfs"} - - # During workflow creation, we need resources for all RUNs and RUN is undefined - for _RUN in ${_RUN_LIST}; do - if [[ "${_RUN}" =~ "gfs" ]]; then - export layout_x=${layout_x_gfs} - export layout_y=${layout_y_gfs} - export WRITE_GROUP=${WRITE_GROUP_GFS} - export WRTTASK_PER_GROUP_PER_THREAD=${WRTTASK_PER_GROUP_PER_THREAD_GFS} - ntasks_fv3=${ntasks_fv3_gfs} - ntasks_quilt=${ntasks_quilt_gfs} - nthreads_fv3=${nthreads_fv3_gfs} - nthreads_ufs=${nthreads_ufs_gfs} - fi - - # Determine if using ESMF-managed threading or traditional threading - # If using traditional threading, set them to 1 - if [[ "${USE_ESMF_THREADING:-}" == "YES" ]]; then - export UFS_THREADS=1 - else # traditional threading - export UFS_THREADS=${nthreads_ufs:-1} - nthreads_fv3=1 - nthreads_mediator=1 - [[ "${DO_WAVE}" == "YES" ]] && nthreads_ww3=1 - [[ "${DO_OCN}" == "YES" ]] && nthreads_mom6=1 - [[ "${DO_ICE}" == "YES" ]] && nthreads_cice6=1 - fi - - # PETS for the atmosphere dycore - (( FV3PETS = ntasks_fv3 * nthreads_fv3 )) - echo "FV3 using (nthreads, PETS) = (${nthreads_fv3}, ${FV3PETS})" - - # PETS for quilting - if [[ "${QUILTING:-}" == ".true." ]]; then - (( QUILTPETS = ntasks_quilt * nthreads_fv3 )) - (( WRTTASK_PER_GROUP = WRTTASK_PER_GROUP_PER_THREAD )) - export WRTTASK_PER_GROUP - else - QUILTPETS=0 - fi - echo "QUILT using (nthreads, PETS) = (${nthreads_fv3}, ${QUILTPETS})" - - # Total PETS for the atmosphere component - ATMTHREADS=${nthreads_fv3} - (( ATMPETS = FV3PETS + QUILTPETS )) - export ATMPETS ATMTHREADS - echo "FV3ATM using (nthreads, PETS) = (${ATMTHREADS}, ${ATMPETS})" - - # Total PETS for the coupled model (starting w/ the atmosphere) - NTASKS_TOT=${ATMPETS} - - # The mediator PETS can overlap with other components, usually it lands on the atmosphere tasks. - # However, it is suggested limiting mediator PETS to 300, as it may cause the slow performance. - # See https://docs.google.com/document/d/1bKpi-52t5jIfv2tuNHmQkYUe3hkKsiG_DG_s6Mnukog/edit - # TODO: Update reference when moved to ufs-weather-model RTD - MEDTHREADS=${nthreads_mediator:-1} - MEDPETS=${MEDPETS:-${FV3PETS}} - (( "${MEDPETS}" > 300 )) && MEDPETS=300 - export MEDPETS MEDTHREADS - echo "MEDIATOR using (threads, PETS) = (${MEDTHREADS}, ${MEDPETS})" - - CHMPETS=0; CHMTHREADS=0 - if [[ "${DO_AERO}" == "YES" ]]; then - # GOCART shares the same grid and forecast tasks as FV3 (do not add write grid component tasks). - (( CHMTHREADS = ATMTHREADS )) - (( CHMPETS = FV3PETS )) - # Do not add to NTASKS_TOT - echo "GOCART using (threads, PETS) = (${CHMTHREADS}, ${CHMPETS})" - fi - export CHMPETS CHMTHREADS - - WAVPETS=0; WAVTHREADS=0 - if [[ "${DO_WAVE}" == "YES" ]]; then - (( WAVPETS = ntasks_ww3 * nthreads_ww3 )) - (( WAVTHREADS = nthreads_ww3 )) - echo "WW3 using (threads, PETS) = (${WAVTHREADS}, ${WAVPETS})" - (( NTASKS_TOT = NTASKS_TOT + WAVPETS )) - fi - export WAVPETS WAVTHREADS - - OCNPETS=0; OCNTHREADS=0 - if [[ "${DO_OCN}" == "YES" ]]; then - (( OCNPETS = ntasks_mom6 * nthreads_mom6 )) - (( OCNTHREADS = nthreads_mom6 )) - echo "MOM6 using (threads, PETS) = (${OCNTHREADS}, ${OCNPETS})" - (( NTASKS_TOT = NTASKS_TOT + OCNPETS )) - fi - export OCNPETS OCNTHREADS - - ICEPETS=0; ICETHREADS=0 - if [[ "${DO_ICE}" == "YES" ]]; then - (( ICEPETS = ntasks_cice6 * nthreads_cice6 )) - (( ICETHREADS = nthreads_cice6 )) - echo "CICE6 using (threads, PETS) = (${ICETHREADS}, ${ICEPETS})" - (( NTASKS_TOT = NTASKS_TOT + ICEPETS )) - fi - export ICEPETS ICETHREADS - - echo "Total PETS for ${_RUN} = ${NTASKS_TOT}" - - declare -x "ntasks_${_RUN}"="${NTASKS_TOT}" - declare -x "threads_per_task_${_RUN}"="${UFS_THREADS}" - declare -x "tasks_per_node_${_RUN}"="${max_tasks_per_node}" - - done + export layout_x=${layout_x_gfs} + export layout_y=${layout_y_gfs} + export WRITE_GROUP=${WRITE_GROUP_GFS} + export WRTTASK_PER_GROUP_PER_THREAD=${WRTTASK_PER_GROUP_PER_THREAD_GFS} + ntasks_fv3=${ntasks_fv3_gfs} + ntasks_quilt=${ntasks_quilt_gfs} + nthreads_fv3=${nthreads_fv3_gfs} + nthreads_ufs=${nthreads_ufs_gfs} + + # Determine if using ESMF-managed threading or traditional threading + # If using traditional threading, set them to 1 + if [[ "${USE_ESMF_THREADING:-}" == "YES" ]]; then + export UFS_THREADS=1 + else # traditional threading + export UFS_THREADS=${nthreads_ufs:-1} + nthreads_fv3=1 + nthreads_mediator=1 + [[ "${DO_WAVE}" == "YES" ]] && nthreads_ww3=1 + [[ "${DO_OCN}" == "YES" ]] && nthreads_mom6=1 + [[ "${DO_ICE}" == "YES" ]] && nthreads_cice6=1 + fi + + # PETS for the atmosphere dycore + (( FV3PETS = ntasks_fv3 * nthreads_fv3 )) + echo "FV3 using (nthreads, PETS) = (${nthreads_fv3}, ${FV3PETS})" + + # PETS for quilting + if [[ "${QUILTING:-}" == ".true." ]]; then + (( QUILTPETS = ntasks_quilt * nthreads_fv3 )) + (( WRTTASK_PER_GROUP = WRTTASK_PER_GROUP_PER_THREAD )) + export WRTTASK_PER_GROUP + else + QUILTPETS=0 + fi + echo "QUILT using (nthreads, PETS) = (${nthreads_fv3}, ${QUILTPETS})" + + # Total PETS for the atmosphere component + ATMTHREADS=${nthreads_fv3} + (( ATMPETS = FV3PETS + QUILTPETS )) + export ATMPETS ATMTHREADS + echo "FV3ATM using (nthreads, PETS) = (${ATMTHREADS}, ${ATMPETS})" + + # Total PETS for the coupled model (starting w/ the atmosphere) + NTASKS_TOT=${ATMPETS} + + # The mediator PETS can overlap with other components, usually it lands on the atmosphere tasks. + # However, it is suggested limiting mediator PETS to 300, as it may cause the slow performance. + # See https://docs.google.com/document/d/1bKpi-52t5jIfv2tuNHmQkYUe3hkKsiG_DG_s6Mnukog/edit + # TODO: Update reference when moved to ufs-weather-model RTD + MEDTHREADS=${nthreads_mediator:-1} + MEDPETS=${MEDPETS:-${FV3PETS}} + (( "${MEDPETS}" > 300 )) && MEDPETS=300 + export MEDPETS MEDTHREADS + echo "MEDIATOR using (threads, PETS) = (${MEDTHREADS}, ${MEDPETS})" + + CHMPETS=0; CHMTHREADS=0 + if [[ "${DO_AERO}" == "YES" ]]; then + # GOCART shares the same grid and forecast tasks as FV3 (do not add write grid component tasks). + (( CHMTHREADS = ATMTHREADS )) + (( CHMPETS = FV3PETS )) + # Do not add to NTASKS_TOT + echo "GOCART using (threads, PETS) = (${CHMTHREADS}, ${CHMPETS})" + fi + export CHMPETS CHMTHREADS + + WAVPETS=0; WAVTHREADS=0 + if [[ "${DO_WAVE}" == "YES" ]]; then + (( WAVPETS = ntasks_ww3 * nthreads_ww3 )) + (( WAVTHREADS = nthreads_ww3 )) + echo "WW3 using (threads, PETS) = (${WAVTHREADS}, ${WAVPETS})" + (( NTASKS_TOT = NTASKS_TOT + WAVPETS )) + fi + export WAVPETS WAVTHREADS + + OCNPETS=0; OCNTHREADS=0 + if [[ "${DO_OCN}" == "YES" ]]; then + (( OCNPETS = ntasks_mom6 * nthreads_mom6 )) + (( OCNTHREADS = nthreads_mom6 )) + echo "MOM6 using (threads, PETS) = (${OCNTHREADS}, ${OCNPETS})" + (( NTASKS_TOT = NTASKS_TOT + OCNPETS )) + fi + export OCNPETS OCNTHREADS + + ICEPETS=0; ICETHREADS=0 + if [[ "${DO_ICE}" == "YES" ]]; then + (( ICEPETS = ntasks_cice6 * nthreads_cice6 )) + (( ICETHREADS = nthreads_cice6 )) + echo "CICE6 using (threads, PETS) = (${ICETHREADS}, ${ICEPETS})" + (( NTASKS_TOT = NTASKS_TOT + ICEPETS )) + fi + export ICEPETS ICETHREADS + + echo "Total PETS = ${NTASKS_TOT}" + + declare -x "ntasks"="${NTASKS_TOT}" + declare -x "threads_per_task"="${UFS_THREADS}" + declare -x "tasks_per_node"="${max_tasks_per_node}" case "${CASE}" in "C48" | "C96" | "C192") - declare -x "walltime_gefs"="03:00:00" - declare -x "walltime_gfs"="03:00:00" + declare -x "walltime"="03:00:00" ;; "C384" | "C768" | "C1152") - declare -x "walltime_gefs"="06:00:00" - declare -x "walltime_gfs"="06:00:00" + declare -x "walltime"="06:00:00" ;; *) echo "FATAL ERROR: Resources not defined for job ${step} at resolution ${CASE}" @@ -201,7 +191,6 @@ case ${step} in ;; esac - unset _RUN _RUN_LIST unset NTASKS_TOT ;; diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index 81677d15029..b1c9f7be446 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -635,134 +635,128 @@ case ${step} in "fcst" | "efcs") export is_exclusive=True - if [[ "${step}" == "fcst" ]]; then - _RUN_LIST=${RUN:-"gdas gfs"} - elif [[ "${step}" == "efcs" ]]; then - _RUN_LIST=${RUN:-"enkfgdas enkfgfs"} - fi - - # During workflow creation, we need resources for all RUNs and RUN is undefined - for _RUN in ${_RUN_LIST}; do - if [[ "${_RUN}" =~ "gfs" ]]; then - export layout_x=${layout_x_gfs} - export layout_y=${layout_y_gfs} - export WRITE_GROUP=${WRITE_GROUP_GFS} - export WRTTASK_PER_GROUP_PER_THREAD=${WRTTASK_PER_GROUP_PER_THREAD_GFS} - ntasks_fv3=${ntasks_fv3_gfs} - ntasks_quilt=${ntasks_quilt_gfs} - nthreads_fv3=${nthreads_fv3_gfs} - nthreads_ufs=${nthreads_ufs_gfs} - # Will not be set if we are skipping the mediator - nthreads_mediator=${nthreads_mediator_gfs:-} - elif [[ "${_RUN}" =~ "gdas" ]]; then - export layout_x=${layout_x_gdas} - export layout_y=${layout_y_gdas} - export WRITE_GROUP=${WRITE_GROUP_GDAS} - export WRTTASK_PER_GROUP_PER_THREAD=${WRTTASK_PER_GROUP_PER_THREAD_GDAS} - ntasks_fv3=${ntasks_fv3_gdas} - ntasks_quilt=${ntasks_quilt_gdas} - nthreads_fv3=${nthreads_fv3_gdas} - nthreads_ufs=${nthreads_ufs_gdas} - nthreads_mediator=${nthreads_mediator_gdas:-} + _RUN=${RUN:-"gfs"} + _RUN=${RUN/enkf/} + + # Declare variables from config.ufs based on _RUN + # Export layout and write task variables, but not ntasks/threads + # Capitalize _RUN for write tasks + for var in layout_x layout_y ntasks_fv3 ntasks_quilt nthreads_fv3 nthreads_ufs \ + WRITE_GROUP WRTTASK_PER_GROUP_PER_THREAD; do + if [[ ${var} =~ "layout" ]]; then + ufs_var_name="${var}_${_RUN}" + declare -x "${var}"="${!ufs_var_name}" + elif [[ ${var} =~ "WR" ]]; then + ufs_var_name="${var}_${_RUN^^}" + declare -x "${var}"="${!ufs_var_name}" + else + ufs_var_name="${var}_${_RUN}" + declare "${var}"="${!ufs_var_name}" fi + done - # Determine if using ESMF-managed threading or traditional threading - # If using traditional threading, set them to 1 - if [[ "${USE_ESMF_THREADING:-}" == "YES" ]]; then - export UFS_THREADS=1 - else # traditional threading - export UFS_THREADS=${nthreads_ufs:-1} - nthreads_fv3=1 - nthreads_mediator=1 - [[ "${DO_WAVE}" == "YES" ]] && nthreads_ww3=1 - [[ "${DO_OCN}" == "YES" ]] && nthreads_mom6=1 - [[ "${DO_ICE}" == "YES" ]] && nthreads_cice6=1 - fi + # Will not set mediator threads if we are skipping the mediator + if [[ ${_RUN} == "gfs" ]]; then + nthreads_mediator=${nthreads_mediator_gfs:-} + elif [[ ${_RUN} == "gdas" ]]; then + nthreads_mediator=${nthreads_mediator_gdas:-} + fi - if (( ntiles > 6 )); then - export layout_x_nest=${layout_x_nest:-10} - export layout_y_nest=${layout_y_nest:-10} - export npx_nest=${npx_nest:-1441} - export npy_nest=${npy_nest:-961} - fi + # Determine if using ESMF-managed threading or traditional threading + # If using traditional threading, set them to 1 + if [[ "${USE_ESMF_THREADING:-}" == "YES" ]]; then + export UFS_THREADS=1 + else # traditional threading + export UFS_THREADS=${nthreads_ufs:-1} + nthreads_fv3=1 + nthreads_mediator=1 + [[ "${DO_WAVE}" == "YES" ]] && nthreads_ww3=1 + [[ "${DO_OCN}" == "YES" ]] && nthreads_mom6=1 + [[ "${DO_ICE}" == "YES" ]] && nthreads_cice6=1 + fi - # PETS for the atmosphere dycore - (( FV3PETS = ntasks_fv3 * nthreads_fv3 )) - echo "FV3 using (nthreads, PETS) = (${nthreads_fv3}, ${FV3PETS})" + if (( ntiles > 6 )); then + export layout_x_nest=${layout_x_nest:-10} + export layout_y_nest=${layout_y_nest:-10} + export npx_nest=${npx_nest:-1441} + export npy_nest=${npy_nest:-961} + fi - # PETS for quilting - if [[ "${QUILTING:-}" == ".true." ]]; then - (( QUILTPETS = ntasks_quilt * nthreads_fv3 )) - (( WRTTASK_PER_GROUP = WRTTASK_PER_GROUP_PER_THREAD )) - export WRTTASK_PER_GROUP - else - QUILTPETS=0 - fi - echo "QUILT using (nthreads, PETS) = (${nthreads_fv3}, ${QUILTPETS})" - - # Total PETS for the atmosphere component - ATMTHREADS=${nthreads_fv3} - (( ATMPETS = FV3PETS + QUILTPETS )) - export ATMPETS ATMTHREADS - echo "FV3ATM using (nthreads, PETS) = (${ATMTHREADS}, ${ATMPETS})" - - # Total PETS for the coupled model (starting w/ the atmosphere) - NTASKS_TOT=${ATMPETS} - - # The mediator PETS can overlap with other components, usually it lands on the atmosphere tasks. - # However, it is suggested limiting mediator PETS to 300, as it may cause the slow performance. - # See https://docs.google.com/document/d/1bKpi-52t5jIfv2tuNHmQkYUe3hkKsiG_DG_s6Mnukog/edit - # TODO: Update reference when moved to ufs-weather-model RTD - MEDTHREADS=${nthreads_mediator:-1} - MEDPETS=${MEDPETS:-${FV3PETS}} - (( "${MEDPETS}" > 300 )) && MEDPETS=300 - export MEDPETS MEDTHREADS - echo "MEDIATOR using (threads, PETS) = (${MEDTHREADS}, ${MEDPETS})" - - CHMPETS=0; CHMTHREADS=0 - if [[ "${DO_AERO}" == "YES" ]]; then - # GOCART shares the same grid and forecast tasks as FV3 (do not add write grid component tasks). - (( CHMTHREADS = ATMTHREADS )) - (( CHMPETS = FV3PETS )) - # Do not add to NTASKS_TOT - echo "GOCART using (threads, PETS) = (${CHMTHREADS}, ${CHMPETS})" - fi - export CHMPETS CHMTHREADS - - WAVPETS=0; WAVTHREADS=0 - if [[ "${DO_WAVE}" == "YES" ]]; then - (( WAVPETS = ntasks_ww3 * nthreads_ww3 )) - (( WAVTHREADS = nthreads_ww3 )) - echo "WW3 using (threads, PETS) = (${WAVTHREADS}, ${WAVPETS})" - (( NTASKS_TOT = NTASKS_TOT + WAVPETS )) - fi - export WAVPETS WAVTHREADS - - OCNPETS=0; OCNTHREADS=0 - if [[ "${DO_OCN}" == "YES" ]]; then - (( OCNPETS = ntasks_mom6 * nthreads_mom6 )) - (( OCNTHREADS = nthreads_mom6 )) - echo "MOM6 using (threads, PETS) = (${OCNTHREADS}, ${OCNPETS})" - (( NTASKS_TOT = NTASKS_TOT + OCNPETS )) - fi - export OCNPETS OCNTHREADS - - ICEPETS=0; ICETHREADS=0 - if [[ "${DO_ICE}" == "YES" ]]; then - (( ICEPETS = ntasks_cice6 * nthreads_cice6 )) - (( ICETHREADS = nthreads_cice6 )) - echo "CICE6 using (threads, PETS) = (${ICETHREADS}, ${ICEPETS})" - (( NTASKS_TOT = NTASKS_TOT + ICEPETS )) - fi - export ICEPETS ICETHREADS + # PETS for the atmosphere dycore + (( FV3PETS = ntasks_fv3 * nthreads_fv3 )) + echo "FV3 using (nthreads, PETS) = (${nthreads_fv3}, ${FV3PETS})" - echo "Total PETS for ${_RUN} = ${NTASKS_TOT}" + # PETS for quilting + if [[ "${QUILTING:-}" == ".true." ]]; then + (( QUILTPETS = ntasks_quilt * nthreads_fv3 )) + (( WRTTASK_PER_GROUP = WRTTASK_PER_GROUP_PER_THREAD )) + export WRTTASK_PER_GROUP + else + QUILTPETS=0 + fi + echo "QUILT using (nthreads, PETS) = (${nthreads_fv3}, ${QUILTPETS})" + + # Total PETS for the atmosphere component + ATMTHREADS=${nthreads_fv3} + (( ATMPETS = FV3PETS + QUILTPETS )) + export ATMPETS ATMTHREADS + echo "FV3ATM using (nthreads, PETS) = (${ATMTHREADS}, ${ATMPETS})" + + # Total PETS for the coupled model (starting w/ the atmosphere) + NTASKS_TOT=${ATMPETS} + + # The mediator PETS can overlap with other components, usually it lands on the atmosphere tasks. + # However, it is suggested limiting mediator PETS to 300, as it may cause the slow performance. + # See https://docs.google.com/document/d/1bKpi-52t5jIfv2tuNHmQkYUe3hkKsiG_DG_s6Mnukog/edit + # TODO: Update reference when moved to ufs-weather-model RTD + MEDTHREADS=${nthreads_mediator:-1} + MEDPETS=${MEDPETS:-${FV3PETS}} + (( "${MEDPETS}" > 300 )) && MEDPETS=300 + export MEDPETS MEDTHREADS + echo "MEDIATOR using (threads, PETS) = (${MEDTHREADS}, ${MEDPETS})" + + CHMPETS=0; CHMTHREADS=0 + if [[ "${DO_AERO}" == "YES" ]]; then + # GOCART shares the same grid and forecast tasks as FV3 (do not add write grid component tasks). + (( CHMTHREADS = ATMTHREADS )) + (( CHMPETS = FV3PETS )) + # Do not add to NTASKS_TOT + echo "GOCART using (threads, PETS) = (${CHMTHREADS}, ${CHMPETS})" + fi + export CHMPETS CHMTHREADS + + WAVPETS=0; WAVTHREADS=0 + if [[ "${DO_WAVE}" == "YES" ]]; then + (( WAVPETS = ntasks_ww3 * nthreads_ww3 )) + (( WAVTHREADS = nthreads_ww3 )) + echo "WW3 using (threads, PETS) = (${WAVTHREADS}, ${WAVPETS})" + (( NTASKS_TOT = NTASKS_TOT + WAVPETS )) + fi + export WAVPETS WAVTHREADS + + OCNPETS=0; OCNTHREADS=0 + if [[ "${DO_OCN}" == "YES" ]]; then + (( OCNPETS = ntasks_mom6 * nthreads_mom6 )) + (( OCNTHREADS = nthreads_mom6 )) + echo "MOM6 using (threads, PETS) = (${OCNTHREADS}, ${OCNPETS})" + (( NTASKS_TOT = NTASKS_TOT + OCNPETS )) + fi + export OCNPETS OCNTHREADS + + ICEPETS=0; ICETHREADS=0 + if [[ "${DO_ICE}" == "YES" ]]; then + (( ICEPETS = ntasks_cice6 * nthreads_cice6 )) + (( ICETHREADS = nthreads_cice6 )) + echo "CICE6 using (threads, PETS) = (${ICETHREADS}, ${ICEPETS})" + (( NTASKS_TOT = NTASKS_TOT + ICEPETS )) + fi + export ICEPETS ICETHREADS - declare -x "ntasks_${_RUN}"="${NTASKS_TOT}" - declare -x "threads_per_task_${_RUN}"="${UFS_THREADS}" - declare -x "tasks_per_node_${_RUN}"="${max_tasks_per_node}" + echo "Total PETS for ${RUN:-gfs} = ${NTASKS_TOT}" - done + declare -x "ntasks"="${NTASKS_TOT}" + declare -x "threads_per_task"="${UFS_THREADS}" + declare -x "tasks_per_node"="${max_tasks_per_node}" case "${CASE}" in "C48" | "C96" | "C192") @@ -788,7 +782,7 @@ case ${step} in ;; esac - unset _RUN _RUN_LIST + unset _RUN unset NTASKS_TOT ;; From 3264de1f3ffb5cbb3e3250b84a0d653abce4c3a7 Mon Sep 17 00:00:00 2001 From: David Huber Date: Thu, 25 Jul 2024 18:14:46 +0000 Subject: [PATCH 73/73] Remove local declaration --- jobs/rocoto/prep.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/rocoto/prep.sh b/jobs/rocoto/prep.sh index 48e5a461608..bbde68377df 100755 --- a/jobs/rocoto/prep.sh +++ b/jobs/rocoto/prep.sh @@ -14,7 +14,7 @@ export jobid="${job}.$$" source "${HOMEgfs}/ush/jjob_header.sh" -e "prep" -c "base prep" # Strip 'enkf' from RUN for pulling data -local RUN_local="${RUN/enkf}" +RUN_local="${RUN/enkf}" ############################################################### # Set script and dependency variables