diff --git a/jobs/JREGIONAL_CHECK_POST_OUTPUT b/jobs/JREGIONAL_CHECK_POST_OUTPUT index e8fbe77296..288c499787 100755 --- a/jobs/JREGIONAL_CHECK_POST_OUTPUT +++ b/jobs/JREGIONAL_CHECK_POST_OUTPUT @@ -8,7 +8,7 @@ # Run-time environment variables: # # CDATE -# ENSMEM_INDX +# ENSMEM_NAME # GLOBAL_VAR_DEFNS_FP # # Experiment variables diff --git a/parm/wflow/coldstart.yaml b/parm/wflow/coldstart.yaml index 6fad0b8d83..a808b07e55 100644 --- a/parm/wflow/coldstart.yaml +++ b/parm/wflow/coldstart.yaml @@ -11,7 +11,7 @@ default_task: &default_task nprocs: '{{ parent.nnodes * parent.ppn }}' subcyc: !cycstr "@M" LOGDIR: !cycstr "&LOGDIR;" - ENSMEM_INDX: '#mem#' + ENSMEM_INDX: '#mem_indx#' native: '{{ platform.SCHED_NATIVE_CMD }}' nodes: '{{ nnodes }}:ppn={{ ppn }}' partition: '{% if platform.get("PARTITION_DEFAULT") %}&PARTITION_DEFAULT;{% else %}None{% endif %}' @@ -82,8 +82,9 @@ task_get_extrn_lbcs: metatask_run_ensemble: var: - mem: '{% if global.DO_ENSEMBLE %}{%- for m in range(1, global.NUM_ENS_MEMBERS+1) -%}{{ "%03d "%m }}{%- endfor -%} {% else %}{{ "000"|string }}{% endif %}' - task_make_ics_mem#mem#: + mem_indx: '&ENSMEM_INDICES;' + mem_name: '&ENSMEM_NAMES;' + task_make_ics_#mem_name#: <<: *default_task command: '&LOAD_MODULES_RUN_TASK; "make_ics" "&JOBSdir;/JREGIONAL_MAKE_ICS"' envars: @@ -122,7 +123,7 @@ metatask_run_ensemble: left: staged_sfc_climo right: '{% if not rocoto.get("tasks", {}).get("task_make_sfc_climo") %}staged_sfc_climo{% endif %}' - task_make_lbcs_mem#mem#: + task_make_lbcs_#mem_name#: <<: *default_task command: '&LOAD_MODULES_RUN_TASK; "make_lbcs" "&JOBSdir;/JREGIONAL_MAKE_LBCS"' envars: @@ -140,7 +141,7 @@ metatask_run_ensemble: attrs: task: get_extrn_lbcs - task_run_fcst_mem#mem#: + task_run_fcst_#mem_name#: <<: *default_task command: '&LOAD_MODULES_RUN_TASK; "run_fcst" "&JOBSdir;/JREGIONAL_RUN_FCST"' envars: @@ -157,10 +158,10 @@ metatask_run_ensemble: and: taskdep_make_ics: attrs: - task: make_ics_mem#mem# + task: make_ics_#mem_name# taskdep_make_lbcs: attrs: - task: make_lbcs_mem#mem# + task: make_lbcs_#mem_name# or_nexus_emission: not: taskvalid: diff --git a/parm/wflow/default_workflow.yaml b/parm/wflow/default_workflow.yaml index d0f459e362..b2a793d533 100644 --- a/parm/wflow/default_workflow.yaml +++ b/parm/wflow/default_workflow.yaml @@ -27,6 +27,10 @@ rocoto: RUN: '{{ nco.RUN_default }}' SCRIPTSdir: '{{ user.SCRIPTSdir }}' SENDCOM: '{{ nco.SENDCOM_default }}' + SLASH_ENSMEM_SUBDIR: '{{- "/" }} + {%- if global.DO_ENSEMBLE %} + {{- "#mem_name#" }} + {%- endif %}' ENSMEM_INDICES: '{%- for mem_indx in global.ENSMEM_INDS %} {{- mem_indx ~ " " }} {%- endfor %}' @@ -43,7 +47,7 @@ rocoto: DATAROOT: '{{ nco.PTMP }}/&envir;/tmp' DCOMROOT: '{{ nco.PTMP }}/&envir;/dcom' COMIN_DIR: '{% if user.RUN_ENVIR == "nco" %}&COMROOT;/&NET;/&model_ver;/&RUN;.@Y@m@d/@H{% else %}{{ workflow.EXPTDIR }}/@Y@m@d@H{% endif %}' - FCST_DIR: '{% if user.RUN_ENVIR == "nco" %}&DATAROOT;/run_fcst_mem#mem#_@Y@m@d@H{% else %}{{ workflow.EXPTDIR }}/@Y@m@d@H{% endif %}' + FCST_DIR: '{% if user.RUN_ENVIR == "nco" %}&DATAROOT;/run_fcst_#mem_name#_@Y@m@d@H{% else %}{{ workflow.EXPTDIR }}/@Y@m@d@H{% endif %}' LOGDIR: '{% if user.RUN_ENVIR == "nco" %}&COMROOT;/output/logs/@Y@m@d{% else %}{{ workflow.EXPTDIR }}/log{% endif %}' attrs: cyclethrottle: "200" diff --git a/parm/wflow/plot.yaml b/parm/wflow/plot.yaml index 8448bc3f9e..eccc10cb01 100644 --- a/parm/wflow/plot.yaml +++ b/parm/wflow/plot.yaml @@ -15,7 +15,7 @@ default_task_plot: &default_task fhr: '#fhr#' LOGDIR: !cycstr "&LOGDIR;" SLASH_ENSMEM_SUBDIR: '&SLASH_ENSMEM_SUBDIR;' - ENSMEM_INDX: '#mem#' + ENSMEM_INDX: '#mem_indx#' nprocs: '{{ parent.nnodes * parent.ppn }}' join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;' native: '{{ platform.SCHED_NATIVE_CMD }}' @@ -28,12 +28,13 @@ default_task_plot: &default_task metatask_plot_allvars: var: - mem: '{% if global.DO_ENSEMBLE %}{%- for m in range(1, global.NUM_ENS_MEMBERS+1) -%}{{ "%03d "%m }}{%- endfor -%} {% else %}{{ "000"|string }}{% endif %}' - metatask_plot_allvars_mem#mem#_all_fhrs: + mem_indx: '&ENSMEM_INDICES;' + mem_name: '&ENSMEM_NAMES;' + metatask_plot_allvars_#mem_name#_all_fhrs: var: fhr: '{% for h in range(0, workflow.LONG_FCST_LEN+1) %}{{ " %03d" % h }}{% endfor %}' cycledef: '{% for h in range(0, workflow.LONG_FCST_LEN+1) %}{% if h <= workflow.FCST_LEN_CYCL|min %}forecast {% else %}long_forecast {% endif %}{% endfor %}' - task_plot_allvars_mem#mem#_f#fhr#: + task_plot_allvars_#mem_name#_f#fhr#: <<: *default_task command: '&LOAD_MODULES_RUN_TASK; "plot_allvars" "&JOBSdir;/JREGIONAL_PLOT_ALLVARS"' dependency: @@ -41,7 +42,7 @@ metatask_plot_allvars: and_run_post: # If post was meant to run, wait on the whole post metatask taskvalid: attrs: - task: run_post_mem#mem#_f#fhr# + task: run_post_#mem_name#_f#fhr# metataskdep: attrs: metatask: run_ens_post @@ -49,8 +50,8 @@ metatask_plot_allvars: not: taskvalid: attrs: - task: run_post_mem#mem#_f#fhr# + task: run_post_#mem_name#_f#fhr# taskdep: attrs: - task: run_post_mem#mem#_f#fhr# + task: run_post_#mem_name#_f#fhr# diff --git a/parm/wflow/post.yaml b/parm/wflow/post.yaml index 114e5de377..4f76c0fb83 100644 --- a/parm/wflow/post.yaml +++ b/parm/wflow/post.yaml @@ -11,7 +11,7 @@ default_task_post: &default_task cyc: !cycstr '@H' fhr: '#fhr#' SLASH_ENSMEM_SUBDIR: '&SLASH_ENSMEM_SUBDIR;' - ENSMEM_INDX: '#mem#' + ENSMEM_INDX: '#mem_indx#' nprocs: '{{ parent.nnodes * parent.ppn }}' join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;' native: '{{ platform.SCHED_NATIVE_CMD }}' @@ -24,18 +24,19 @@ default_task_post: &default_task metatask_run_ens_post: var: - mem: '{% if global.DO_ENSEMBLE %}{%- for m in range(1, global.NUM_ENS_MEMBERS+1) -%}{{ "%03d "%m }}{%- endfor -%} {% else %}{{ "000"|string }}{% endif %}' - metatask_run_post_mem#mem#_all_fhrs: + mem_indx: '&ENSMEM_INDICES;' + mem_name: '&ENSMEM_NAMES;' + metatask_run_post_#mem_name#_all_fhrs: var: fhr: '{% for h in range(0, workflow.LONG_FCST_LEN+1) %}{{ " %03d" % h }}{% endfor %}' cycledef: '{% for h in range(0, workflow.LONG_FCST_LEN+1) %}{% if h <= workflow.FCST_LEN_CYCL|min %}forecast {% else %}long_forecast {% endif %}{% endfor %}' - task_run_post_mem#mem#_f#fhr#: + task_run_post_#mem_name#_f#fhr#: <<: *default_task dependency: or: taskdep: attrs: - task: run_fcst_mem#mem# + task: run_fcst_#mem_name# and: datadep_dyn: text: !cycstr '&FCST_DIR;&SLASH_ENSMEM_SUBDIR;/dynf#fhr#.nc' @@ -52,7 +53,7 @@ metatask_run_ens_post: metatask_sub_hourly_post: var: fmn: '{% for min in range(0, 60, task_run_post.DT_SUBHOURLY_POST_MNTS) %}{{ " %02d" % min }}{% endfor %}' - task_run_post_mem#mem#_f#fhr##fmn#: &subhourly_run_post_task + task_run_post_#mem_name#_f#fhr##fmn#: &subhourly_run_post_task <<: *default_task envars: <<: *default_vars @@ -61,7 +62,7 @@ metatask_run_ens_post: or: taskdep: attrs: - task: run_fcst_mem#mem# + task: run_fcst_#mem_name# and: datadep_dyn: text: !cycstr '&FCST_DIR;&SLASH_ENSMEM_SUBDIR;/dynf#fhr#:#fmn#:00.nc' @@ -76,5 +77,5 @@ metatask_run_ens_post: var: fhr: '{{ " %03d" % workflow.FCST_LEN_HRS }}' fmn: '00' - task_run_post_mem#mem#_f#fhr##fmn#: + task_run_post_#mem_name#_f#fhr##fmn#: <<: *subhourly_run_post_task diff --git a/parm/wflow/prdgen.yaml b/parm/wflow/prdgen.yaml index 3f2026a45f..979dfa6445 100644 --- a/parm/wflow/prdgen.yaml +++ b/parm/wflow/prdgen.yaml @@ -1,11 +1,12 @@ metatask_run_prdgen: var: - mem: '{% if global.DO_ENSEMBLE %}{%- for m in range(1, global.NUM_ENS_MEMBERS+1) -%}{{ "%03d "%m }}{%- endfor -%} {% else %}{{ "000"|string }}{% endif %}' - metatask_run_prdgen_hrs_mem#mem#: + mem_indx: '&ENSMEM_INDICES;' + mem_name: '&ENSMEM_NAMES;' + metatask_run_prdgen_hrs_#mem_name#: var: fhr: '{% for h in range(0, workflow.LONG_FCST_LEN+1) %}{{ " %03d" % h }}{% endfor %}' cycledef: '{% for h in range(0, workflow.LONG_FCST_LEN+1) %}{% if h <= workflow.FCST_LEN_HRS %}forecast {% else %}long_forecast {% endif %}{% endfor %}' - task_run_prdgen_mem#mem#_f#fhr#: + task_run_prdgen_#mem_name#_f#fhr#: account: '&ACCOUNT;' attrs: cycledefs: '#cycledef#' @@ -18,7 +19,7 @@ metatask_run_prdgen: cyc: !cycstr '@H' fhr: '#fhr#' SLASH_ENSMEM_SUBDIR: '&SLASH_ENSMEM_SUBDIR;' - ENSMEM_INDX: '#mem#' + ENSMEM_INDX: '#mem_indx#' nprocs: '{{ parent.nnodes * parent.ppn }}' join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;' native: '{{ platform.SCHED_NATIVE_CMD }}' @@ -31,4 +32,4 @@ metatask_run_prdgen: dependency: taskdep: attrs: - task: run_post_mem#mem#_f#fhr# + task: run_post_#mem_name#_f#fhr# diff --git a/parm/wflow/test.yaml b/parm/wflow/test.yaml index 9c084d6875..56e77ec6e6 100644 --- a/parm/wflow/test.yaml +++ b/parm/wflow/test.yaml @@ -15,7 +15,7 @@ default_task_test: &default_task subcyc: !cycstr "@M" LOGDIR: !cycstr "&LOGDIR;" SLASH_ENSMEM_SUBDIR: '&SLASH_ENSMEM_SUBDIR;' - ENSMEM_INDX: '#mem#' + ENSMEM_INDX: '#mem_indx#' native: '{{ platform.SCHED_NATIVE_CMD }}' nnodes: 1 nodes: '{{ nnodes }}:ppn={{ ppn }}' @@ -26,8 +26,9 @@ default_task_test: &default_task metatask_integration_test: var: - mem: '{% if global.DO_ENSEMBLE %}{%- for m in range(1, global.NUM_ENS_MEMBERS+1) -%}{{ "%03d "%m }}{%- endfor -%} {% else %}{{ "000"|string }}{% endif %}' - task_integration_test_mem#mem#: + mem_indx: '&ENSMEM_INDICES;' + mem_name: '&ENSMEM_NAMES;' + task_integration_test_#mem_name#: <<: *default_task command: '&LOAD_MODULES_RUN_TASK; "integration_test" "&JOBSdir;/JREGIONAL_INTEGRATION_TEST"' join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;' @@ -35,8 +36,8 @@ metatask_integration_test: and_run_fcst: taskvalid: attrs: - task: run_fcst_mem#mem# + task: run_fcst_#mem_name# taskdep: attrs: - task: run_fcst_mem#mem# + task: run_fcst_#mem_name# diff --git a/parm/wflow/verify_pre.yaml b/parm/wflow/verify_pre.yaml index 9a983877b4..e9f3843d46 100644 --- a/parm/wflow/verify_pre.yaml +++ b/parm/wflow/verify_pre.yaml @@ -214,17 +214,14 @@ metatask_check_post_output_all_mems: # so, to ensure that the stand-alone post metatask for the current member # has completed for all forecast hours. and_standalone_post: - # This "or" is to check whether a stand-alane post task exists [either for - # mem000 (if running a deterministic forecast) or for mem001 (if running - # an ensemble forecast)]. Checking for forecast hour 000 is sufficient. - # If so, it implies post is being run stand-alone. - or_post_task_exists: &post_task_exists - taskvalid_mem000: - attrs: - task: run_post_mem000_f000 - taskvalid_mem001: - attrs: - task: run_post_mem001_f000 + # This checks whether a stand-alane post task exists for the first ensemble + # member (which will be member 0 for a deterministic forecast or member 1 + # for an ensemble forecast). Checking for forecast hour 000 is sufficient. + # If so, it implies post is being run stand-alone (as opposed to inline, + # i.e. from within the weather model). + taskvalid_first_ensmem: &post_task_exists + attrs: + task: '{{- "run_post_" ~ global.ENSMEM_NAMES[0] ~ "_f000" }}' # We would like a dependency here on the run_post_#mem_name#_all_fhrs metatask, # but that is apparently not possible in rocoto with a metataskvalid/ # metataskdep combination (currently, metataskvalid is not a defined @@ -254,13 +251,13 @@ metatask_check_post_output_all_mems: # the weather model), and if so, to ensure that the forecast task for the # current member has completed. and_inline_post: - # This "not" is to check whether a stand-alone post task DOESN'T exist - # [either for mem000 (if running a deterministic forecast) or for mem001 - # (if running an ensemble forecast)]. If so, it implies that either - # post is being run inline (as part of the weather model) or is not being - # run at all. + # This "not" is to check whether a stand-alone post task DOESN'T exist. + # If it does, it will either be for ensemble member 0 for a deterministic + # forecast or for member 1 for an ensemble forecast. If such a post task + # doesn't exist, it implies that either post is being run inline (i.e. as + # part of the weather model) or is not being run at all. not: - or_post_task_exists: + taskvalid_first_ensmem: <<: *post_task_exists # This "or" is to verify that either the forecast task for the current # member exists and has completed, or that it doesn't exist. diff --git a/scripts/exregional_get_extrn_mdl_files.sh b/scripts/exregional_get_extrn_mdl_files.sh index 96c3136e33..6fc6bbb962 100755 --- a/scripts/exregional_get_extrn_mdl_files.sh +++ b/scripts/exregional_get_extrn_mdl_files.sh @@ -56,6 +56,8 @@ # global: # DO_ENSEMBLE # NUM_ENS_MEMBERS +# ENSMEM_BASENAME +# NDIGITS_IN_ENSMEM_NAMES # #----------------------------------------------------------------------- # @@ -217,7 +219,7 @@ if [ $(boolify $SYMLINK_FIX_FILES) = "TRUE" ]; then fi if [ $(boolify $DO_ENSEMBLE) = "TRUE" ] ; then - mem_dir="/mem{mem:03d}" + mem_dir="/${ENSMEM_BASENAME}{mem:0${NDIGITS_IN_ENSMEM_NAMES}d}" member_list=(1 ${NUM_ENS_MEMBERS}) additional_flags="$additional_flags \ --members ${member_list[@]}" @@ -287,7 +289,8 @@ if [ "${EXTRN_MDL_NAME}" = "GEFS" ]; then sorted_fn=( ) for fcst_hr in "${all_fcst_hrs_array[@]}"; do # Read in filenames from EXTRN_MDL_FNS and sort them - base_path="${EXTRN_MDL_STAGING_DIR}/mem`printf %03d $num`" + ensmem_indx_fmt=$(printf "%0${NDIGITS_IN_ENSMEM_NAMES}d" $((10#${num}))) + base_path="${EXTRN_MDL_STAGING_DIR}/${ENSMEM_BASENAME}${ensmem_indx_fmt}" filenames_array=`awk -F= '/EXTRN_MDL_FNS/{print $2}' $base_path/${EXTRN_DEFNS}` for filename in ${filenames_array[@]}; do IFS='.' read -ra split_fn <<< "$filename" diff --git a/scripts/exregional_run_post.sh b/scripts/exregional_run_post.sh index 3f0ca93df9..468074c649 100755 --- a/scripts/exregional_run_post.sh +++ b/scripts/exregional_run_post.sh @@ -11,7 +11,7 @@ # COMOUT # DATA_FHR # DBNROOT -# ENSMEM_INDX +# ENSMEM_NAME # GLOBAL_VAR_DEFNS_FP # NET # PDY @@ -226,7 +226,7 @@ fi # Set the names of the forecast model's write-component output files. # if [ "${RUN_ENVIR}" = "nco" ]; then - DATAFCST=$DATAROOT/run_fcst_mem${ENSMEM_INDX}.${share_pid} + DATAFCST=$DATAROOT/run_fcst_${ENSMEM_NAME}.${share_pid} else DATAFCST=$DATA fi