Skip to content

Commit

Permalink
RRFS_B ensemble retro (NOAA-EMC#447) (NOAA-EMC#449)
Browse files Browse the repository at this point in the history
* Update scripts for running ensemble retros on Hera.

* changes for running RRFSE retro

* Update retro data path on Jet

* Use spinup cycles for ensemble initialization

* Update JREGIONAL_RUN_FCST

* Update JREGIONAL_RUN_PREPSTART

* Update JREGIONAL_SAVE_RESTART

* Updating config.sh for CONUS_13km

* Update model_configure to have different output frequency

* Updating config.sh for CONUS_3km

Co-authored-by: Ming.Hu <[email protected]>

Co-authored-by: Ming.Hu <[email protected]>
  • Loading branch information
chunhuazhou and hu5970 authored Nov 30, 2022
1 parent b7387a8 commit 184d5dc
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 20 deletions.
20 changes: 14 additions & 6 deletions scripts/exregional_run_analysis.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ if [[ ${regional_ensemble_option:-1} -eq 5 ]]; then
ens_nstarthr=$( printf "%02d" ${DA_CYCLE_INTERV} )
imem=1
ifound=0
for hrs in ${CYCL_HRS_HYB_FV3LAM_ENS}; do
if [ $HH == ${hrs} ]; then

while [[ $imem -le ${NUM_ENS_MEMBERS} ]];do
memcharv0=$( printf "%03d" $imem )
memchar=mem$( printf "%04d" $imem )
Expand All @@ -215,12 +218,13 @@ if [[ ${regional_ensemble_option:-1} -eq 5 ]]; then
restart_prefix="${YYYYMMDD}.${HH}0000."
slash_ensmem_subdir=$memchar
bkpathmem=${rrfse_fg_root}/${YYYYMMDDHHmInterv}/${slash_ensmem_subdir}/fcst_fv3lam/RESTART
for cycl_hrs in ${CYCL_HRS_PRODSTART_ENS}; do
if [ $HH == ${cycl_hrs} ]; then
bkpathmem=${rrfse_fg_root}/${YYYYMMDDHHmInterv}/${slash_ensmem_subdir}/fcst_fv3lam_spinup/RESTART
fi
done

if [ ${DO_SPINUP} == "TRUE" ]; then
for cycl_hrs in ${CYCL_HRS_PRODSTART_ENS}; do
if [ $HH == ${cycl_hrs} ]; then
bkpathmem=${rrfse_fg_root}/${YYYYMMDDHHmInterv}/${slash_ensmem_subdir}/fcst_fv3lam_spinup/RESTART
fi
done
fi
dynvarfile=${bkpathmem}/${restart_prefix}fv_core.res.tile1.nc
tracerfile=${bkpathmem}/${restart_prefix}fv_tracer.res.tile1.nc
phyvarfile=${bkpathmem}/${restart_prefix}phy_data.nc
Expand All @@ -234,6 +238,10 @@ if [[ ${regional_ensemble_option:-1} -eq 5 ]]; then
fi
(( imem += 1 ))
done

fi
done

if [[ $ifound -ne ${NUM_ENS_MEMBERS} ]]; then
print_info_msg "Not enough FV3_LAM ensembles, will fall to GDAS"
regional_ensemble_option=1
Expand Down
7 changes: 7 additions & 0 deletions scripts/exregional_run_enkf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,9 @@ fi
#
#-----------------------------------------------------------------------
#
countdiag=$(ls diag*conv* | wc -l)
if [ $countdiag -gt $nens ]; then

${APRUN} $enkfworkdir/enkf.x < enkf.nml 1>${stdout_name} 2>${stderr_name} || print_err_msg_exit "\
Call to executable to run EnKF returned with nonzero exit code."

Expand All @@ -447,6 +450,10 @@ fi
cp_vrfy ${stdout_name} ${NWGES_DIR}/../enkf_diag/${stdout_name}.$vlddate
cp_vrfy ${stderr_name} ${NWGES_DIR}/../enkf_diag/${stderr_name}.$vlddate

else
echo "Warning: EnKF not running due to lack of ${ob_type} obs for cycle $vlddate !!!"
fi

print_info_msg "
========================================================================
EnKF PROCESS completed successfully!!!
Expand Down
9 changes: 4 additions & 5 deletions ush/config.sh.RRFS_CONUS_13km_ens
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,8 @@ COMINgfs=""
STMP="YourOwnSpace/NCO_dirs/stmp" # Path to directory STMP that mostly contains input files.
PTMP="YourOwnSpace/NCO_dirs/ptmp" # Path to directory STMP that mostly contains input files.
NWGES="YourOwnSpace/NCO_dirs/nwges" # Path to directory NWGES that save boundary, cold initial, restart files
if [[ ${DO_RECENTER} == "TRUE" || ${DO_ENSINIT} == "TRUE" ]]; then
ENSCTRL_STMP="YourOwnSpace/NCO_dirs/stmp" # Path to directory STMP that mostly contains control input files for ensemble recentering.
ENSCTRL_PTMP="YourOwnSpace/NCO_dirs/ptmp" # Path to directory STMP that mostly contains control input files for ensemble recentering.
ENSCTRL_NWGES="YourOwnSpace/NCO_dirs/nwges" # Path to directory STMP that mostly contains control input files for ensemble recentering.
fi
ENSCTRL_STMP="YourOwnSpace/NCO_dirs/stmp" # Path to directory STMP that mostly contains control input files for ensemble recentering.
ENSCTRL_PTMP="YourOwnSpace/NCO_dirs/ptmp" # Path to directory STMP that mostly contains control input files for ensemble recentering.
ENSCTRL_NWGES="YourOwnSpace/NCO_dirs/nwges" # Path to directory STMP that mostly contains control input files for ensemble recentering.


16 changes: 8 additions & 8 deletions ush/config.sh.RRFS_CONUS_3km_ens
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,16 @@ RUN_ENVIR="nco"
PREDEF_GRID_NAME=RRFS_CONUS_3km
ADDNL_OUTPUT_GRIDS=()

TILE_LABELS="CONUS NE NC NW SE SC SW"
TILE_SETS="full NE NC NW SE SC SW"
TILE_LABELS="CONUS REGIONS"
TILE_SETS="full NE,NC,NW,SE,SC,SW"

DO_ENSEMBLE="TRUE"
#DO_DACYCLE="TRUE"
#DO_SURFACE_CYCLE="TRUE"
DO_SPINUP="TRUE"
#DO_RETRO="TRUE"
DO_NONVAR_CLDANAL="TRUE"
DO_SMOKE_DUST="FALSE"
#DO_REFL2TTEN="FALSE"
#RADARREFL_TIMELEVEL=(0)
#FH_DFI_RADAR="0.0,0.25,0.5"
Expand Down Expand Up @@ -134,7 +135,7 @@ HYBENSMEM_NMIN=66
HALO_BLEND=20
IO_LAYOUT_Y=1
PPN_RUN_REF2TTEN=1
PPN_RUN_NONVARCLDANL=1
PPN_RUN_NONVARCLDANL=${IO_LAYOUT_Y}

MAXTRIES_GET_EXTRN_ICS="2"
MAXTRIES_GET_EXTRN_LBCS="2"
Expand Down Expand Up @@ -181,6 +182,7 @@ TAG="RRFSE_CONUS_3km"

USE_CUSTOM_POST_CONFIG_FILE="TRUE"
TESTBED_FIELDS_FN="testbed_fields_bgdawp.txt"
TESTBED_FIELDS_FN2="testbed_fields_bgrd3d.txt"
CUSTOM_POST_CONFIG_FP="$(cd "$( dirname "${BASH_SOURCE[0]}" )/.." &>/dev/null&&pwd)/fix/upp/postxconfig-NT-fv3lam_rrfs.txt"
CUSTOM_POST_PARAMS_FP="$(cd "$( dirname "${BASH_SOURCE[0]}" )/.." &>/dev/null&&pwd)/fix/upp/params_grib2_tbl_new"
ARCHIVEDIR="/1year/BMC/wrfruc/rrfs_dev1"
Expand Down Expand Up @@ -255,9 +257,7 @@ COMINgfs=""
STMP="/mnt/lfs4/BMC/wrfruc/RRFSE/NCO_dirs/stmp" # Path to directory STMP that mostly contains input files.
PTMP="/mnt/lfs4/BMC/wrfruc/RRFSE/NCO_dirs/ptmp" # Path to directory STMP that mostly contains input files.
NWGES="/mnt/lfs4/BMC/wrfruc/RRFSE/NCO_dirs/nwges" # Path to directory NWGES that save boundary, cold initial, restart files
if [[ ${DO_RECENTER} == "TRUE" || ${DO_ENSINIT} == "TRUE" ]]; then
ENSCTRL_STMP="/mnt/lfs4/BMC/nrtrr/NCO_dirs/stmp" # Path to directory STMP that mostly contains control input files for ensemble recentering.
ENSCTRL_PTMP="/mnt/lfs4/BMC/nrtrr/NCO_dirs/ptmp" # Path to directory STMP that mostly contains control input files for ensemble recentering.
ENSCTRL_NWGES="/mnt/lfs4/BMC/nrtrr/NCO_dirs/nwges" # Path to directory STMP that mostly contains control input files for ensemble recentering.
fi
ENSCTRL_STMP="/mnt/lfs4/BMC/nrtrr/NCO_dirs/stmp" # Path to directory STMP that mostly contains control input files for ensemble recentering.
ENSCTRL_PTMP="/mnt/lfs4/BMC/nrtrr/NCO_dirs/ptmp" # Path to directory STMP that mostly contains control input files for ensemble recentering.
ENSCTRL_NWGES="/mnt/lfs4/BMC/nrtrr/NCO_dirs/nwges" # Path to directory STMP that mostly contains control input files for ensemble recentering.

21 changes: 20 additions & 1 deletion ush/templates/FV3LAM_wflow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,8 @@ MODULES_RUN_TASK_FP script.
<streq><left>{{ h }}</left><right><cyclestr>@H</cyclestr></right></streq>
{%- endfor %}
</or>
<or>
<or>
{%- if do_spinup %}
<and>
<or>
{%- for h in cycl_hrs_prodstart_ens %}
Expand All @@ -1206,6 +1207,13 @@ MODULES_RUN_TASK_FP script.
<datadep age="00:00:01:00"><cyclestr offset="-{{ da_cycle_interval_hrs }}:00:00">&RRFSE_FG_ROOT;/@Y@m@d@H/mem{{ "%04d" % h }}/fcst_fv3lam/RESTART/</cyclestr><cyclestr>@Y@m@[email protected]</cyclestr></datadep>
{%- endfor %}
</and>
{%- else %}
<and>
{% for h in range(1, num_ens_members+1) %}
<datadep age="00:00:01:00"><cyclestr offset="-{{ da_cycle_interval_hrs }}:00:00">&RRFSE_FG_ROOT;/@Y@m@d@H/mem{{ "%04d" % h }}/fcst_fv3lam/RESTART/</cyclestr><cyclestr>@Y@m@[email protected]</cyclestr></datadep>
{%- endfor %}
</and>
{%- endif %}
</or>
</and>
<and>
Expand Down Expand Up @@ -2086,7 +2094,9 @@ MODULES_RUN_TASK_FP script.
<dependency>
<and>
<taskdep task="&PREP_CYC_ENSMEAN_TN;"/>
{%- if do_enkf_radar_ref %}
<taskdep task="&PROCESS_RADAR_REF_TN;_prod"/>
{%- endif %}
{% if machine in ["JET", "HERA"] -%}
<datadep age="05:00"><cyclestr>&OBSPATH;/@Y@m@[email protected]@Hz.prepbufr.tm00</cyclestr></datadep>
{% else -%}
Expand Down Expand Up @@ -2321,7 +2331,16 @@ MODULES_RUN_TASK_FP script.
<envar><name>OB_TYPE</name><value>radardbz</value></envar>

<dependency>
<and>
<taskdep task="&RUN_ENKFUPDT_TN;"/>
{%- if do_retro %}
<and>
{%- for m in range(1, num_ens_members+1) %}
<datadep age="00:00:00:01"><cyclestr>&NWGES_BASEDIR;/@Y@m@d@H/mem{{ "%04d" % m }}/observer_gsi/diag_conv_rw_ges.@Y@m@[email protected]</cyclestr></datadep>
{%- endfor %}
</and>
{%- endif %}
</and>
</dependency>
</task>

Expand Down

0 comments on commit 184d5dc

Please sign in to comment.