-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add options for Mixed Ensemble and Scale/Variable-Dependent Localization #451
Changes from 4 commits
4fda327
b46f252
91791b2
e81c805
c6084ab
10d6c2a
2f6fdef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
met_guess:: | ||
!var level crtm_use desc orig_name | ||
ps 1 -1 surface_pressure ps | ||
z 1 -1 geopotential_height phis | ||
u 65 2 zonal_wind u | ||
v 65 2 meridional_wind v | ||
w 65 2 vertical velocity w | ||
tv 65 2 virtual_temperature tv | ||
q 65 2 specific_humidity sphu | ||
oz 65 2 ozone ozone | ||
delp 65 -1 fv3 del pressure delp | ||
t2m 1 -1 2-m_T t2m | ||
q2m 1 -1 2-m_Q q2m | ||
ql 65 10 cloud_condensate QCLOUD | ||
qr 65 10 rain QRAIN | ||
qs 65 10 snow QSNOW | ||
qi 65 10 ice QICE | ||
qg 65 10 graupel QGRAUP | ||
dbz 65 10 reflectivity REFL_10CM | ||
:: | ||
|
||
state_derivatives:: | ||
!var level src | ||
ps 1 met_guess | ||
u 65 met_guess | ||
v 65 met_guess | ||
tv 65 met_guess | ||
q 65 met_guess | ||
oz 65 met_guess | ||
cw 65 met_guess | ||
prse 66 met_guess | ||
:: | ||
|
||
state_tendencies:: | ||
!var levels source | ||
u 65 met_guess | ||
v 65 met_guess | ||
tv 65 met_guess | ||
q 65 met_guess | ||
oz 65 met_guess | ||
prse 66 met_guess | ||
:: | ||
|
||
state_vector:: | ||
!var level itracer source funcof | ||
u 65 0 met_guess u | ||
v 65 0 met_guess v | ||
w 65 0 met_guess w | ||
tv 65 0 met_guess tv | ||
tsen 65 0 met_guess tv,q | ||
q 65 1 met_guess q | ||
oz 65 1 met_guess oz | ||
prse 66 0 met_guess prse | ||
ps 1 0 met_guess prse | ||
sst 1 0 met_guess sst | ||
qr 65 1 met_guess qr | ||
ql 65 1 met_guess qc | ||
qs 65 1 met_guess qs | ||
qi 65 1 met_guess qi | ||
qg 65 1 met_guess qg | ||
dbz 65 1 met_guess dbz | ||
:: | ||
|
||
control_vector:: | ||
!var level itracer as/tsfc_sdv an_amp0 source funcof | ||
sf 65 0 0.90 -1.0 state u,v | ||
vp 65 0 0.90 -1.0 state u,v | ||
ps 1 0 1.00 -1.0 state prse | ||
t 65 0 1.40 -1.0 state tv | ||
q 65 1 0.80 -1.0 state q | ||
sst 1 0 1.00 -1.0 state sst | ||
stl 1 0 1.00 -1.0 motley sst | ||
sti 1 0 1.00 -1.0 motley sst | ||
w 65 11 1.00 -1.0 state w | ||
qr 65 11 1.00 -1.0 state qr | ||
qs 65 11 1.00 -1.0 state qs | ||
qi 65 11 1.00 -1.0 state qi | ||
qg 65 11 1.00 -1.0 state qg | ||
ql 65 11 1.00 -1.0 state qc | ||
dbz 65 11 1.00 -1.0 state dbz | ||
:: |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -188,6 +188,10 @@ else | |
regional_ensemble_option=1 | ||
fi | ||
|
||
if [ ${ob_type} != "conv" ] || [ ${BKTYPE} -eq 1 ]; then #not using GDAS | ||
l_both_fv3sar_gfs_ens=.false. | ||
fi | ||
|
||
#--------------------------------------------------------------------- | ||
# | ||
# decide regional_ensemble_option: global ensemble (1) or FV3LAM ensemble (5) | ||
|
@@ -246,10 +250,11 @@ if [[ ${regional_ensemble_option:-1} -eq 5 ]]; then | |
if [[ $ifound -ne ${NUM_ENS_MEMBERS} ]] || [[ ${BKTYPE} -eq 1 ]]; then | ||
print_info_msg "Not enough FV3_LAM ensembles, will fall to GDAS" | ||
regional_ensemble_option=1 | ||
l_both_fv3sar_gfs_ens=.false. | ||
fi | ||
fi | ||
# | ||
if [[ ${regional_ensemble_option:-1} -eq 1 ]]; then #using GDAS | ||
if [[ ${regional_ensemble_option:-1} -eq 1 || ${l_both_fv3sar_gfs_ens} = ".true." ]]; then #using GDAS | ||
#----------------------------------------------------------------------- | ||
# Make a list of the latest GFS EnKF ensemble | ||
#----------------------------------------------------------------------- | ||
|
@@ -349,23 +354,32 @@ niter2=50 | |
lread_obs_save=.false. | ||
lread_obs_skip=.false. | ||
if_model_dbz=.false. | ||
nummem_gfs=0 | ||
nummem_fv3sar=0 | ||
anav_type=${ob_type} | ||
i_use_2mQ4B=2 | ||
i_use_2mT4B=1 | ||
|
||
# Determine if hybrid option is available | ||
memname='atmf009' | ||
|
||
if [ ${regional_ensemble_option:-1} -eq 5 ] && [ ${BKTYPE} != 1 ]; then | ||
nummem=$NUM_ENS_MEMBERS | ||
if [ ${l_both_fv3sar_gfs_ens} = ".true." ]; then | ||
nummem_gfs=$(more filelist03 | wc -l) | ||
nummem_gfs=$((nummem_gfs - 3 )) | ||
fi | ||
nummem_fv3sar=$NUM_ENS_MEMBERS | ||
nummem=`expr ${nummem_gfs} + ${nummem_fv3sar}` | ||
print_info_msg "$VERBOSE" "Do hybrid with FV3LAM ensemble" | ||
ifhyb=.true. | ||
print_info_msg "$VERBOSE" " Cycle ${YYYYMMDDHH}: GSI hybrid uses FV3LAM ensemble with n_ens=${nummem}" | ||
echo " ${YYYYMMDDHH}(${cycle_type}): GSI hybrid uses FV3LAM ensemble with n_ens=${nummem}" >> ${EXPTDIR}/log.cycles | ||
grid_ratio_ens="1" | ||
ens_fast_read=.true. | ||
else | ||
nummem=$(more filelist03 | wc -l) | ||
nummem=$((nummem - 3 )) | ||
nummem_gfs=$(more filelist03 | wc -l) | ||
nummem_gfs=$((nummem_gfs - 3 )) | ||
nummem=${nummem_gfs} | ||
if [[ ${nummem} -ge ${HYBENSMEM_NMIN} ]]; then | ||
print_info_msg "$VERBOSE" "Do hybrid with ${memname}" | ||
ifhyb=.true. | ||
|
@@ -376,6 +390,9 @@ else | |
print_info_msg "$VERBOSE" " Hybrid needs at least ${HYBENSMEM_NMIN} ${memname} ensembles, only ${nummem} available" | ||
echo " ${YYYYMMDDHH}(${cycle_type}): GSI dose pure 3DVAR" >> ${EXPTDIR}/log.cycles | ||
fi | ||
if [[ ${anav_type} == "all" ]]; then | ||
anav_type="conv" | ||
fi | ||
fi | ||
|
||
# | ||
|
@@ -406,6 +423,17 @@ if [ ${BKTYPE} -eq 1 ]; then # cold start uses background from INPUT | |
fv3lam_bg_type=1 | ||
else # cycle uses background from restart | ||
if [ "${IO_LAYOUT_Y}" == "1" ]; then | ||
if [ -r "${bkpath}/bk_${ob_type}_fv_core.res.tile1.nc" ]; then | ||
cp_vrfy -f ${bkpath}/bk_${ob_type}_fv_core.res.tile1.nc ${bkpath}/fv_core.res.tile1.nc | ||
cp_vrfy -f ${bkpath}/bk_${ob_type}_fv_tracer.res.tile1.nc ${bkpath}/fv_tracer.res.tile1.nc | ||
cp_vrfy -f ${bkpath}/bk_${ob_type}_sfc_data.nc ${bkpath}/sfc_data.nc | ||
cp_vrfy -f ${bkpath}/bk_${ob_type}_phy_data.nc ${bkpath}/phy_data.nc | ||
else | ||
cp_vrfy ${bkpath}/fv_core.res.tile1.nc ${bkpath}/bk_${ob_type}_fv_core.res.tile1.nc | ||
cp_vrfy ${bkpath}/fv_tracer.res.tile1.nc ${bkpath}/bk_${ob_type}_fv_tracer.res.tile1.nc | ||
cp_vrfy ${bkpath}/sfc_data.nc ${bkpath}/bk_${ob_type}_sfc_data.nc | ||
cp_vrfy ${bkpath}/phy_data.nc ${bkpath}/bk_${ob_type}_phy_data.nc | ||
fi | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prep_cyc builds the background and make a link to original background files (named as bk_*). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "bk_*" built in prep_cyc is just a link before doing "ncatted -a checksum". To keep the "ncatted" files, this copy process is required. On Orion, overwriting these files by GSI analysis is often failed and this job is automatically rerun. To prevent the duplicate overwriting in the rerun, I added this copy process. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I still cannot figure out why this part of copy needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this job, restart files are overwritten. Therefore, if this job is failed after outputting restart files, updated restart files are used as the first guess of EnVar in the rerun job by accident. In fact, such situation frequently occurred on Orion. To prevent from that issue, I added this part. |
||
ln_vrfy -snf ${bkpath}/fv_core.res.tile1.nc fv3_dynvars | ||
ln_vrfy -snf ${bkpath}/fv_tracer.res.tile1.nc fv3_tracer | ||
ln_vrfy -snf ${bkpath}/sfc_data.nc fv3_sfcdata | ||
|
@@ -473,7 +501,7 @@ else | |
esac | ||
fi | ||
|
||
if [[ ${gsi_type} == "OBSERVER" || ${ob_type} == "conv" ]]; then | ||
if [[ ${gsi_type} == "OBSERVER" || ${anav_type} == "conv" || ${anav_type} == "all" ]]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using "all" as analysis variable is too general. As this application doing all the thing and cannot be extended? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I renamed 'all' to 'conv_dbz'. |
||
|
||
obs_files_source[0]=${obspath_tmp}/${obsfileprefix}.t${HH}${SUBH}z.prepbufr.tm00 | ||
obs_files_target[0]=prepbufr | ||
|
@@ -486,15 +514,19 @@ if [[ ${gsi_type} == "OBSERVER" || ${ob_type} == "conv" ]]; then | |
obs_files_source[${obs_number}]=${obspath_tmp}/${obsfileprefix}.t${HH}${SUBH}z.nexrad.tm00.bufr_d | ||
obs_files_target[${obs_number}]=l2rwbufr | ||
|
||
if [ ${DO_ENKF_RADAR_REF} == "TRUE" ]; then | ||
if [[ ${DO_ENKF_RADAR_REF} == "TRUE" || ${anav_type} == "all" ]]; then | ||
obs_number=${#obs_files_source[@]} | ||
obs_files_source[${obs_number}]=${cycle_dir}/process_radarref/00/Gridded_ref.nc | ||
if [ ${cycle_type} == "spinup" ]; then | ||
obs_files_source[${obs_number}]=${cycle_dir}/process_radarref_spinup/00/Gridded_ref.nc | ||
else | ||
obs_files_source[${obs_number}]=${cycle_dir}/process_radarref/00/Gridded_ref.nc | ||
fi | ||
obs_files_target[${obs_number}]=dbzobs.nc | ||
fi | ||
|
||
else | ||
|
||
if [ ${ob_type} == "radardbz" ]; then | ||
if [ ${anav_type} == "radardbz" ]; then | ||
|
||
if [ ${cycle_type} == "spinup" ]; then | ||
obs_files_source[0]=${cycle_dir}/process_radarref_spinup/00/Gridded_ref.nc | ||
|
@@ -506,7 +538,7 @@ else | |
fi | ||
|
||
|
||
if [ ${ob_type} == "AERO" ]; then | ||
if [ ${anav_type} == "AERO" ]; then | ||
obs_files_source[0]=${OBSPATH_PM}/${YYYYMMDD}/pm25.airnow.${YYYYMMDD}${HH}.bufr | ||
obs_files_target[0]=pm25bufr | ||
fi | ||
|
@@ -624,27 +656,42 @@ if [ ${DO_ENKF_RADAR_REF} == "TRUE" ]; then | |
beta1_inv=0.0 | ||
if_model_dbz=.true. | ||
fi | ||
if [[ ${gsi_type} == "ANALYSIS" && ${ob_type} == "radardbz" ]]; then | ||
if [[ ${gsi_type} == "ANALYSIS" && ${anav_type} == "radardbz" ]]; then | ||
ANAVINFO=${FIX_GSI}/${ENKF_ANAVINFO_DBZ_FN} | ||
miter=1 | ||
niter1=100 | ||
niter2=0 | ||
bkgerr_vs=0.1 | ||
bkgerr_hzscl="0.4,0.5,0.6" | ||
beta1_inv=0.0 | ||
ens_h=4.10790 | ||
ens_v=-0.30125 | ||
readin_localization=.false. | ||
ens_h=${ens_h_radardbz} | ||
ens_v=${ens_v_radardbz} | ||
nsclgrp=1 | ||
ngvarloc=1 | ||
i_ensloccov4tim=0 | ||
i_ensloccov4var=0 | ||
i_ensloccov4scl=0 | ||
q_hyb_ens=.true. | ||
if_model_dbz=.true. | ||
fi | ||
if [[ ${gsi_type} == "ANALYSIS" && ${anav_type} == "all" ]]; then | ||
ANAVINFO=${FIX_GSI}/${ANAVINFO_ALL_FN} | ||
beta1_inv=0.0 | ||
if_model_dbz=.true. | ||
fi | ||
naensloc=`expr ${nsclgrp} \* ${ngvarloc} + ${nsclgrp} - 1` | ||
if [ ${assign_vdl_nml} = ".true." ]; then | ||
nsclgrp=`expr ${nsclgrp} \* ${ngvarloc}` | ||
ngvarloc=1 | ||
fi | ||
CONVINFO=${FIX_GSI}/${CONVINFO_FN} | ||
HYBENSINFO=${FIX_GSI}/${HYBENSINFO_FN} | ||
OBERROR=${FIX_GSI}/${OBERROR_FN} | ||
BERROR=${FIX_GSI}/${BERROR_FN} | ||
|
||
|
||
if [[ ${gsi_type} == "ANALYSIS" && ${ob_type} == "AERO" ]]; then | ||
if [[ ${gsi_type} == "ANALYSIS" && ${anav_type} == "AERO" ]]; then | ||
if [ ${BKTYPE} -eq 1 ]; then | ||
echo "cold start, skip GSI SD DA" | ||
exit 0 | ||
|
@@ -831,7 +878,7 @@ fi | |
# skip radar reflectivity analysis if no RRFSE ensemble | ||
#----------------------------------------------------------------------- | ||
|
||
if [[ ${gsi_type} == "ANALYSIS" && ${ob_type} == "radardbz" ]]; then | ||
if [[ ${gsi_type} == "ANALYSIS" && ${anav_type} == "radardbz" ]]; then | ||
if [[ ${regional_ensemble_option:-1} -eq 1 ]]; then | ||
echo "No RRFSE ensemble available, cannot do radar reflectivity analysis" | ||
exit 0 | ||
|
@@ -877,7 +924,7 @@ EOF | |
# | ||
gsi_exec="${EXECDIR}/gsi.x" | ||
|
||
if [[ ${gsi_type} == "ANALYSIS" && ${ob_type} == "AERO" ]]; then | ||
if [[ ${gsi_type} == "ANALYSIS" && ${anav_type} == "AERO" ]]; then | ||
gsi_exec="${EXECDIR}/gsi.x.sd" | ||
fi | ||
|
||
|
@@ -914,7 +961,7 @@ fi | |
$APRUN ./gsi.x < gsiparm.anl > stdout 2>&1 || print_err_msg_exit "\ | ||
Call to executable to run GSI returned with nonzero exit code." | ||
|
||
if [ ${ob_type} == "radardbz" ]; then | ||
if [ ${anav_type} == "radardbz" ]; then | ||
cat fort.238 > $comout/rrfs_a.t${HH}z.fits3.tm00 | ||
else | ||
mv fort.207 fit_rad1 | ||
|
@@ -933,7 +980,7 @@ else | |
|
||
fi | ||
|
||
cp stdout $comout/stdout_${ob_type} | ||
cp stdout $comout/stdout_${anav_type} | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
|
@@ -943,6 +990,9 @@ cp stdout $comout/stdout_${ob_type} | |
#----------------------------------------------------------------------- | ||
# | ||
touch gsi_complete.txt | ||
if [[ ${anav_type} == "radardbz" || ${anav_type} == "all" ]]; then | ||
touch gsi_complete_radar.txt # for nonvarcldanl | ||
fi | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,40 @@ DO_SOIL_ADJUST="TRUE" | |
DO_RADDA="FALSE" | ||
DO_BUFRSND="FALSE" | ||
|
||
l_both_fv3sar_gfs_ens=.false. #if true, ensemble size is increased with GDAS ensemble | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This part is added in three configuration files: RRFS_CONUS_13km, RRFS_CONUS_3km, RRFS_CONUS_3km.2022HWT. If they are same or mostly same, can make a separate file just like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I made a separated file (set_rrfs_config_SDL_VDL_MixEn.sh) for setting of MixEn/SDL/VDL. |
||
nsclgrp=1 #number of scales for scale-dependent localization | ||
ngvarloc=1 #number of scales for variable-dependent localization | ||
assign_vdl_nml=.false. | ||
if [[ ${ngvarloc} == "1" ]] && [[ ${nsclgrp} == "2" ]]; then | ||
readin_localization=.false. | ||
ens_h="328.632,82.1580,82.1580" | ||
ens_v="-0.30125,-0.30125,0.0" | ||
ens_h_radardbz="4.10790" | ||
ens_v_radardbz="-0.30125" | ||
elif [[ ${ngvarloc} == "2" ]] && [[ ${nsclgrp} == "1" ]]; then | ||
DO_ENVAR_RADAR_REF_ONCE="TRUE" | ||
readin_localization=.false. | ||
ens_h="82.1580,4.10790" | ||
ens_v="-0.30125,-0.30125" | ||
if [ ${assign_vdl_nml} = ".true." ]; then | ||
vdl_scale="2,2" | ||
else | ||
i_ensloccov4var=1 | ||
fi | ||
elif [[ ${ngvarloc} == "2" ]] && [[ ${nsclgrp} == "2" ]]; then | ||
DO_ENVAR_RADAR_REF_ONCE="TRUE" | ||
readin_localization=.false. | ||
if [ ${assign_vdl_nml} = ".true." ]; then | ||
ens_h="82.1580,16.4316,8.21580,4.10790,2.73860" | ||
ens_v="-0.30125,-0.30125,-0.30125,-0.30125,0.0" | ||
vdl_scale="2,2,2,2" | ||
else | ||
ens_h="328.632,82.1580,4.10790,4.10790,82.1580" | ||
ens_v="-0.30125,-0.30125,-0.30125,-0.30125,0.0" | ||
i_ensloccov4var=1 | ||
fi | ||
fi | ||
|
||
EXTRN_MDL_ICS_OFFSET_HRS="3" | ||
LBC_SPEC_INTVL_HRS="1" | ||
EXTRN_MDL_LBCS_OFFSET_HRS="6" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About the name of this file: should have a name fit to the application. Using "_all" is too general.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed 'all' to 'conv_dbz'.