From c6942b631d46b323036893743328ab074f6837b0 Mon Sep 17 00:00:00 2001 From: "chunhua.zhou" Date: Sun, 11 Dec 2022 04:24:01 +0000 Subject: [PATCH 1/5] Fix spinup cycle for ensemble DA --- scripts/exregional_run_analysis.sh | 5 +++-- ush/config.sh.RRFS_CONUS_13km_ens | 1 - ush/templates/FV3LAM_wflow.xml | 26 -------------------------- 3 files changed, 3 insertions(+), 29 deletions(-) diff --git a/scripts/exregional_run_analysis.sh b/scripts/exregional_run_analysis.sh index ae94d5ee3..1033e2745 100755 --- a/scripts/exregional_run_analysis.sh +++ b/scripts/exregional_run_analysis.sh @@ -944,13 +944,14 @@ if [ $binary_diag = ".true." ]; then fi if [ $netcdf_diag = ".true." ]; then +nc_diag_cat="${EXECDIR}/nc_diag_cat.x" listall_cnv="conv_ps conv_q conv_t conv_uv conv_pw conv_rw conv_sst conv_dbz" listall_rad="hirs2_n14 msu_n14 sndr_g08 sndr_g11 sndr_g11 sndr_g12 sndr_g13 sndr_g08_prep sndr_g11_prep sndr_g12_prep sndr_g13_prep sndrd1_g11 sndrd2_g11 sndrd3_g11 sndrd4_g11 sndrd1_g15 sndrd2_g15 sndrd3_g15 sndrd4_g15 sndrd1_g13 sndrd2_g13 sndrd3_g13 sndrd4_g13 hirs3_n15 hirs3_n16 hirs3_n17 amsua_n15 amsua_n16 amsua_n17 amsua_n18 amsua_n19 amsua_metop-a amsua_metop-b amsua_metop-c amsub_n15 amsub_n16 amsub_n17 hsb_aqua airs_aqua amsua_aqua imgr_g08 imgr_g11 imgr_g12 pcp_ssmi_dmsp pcp_tmi_trmm conv sbuv2_n16 sbuv2_n17 sbuv2_n18 omi_aura ssmi_f13 ssmi_f14 ssmi_f15 hirs4_n18 hirs4_metop-a mhs_n18 mhs_n19 mhs_metop-a mhs_metop-b mhs_metop-c amsre_low_aqua amsre_mid_aqua amsre_hig_aqua ssmis_las_f16 ssmis_uas_f16 ssmis_img_f16 ssmis_env_f16 iasi_metop-a iasi_metop-b iasi_metop-c seviri_m08 seviri_m09 seviri_m10 seviri_m11 cris_npp atms_npp ssmis_f17 cris-fsr_npp cris-fsr_n20 atms_n20 abi_g16" for type in $listall_cnv; do count=$(ls pe*.${type}_${loop}.nc4 | wc -l) if [[ $count -gt 0 ]]; then - ${APRUN} nc_diag_cat.x -o diag_${type}_${string}.${YYYYMMDDHH}.nc4 pe*.${type}_${loop}.nc4 + ${APRUN} ${nc_diag_cat} -o diag_${type}_${string}.${YYYYMMDDHH}.nc4 pe*.${type}_${loop}.nc4 cp diag_${type}_${string}.${YYYYMMDDHH}.nc4 $comout echo "diag_${type}_${string}.${YYYYMMDDHH}.nc4*" >> listcnv numfile_cnv=`expr ${numfile_cnv} + 1` @@ -960,7 +961,7 @@ if [ $netcdf_diag = ".true." ]; then for type in $listall_rad; do count=$(ls pe*.${type}_${loop}.nc4 | wc -l) if [[ $count -gt 0 ]]; then - ${APRUN} nc_diag_cat.x -o diag_${type}_${string}.${YYYYMMDDHH}.nc4 pe*.${type}_${loop}.nc4 + ${APRUN} ${nc_diag_cat} -o diag_${type}_${string}.${YYYYMMDDHH}.nc4 pe*.${type}_${loop}.nc4 cp diag_${type}_${string}.${YYYYMMDDHH}.nc4 $comout echo "diag_${type}_${string}.${YYYYMMDDHH}.nc4*" >> listrad numfile_rad=`expr ${numfile_rad} + 1` diff --git a/ush/config.sh.RRFS_CONUS_13km_ens b/ush/config.sh.RRFS_CONUS_13km_ens index db31951f1..fdd94320a 100644 --- a/ush/config.sh.RRFS_CONUS_13km_ens +++ b/ush/config.sh.RRFS_CONUS_13km_ens @@ -146,7 +146,6 @@ HALO_BLEND=20 IO_LAYOUT_Y=1 PPN_RUN_REF2TTEN=1 PPN_RUN_NONVARCLDANL=${IO_LAYOUT_Y} -regional_ensemble_option=5 MAXTRIES_GET_EXTRN_ICS="2" MAXTRIES_GET_EXTRN_LBCS="2" diff --git a/ush/templates/FV3LAM_wflow.xml b/ush/templates/FV3LAM_wflow.xml index 81d01eac3..58761904c 100644 --- a/ush/templates/FV3LAM_wflow.xml +++ b/ush/templates/FV3LAM_wflow.xml @@ -1493,7 +1493,6 @@ MODULES_RUN_TASK_FP script. {%- endif %} {%- elif do_enkfupdate or do_enkf_radar_ref %} - {%- for h in cycl_hrs_spinstart %} @@ -1508,31 +1507,6 @@ MODULES_RUN_TASK_FP script. {%- endif %} - {%- if do_recenter %} - - - - {%- for h in cycl_hrs_recenter %} - {{ h }}@H - {%- endfor %} - - &CYCLE_BASEDIR;/@Y@m@d@H/recenter/fcst_fv3lam/INPUT/recenter_complete.txt - - - {%- for h in cycl_hrs_recenter %} - {{ h }}@H - {%- endfor %} - - - - {%- elif do_nonvar_cldanal%} - - {%- elif do_enkf_radar_ref %} - - {%- else %} - - {%- endif %} - {%- else %} {%- endif %} From f0ec6820e9113ae3a97743a02b297e1c994e4455 Mon Sep 17 00:00:00 2001 From: "chunhua.zhou" Date: Sun, 11 Dec 2022 06:08:12 +0000 Subject: [PATCH 2/5] Add task save_input to save DA analysis before run_fcst --- jobs/JREGIONAL_SAVE_INPUT | 123 +++++++++++++++++++++++++ scripts/exregional_save_input.sh | 152 +++++++++++++++++++++++++++++++ ush/config_defaults.sh | 6 ++ ush/generate_FV3LAM_wflow.sh | 3 + ush/setup.sh | 22 ++++- ush/templates/FV3LAM_wflow.xml | 75 ++++++++++++++- ush/valid_param_vals.sh | 1 + 7 files changed, 380 insertions(+), 2 deletions(-) create mode 100755 jobs/JREGIONAL_SAVE_INPUT create mode 100755 scripts/exregional_save_input.sh diff --git a/jobs/JREGIONAL_SAVE_INPUT b/jobs/JREGIONAL_SAVE_INPUT new file mode 100755 index 000000000..ec9b7a1c6 --- /dev/null +++ b/jobs/JREGIONAL_SAVE_INPUT @@ -0,0 +1,123 @@ +#!/bin/bash + +# +#----------------------------------------------------------------------- +# +# This script runs the save_input to save DA analysis files to nwges +# +#----------------------------------------------------------------------- +# + +# +#----------------------------------------------------------------------- +# +# Source the variable definitions file and the bash utility functions. +# +#----------------------------------------------------------------------- +# +. ${GLOBAL_VAR_DEFNS_FP} +. $USHDIR/source_util_funcs.sh +# +#----------------------------------------------------------------------- +# +# Save current shell options (in a global array). Then set new options +# for this script/function. +# +#----------------------------------------------------------------------- +# +{ save_shell_opts; set -u -x; } > /dev/null 2>&1 +# +#----------------------------------------------------------------------- +# +# Get the full path to the file in which this script/function is located +# (scrfunc_fp), the name of that file (scrfunc_fn), and the directory in +# which the file is located (scrfunc_dir). +# +#----------------------------------------------------------------------- +# +scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" ) +scrfunc_fn=$( basename "${scrfunc_fp}" ) +scrfunc_dir=$( dirname "${scrfunc_fp}" ) +# +#----------------------------------------------------------------------- +# +# Print message indicating entry into script. +# +#----------------------------------------------------------------------- +# +print_info_msg " +======================================================================== +Entering script: \"${scrfunc_fn}\" +In directory: \"${scrfunc_dir}\" + +This is the J-job script for the task that runs the post-processor (UPP) +on the output files corresponding to a specified forecast hour. +========================================================================" +# +#----------------------------------------------------------------------- +# +# Set the run directory. +# +#----------------------------------------------------------------------- +# CYCLE_TYPE is to indicate which type of cycle this job for: +# spinup: this job is for spin-up cycles +# others(prod): this job is for product cycle +# +# NWGES_DIR is the directory in which the model IC file (DA analysis) will be saved +# +CYCLE_TYPE=${CYCLE_TYPE:-prod} +CYCLE_SUBTYPE=${CYCLE_SUBTYPE:-empty} +if [ ${CYCLE_TYPE} == "spinup" ]; then + run_dir="${CYCLE_DIR}${SLASH_ENSMEM_SUBDIR}/fcst_fv3lam_spinup" + nwges_dir="${NWGES_DIR}${SLASH_ENSMEM_SUBDIR}/fcst_fv3lam_spinup" + if [ ${CYCLE_SUBTYPE} == "ensinit" ]; then + run_dir="${CYCLE_DIR}${SLASH_ENSMEM_SUBDIR}/fcst_fv3lam_ensinit" + nwges_dir="${NWGES_DIR}${SLASH_ENSMEM_SUBDIR}/fcst_fv3lam_ensinit" + fi +else + run_dir="${CYCLE_DIR}${SLASH_ENSMEM_SUBDIR}/fcst_fv3lam" + nwges_dir="${NWGES_DIR}${SLASH_ENSMEM_SUBDIR}/fcst_fv3lam" +fi + +if [ "${RUN_ENVIR}" = "nco" ]; then + mkdir_vrfy -p "${nwges_dir}/DA_OUTPUT" +fi + +# +#----------------------------------------------------------------------- +# +# Call the ex-script for this J-job and pass to it the necessary varia- +# bles. +# +#----------------------------------------------------------------------- +# +$SCRIPTSDIR/exregional_save_input.sh \ + cdate="${CDATE}" \ + run_dir="${run_dir}" \ + nwges_dir="${nwges_dir}" \ + cycle_type="${CYCLE_TYPE}" \ + cycle_subtype="${CYCLE_SUBTYPE}" || \ +print_err_msg_exit "\ +Call to ex-script corresponding to J-job \"${scrfunc_fn}\" failed." +# +#----------------------------------------------------------------------- +# +# Print exit message. +# +#----------------------------------------------------------------------- +# +print_info_msg " +======================================================================== +Exiting script: \"${scrfunc_fn}\" +In directory: \"${scrfunc_dir}\" +========================================================================" +# +#----------------------------------------------------------------------- +# +# Restore the shell options saved at the beginning of this script/func- +# tion. +# +#----------------------------------------------------------------------- +# +{ restore_shell_opts; } > /dev/null 2>&1 + diff --git a/scripts/exregional_save_input.sh b/scripts/exregional_save_input.sh new file mode 100755 index 000000000..bfb58a930 --- /dev/null +++ b/scripts/exregional_save_input.sh @@ -0,0 +1,152 @@ +#!/bin/bash + +# +#----------------------------------------------------------------------- +# +# Source the variable definitions file and the bash utility functions. +# +#----------------------------------------------------------------------- +# +. ${GLOBAL_VAR_DEFNS_FP} +. $USHDIR/source_util_funcs.sh +# +#----------------------------------------------------------------------- +# +# Save current shell options (in a global array). Then set new options +# for this script/function. +# +#----------------------------------------------------------------------- +# +{ save_shell_opts; set -u +x; } > /dev/null 2>&1 +# +#----------------------------------------------------------------------- +# +# Get the full path to the file in which this script/function is located +# (scrfunc_fp), the name of that file (scrfunc_fn), and the directory in +# which the file is located (scrfunc_dir). +# +#----------------------------------------------------------------------- +# +scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" ) +scrfunc_fn=$( basename "${scrfunc_fp}" ) +scrfunc_dir=$( dirname "${scrfunc_fp}" ) +# +#----------------------------------------------------------------------- +# +# Print message indicating entry into script. +# +#----------------------------------------------------------------------- +# +print_info_msg " +======================================================================== +Entering script: \"${scrfunc_fn}\" +In directory: \"${scrfunc_dir}\" + +This is the ex-script for the task that runs the post-processor (UPP) on +the output files corresponding to a specified forecast hour. +========================================================================" +# +#----------------------------------------------------------------------- +# +# Specify the set of valid argument names for this script/function. +# Then process the arguments provided to this script/function (which +# should consist of a set of name-value pairs of the form arg1="value1", +# etc). +# +#----------------------------------------------------------------------- +# +valid_args=( \ +"cdate" \ +"run_dir" \ +"nwges_dir" \ +"cycle_type" \ +"cycle_subtype" \ +) +process_args valid_args "$@" +# +#----------------------------------------------------------------------- +# +# For debugging purposes, print out values of arguments passed to this +# script. Note that these will be printed out only if VERBOSE is set to +# TRUE. +# +#----------------------------------------------------------------------- +# +print_input_args valid_args +# +#----------------------------------------------------------------------- +# +# Get the cycle date and hour (in formats of yyyymmdd and hh, respectively) +# from cdate. +# +#----------------------------------------------------------------------- +# +yyyymmdd=${cdate:0:8} +hh=${cdate:8:2} +cyc=$hh + +# +#----------------------------------------------------------------------- +# +# Let's save the DA analysis files if needed before run fcst. +# This will copy the data assimilation analysis files from $run_dir/INPUT/ +# to ${nwges_dir}/DA_OUTPUT/, +# this is to prepare for ensemble free forecast after the ensemble data assimilation +# +#----------------------------------------------------------------------- +# +filelist="fv_core.res.nc coupler.res" +filelistn="fv_core.res.tile1.nc fv_srf_wnd.res.tile1.nc fv_tracer.res.tile1.nc phy_data.nc sfc_data.nc" +filelistcold="gfs_data.tile7.halo0.nc sfc_data.tile7.halo0.nc" +n_iolayouty=$(($IO_LAYOUT_Y-1)) +list_iolayout=$(seq 0 $n_iolayouty) + +if [ ! -r ${nwges_dir}/DA_OUTPUT/gfs_ctrl.nc ]; then + cp_vrfy $run_dir/INPUT/gfs_ctrl.nc ${nwges_dir}/DA_OUTPUT/gfs_ctrl.nc + if [ -r ${run_dir}/INPUT/coupler.res ]; then # warm start + if [ "${IO_LAYOUT_Y}" == "1" ]; then + for file in ${filelistn}; do + cp_vrfy $run_dir/INPUT/${file} ${nwges_dir}/DA_OUTPUT/${file} + done + else + for file in ${filelistn}; do + for ii in ${list_iolayout} + do + iii=$(printf %4.4i $ii) + cp_vrfy $run_dir/INPUT/${file}.${iii} ${nwges_dir}/DA_OUTPUT/${file}.${iii} + done + done + fi + for file in ${filelist}; do + cp_vrfy $run_dir/INPUT/${file} ${nwges_dir}/DA_OUTPUT/${file} + done + else # cold start + for file in ${filelistcold}; do + cp_vrfy $run_dir/INPUT/${file} ${nwges_dir}/DA_OUTPUT/${file} + done + fi +fi +# +#----------------------------------------------------------------------- +# +# Print message indicating successful completion of script. +# +#----------------------------------------------------------------------- +# +print_info_msg " +======================================================================== +save DA analysis completed successfully. + +Exiting script: \"${scrfunc_fn}\" +In directory: \"${scrfunc_dir}\" +========================================================================" +# +#----------------------------------------------------------------------- +# +# Restore the shell options saved at the beginning of this script/func- +# tion. +# +#----------------------------------------------------------------------- +# +{ restore_shell_opts; } > /dev/null 2>&1 + diff --git a/ush/config_defaults.sh b/ush/config_defaults.sh index 8f84122ba..8683bd09c 100644 --- a/ush/config_defaults.sh +++ b/ush/config_defaults.sh @@ -1675,6 +1675,7 @@ PROCESS_SMOKE_TN="process_smoke" RADAR_REFL2TTEN_TN="radar_refl2tten" CLDANL_NONVAR_TN="cldanl_nonvar" SAVE_RESTART_TN="save_restart" +SAVE_INPUT_TN="save_input" JEDI_ENVAR_IODA_TN="jedi_envar_ioda" # # Number of nodes. @@ -1820,6 +1821,7 @@ MAXTRIES_PROCESS_SMOKE="1" MAXTRIES_RADAR_REF2TTEN="1" MAXTRIES_CLDANL_NONVAR="1" MAXTRIES_SAVE_RESTART="1" +MAXTRIES_SAVE_INPUT="1" MAXTRIES_JEDI_ENVAR_IODA="1" # # @@ -1955,6 +1957,9 @@ TILE_SETS="full" # DO_RECENTER: # Decide whether or not to run recenter for the ensemble members # +# DO_SAVE_INPUT: +# Decide whether or not to run save_input after the DA analysis +# # DO_ENS_GRAPHICS: # Flag to turn on/off ensemble graphics. Turns OFF deterministic # graphics. @@ -2000,6 +2005,7 @@ DO_RECENTER="FALSE" DO_ENS_GRAPHICS="FALSE" DO_ENSPOST="FALSE" DO_ENSINIT="FALSE" +DO_SAVE_INPUT="FALSE" # #----------------------------------------------------------------------- # diff --git a/ush/generate_FV3LAM_wflow.sh b/ush/generate_FV3LAM_wflow.sh index 051453a40..b30f43c82 100755 --- a/ush/generate_FV3LAM_wflow.sh +++ b/ush/generate_FV3LAM_wflow.sh @@ -223,6 +223,7 @@ settings="\ 'cldanl_nonvar': ${CLDANL_NONVAR_TN} 'run_bufrsnd_tn': ${RUN_BUFRSND_TN} 'save_restart': ${SAVE_RESTART_TN} + 'save_input': ${SAVE_INPUT_TN} 'tag': ${TAG} 'jedi_envar_ioda': ${JEDI_ENVAR_IODA_TN} # @@ -368,6 +369,7 @@ settings="\ 'maxtries_radar_ref2tten': ${MAXTRIES_RADAR_REF2TTEN} 'maxtries_cldanl_nonvar': ${MAXTRIES_CLDANL_NONVAR} 'maxtries_save_restart': ${MAXTRIES_SAVE_RESTART} + 'maxtries_save_input': ${MAXTRIES_SAVE_INPUT} 'maxtries_jedi_envar_ioda': ${MAXTRIES_JEDI_ENVAR_IODA} # # Flags that specify whether to run the preprocessing tasks. @@ -473,6 +475,7 @@ settings="\ 'do_ens_graphics': ${DO_ENS_GRAPHICS} 'do_enspost': ${DO_ENSPOST} 'do_ensinit': ${DO_ENSINIT} + 'do_save_input': ${DO_SAVE_INPUT} # # data assimilation related parameters. # diff --git a/ush/setup.sh b/ush/setup.sh index 9c754a2bf..383e59602 100755 --- a/ush/setup.sh +++ b/ush/setup.sh @@ -1640,7 +1640,7 @@ fi # check_var_valid_value "DO_ENSINIT" "valid_vals_DO_ENSINIT" # -# Set DO_ENSFCST to either "TRUE" or "FALSE" so we don't have to consider +# Set DO_ENSINIT to either "TRUE" or "FALSE" so we don't have to consider # other valid values later on. # DO_ENSINIT=${DO_ENSINIT^^} @@ -1654,6 +1654,26 @@ fi # #----------------------------------------------------------------------- # +# Make sure that DO_SAVE_INPUT is set to a valid value. +# +#----------------------------------------------------------------------- +# +check_var_valid_value "DO_SAVE_INPUT" "valid_vals_DO_SAVE_INPUT" +# +# Set DO_SAVE_INPUT to either "TRUE" or "FALSE" so we don't have to consider +# other valid values later on. +# +DO_SAVE_INPUT=${DO_SAVE_INPUT^^} +if [ "$DO_SAVE_INPUT" = "TRUE" ] || \ + [ "$DO_SAVE_INPUT" = "YES" ]; then + DO_SAVE_INPUT="TRUE" +elif [ "$DO_SAVE_INPUT" = "FALSE" ] || \ + [ "$DO_SAVE_INPUT" = "NO" ]; then + DO_SAVE_INPUT="FALSE" +fi +# +#----------------------------------------------------------------------- +# # Make sure that DO_ENSFCST is set to a valid value. # #----------------------------------------------------------------------- diff --git a/ush/templates/FV3LAM_wflow.xml b/ush/templates/FV3LAM_wflow.xml index 58761904c..24d10362d 100644 --- a/ush/templates/FV3LAM_wflow.xml +++ b/ush/templates/FV3LAM_wflow.xml @@ -56,6 +56,7 @@ Workflow task names. + @@ -2316,6 +2317,78 @@ MODULES_RUN_TASK_FP script. {%- endif %} + +{%- if do_save_input %} + + + + &RSRV_DEFAULT; + &WALL_LIMIT_SAVE_RESTART; + &LOAD_MODULES_RUN_TASK_FP; "&SAVE_RESTART_TN;" "&JOBSDIR;/JREGIONAL_SAVE_INPUT" + {{ nnodes_save_restart }}:ppn={{ ppn_save_restart }} + {{ wtime_save_restart }} + &NCORES_PER_NODE; + &TAG;_&SAVE_INPUT_TN;{{ uscore_ensmem_name }} + &LOGDIR;/&SAVE_INPUT_TN;{{ uscore_ensmem_name }}_@Y@m@d@H.log + + GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP; + PDY@Y@m@d + CDATE@Y@m@d@H + CYCLE_DIR&CYCLE_BASEDIR;/@Y@m@d@H + NWGES_DIR&NWGES_BASEDIR;/@Y@m@d@H + SLASH_ENSMEM_SUBDIR{{ slash_ensmem_subdir }} + cyc@H + CYCLE_TYPEprod + + + {%- if do_dacycle and do_refl2tten and do_nonvar_cldanal%} + + + + + {%- elif do_dacycle and do_nonvar_cldanal%} + + {%- elif do_dacycle and do_refl2tten%} + + {%- elif do_dacycle %} + {%- if do_envar_radar_ref %} + + {%- else %} + + {%- endif %} + {%- elif do_enkfupdate or do_enkf_radar_ref %} + {%- if do_recenter %} + + + + {%- for h in cycl_hrs_recenter %} + {{ h }}@H + {%- endfor %} + + &CYCLE_BASEDIR;/@Y@m@d@H/recenter/fcst_fv3lam/INPUT/recenter_complete.txt + + + {%- for h in cycl_hrs_recenter %} + {{ h }}@H + {%- endfor %} + + + + {%- elif do_nonvar_cldanal%} + + {%- elif do_enkf_radar_ref %} + + {%- elif do_enkfupdate %} + + {%- endif %} + {%- endif %} + + + +{%- endif %} + + + &RSRV_DEFAULT; + &WALL_LIMIT_SAVE_RESTART; + &LOAD_MODULES_RUN_TASK_FP; "&SAVE_RESTART_TN;" "&JOBSDIR;/JREGIONAL_SAVE_INPUT" + {{ nnodes_save_restart }}:ppn={{ ppn_save_restart }} + {{ wtime_save_restart }} + &NCORES_PER_NODE; + &TAG;_&SAVE_INPUT_TN;{{ uscore_ensmem_name }} + &LOGDIR;/&SAVE_INPUT_TN;{{ uscore_ensmem_name }}_@Y@m@d@H.log + + GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP; + PDY@Y@m@d + CDATE@Y@m@d@H + CYCLE_DIR&CYCLE_BASEDIR;/@Y@m@d@H + NWGES_DIR&NWGES_BASEDIR;/@Y@m@d@H + SLASH_ENSMEM_SUBDIR{{ slash_ensmem_subdir }} + cyc@H + CYCLE_TYPEprod + + + {%- if do_dacycle and do_refl2tten and do_nonvar_cldanal%} + + + + + {%- elif do_dacycle and do_nonvar_cldanal%} + + {%- elif do_dacycle and do_refl2tten%} + + {%- elif do_dacycle %} + {%- if do_envar_radar_ref %} + + {%- else %} + + {%- endif %} + {%- elif do_enkfupdate or do_enkf_radar_ref %} + {%- if do_recenter %} + + + + {%- for h in cycl_hrs_recenter %} + {{ h }}@H + {%- endfor %} + + &CYCLE_BASEDIR;/@Y@m@d@H/recenter/fcst_fv3lam/INPUT/recenter_complete.txt + + + {%- for h in cycl_hrs_recenter %} + {{ h }}@H + {%- endfor %} + + + + {%- elif do_nonvar_cldanal%} + + {%- elif do_enkf_radar_ref %} + + {%- elif do_enkfupdate %} + + {%- endif %} + {%- endif %} + + + +{%- endif %} + + + &RSRV_DEFAULT; + &WALL_LIMIT_SAVE_RESTART; + &LOAD_MODULES_RUN_TASK_FP; "&SAVE_RESTART_TN;" "&JOBSDIR;/JREGIONAL_SAVE_INPUT" + {{ nnodes_save_restart }}:ppn={{ ppn_save_restart }} + {{ wtime_save_restart }} + &NCORES_PER_NODE; + &TAG;_&SAVE_INPUT_TN;{{ uscore_ensmem_name }} + &LOGDIR;/&SAVE_INPUT_TN;{{ uscore_ensmem_name }}_@Y@m@d@H.log + + GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP; + PDY@Y@m@d + CDATE@Y@m@d@H + CYCLE_DIR&CYCLE_BASEDIR;/@Y@m@d@H + NWGES_DIR&NWGES_BASEDIR;/@Y@m@d@H + SLASH_ENSMEM_SUBDIR{{ slash_ensmem_subdir }} + cyc@H + CYCLE_TYPEprod + + + {%- if do_dacycle and do_refl2tten and do_nonvar_cldanal%} + + + + + {%- elif do_dacycle and do_nonvar_cldanal%} + + {%- elif do_dacycle and do_refl2tten%} + + {%- elif do_dacycle %} + {%- if do_envar_radar_ref %} + + {%- else %} + + {%- endif %} + {%- elif do_enkfupdate or do_enkf_radar_ref %} + {%- if do_recenter %} + + + + {%- for h in cycl_hrs_recenter %} + {{ h }}@H + {%- endfor %} + + &CYCLE_BASEDIR;/@Y@m@d@H/recenter/fcst_fv3lam/INPUT/recenter_complete.txt + + + {%- for h in cycl_hrs_recenter %} + {{ h }}@H + {%- endfor %} + + + + {%- elif do_nonvar_cldanal%} + + {%- elif do_enkf_radar_ref %} + + {%- elif do_enkfupdate %} + + {%- endif %} + {%- endif %} + + + +{%- endif %} +{% if do_ensemble %} + + + {%- for m in range(1, num_ens_members_fcst+1) -%}{%- set fmtstr=" %0"~ndigits_ensmem_names~"d" -%}{{- fmtstr%m -}}{%- endfor %} +{%- endif %} + &RSRV_DEFAULT; @@ -2344,23 +2353,7 @@ MODULES_RUN_TASK_FP script. CYCLE_TYPEprod - {%- if do_dacycle and do_refl2tten and do_nonvar_cldanal%} - - - - - {%- elif do_dacycle and do_nonvar_cldanal%} - - {%- elif do_dacycle and do_refl2tten%} - - {%- elif do_dacycle %} - {%- if do_envar_radar_ref %} - - {%- else %} - - {%- endif %} - {%- elif do_enkfupdate or do_enkf_radar_ref %} - {%- if do_recenter %} + {%- if do_recenter %} @@ -2384,15 +2377,22 @@ MODULES_RUN_TASK_FP script. {%- elif do_enkfupdate %} {%- endif %} - {%- endif %} +{% if do_ensemble %} + +{%- endif %} {%- endif %} +{% if do_ensemble %} + + + {%- for m in range(1, num_ens_members+1) -%}{%- set fmtstr=" %0"~ndigits_ensmem_names~"d" -%}{{- fmtstr%m -}}{%- endfor %} +{%- endif %} &RSRV_FCST;