Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 45 additions & 1 deletion scripts/exregional_run_analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ if [ ${DO_RADDA} == "TRUE" ]; then

# For EnVar
if [ -r ${satbias_dir}/rrfs.${spinup_or_prod_rrfs}.${SAT_TIME}_satbias ]; then
echo " using satellite bias files from ${SAT_TIME}"
echo " using satellite bias files from ${satbias_dir} ${spinup_or_prod_rrfs}.${SAT_TIME}"

cp_vrfy ${satbias_dir}/rrfs.${spinup_or_prod_rrfs}.${SAT_TIME}_satbias ./satbias_in
cp_vrfy ${satbias_dir}/rrfs.${spinup_or_prod_rrfs}.${SAT_TIME}_satbias_pc ./satbias_pc
Expand All @@ -886,6 +886,48 @@ if [ ${DO_RADDA} == "TRUE" ]; then
satcounter=` expr $satcounter + 1 `
done

## if satbias files (go back to previous 10 dyas) are not available from ${satbias_dir}, use satbias files from the ${FIX_GSI}
## now check if there are satbias files in continue cycle data space
if [ $satcounter -eq $maxcounter ]; then
satcounter=1
maxcounter=240
satbias_dir_cont=${CONT_CYCLE_DATA_ROOT}/satbias
while [ $satcounter -lt $maxcounter ]; do
SAT_TIME=`date +"%Y%m%d%H" -d "${START_DATE} ${satcounter} hours ago"`
echo $SAT_TIME

if [ ${DO_ENS_RADDA} == "TRUE" ]; then

# For EnKF. Note, EnKF does not need radstat file
if [ -r ${satbias_dir_cont}_ensmean/rrfs.${spinup_or_prod_rrfs}.${SAT_TIME}_satbias ]; then
echo " using satellite bias files from ${SAT_TIME}"

cp_vrfy ${satbias_dir_cont}_ensmean/rrfs.${spinup_or_prod_rrfs}.${SAT_TIME}_satbias ./satbias_in
cp_vrfy ${satbias_dir_cont}_ensmean/rrfs.${spinup_or_prod_rrfs}.${SAT_TIME}_satbias_pc ./satbias_pc

break
fi

else

# For EnVar
if [ -r ${satbias_dir_cont}/rrfs.${spinup_or_prod_rrfs}.${SAT_TIME}_satbias ]; then
echo " using satellite bias files from ${satbias_dir_cont} ${spinup_or_prod_rrfs}.${SAT_TIME}"

cp_vrfy ${satbias_dir_cont}/rrfs.${spinup_or_prod_rrfs}.${SAT_TIME}_satbias ./satbias_in
cp_vrfy ${satbias_dir_cont}/rrfs.${spinup_or_prod_rrfs}.${SAT_TIME}_satbias_pc ./satbias_pc
if [ -r ${satbias_dir_cont}/rrfs.${spinup_or_prod_rrfs}.${SAT_TIME}_radstat ]; then
cp_vrfy ${satbias_dir_cont}/rrfs.${spinup_or_prod_rrfs}.${SAT_TIME}_radstat ./radstat.rrfs
fi

break
fi

fi
satcounter=` expr $satcounter + 1 `
done
fi

## if satbias files (go back to previous 10 dyas) are not available from ${satbias_dir}, use satbias files from the ${FIX_GSI}
if [ $satcounter -eq $maxcounter ]; then

Expand Down Expand Up @@ -1000,12 +1042,14 @@ fi
#
# comment out for testing

if [ ${BKTYPE} -eq 0 ]; then

@chunhuazhou chunhuazhou Oct 16, 2023

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hu5970 Do you plan to turn off GSI at 03Z and 15Z spinup cycle for all the cases? In this case, then the following section should be skipped too (for example, renaming/cat the fort files and etc)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The follow-up section do not dependent on the GSI execution, for example, GSI can run without any data.
But I do want to add machine dependent now because we only have trouble to run GSI cold start on WCOSS2.

$APRUN ./gsi.x < gsiparm.anl > stdout 2>&1 ; errcode=$?
echo "----------------------begin of stdout--------------"
cat ./stdout #log stdout whether gsi.x succeeds or not
echo "----------------------end of stdout----------------"
[ $errcode -eq 0 ] || print_err_msg_exit "\
Call to executable to run GSI returned with nonzero exit code."
fi

if [ ${anav_type} == "radardbz" ]; then
cat fort.238 > $comout/rrfs_a.t${HH}z.fits3.tm00
Expand Down
8 changes: 6 additions & 2 deletions scripts/exregional_run_gsidiag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,12 @@ if [ ${DO_RADDA} == "TRUE" ]; then
fi

# For EnVar DA
cp_vrfy ./satbias_out ${satbias_dir}/rrfs.${spinup_or_prod_rrfs}.${YYYYMMDDHH}_satbias
cp_vrfy ./satbias_pc.out ${satbias_dir}/rrfs.${spinup_or_prod_rrfs}.${YYYYMMDDHH}_satbias_pc
if [ -r ./satbias_out ]; then
cp_vrfy ./satbias_out ${satbias_dir}/rrfs.${spinup_or_prod_rrfs}.${YYYYMMDDHH}_satbias
fi
if [ -r ./satbias_pc.out ]; then
cp_vrfy ./satbias_pc.out ${satbias_dir}/rrfs.${spinup_or_prod_rrfs}.${YYYYMMDDHH}_satbias_pc
fi
fi

fi
Expand Down
63 changes: 52 additions & 11 deletions scripts/exregional_run_prepstart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -523,14 +523,14 @@ cat << EOF > sst.namelist
EOF
if [ "${IO_LAYOUT_Y}" == "1" ]; then
ln_vrfy -sf ${FIX_GSI}/${PREDEF_GRID_NAME}/fv3_grid_spec fv3_grid_spec
${EXECDIR}/process_updatesst.exe > stdout_sstupdate 2>&1
${APRUN} ${EXECDIR}/process_updatesst.exe > stdout_sstupdate 2>&1
else
for ii in ${list_iolayout}
do
iii=$(printf %4.4i $ii)
ln_vrfy -sf ${gridspec_dir}/fv3_grid_spec.${iii} fv3_grid_spec
ln_vrfy -sf sfc_data.nc.${iii} sfc_data.nc
${EXECDIR}/process_updatesst.exe > stdout_sstupdate.${iii} 2>&1
${APRUN} ${EXECDIR}/process_updatesst.exe > stdout_sstupdate.${iii} 2>&1
ls -l > list_sstupdate.${iii}
done
rm -f sfc_data.nc
Expand Down Expand Up @@ -661,15 +661,50 @@ if [ ${SFC_CYC} -eq 1 ] || [ ${SFC_CYC} -eq 2 ] ; then # cycle surface fields
fi
done
fi
surface_file_path=$bkpath

# check if there are surface file in continue cycle data space:
if [ "${restart_suffix_find}" == "missing" ] || [ "${restart_prefix_find}" == "missing" ]; then
surface_file_path=${CONT_CYCLE_DATA_ROOT}/surface

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this "CONT_CYCLE_DATA_ROOT" defined somewhere for non-wcoss2 machines?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for wcoss2 only now.

for ndayinhour in 00 24
do
if [ "${restart_suffix_find}" == "missing" ]; then
restart_prefix=$( date +%Y%m%d.%H0000. -d "${START_DATE} ${ndayinhour} hours ago" )

offset_hours=$(( ${DA_CYCLE_INTERV} + ${ndayinhour} ))
YYYYMMDDHHmInterv=$( date +%Y%m%d%H -d "${START_DATE} ${offset_hours} hours ago" )

n=${DA_CYCLE_INTERV}
while [[ $n -le 2 ]] ; do
if [ "${IO_LAYOUT_Y}" == "1" ]; then
checkfile=${surface_file_path}/${restart_prefix}sfc_data.nc.${YYYYMMDDHHmInterv}
else
checkfile=${surface_file_path}/${restart_prefix}sfc_data.nc.${YYYYMMDDHHmInterv}.0000
fi
if [ -r "${checkfile}" ] && [ "${restart_suffix_find}" == "missing" ]; then
restart_prefix_find=${restart_prefix}
restart_suffix_find=${YYYYMMDDHHmInterv}
print_info_msg "$VERBOSE" "Found ${checkfile}; Use it as surface for analysis "
fi

n=$((n + ${DA_CYCLE_INTERV}))
offset_hours=$(( ${n} + ${ndayinhour} ))
YYYYMMDDHHmInterv=$( date +%Y%m%d%H -d "${START_DATE} ${offset_hours} hours ago" )
print_info_msg "$VERBOSE" "Trying this cycle: ${YYYYMMDDHHmInterv}"
done
fi
done
fi

# rename the soil mositure and temperature fields in restart file
rm -f cycle_surface.done
if [ "${restart_suffix_find}" == "missing" ] || [ "${restart_prefix_find}" == "missing" ]; then
print_info_msg "Warning: cannot find surface from previous cycle"
else
if [ "${IO_LAYOUT_Y}" == "1" ]; then
checkfile=${bkpath}/${restart_prefix_find}sfc_data.nc.${restart_suffix_find}
checkfile=${surface_file_path}/${restart_prefix_find}sfc_data.nc.${restart_suffix_find}
else
checkfile=${bkpath}/${restart_prefix_find}sfc_data.nc.${restart_suffix_find}.0000
checkfile=${surface_file_path}/${restart_prefix_find}sfc_data.nc.${restart_suffix_find}.0000
fi
if [ -r "${checkfile}" ]; then
if [ ${SFC_CYC} -eq 1 ]; then # cycle surface at cold start cycle
Expand All @@ -690,10 +725,10 @@ if [ ${SFC_CYC} -eq 1 ] || [ ${SFC_CYC} -eq 2 ] ; then # cycle surface fields
mv ${restart_prefix_find}sfc_data.nc sfc_data.nc
ncatted -a checksum,,d,, sfc_data.nc
if [ "${if_update_ice}" == "TRUE" ]; then
${EXECDIR}/update_ice.exe > stdout_cycleICE 2>&1
${APRUN} ${EXECDIR}/update_ice.exe > stdout_cycleICE 2>&1
fi
else
checkfile=${bkpath}/${restart_prefix_find}sfc_data.nc.${restart_suffix_find}
checkfile=${surface_file_path}/${restart_prefix_find}sfc_data.nc.${restart_suffix_find}
for ii in ${list_iolayout}
do
iii=$(printf %4.4i $ii)
Expand All @@ -709,7 +744,7 @@ if [ ${SFC_CYC} -eq 1 ] || [ ${SFC_CYC} -eq 2 ] ; then # cycle surface fields
ln_vrfy -sf sfc_data.nc.${iii} sfc_data.nc
ln_vrfy -sf gfsice.sfc_data.nc.${iii} gfsice.sfc_data.nc
if [ "${if_update_ice}" == "TRUE" ]; then
${EXECDIR}/update_ice.exe > stdout_cycleICE.${iii} 2>&1
${APRUN} ${EXECDIR}/update_ice.exe > stdout_cycleICE.${iii} 2>&1
fi
done
rm -f sfc_data.nc gfsice.sfc_data.nc
Expand Down Expand Up @@ -748,14 +783,14 @@ if [ ${HH} -eq ${GVF_update_hour} ] && [ ${cycle_type} == "spinup" ]; then

if [ "${IO_LAYOUT_Y}" == "1" ]; then
ln_vrfy -sf ${FIX_GSI}/${PREDEF_GRID_NAME}/fv3_grid_spec fv3_grid_spec
${EXECDIR}/update_GVF.exe > stdout_updateGVF 2>&1
${APRUN} ${EXECDIR}/update_GVF.exe > stdout_updateGVF 2>&1
else
for ii in ${list_iolayout}
do
iii=$(printf %4.4i $ii)
ln_vrfy -sf ${gridspec_dir}/fv3_grid_spec.${iii} fv3_grid_spec
ln_vrfy -sf sfc_data.nc.${iii} sfc_data.nc
${EXECDIR}/update_GVF.exe > stdout_updateGVF.${iii} 2>&1
${APRUN} ${EXECDIR}/update_GVF.exe > stdout_updateGVF.${iii} 2>&1
ls -l > list_updateGVF.${iii}
done
rm -f sfc_data.nc
Expand Down Expand Up @@ -900,13 +935,19 @@ if [ ${SFC_CYC} -eq 3 ] ; then
elif [ -r ${raphrrr_com}/rap/prod/rap.${YYYYMMDD}/rap.t${HH}z.wrf_inout_smoke ]; then
ln -s ${raphrrr_com}/rap/prod/rap.${YYYYMMDD}/rap.t${HH}z.wrf_inout_smoke sfc_rap
rapfile='sfc_rap'
elif [ -r ${raphrrr_com}/rap/v5.1/rap.${YYYYMMDD}/rap.t${HH}z.wrf_inout_smoke ]; then
ln -s ${raphrrr_com}/rap/v5.1/rap.${YYYYMMDD}/rap.t${HH}z.wrf_inout_smoke sfc_rap
rapfile='sfc_rap'
fi
if [ -r ${raphrrr_com}/${YYYYMMDD}/hrrr.t${HH}z.wrf_inout ]; then
ln -s ${raphrrr_com}/${YYYYMMDD}/hrrr.t${HH}z.wrf_inout sfc_hrrr
hrrrfile='sfc_hrrr'
elif [ -r ${raphrrr_com}/hrrr/prod/hrrr.${YYYYMMDD}/conus/hrrr.t${HH}z.wrf_inout ]; then
ln -s ${raphrrr_com}/hrrr/prod/hrrr.${YYYYMMDD}/conus/hrrr.t${HH}z.wrf_inout sfc_hrrr
hrrrfile='sfc_hrrr'
elif [ -r ${raphrrr_com}/hrrr/v4.1/hrrr.${YYYYMMDD}/conus/hrrr.t${HH}z.wrfhistory00 ]; then
ln -s ${raphrrr_com}/hrrr/v4.1/hrrr.${YYYYMMDD}/conus/hrrr.t${HH}z.wrfhistory00 sfc_hrrr
hrrrfile='sfc_hrrr'
fi
if [ -r ${raphrrr_com}/${YYYYMMDD}/hrrrak.t${HH}z.wrf_inout ]; then
ln -s ${raphrrr_com}/${YYYYMMDD}/hrrr.t${HH}z.wrf_inout sfc_hrrrak
Expand Down Expand Up @@ -980,15 +1021,15 @@ cp use_raphrrr_sfc.namelist use_raphrrr_sfc.namelist_hrrrak
fi
if [ "${IO_LAYOUT_Y}" == "1" ]; then
cp_vrfy sfc_data.nc sfc_data.nc_read
./${exect} > stdout_sfc_sugery.${file} 2>&1 || print_info_msg "\
${APRUN} ./${exect} > stdout_sfc_sugery.${file} 2>&1 || print_info_msg "\
Call to executable to run surface surgery returned with nonzero exit code."
else
for ii in ${list_iolayout}
do
iii=$(printf %4.4i $ii)
ln_vrfy -sf sfc_data.nc.${iii} sfc_data.nc
cp_vrfy sfc_data.nc sfc_data.nc_read
./${exect} > stdout_sfc_sugery.${iii}.${file} 2>&1 || print_info_msg "\
${APRUN} ./${exect} > stdout_sfc_sugery.${iii}.${file} 2>&1 || print_info_msg "\
Call to executable to run surface surgery returned with nonzero exit code."
ls -l > list_sfc_sugery.${iii}
done
Expand Down
13 changes: 7 additions & 6 deletions ush/config.sh_rrfs_a_enkf_n3
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MACHINE="wcoss2"
MACHINETYPE="primary"
version="v0.6.7"
version="v0.7.1"
ACCOUNT="RRFS_DEV"
#RESERVATION="rrfsdet"
EXPT_BASEDIR="/lfs/h2/emc/lam/noscrub/emc.lam/rrfs/${version}"
Expand All @@ -21,7 +21,7 @@ DO_POST_PROD="FALSE"
#DO_RETRO="TRUE"
DO_NONVAR_CLDANAL="TRUE"
#DO_ENVAR_RADAR_REF="TRUE"
DO_SMOKE_DUST="FALSE"
DO_SMOKE_DUST="TRUE"
#DO_REFL2TTEN="FALSE"
#RADARREFL_TIMELEVEL=(0)
#FH_DFI_RADAR="0.0,0.25,0.5"
Expand All @@ -30,6 +30,7 @@ DO_SMOKE_DUST="FALSE"
#DO_BUFRSND="TRUE"
#USE_FVCOM="TRUE"
#PREP_FVCOM="TRUE"
USE_CLM="TRUE"
DO_PARALLEL_PRDGEN="TRUE"
DO_GSIDIAG_OFFLINE="FALSE"

Expand All @@ -49,7 +50,7 @@ BOUNDARY_PROC_GROUP_NUM="12"

# avaialble retro period:
# 20210511-20210531; 20210718-20210801
DATE_FIRST_CYCL="20230901"
DATE_FIRST_CYCL="20231001"
DATE_LAST_CYCL="20231031"
CYCL_HRS=( "00" "12" )
CYCL_HRS=( "18" )
Expand All @@ -59,7 +60,7 @@ if [[ ${DO_ENSFCST} == "TRUE" ]] ; then
CYCL_HRS_STOCH=("00" "06" "12" "18")
fi
#CYCL_HRS_RECENTER=("19")
CYCLEMONTH="09,10"
CYCLEMONTH="10"
CYCLEDAY="*"

STARTYEAR=${DATE_FIRST_CYCL:0:4}
Expand Down Expand Up @@ -187,10 +188,10 @@ fi

RUN_ensctrl="rrfs"
RUN="enkfrrfs"
TAG="n3enkf67"
TAG="n3enkf71"
if [[ ${DO_ENSFCST} == "TRUE" ]] ; then
RUN="refs"
TAG="n3enfcst67"
TAG="n3enfcst71"
fi
COMINgfs=""

Expand Down
10 changes: 6 additions & 4 deletions ush/config.sh_rrfs_a_n3
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MACHINE="wcoss2"
MACHINETYPE="primary"
version="v0.6.7"
version="v0.7.1"
ACCOUNT="RRFS_DEV"
#RESERVATION="rrfsdet"
EXPT_BASEDIR="/lfs/h2/emc/lam/noscrub/emc.lam/rrfs/${version}"
Expand Down Expand Up @@ -31,6 +31,7 @@ DO_RADDA="TRUE"
DO_BUFRSND="TRUE"
USE_FVCOM="TRUE"
PREP_FVCOM="TRUE"
USE_CLM="TRUE"
DO_PARALLEL_PRDGEN="TRUE"
DO_GSIDIAG_OFFLINE="TRUE"

Expand All @@ -42,12 +43,12 @@ BOUNDARY_PROC_GROUP_NUM="72"

# avaialble retro period:
# 20210511-20210531; 20210718-20210801
DATE_FIRST_CYCL="20230901"
DATE_FIRST_CYCL="20231001"
DATE_LAST_CYCL="20231031"
CYCL_HRS=( "00" "12" )
CYCL_HRS_SPINSTART=("03" "15")
CYCL_HRS_PRODSTART=("09" "21")
CYCLEMONTH="09,10"
CYCLEMONTH="10"
CYCLEDAY="*"

STARTYEAR=${DATE_FIRST_CYCL:0:4}
Expand Down Expand Up @@ -93,6 +94,7 @@ CYCL_HRS_HYB_FV3LAM_ENS=("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "10"
SST_update_hour=01
GVF_update_hour=04
SNOWICE_update_hour=01
SOIL_SURGERY_time=202310916
netcdf_diag=.true.
binary_diag=.false.

Expand All @@ -104,7 +106,7 @@ EXTRN_MDL_NAME_LBCS="FV3GFS"
envir="para"

NET="rrfs_a"
TAG="n3v67"
TAG="n3v71"

ARCHIVEDIR="/NCEPDEV/emc-meso/1year/emc.lam/${TAG}"
NCL_REGION="conus"
Expand Down
9 changes: 9 additions & 0 deletions ush/config_defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@ EXPT_SUBDIR=""
# RAPHRR_SOIL_ROOT: locations of RAP/HRRR forecast netcdf files
# SOIL_SURGERY_time: cycle time for soil surgery
#
# Setup default data locations for cycle surface/bias correction coefficient
# smoke/dust during machine switch and version update
# CONT_CYCLE_DATA_ROOT: locations of surface, bias correction coefficient files
#
# Setup default locations for FIRE_RRFS files and update time
# FIRE_RAVE_DIR
# FIRE_RRFS_ROOT
Expand Down Expand Up @@ -360,6 +364,7 @@ SOIL_SURGERY_time=9999999999
FIRE_RAVE_DIR="/lfs4/BMC/public/data/grids/nesdis/3km_fire_emissions"
FIRE_RRFS_ROOT="/mnt/lfs4/BMC/gsd-fv3-dev/FIRE_RRFS_ROOT"
FIRE_RRFS_update_hour=99
CONT_CYCLE_DATA_ROOT="/lfs/h2/emc/lam/noscrub/emc.lam/nwges"

#
#-----------------------------------------------------------------------
Expand Down Expand Up @@ -1294,6 +1299,9 @@ OUTPUT_FH="-1"
# WRTCMP_write_tasks_per_group:
# The number of MPI tasks to allocate for each write group.
#
# WRTCMP_output_file:
# The output file format.
#
# PRINT_ESMF:
# Flag for whether or not to output extra (debugging) information from
# ESMF routines. Must be "TRUE" or "FALSE". Note that the write
Expand All @@ -1309,6 +1317,7 @@ PRINT_ESMF="FALSE"

WRTCMP_write_groups="1"
WRTCMP_write_tasks_per_group="20"
WRTCMP_output_file="netcdf"

WRTCMP_output_grid="''"
WRTCMP_cen_lon=""
Expand Down
6 changes: 6 additions & 0 deletions ush/create_model_configure_file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ run directory (run_dir):
fi
fi

WRTCMP_ideflate="0"
if [ ${WRTCMP_output_file} == "netcdf_parallel" ]; then
WRTCMP_ideflate="1"

@chunhuazhou chunhuazhou Oct 16, 2023

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this default value of " WRTCMP_ideflate (0) " be in config_defaults.sh, with some information?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not this one. The WRTCMP_ideflate should go with the content of WRTCMP_output_file. We should not set it in configure.

fi
#
#-----------------------------------------------------------------------
#
Expand Down Expand Up @@ -172,6 +176,8 @@ run directory (run_dir):
settings="${settings}
'write_groups': ${WRTCMP_write_groups}
'write_tasks_per_group': ${WRTCMP_write_tasks_per_group}
'output_file': ${WRTCMP_output_file}
'ideflate': ${WRTCMP_ideflate}
'cen_lon': ${WRTCMP_cen_lon}
'cen_lat': ${WRTCMP_cen_lat}
'lon1': ${WRTCMP_lon_lwr_left}
Expand Down
Loading