Skip to content

Commit

Permalink
Enable cycling forecast from EnKF analysis (NOAA-EMC#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
chunhuazhou authored Nov 2, 2021
1 parent da1fb44 commit a8f2564
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 11 deletions.
4 changes: 3 additions & 1 deletion scripts/exregional_run_enkf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ for imem in $(seq 1 $nens); do
FileUpdated=fv3sar_tile1_${memcharv0}_dynvartracer

cp_vrfy $bkpath/fv_tracer.res.tile1.nc ./${memcharv0}_fv3_tracer
cp_vrfy $bkpath/fv_tracer.res.tile1.nc ./${memcharv0}_fv3_dynvars
cp_vrfy $bkpath/fv_core.res.tile1.nc ./${memcharv0}_fv3_dynvars
if [ $imem == 1 ];then
ncvarlst_noaxis_time_new ${memcharv0}_fv3_tracer > nck_tracer_list.txt
ncvarlst_noaxis_time_new ${memcharv0}_fv3_dynvars > nck_dynvar_list.txt
Expand All @@ -443,9 +443,11 @@ for imem in $(seq 1 $nens); do

ncks -A -v $user_nck_dynvar_list $FileUpdated ${memcharv0}_fv3_dynvars
cp_vrfy ${memcharv0}_fv3_dynvars ${enkfanal_nwges_dir}/fv_core.res.tile1.nc
cp_vrfy ${memcharv0}_fv3_dynvars ${bkpath}/fv_core.res.tile1.nc
ncks -A -v $user_nck_tracer_list $FileUpdated ${memcharv0}_fv3_tracer
ncks --no_abc -O -x -v yaxis_2 ${memcharv0}_fv3_tracer tmp_${memcharv0}_tracer
cp_vrfy tmp_${memcharv0}_tracer ${enkfanal_nwges_dir}/fv_tracer.res.tile1.nc
cp_vrfy tmp_${memcharv0}_tracer ${bkpath}/fv_tracer.res.tile1.nc

done

Expand Down
18 changes: 10 additions & 8 deletions scripts/exregional_run_prepstart_ensmean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,16 @@ while [[ $imem -le ${NUM_ENS_MEMBERS} ]];
checkfile=${bkpath}/${restart_prefix}fv_core.res.tile1.nc
checkfile1=${bkpath}/${restart_prefix}fv_tracer.res.tile1.nc
if [ -r "${checkfile}" ] && [ -r "${checkfile1}" ] ; then
cp_vrfy ${bkpath}/${restart_prefix}fv_core.res.tile1.nc fv_core.res.tile1.nc_mem${ensmem}
cp_vrfy ${bkpath}/${restart_prefix}fv_tracer.res.tile1.nc fv_tracer.res.tile1.nc_mem${ensmem}
cp_vrfy ${bkpath}/${restart_prefix}sfc_data.nc sfc_data.nc_mem${ensmem}
cp_vrfy ${bkpath}/${restart_prefix}coupler.res coupler.res
cp_vrfy ${bkpath}/${restart_prefix}fv_core.res.nc fv_core.res.nc
cp_vrfy ${bkpath}/${restart_prefix}fv_srf_wnd.res.tile1.nc fv_srf_wnd.res.tile1.nc_mem${ensmem}
cp_vrfy ${bkpath}/${restart_prefix}phy_data.nc phy_data.nc_mem${ensmem}
cp_vrfy ${fg_root}/${YYYYMMDDHHmInterv}/mem${ensmem}/${fg_restart_dirname}/INPUT/gfs_ctrl.nc gfs_ctrl.nc
ln_vrfy ${bkpath}/${restart_prefix}fv_core.res.tile1.nc fv_core.res.tile1.nc_mem${ensmem}
ln_vrfy ${bkpath}/${restart_prefix}fv_tracer.res.tile1.nc fv_tracer.res.tile1.nc_mem${ensmem}
ln_vrfy ${bkpath}/${restart_prefix}sfc_data.nc sfc_data.nc_mem${ensmem}
ln_vrfy ${bkpath}/${restart_prefix}fv_srf_wnd.res.tile1.nc fv_srf_wnd.res.tile1.nc_mem${ensmem}
ln_vrfy ${bkpath}/${restart_prefix}phy_data.nc phy_data.nc_mem${ensmem}
if [ $imem == 1 ]; then
ln_vrfy ${bkpath}/${restart_prefix}coupler.res coupler.res
ln_vrfy ${bkpath}/${restart_prefix}fv_core.res.nc fv_core.res.nc
ln_vrfy ${fg_root}/${YYYYMMDDHHmInterv}/mem${ensmem}/${fg_restart_dirname}/INPUT/gfs_ctrl.nc gfs_ctrl.nc
fi
else
print_err_msg_exit "Error: cannot find background: ${checkfile}"
fi
Expand Down
3 changes: 2 additions & 1 deletion ush/config.sh.RRFS_CONUS_13km
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ if [[ ${DO_ENSEMBLE} == "TRUE" ]]; then
NUM_ENS_MEMBERS=9
DO_SPPT=TRUE
SPPT_MAG=0.5
DO_DACYCLE="TRUE"
DO_DACYCLE="FALSE"
DO_ENKFUPDATE="TRUE"
DO_SPINUP="FALSE"
DO_SURFACE_CYCLE="FALSE"
DO_NONVAR_CLDANAL="FALSE"
Expand Down
2 changes: 1 addition & 1 deletion ush/generate_FV3LAM_wflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ if [ "${DO_SURFACE_CYCLE}" = "TRUE" ]; then
$settings"
fi

if [ "${DO_DACYCLE}" = "TRUE" ]; then
if [[ "${DO_DACYCLE}" = "TRUE" || "${DO_ENKFUPDATE}" = "TRUE" ]]; then
nstf_name="2,0,0,0,0"
if [ "${SDF_USES_RUC_LSM}" = "TRUE" ]; then
lsoil="9"
Expand Down
7 changes: 7 additions & 0 deletions ush/templates/FV3LAM_wflow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,13 @@ MODULES_RUN_TASK_FP script.
<taskdep task="&CLDANL_NONVAR_TN;_#type#"/>
{%- elif do_dacycle %}
<taskdep task="&ANAL_GSI_TN;_#type#{{ uscore_ensmem_name }}"/>
{%- elif do_enkfupdate %}
<or>
{%- for h in cycl_hrs_prodstart %}
<streq><left>{{ h }}</left><right><cyclestr>@H</cyclestr></right></streq>
{%- endfor %}
<taskdep task="&RUN_ENKFUPDT_TN;"/>
</or>
{%- else %}
<taskdep task="&PREP_CYC_TN;_#type#{{ uscore_ensmem_name }}"/>
{%- endif %}
Expand Down

0 comments on commit a8f2564

Please sign in to comment.