Skip to content

Commit

Permalink
Get observation type from field group; remove unneeded environment va…
Browse files Browse the repository at this point in the history
…riables from workflow; use pre-defined entities for accumulation hours in the rocoto xml; fix bug in calculation of ensemble member indices for the case of a deterministic (non-ensemble) forecast experiment.
  • Loading branch information
gsketefian committed Nov 30, 2024
1 parent f327dcd commit 8e09b15
Show file tree
Hide file tree
Showing 12 changed files with 93 additions and 178 deletions.
22 changes: 16 additions & 6 deletions parm/wflow/default_workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,25 @@
rocoto:
entities:
ACCOUNT: '{{ user.ACCOUNT }}'
ACCUM_HH_APCP: '{%- for ah in verification.VX_APCP_ACCUMS_HRS %}
{%- if workflow.FCST_LEN_HRS >= ah %}
{{- "%02d " % ah }}
{%- endif %}
{%- endfor %}'
ACCUM_HH_ASNOW: '{%- for ah in verification.VX_ASNOW_ACCUMS_HRS %}
{%- if workflow.FCST_LEN_HRS >= ah %}
{{- "%02d " % ah }}
{%- endif %}
{%- endfor %}'
CCPA_OBS_DIR: '{{ verification.CCPA_OBS_DIR }}'
COLDSTART: '{{ workflow.COLDSTART }}'
COMINgfs: '{{ platform.get("COMINgfs") }}'
ENSMEM_INDICES: '{%- for mem_indx in global.ENSMEM_INDS %}
{{- mem_indx ~ " " }}
{%- endfor %}'
ENSMEM_NAMES: '{%- for mem_name in global.ENSMEM_NAMES %}
{{- mem_name ~ " " }}
{%- endfor %}'
GLOBAL_VAR_DEFNS_FP: '{{ workflow.GLOBAL_VAR_DEFNS_FP }}'
HOMEdir: '{{ user.HOMEdir }}'
JOBSdir: '{{ user.JOBSdir }}'
Expand All @@ -31,12 +47,6 @@ rocoto:
{%- if global.DO_ENSEMBLE %}
{{- "#mem_name#" }}
{%- endif %}'
ENSMEM_INDICES: '{%- for mem_indx in global.ENSMEM_INDS %}
{{- mem_indx ~ " " }}
{%- endfor %}'
ENSMEM_NAMES: '{%- for mem_name in global.ENSMEM_NAMES %}
{{- mem_name ~ " " }}
{%- endfor %}'
USHdir: '{{ user.USHdir }}'
WARMSTART_CYCLE_DIR: '{{ workflow.WARMSTART_CYCLE_DIR }}'
WORKFLOW_ID: '{{ workflow.WORKFLOW_ID }}'
Expand Down
20 changes: 2 additions & 18 deletions parm/wflow/verify_det.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ default_task_verify_det: &default_task_verify_det

metatask_GridStat_APCP_all_accums_all_mems:
var:
ACCUM_HH: '{%- for ah in verification.VX_APCP_ACCUMS_HRS %}
{%- if workflow.FCST_LEN_HRS >= ah %}
{{- "%02d " % ah }}
{%- endif %}
{%- endfor %}'
ACCUM_HH: '&ACCUM_HH_APCP;'
metatask_GridStat_APCP#ACCUM_HH#h_all_mems:
var:
mem_indx: '&ENSMEM_INDICES;'
Expand All @@ -44,10 +40,8 @@ metatask_GridStat_APCP_all_accums_all_mems:
FIELD_GROUP: 'APCP'
ACCUM_HH: '#ACCUM_HH#'
METPLUSTOOLNAME: 'GRIDSTAT'
OBTYPE: 'CCPA'
ENSMEM_INDX: "#mem_indx#"
ENSMEM_NAME: "#mem_name#"
OBS_AVAIL_INTVL_HRS: '{{- verification.CCPA_OBS_AVAIL_INTVL_HRS }}'
FCST_LEVEL: 'A#ACCUM_HH#'
FCST_THRESH: 'all'
walltime: 02:00:00
Expand All @@ -62,11 +56,7 @@ metatask_GridStat_APCP_all_accums_all_mems:

metatask_GridStat_ASNOW_all_accums_all_mems:
var:
ACCUM_HH: '{%- for ah in verification.VX_ASNOW_ACCUMS_HRS %}
{%- if workflow.FCST_LEN_HRS >= ah %}
{{- "%02d " % ah }}
{%- endif %}
{%- endfor %}'
ACCUM_HH: '&ACCUM_HH_ASNOW;'
metatask_GridStat_ASNOW#ACCUM_HH#h_all_mems:
var:
mem_indx: '&ENSMEM_INDICES;'
Expand All @@ -83,10 +73,8 @@ metatask_GridStat_ASNOW_all_accums_all_mems:
FIELD_GROUP: 'ASNOW'
ACCUM_HH: '#ACCUM_HH#'
METPLUSTOOLNAME: 'GRIDSTAT'
OBTYPE: 'NOHRSC'
ENSMEM_INDX: "#mem_indx#"
ENSMEM_NAME: "#mem_name#"
OBS_AVAIL_INTVL_HRS: '{{- verification.NOHRSC_OBS_AVAIL_INTVL_HRS }}'
FCST_LEVEL: 'A#ACCUM_HH#'
FCST_THRESH: 'all'
walltime: 02:00:00
Expand Down Expand Up @@ -118,10 +106,8 @@ metatask_GridStat_REFC_RETOP_all_mems:
OBS_DIR: '&MRMS_OBS_DIR;'
FIELD_GROUP: '#FIELD_GROUP#'
METPLUSTOOLNAME: 'GRIDSTAT'
OBTYPE: 'MRMS'
ENSMEM_INDX: "#mem_indx#"
ENSMEM_NAME: "#mem_name#"
OBS_AVAIL_INTVL_HRS: '{{- verification.MRMS_OBS_AVAIL_INTVL_HRS }}'
FCST_LEVEL: 'L0'
FCST_THRESH: 'all'
walltime: 02:00:00
Expand Down Expand Up @@ -170,10 +156,8 @@ metatask_PointStat_SFC_UPA_all_mems:
OBS_DIR: '&NDAS_OBS_DIR;'
FIELD_GROUP: '#FIELD_GROUP#'
METPLUSTOOLNAME: 'POINTSTAT'
OBTYPE: 'NDAS'
ENSMEM_INDX: "#mem_indx#"
ENSMEM_NAME: "#mem_name#"
OBS_AVAIL_INTVL_HRS: '{{- verification.NDAS_OBS_AVAIL_INTVL_HRS }}'
FCST_LEVEL: 'all'
FCST_THRESH: 'all'
walltime: 01:00:00
Expand Down
8 changes: 0 additions & 8 deletions parm/wflow/verify_ens.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ metatask_GenEnsProd_EnsembleStat_APCP_all_accums:
OBS_DIR: '&CCPA_OBS_DIR;'
FIELD_GROUP: 'APCP'
METPLUSTOOLNAME: 'GENENSPROD'
OBTYPE: 'CCPA'
FCST_LEVEL: 'A#ACCUM_HH#'
FCST_THRESH: 'all'
ENSMEM_NAMES_STR: '&ENSMEM_NAMES;'
Expand Down Expand Up @@ -76,7 +75,6 @@ metatask_GenEnsProd_EnsembleStat_ASNOW_all_accums:
OBS_DIR: '&NOHRSC_OBS_DIR;'
FIELD_GROUP: 'ASNOW'
METPLUSTOOLNAME: 'GENENSPROD'
OBTYPE: 'NOHRSC'
FCST_LEVEL: 'A#ACCUM_HH#'
FCST_THRESH: 'all'
ENSMEM_NAMES_STR: '&ENSMEM_NAMES;'
Expand Down Expand Up @@ -116,7 +114,6 @@ metatask_GenEnsProd_EnsembleStat_REFC_RETOP:
OBS_DIR: '&MRMS_OBS_DIR;'
FIELD_GROUP: '#FIELD_GROUP#'
METPLUSTOOLNAME: 'GENENSPROD'
OBTYPE: 'MRMS'
FCST_LEVEL: 'L0'
FCST_THRESH: 'all'
ENSMEM_NAMES_STR: '&ENSMEM_NAMES;'
Expand Down Expand Up @@ -171,7 +168,6 @@ metatask_GenEnsProd_EnsembleStat_SFC_UPA:
OBS_DIR: '&NDAS_OBS_DIR;'
FIELD_GROUP: '#FIELD_GROUP#'
METPLUSTOOLNAME: 'GENENSPROD'
OBTYPE: 'NDAS'
ACCUM_HH: '01'
FCST_LEVEL: 'all'
FCST_THRESH: 'all'
Expand Down Expand Up @@ -230,7 +226,6 @@ metatask_GridStat_APCP_all_accums_ensmeanprob:
OBS_DIR: '&CCPA_OBS_DIR;'
FIELD_GROUP: 'APCP'
METPLUSTOOLNAME: 'GRIDSTAT'
OBTYPE: 'CCPA'
ACCUM_HH: '#ACCUM_HH#'
FCST_LEVEL: 'A#ACCUM_HH#'
FCST_THRESH: 'all'
Expand Down Expand Up @@ -261,7 +256,6 @@ metatask_GridStat_ASNOW_all_accums_ensmeanprob:
OBS_DIR: '&NOHRSC_OBS_DIR;'
FIELD_GROUP: 'ASNOW'
METPLUSTOOLNAME: 'GRIDSTAT'
OBTYPE: 'NOHRSC'
ACCUM_HH: '#ACCUM_HH#'
FCST_LEVEL: 'A#ACCUM_HH#'
FCST_THRESH: 'all'
Expand Down Expand Up @@ -289,7 +283,6 @@ metatask_GridStat_REFC_RETOP_ensprob:
OBS_DIR: '&MRMS_OBS_DIR;'
FIELD_GROUP: '#FIELD_GROUP#'
METPLUSTOOLNAME: 'GRIDSTAT'
OBTYPE: 'MRMS'
FCST_LEVEL: 'L0'
FCST_THRESH: 'all'
dependency:
Expand Down Expand Up @@ -319,7 +312,6 @@ metatask_PointStat_SFC_UPA_ensmeanprob:
OBS_DIR: '&NDAS_OBS_DIR;'
FIELD_GROUP: '#FIELD_GROUP#'
METPLUSTOOLNAME: 'POINTSTAT'
OBTYPE: 'NDAS'
ACCUM_HH: '01'
FCST_LEVEL: 'all'
FCST_THRESH: 'all'
Expand Down
29 changes: 4 additions & 25 deletions parm/wflow/verify_pre.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ task_run_MET_Pb2nc_obs_NDAS:
FIELD_GROUP: 'SFC'
ACCUM_HH: '01'
FCST_OR_OBS: OBS
OBTYPE: NDAS
OBS_DIR: '&NDAS_OBS_DIR;'
METPLUSTOOLNAME: 'PB2NC'
dependency:
Expand All @@ -100,11 +99,7 @@ task_run_MET_Pb2nc_obs_NDAS:

metatask_PcpCombine_APCP_all_accums_obs_CCPA:
var:
ACCUM_HH: '{%- for ah in verification.VX_APCP_ACCUMS_HRS %}
{%- if workflow.FCST_LEN_HRS >= ah %}
{{- "%02d " % ah }}
{%- endif %}
{%- endfor %}'
ACCUM_HH: '&ACCUM_HH_APCP;'
task_run_MET_PcpCombine_APCP#ACCUM_HH#h_obs_CCPA:
<<: *default_task_verify_pre
attrs:
Expand All @@ -116,7 +111,6 @@ metatask_PcpCombine_APCP_all_accums_obs_CCPA:
FIELD_GROUP: 'APCP'
ACCUM_HH: '#ACCUM_HH#'
FCST_OR_OBS: OBS
OBTYPE: CCPA
OBS_DIR: '&CCPA_OBS_DIR;'
OBS_AVAIL_INTVL_HRS: '{{- verification.CCPA_OBS_AVAIL_INTVL_HRS }}'
METPLUSTOOLNAME: 'PCPCOMBINE'
Expand Down Expand Up @@ -146,11 +140,7 @@ metatask_PcpCombine_APCP_all_accums_obs_CCPA:

metatask_PcpCombine_ASNOW_all_accums_obs_NOHRSC:
var:
ACCUM_HH: '{%- for ah in verification.VX_ASNOW_ACCUMS_HRS %}
{%- if workflow.FCST_LEN_HRS >= ah %}
{{- "%02d " % ah }}
{%- endif %}
{%- endfor %}'
ACCUM_HH: '&ACCUM_HH_ASNOW;'
task_run_MET_PcpCombine_ASNOW#ACCUM_HH#h_obs_NOHRSC:
<<: *default_task_verify_pre
attrs:
Expand All @@ -162,7 +152,6 @@ metatask_PcpCombine_ASNOW_all_accums_obs_NOHRSC:
FIELD_GROUP: 'ASNOW'
ACCUM_HH: '#ACCUM_HH#'
FCST_OR_OBS: OBS
OBTYPE: NOHRSC
OBS_DIR: '&NOHRSC_OBS_DIR;'
OBS_AVAIL_INTVL_HRS: '{{- verification.NOHRSC_OBS_AVAIL_INTVL_HRS }}'
METPLUSTOOLNAME: 'PCPCOMBINE'
Expand Down Expand Up @@ -275,11 +264,7 @@ metatask_check_post_output_all_mems:

metatask_PcpCombine_APCP_all_accums_all_mems:
var:
ACCUM_HH: '{%- for ah in verification.VX_APCP_ACCUMS_HRS %}
{%- if workflow.FCST_LEN_HRS >= ah %}
{{- "%02d " % ah }}
{%- endif %}
{%- endfor %}'
ACCUM_HH: '&ACCUM_HH_APCP;'
metatask_PcpCombine_APCP#ACCUM_HH#h_all_mems:
var:
mem_indx: '&ENSMEM_INDICES;'
Expand All @@ -295,7 +280,6 @@ metatask_PcpCombine_APCP_all_accums_all_mems:
FIELD_GROUP: 'APCP'
ACCUM_HH: '#ACCUM_HH#'
FCST_OR_OBS: FCST
OBTYPE: CCPA
OBS_DIR: '&CCPA_OBS_DIR;'
METPLUSTOOLNAME: 'PCPCOMBINE'
ENSMEM_INDX: "#mem_indx#"
Expand All @@ -309,11 +293,7 @@ metatask_PcpCombine_APCP_all_accums_all_mems:

metatask_PcpCombine_ASNOW_all_accums_all_mems:
var:
ACCUM_HH: '{%- for ah in verification.VX_ASNOW_ACCUMS_HRS %}
{%- if workflow.FCST_LEN_HRS >= ah %}
{{- "%02d " % ah }}
{%- endif %}
{%- endfor %}'
ACCUM_HH: '&ACCUM_HH_ASNOW;'
metatask_PcpCombine_ASNOW#ACCUM_HH#h_all_mems:
var:
mem_indx: '&ENSMEM_INDICES;'
Expand All @@ -329,7 +309,6 @@ metatask_PcpCombine_ASNOW_all_accums_all_mems:
FIELD_GROUP: 'ASNOW'
ACCUM_HH: '#ACCUM_HH#'
FCST_OR_OBS: FCST
OBTYPE: NOHRSC
OBS_DIR: '&NOHRSC_OBS_DIR;'
METPLUSTOOLNAME: 'PCPCOMBINE'
ENSMEM_INDX: "#mem_indx#"
Expand Down
6 changes: 3 additions & 3 deletions scripts/exregional_run_met_genensprod_or_ensemblestat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ CDATE="${PDY}${cyc}"
FIELDNAME_IN_MET_FILEDIR_NAMES=""

set_vx_params \
obtype="${OBTYPE}" \
field_group="${FIELD_GROUP}" \
accum_hh="${ACCUM_HH}" \
outvarname_grid_or_point="grid_or_point" \
outvarname_obtype="obtype" \
outvarname_fieldname_in_MET_filedir_names="FIELDNAME_IN_MET_FILEDIR_NAMES"
#
#-----------------------------------------------------------------------
Expand Down Expand Up @@ -213,7 +213,7 @@ STAGING_DIR="${OUTPUT_BASE}/stage/${FIELDNAME_IN_MET_FILEDIR_NAMES}"
#
#-----------------------------------------------------------------------
#
case "$OBTYPE" in
case "${obtype}" in
"CCPA"|"NOHRSC")
vx_intvl="$((10#${ACCUM_HH}))"
vx_hr_start="${vx_intvl}"
Expand Down Expand Up @@ -374,7 +374,7 @@ settings="\
# Field information.
#
'fieldname_in_met_filedir_names': '${FIELDNAME_IN_MET_FILEDIR_NAMES}'
'obtype': '${OBTYPE}'
'obtype': '${obtype}'
'accum_hh': '${ACCUM_HH:-}'
'accum_no_pad': '${ACCUM_NO_PAD:-}'
'metplus_templates_dir': '${METPLUS_CONF:-}'
Expand Down
6 changes: 3 additions & 3 deletions scripts/exregional_run_met_gridstat_or_pointstat_vx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ FIELDNAME_IN_MET_FILEDIR_NAMES=""
# Note that ACCUM_HH will not be defined for the REFC, RETOP, SFC, and
# UPA field groups.
set_vx_params \
obtype="${OBTYPE}" \
field_group="${FIELD_GROUP}" \
accum_hh="${ACCUM_HH:-}" \
outvarname_obtype="obtype" \
outvarname_grid_or_point="grid_or_point" \
outvarname_fieldname_in_MET_filedir_names="FIELDNAME_IN_MET_FILEDIR_NAMES"
#
Expand Down Expand Up @@ -213,7 +213,7 @@ STAGING_DIR="${OUTPUT_BASE}/stage/${FIELDNAME_IN_MET_FILEDIR_NAMES}"
#
#-----------------------------------------------------------------------
#
case "$OBTYPE" in
case "${obtype}" in
"CCPA"|"NOHRSC")
vx_intvl="$((10#${ACCUM_HH}))"
vx_hr_start="${vx_intvl}"
Expand Down Expand Up @@ -364,7 +364,7 @@ settings="\
# Field information.
#
'fieldname_in_met_filedir_names': '${FIELDNAME_IN_MET_FILEDIR_NAMES}'
'obtype': '${OBTYPE}'
'obtype': '${obtype}'
'accum_hh': '${ACCUM_HH:-}'
'accum_no_pad': '${ACCUM_NO_PAD:-}'
'metplus_templates_dir': '${METPLUS_CONF:-}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ CDATE="${PDY}${cyc}"
FIELDNAME_IN_MET_FILEDIR_NAMES=""

set_vx_params \
obtype="${OBTYPE}" \
field_group="${FIELD_GROUP}" \
accum_hh="${ACCUM_HH}" \
outvarname_obtype="obtype" \
outvarname_grid_or_point="grid_or_point" \
outvarname_fieldname_in_MET_filedir_names="FIELDNAME_IN_MET_FILEDIR_NAMES"
#
Expand Down Expand Up @@ -142,7 +142,7 @@ elif [ "${grid_or_point}" = "point" ]; then

fi
OBS_INPUT_FN_TEMPLATE=$( eval echo ${OBS_INPUT_FN_TEMPLATE} )
FCST_INPUT_FN_TEMPLATE=$( eval echo 'gen_ens_prod_${VX_FCST_MODEL_NAME}_${FIELDNAME_IN_MET_FILEDIR_NAMES}_${OBTYPE}_{lead?fmt=%H%M%S}L_{valid?fmt=%Y%m%d}_{valid?fmt=%H%M%S}V.nc' )
FCST_INPUT_FN_TEMPLATE=$( eval echo 'gen_ens_prod_${VX_FCST_MODEL_NAME}_${FIELDNAME_IN_MET_FILEDIR_NAMES}_${obtype}_{lead?fmt=%H%M%S}L_{valid?fmt=%Y%m%d}_{valid?fmt=%H%M%S}V.nc' )

OUTPUT_BASE="${vx_output_basedir}${slash_cdate_or_null}"
OUTPUT_DIR="${OUTPUT_BASE}/metprd/${MetplusToolName}_ensmean"
Expand All @@ -157,7 +157,7 @@ STAGING_DIR="${OUTPUT_BASE}/stage/${FIELDNAME_IN_MET_FILEDIR_NAMES}_ensmean"
#
#-----------------------------------------------------------------------
#
case "$OBTYPE" in
case "${obtype}" in
"CCPA"|"NOHRSC")
vx_intvl="$((10#${ACCUM_HH}))"
vx_hr_start="${vx_intvl}"
Expand Down Expand Up @@ -317,7 +317,7 @@ settings="\
# Field information.
#
'fieldname_in_met_filedir_names': '${FIELDNAME_IN_MET_FILEDIR_NAMES}'
'obtype': '${OBTYPE}'
'obtype': '${obtype}'
'accum_hh': '${ACCUM_HH:-}'
'accum_no_pad': '${ACCUM_NO_PAD:-}'
'metplus_templates_dir': '${METPLUS_CONF:-}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ CDATE="${PDY}${cyc}"
FIELDNAME_IN_MET_FILEDIR_NAMES=""

set_vx_params \
obtype="${OBTYPE}" \
field_group="${FIELD_GROUP}" \
accum_hh="${ACCUM_HH}" \
outvarname_obtype="obtype" \
outvarname_grid_or_point="grid_or_point" \
outvarname_fieldname_in_MET_filedir_names="FIELDNAME_IN_MET_FILEDIR_NAMES"
#
Expand Down Expand Up @@ -142,7 +142,7 @@ elif [ "${grid_or_point}" = "point" ]; then
fi
OBS_INPUT_FN_TEMPLATE=$( eval echo ${OBS_INPUT_FN_TEMPLATE} )
FCST_INPUT_DIR="${vx_output_basedir}${slash_cdate_or_null}/metprd/GenEnsProd"
FCST_INPUT_FN_TEMPLATE=$( eval echo 'gen_ens_prod_${VX_FCST_MODEL_NAME}_${FIELDNAME_IN_MET_FILEDIR_NAMES}_${OBTYPE}_{lead?fmt=%H%M%S}L_{valid?fmt=%Y%m%d}_{valid?fmt=%H%M%S}V.nc' )
FCST_INPUT_FN_TEMPLATE=$( eval echo 'gen_ens_prod_${VX_FCST_MODEL_NAME}_${FIELDNAME_IN_MET_FILEDIR_NAMES}_${obtype}_{lead?fmt=%H%M%S}L_{valid?fmt=%Y%m%d}_{valid?fmt=%H%M%S}V.nc' )

OUTPUT_BASE="${vx_output_basedir}${slash_cdate_or_null}"
OUTPUT_DIR="${OUTPUT_BASE}/metprd/${MetplusToolName}_ensprob"
Expand All @@ -157,7 +157,7 @@ STAGING_DIR="${OUTPUT_BASE}/stage/${FIELDNAME_IN_MET_FILEDIR_NAMES}_ensprob"
#
#-----------------------------------------------------------------------
#
case "$OBTYPE" in
case "${obtype}" in
"CCPA"|"NOHRSC")
vx_intvl="$((10#${ACCUM_HH}))"
vx_hr_start="${vx_intvl}"
Expand Down Expand Up @@ -317,7 +317,7 @@ settings="\
# Field information.
#
'fieldname_in_met_filedir_names': '${FIELDNAME_IN_MET_FILEDIR_NAMES}'
'obtype': '${OBTYPE}'
'obtype': '${obtype}'
'accum_hh': '${ACCUM_HH:-}'
'accum_no_pad': '${ACCUM_NO_PAD:-}'
'metplus_templates_dir': '${METPLUS_CONF:-}'
Expand Down
Loading

0 comments on commit 8e09b15

Please sign in to comment.