Skip to content

Commit

Permalink
Add fv3lam namelist for cold start with surface cycling and the scrip…
Browse files Browse the repository at this point in the history
…ts to use it. (NOAA-EMC#221)
  • Loading branch information
hu5970 authored Oct 1, 2021
1 parent 0e9a19a commit 1dc5ff0
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 8 deletions.
13 changes: 9 additions & 4 deletions scripts/exregional_run_fcst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ if [ "${RUN_TASK_MAKE_GRID}" = "TRUE" ] && [ "${MACHINE}" != "WCOSS_CRAY" ]; the
fi

# Symlink to mosaic file with a completely different name.
target="${FIXLAM}/${CRES}${DOT_OR_USCORE}mosaic.halo${NH4}.nc" # Should this point to this halo4 file or a halo3 file???
#target="${FIXLAM}/${CRES}${DOT_OR_USCORE}mosaic.halo${NH3}.nc" # Should this point to this halo4 file or a halo3 file???
#target="${FIXLAM}/${CRES}${DOT_OR_USCORE}mosaic.halo${NH4}.nc" # Should this point to this halo4 file or a halo3 file???
target="${FIXLAM}/${CRES}${DOT_OR_USCORE}mosaic.halo${NH3}.nc" # Should this point to this halo4 file or a halo3 file???
symlink="grid_spec.nc"
if [ -f "${target}" ]; then
ln_vrfy -sf ${relative_or_null} $target $symlink
Expand Down Expand Up @@ -469,12 +469,17 @@ ln_vrfy -sf ${relative_or_null} ${NEMS_YAML_FP} ${run_dir}
if [ "${DO_ENSEMBLE}" = TRUE ]; then
ln_vrfy -sf ${relative_or_null} "${FV3_NML_ENSMEM_FPS[$(( 10#${ensmem_indx}-1 ))]}" ${run_dir}/${FV3_NML_FN}
else
if [ ${BKTYPE} -eq 0 ]; then
if [ ${BKTYPE} -eq 0 ]; then
# cycling, using namelist for cycling forecast
cp_vrfy ${FV3_NML_RESTART_FP} ${run_dir}/input.nml
else
if [ -f "INPUT/cycle_surface.done" ]; then
# namelist for cold start with surface cycle
cp_vrfy ${FV3_NML_CYCSFC_FP} ${run_dir}/input.nml
else
# cold start, using namelist for cold start
cp_vrfy ${FV3_NML_FP} ${run_dir}/input.nml
cp_vrfy ${FV3_NML_FP} ${run_dir}/input.nml
fi
fi
fi
#
Expand Down
2 changes: 2 additions & 0 deletions scripts/exregional_run_prepstart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ if [ ${BKTYPE} -eq 1 ] ; then # cold start, use prepare cold strat initial file
done

# rename the soil mositure and temperature fields in restart file
rm -f cycle_surface.done
if [ "${bkpath_find}" == "missing" ]; then
print_info_msg "Warning: cannot find surface from previous cycle"
else
Expand All @@ -191,6 +192,7 @@ if [ ${BKTYPE} -eq 1 ] ; then # cold start, use prepare cold strat initial file
ln_vrfy -sf ${restart_prefix_find}sfc_data.nc sfc_data.tile7.halo0.nc
ncks --append geolonlat.nc sfc_data.tile7.halo0.nc
ncrename -v tslb,stc -v smois,smc -v sh2o,slc sfc_data.tile7.halo0.nc
echo "cycle surface with ${checkfile}" > cycle_surface.done
else
print_info_msg "Warning: cannot find surface from previous cycle"
fi
Expand Down
47 changes: 43 additions & 4 deletions ush/generate_FV3LAM_wflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -684,10 +684,6 @@ if [ "${EXTRN_MDL_NAME_ICS}" = "HRRR" -o \
[ "${SDF_USES_RUC_LSM}" = "TRUE" ]; then
lsoil="9"
fi
if [ "${DO_SURFACE_CYCLE}" = "TRUE" ] && \
[ "${SDF_USES_RUC_LSM}" = "TRUE" ]; then
lsoil="9"
fi
#
# Create a multiline variable that consists of a yaml-compliant string
# specifying the values that the namelist variables that are physics-
Expand Down Expand Up @@ -873,7 +869,45 @@ for the various ensemble members failed."

fi

if [ "${DO_SURFACE_CYCLE}" = "TRUE" ]; then
nstf_name="2,0,0,0,0"
if [ "${SDF_USES_RUC_LSM}" = "TRUE" ]; then
lsoil="9"
fi
# need to generate a namelist for surface cycle
settings="\
'gfs_physics_nml': {
'lsoil': ${lsoil:-null},
'nst_anl' : false,
'nstf_name' : [${nstf_name[@]}],
}"
# commnet out for using current develop branch that has no radar tten code yet.
# 'gfs_physics_nml': {
# 'fh_dfi_radar': [${FH_DFI_RADAR[@]}],
# }"

$USHDIR/set_namelist.py -q \
-n ${FV3_NML_FP} \
-u "$settings" \
-o ${FV3_NML_CYCSFC_FP} || \
print_err_msg_exit "\
Call to python script set_namelist.py to generate an restart FV3 namelist file
failed. Parameters passed to this script are:
Full path to base namelist file:
FV3_NML_FP = \"${FV3_NML_FP}\"
Full path to output namelist file for DA:
FV3_NML_CYCSFC_FP = \"${FV3_NML_CYCSFC_FP}\"
Namelist settings specified on command line:
settings =
$settings"
fi

if [ "${DO_DACYCLE}" = "TRUE" ]; then
nstf_name="2,0,0,0,0"
if [ "${SDF_USES_RUC_LSM}" = "TRUE" ]; then
lsoil="9"
fi

# need to generate a namelist for da cycle
settings="\
'fv_core_nml': {
Expand All @@ -883,6 +917,11 @@ if [ "${DO_DACYCLE}" = "TRUE" ]; then
'nggps_ic' : false,
'mountain' : true,
'warm_start' : true,
}
'gfs_physics_nml': {
'lsoil': ${lsoil:-null},
'nst_anl' : false,
'nstf_name' : [${nstf_name[@]}],
}"
# commnet out for using current develop branch that has no radar tten code yet.
# 'gfs_physics_nml': {
Expand Down
1 change: 1 addition & 0 deletions ush/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1422,6 +1422,7 @@ DATA_TABLE_FP="${EXPTDIR}/${DATA_TABLE_FN}"
FIELD_TABLE_FP="${EXPTDIR}/${FIELD_TABLE_FN}"
FV3_NML_FN="${FV3_NML_BASE_SUITE_FN%.*}"
FV3_NML_FP="${EXPTDIR}/${FV3_NML_FN}"
FV3_NML_CYCSFC_FP="${EXPTDIR}/${FV3_NML_FN}_cycsfc"
FV3_NML_RESTART_FP="${EXPTDIR}/${FV3_NML_FN}_restart"
NEMS_CONFIG_FP="${EXPTDIR}/${NEMS_CONFIG_FN}"
#
Expand Down

0 comments on commit 1dc5ff0

Please sign in to comment.