Skip to content

Commit

Permalink
Refine GSI PM DA for the RRFS_SD model (NOAA-EMC#569)
Browse files Browse the repository at this point in the history
* Refine GSI PM DA for RRFS_SD model
	modified:   anavinfo.rrfs_sd
	new file:   berror.rrfs_sd
	modified:   ../../scripts/exregional_run_analysis.sh
	modified:   ../../ush/config_defaults.sh
	modified:   ../../ush/templates/FV3LAM_wflow.xml

* Modify FV3LAM_wflow.xml to remove dependence on SD_DA

* Update dependences on SD_DA

* 1. SD DA updates local tracer files
2. Update smoke,dust tracers
 Changes to be committed:
	modified:   scripts/exregional_run_analysis.sh
	modified:   scripts/exregional_run_postanal.sh
	modified:   ush/templates/FV3LAM_wflow.xml

* Remove DO_SDDACYCE
Change dependece to PREP_CYC_TN
  • Loading branch information
hongli-wang authored Sep 28, 2023
1 parent 5f03db7 commit 57d298c
Show file tree
Hide file tree
Showing 10 changed files with 119 additions and 46 deletions.
3 changes: 3 additions & 0 deletions fix/gsi/anavinfo.rrfs_sd
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ state_vector::
ps 1 0 met_guess prse
smoke 65 1 chem_guess smoke
dust 65 1 chem_guess dust
coarsepm 65 1 chem_guess coarsepm
::

control_vector::
Expand All @@ -55,11 +56,13 @@ control_vector::
q 65 1 0.80 -1.0 state q
smoke 65 1 1.00 -1.0 state smoke
dust 65 1 1.00 -1.0 state dust
coarsepm 65 1 1.00 -1.0 state coarsepm
::

chem_guess::
!var level itracer crtm_use type orig_name
smoke 65 1 12 smoke smoke
dust 65 1 12 dust dust
coarsepm 65 1 12 coarsepm coarsepm
pm2_5 65 1 10 pm2_5 pm2_5
::
Binary file added fix/gsi/berror.rrfs_sd
Binary file not shown.
24 changes: 21 additions & 3 deletions scripts/exregional_run_analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -424,18 +424,27 @@ if [ ${BKTYPE} -eq 1 ]; then # cold start uses background from INPUT
else # cycle uses background from restart
if [ "${IO_LAYOUT_Y}" == "1" ]; then
ln_vrfy -snf ${bkpath}/fv_core.res.tile1.nc fv3_dynvars
ln_vrfy -snf ${bkpath}/fv_tracer.res.tile1.nc fv3_tracer
if [ ${anav_type} == "AERO" ]; then
cp_vrfy ${bkpath}/fv_tracer.res.tile1.nc fv3_tracer
else
ln_vrfy -snf ${bkpath}/fv_tracer.res.tile1.nc fv3_tracer
fi
ln_vrfy -snf ${bkpath}/sfc_data.nc fv3_sfcdata
ln_vrfy -snf ${bkpath}/phy_data.nc fv3_phyvars
else
for ii in ${list_iolayout}
do
iii=`printf %4.4i $ii`
ln_vrfy -snf ${bkpath}/fv_core.res.tile1.nc.${iii} fv3_dynvars.${iii}
ln_vrfy -snf ${bkpath}/fv_tracer.res.tile1.nc.${iii} fv3_tracer.${iii}
if [ ${anav_type} == "AERO" ]; then
cp_vrfy ${bkpath}/fv_tracer.res.tile1.nc.${iii} fv3_tracer.${iii}
else
ln_vrfy -snf ${bkpath}/fv_tracer.res.tile1.nc.${iii} fv3_tracer.${iii}
fi
ln_vrfy -snf ${bkpath}/sfc_data.nc.${iii} fv3_sfcdata.${iii}
ln_vrfy -snf ${bkpath}/phy_data.nc.${iii} fv3_phyvars.${iii}
ln_vrfy -snf ${gridspec_dir}/fv3_grid_spec.${iii} fv3_grid_spec.${iii}

done
fi
fv3lam_bg_type=0
Expand Down Expand Up @@ -538,7 +547,13 @@ else


if [ ${anav_type} == "AERO" ]; then
obs_files_source[0]=${OBSPATH_PM}/${YYYYMMDD}/pm25.airnow.${YYYYMMDD}${HH}.bufr
# for previous retro runs
# obs_files_source[0]=${OBSPATH_PM}/${YYYYMMDD}/pm25.airnow.${YYYYMMDD}${HH}.bufr
if [ ${cycle_type} == "spinup" ]; then
obs_files_source[0]=${cycle_dir}/process_pm_spinup/pm.bufr
else
obs_files_source[0]=${cycle_dir}/process_pm/pm.bufr
fi
obs_files_target[0]=pm25bufr
fi

Expand Down Expand Up @@ -702,6 +717,7 @@ if [[ ${gsi_type} == "ANALYSIS" && ${anav_type} == "AERO" ]]; then
miter=1
niter1=100
niter2=0
write_diag_2=.true.
ifhyb=.false.
ifsd_da=.true.
l_hyb_ens=.false.
Expand All @@ -713,7 +729,9 @@ if [[ ${gsi_type} == "ANALYSIS" && ${anav_type} == "AERO" ]]; then
binary_diag=.false.
usenewgfsberror=.false.
laeroana_fv3smoke=.true.
#remove cmaq when GSL GSI is update in future
berror_fv3_cmaq_regional=.true.
berror_fv3_sd_regional=.true.
fi

SATINFO=${FIX_GSI}/global_satinfo.txt
Expand Down
35 changes: 35 additions & 0 deletions scripts/exregional_run_postanal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ MM=${YYYYMMDDHH:4:2}
DD=${YYYYMMDDHH:6:2}
HH=${YYYYMMDDHH:8:2}
YYYYMMDD=${YYYYMMDDHH:0:8}

#
#-----------------------------------------------------------------------
#
Expand Down Expand Up @@ -181,6 +182,40 @@ else
BKTYPE=1 # cold start
fi


#
#-----------------------------------------------------------------------
#
# Update smoke and dust from aerosal data assimilation
#
#-----------------------------------------------------------------------
#


if [ ${cycle_type} == "spinup" ]; then
analworkname="_gsi_spinup"
else
analworkname="_gsi"
fi

if [[ ${BKTYPE} -eq 0 ]] && [[ "${DO_PM_DA}" = "TRUE" ]]; then # warm start
analworkdir_aero="${cycle_dir}/anal_AERO_${analworkname}"
# Assume the GSI analysis files are in current dir
if [ "${IO_LAYOUT_Y}" == "1" ]; then
ln_vrfy -snf ${analworkdir_aero}/fv3_tracer fv3_tracer_sdp
ncrename -v smoke,smoke_ori -v dust,dust_ori fv3_tracer
ncks -A -v smoke,dust fv3_tracer_sdp fv3_tracer
else
for ii in ${list_iolayout}
do
iii=`printf %4.4i $ii`
ln_vrfy -snf ${analworkdir_aero}/fv3_tracer.${iii} fv3_tracer_sdp.${iii}
ncrename -v smoke,smoke_ori -v dust,dust_ori fv3_tracer.${iii}
ncks -A -v smoke,dust fv3_tracer_sdp.${iii} fv3_tracer.${iii}
done
fi
fi

#
#-----------------------------------------------------------------------
#
Expand Down
1 change: 0 additions & 1 deletion ush/config.sh.RRFS-SD_PM25DA_CONUS_3km
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ TILE_LABELS="CONUS REGIONS"
TILE_SETS="full NE,NC,NW,SE,SC,SW"

DO_DACYCLE="TRUE"
DO_SDDACYCLE="TRUE"
DO_SURFACE_CYCLE="TRUE"
DO_SPINUP="TRUE"
DO_RETRO="TRUE"
Expand Down
5 changes: 1 addition & 4 deletions ush/config_defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,7 @@ i_precip_vertical_check=0
# &CHEM
laeroana_fv3smoke=.false.
berror_fv3_cmaq_regional=.false.
berror_fv3_sd_regional=.false.
#-----------------------------------------------------------------------
# HYBENSMEM_NMIN:
# Minimum number of ensemble members required a hybrid GSI analysis
Expand Down Expand Up @@ -2105,9 +2106,6 @@ DO_ENS_RADDA="FALSE"
# DO_DACYCLE:
# Flag that determines whether to run a data assimilation cycle.
#
# DO_SDDACYCLE:
# Flag that determines whether to run a SMOKE and DUST data assimilation cycle.
#
# DO_SURFACE_CYCLE:
# Flag that determines whether to continue cycle surface fields.
#
Expand Down Expand Up @@ -2141,7 +2139,6 @@ DO_ENS_RADDA="FALSE"
# Use CLM mode in the model
#-----------------------------------------------------------------------
DO_DACYCLE="FALSE"
DO_SDDACYCLE="FALSE"
DO_SURFACE_CYCLE="FALSE"
SURFACE_CYCLE_DELAY_HRS="1"
DO_SOIL_ADJUST="FALSE"
Expand Down
1 change: 0 additions & 1 deletion ush/generate_FV3LAM_wflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,6 @@ settings="\
# data assimilation related parameters.
#
'do_dacycle': ${DO_DACYCLE}
'do_sddacycle': ${DO_SDDACYCLE}
'do_surface_cycle': ${DO_SURFACE_CYCLE}
'da_cycle_interval_hrs': ${DA_CYCLE_INTERV}
'do_nonvar_cldanal': ${DO_NONVAR_CLDANAL}
Expand Down
11 changes: 5 additions & 6 deletions ush/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -488,12 +488,11 @@ optionList[18]=DO_ENSEMBLE
optionList[19]=DO_ENSINIT
optionList[20]=DO_ENSFCST
optionList[21]=DO_SAVE_INPUT
optionList[22]=DO_SDDACYCLE
optionList[23]=DO_SAVE_DA_OUTPUT
optionList[24]=DO_ENS_RADDA
optionList[25]=DO_GSIDIAG_OFFLINE
optionList[26]=USE_CLM
optionList[27]=DO_PM_DA
optionList[22]=DO_SAVE_DA_OUTPUT
optionList[23]=DO_ENS_RADDA
optionList[24]=DO_GSIDIAG_OFFLINE
optionList[25]=USE_CLM
optionList[26]=DO_PM_DA

obs_number=${#optionList[@]}
for (( i=0; i<${obs_number}; i++ ));
Expand Down
84 changes: 54 additions & 30 deletions ush/templates/FV3LAM_wflow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1307,12 +1307,12 @@ MODULES_RUN_TASK_FP script.
{%- endif %}

{%- if not do_ensemble %}
{%- if do_sddacycle %}
{%- if do_pm_da %}
<!--
************************************************************************
************************************************************************
-->
<task name="&ANAL_SD_GSI_TN;_#type#{{ uscore_ensmem_name }}" cycledefs="#type#cyc" maxtries="{{ maxtries_anal_gsi }}">
<task name="&ANAL_SD_GSI_TN;_spinup{{ uscore_ensmem_name }}" cycledefs="spinupcyc" maxtries="{{ maxtries_anal_gsi }}">

&RSRV_ANALYSIS;
&WALL_LIMIT_ANAL;
Expand All @@ -1326,8 +1326,8 @@ MODULES_RUN_TASK_FP script.
<nodesize>&NCORES_PER_NODE;</nodesize>
{% endif -%}
<walltime>{{ wtime_run_anal }}</walltime>
<jobname>&TAG;_&ANAL_SD_GSI_TN;_#type#{{ uscore_ensmem_name }}</jobname>
<join><cyclestr>&LOGDIR;/&ANAL_SD_GSI_TN;{{ uscore_ensmem_name }}_#type#_&TAG;_@Y@m@[email protected]</cyclestr></join>
<jobname>&TAG;_&ANAL_SD_GSI_TN;_spinup{{ uscore_ensmem_name }}</jobname>
<join><cyclestr>&LOGDIR;/&ANAL_SD_GSI_TN;{{ uscore_ensmem_name }}_spinup_&TAG;_@Y@m@[email protected]</cyclestr></join>

<envar><name>GLOBAL_VAR_DEFNS_FP</name><value>&GLOBAL_VAR_DEFNS_FP;</value></envar>
<envar><name>PDY</name><value><cyclestr>@Y@m@d</cyclestr></value></envar>
Expand All @@ -1336,7 +1336,7 @@ MODULES_RUN_TASK_FP script.
<envar><name>CYCLE_DIR</name><value><cyclestr>&CYCLE_BASEDIR;/@Y@m@d@H</cyclestr></value></envar>
<envar><name>CYCLE_ROOT</name><value><cyclestr>&CYCLE_BASEDIR;</cyclestr></value></envar>
<envar><name>RRFSE_FG_ROOT</name><value><cyclestr>&RRFSE_FG_ROOT;</cyclestr></value></envar>
<envar><name>CYCLE_TYPE</name><value><cyclestr>#type#</cyclestr></value></envar>
<envar><name>CYCLE_TYPE</name><value><cyclestr>spinup</cyclestr></value></envar>
<envar><name>GSI_TYPE</name><value><cyclestr>ANALYSIS</cyclestr></value></envar>
<envar><name>OB_TYPE</name><value><cyclestr>AERO</cyclestr></value></envar>
<envar><name>MEM_TYPE</name><value><cyclestr>MEMBER</cyclestr></value></envar>
Expand All @@ -1347,28 +1347,7 @@ MODULES_RUN_TASK_FP script.
<dependency>
<and>
<timedep><cyclestr offset="&START_TIME_CONVENTIONAL;">@Y@m@d@H@M00</cyclestr></timedep>
<taskdep task="&PREP_CYC_TN;_#type#{{ uscore_ensmem_name }}"/>
{%- if use_rrfse_ens %}
{%- if do_retro %}
<or>
<and>
<or>
{%- for h in cycl_hrs_hyb_fv3lam_ens %}
<streq><left>{{ h }}</left><right><cyclestr>@H</cyclestr></right></streq>
{%- endfor %}
</or>
{% 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>
<and>
{%- for h in cycl_hrs_hyb_fv3lam_ens %}
<strneq><left>{{ h }}</left><right><cyclestr>@H</cyclestr></right></strneq>
{%- endfor %}
</and>
</or>
{%- endif %}
{%- endif %}
<taskdep task="&PREP_CYC_TN;_prod{{ uscore_ensmem_name }}"/>
</and>
</dependency>

Expand Down Expand Up @@ -1415,9 +1394,6 @@ MODULES_RUN_TASK_FP script.
<and>
<timedep><cyclestr offset="&START_TIME_CONVENTIONAL;">@Y@m@d@H@M00</cyclestr></timedep>
<taskdep task="&PREP_CYC_TN;_spinup{{ uscore_ensmem_name }}"/>
{%- if do_sddacycle %}
<taskdep task="&ANAL_SD_GSI_TN;_#type#"/>
{%- endif %}
{%- if use_rrfse_ens %}
{%- if do_retro %}
<and>
Expand Down Expand Up @@ -1487,6 +1463,9 @@ MODULES_RUN_TASK_FP script.

<dependency>
<taskdep task="&ANAL_GSI_TN;_spinup{{ uscore_ensmem_name }}"/>
{%- if do_pm_da %}
<taskdep task="&ANAL_SD_GSI_TN;_spinup{{ uscore_ensmem_name }}"/>
{%- endif %}
</dependency>

</task>
Expand Down Expand Up @@ -2261,6 +2240,48 @@ MODULES_RUN_TASK_FP script.
{%- endif %}

{%- if do_dacycle %}
{%- if do_pm_da %}
<!--
************************************************************************
************************************************************************
-->
<task name="&ANAL_SD_GSI_TN;_prod{{ uscore_ensmem_name }}" cycledefs="prodcyc,prodcyc_long" maxtries="{{ maxtries_anal_gsi }}">

&RSRV_ANALYSIS;
&WALL_LIMIT_ANAL;

<command>&LOAD_MODULES_RUN_TASK_FP; "&RUN_ANAL_TN;" "&JOBSDIR;/JREGIONAL_RUN_ANAL"</command>

&RESOURCES_ANAL_GSI;
&NATIVE_ANAL_GSI;
<walltime>&WALLTIME_ANAL_GSI;</walltime>
&NODESIZE_ALL;
<jobname>&TAG;_&ANAL_SD_GSI_TN;_prod{{ uscore_ensmem_name }}</jobname>
<join><cyclestr>&LOGDIR;/&ANAL_SD_GSI_TN;_&TAG;{{ uscore_ensmem_name }}_prod_@Y@m@[email protected]</cyclestr></join>

<envar><name>GLOBAL_VAR_DEFNS_FP</name><value>&GLOBAL_VAR_DEFNS_FP;</value></envar>
<envar><name>PDY</name><value><cyclestr>@Y@m@d</cyclestr></value></envar>
<envar><name>cyc</name><value><cyclestr>@H</cyclestr></value></envar>
<envar><name>CDATE</name><value><cyclestr>@Y@m@d@H</cyclestr></value></envar>
<envar><name>CYCLE_DIR</name><value><cyclestr>&CYCLE_BASEDIR;/@Y@m@d@H</cyclestr></value></envar>
<envar><name>CYCLE_ROOT</name><value><cyclestr>&CYCLE_BASEDIR;</cyclestr></value></envar>
<envar><name>RRFSE_FG_ROOT</name><value><cyclestr>&RRFSE_FG_ROOT;</cyclestr></value></envar>
<envar><name>CYCLE_TYPE</name><value><cyclestr>prod</cyclestr></value></envar>
<envar><name>GSI_TYPE</name><value><cyclestr>ANALYSIS</cyclestr></value></envar>
<envar><name>OB_TYPE</name><value><cyclestr>AERO</cyclestr></value></envar>
<envar><name>MEM_TYPE</name><value><cyclestr>MEMBER</cyclestr></value></envar>
<envar><name>SLASH_ENSMEM_SUBDIR</name><value><cyclestr>{{ slash_ensmem_subdir }}</cyclestr></value></envar>
<envar><name>SATBIAS_DIR</name><value><cyclestr>&NWGES_BASEDIR;/satbias</cyclestr></value></envar>
<envar><name>nens</name><value>{{ num_ens_members }}</value></envar>
<dependency>
<and>
<timedep><cyclestr offset="&START_TIME_CONVENTIONAL;">@Y@m@d@H@M00</cyclestr></timedep>
<taskdep task="&PREP_CYC_TN;_prod{{ uscore_ensmem_name }}"/>
</and>
</dependency>

</task>
{%- endif %}
<!--
************************************************************************
************************************************************************
Expand Down Expand Up @@ -2375,6 +2396,9 @@ MODULES_RUN_TASK_FP script.

<dependency>
<taskdep task="&ANAL_GSI_TN;_prod{{ uscore_ensmem_name }}"/>
{%- if do_pm_da %}
<taskdep task="&ANAL_SD_GSI_TN;_prod{{ uscore_ensmem_name }}"/>
{%- endif %}
</dependency>

</task>
Expand Down
1 change: 0 additions & 1 deletion ush/valid_param_vals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ valid_vals_DO_SAVE_DA_OUTPUT=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no
valid_vals_DO_GSIDIAG_OFFLINE=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no")
valid_vals_DO_ENSFCST=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no")
valid_vals_DO_DACYCLE=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no")
valid_vals_DO_SDDACYCLE=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no")
valid_vals_DO_SURFACE_CYCLE=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no")
valid_vals_DO_SOIL_ADJUST=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no")
valid_vals_DO_UPDATE_BC=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no")
Expand Down

0 comments on commit 57d298c

Please sign in to comment.