-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move ozone parameter chooser from config.base to config.fcst
- Loading branch information
Showing
2 changed files
with
281 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,281 @@ | ||
#! /usr/bin/env bash | ||
|
||
########## config.fcst ########## | ||
# Forecast specific | ||
|
||
echo "BEGIN: config.fcst" | ||
|
||
export USE_ESMF_THREADING="YES" # Toggle to use ESMF-managed threading or traditional threading in UFSWM | ||
export COPY_FINAL_RESTARTS="NO" # Toggle to copy restarts from the end of GFS/GEFS Run (GDAS is handled seperately) | ||
|
||
# Source model specific information that is resolution dependent | ||
string="--fv3 ${CASE}" | ||
[[ "${DO_OCN}" == "YES" ]] && string="${string} --mom6 ${OCNRES}" | ||
[[ "${DO_ICE}" == "YES" ]] && string="${string} --cice6 ${ICERES}" | ||
[[ "${DO_WAVE}" == "YES" ]] && string="${string} --ww3 ${waveGRD// /;}" | ||
[[ "${DO_AERO_FCST}" == "YES" ]] && string="${string} --gocart" | ||
# We are counting on $string being multiple arguments | ||
# shellcheck disable=SC2086 | ||
source "${EXPDIR}/config.ufs" ${string} | ||
|
||
# Convert comma-separated string into bash array | ||
IFS=', ' read -ra segments <<< "${FCST_SEGMENTS}" | ||
# Determine MIN and MAX based on the forecast segment | ||
export FHMIN=${segments[${FCST_SEGMENT}]} | ||
export FHMAX=${segments[${FCST_SEGMENT}+1]} | ||
# Cap other FH variables at FHMAX for the segment | ||
export FHMIN_WAV=$(( FHMIN > FHMIN_WAV ? FHMIN : FHMIN_WAV )) | ||
export FHMAX_HF=$(( FHMAX_HF_GFS > FHMAX ? FHMAX : FHMAX_HF_GFS )) | ||
export FHMAX_WAV=$(( FHMAX_WAV > FHMAX ? FHMAX : FHMAX_WAV )) | ||
# shellcheck disable=SC2153 | ||
export FHOUT=${FHOUT_GFS} | ||
export FHOUT_HF=${FHOUT_HF_GFS} | ||
export FHOUT_OCN=${FHOUT_OCN_GFS} | ||
export FHOUT_ICE=${FHOUT_ICE_GFS} | ||
export FHZER=@FHZER@ | ||
|
||
# Get task specific resources | ||
source "${EXPDIR}/config.resources" fcst | ||
export domains_stack_size="16000000" | ||
|
||
|
||
if [[ "${DONST}" == "YES" ]]; then | ||
source "${EXPDIR}/config.nsst" | ||
fi | ||
|
||
export esmf_profile=".false." | ||
export esmf_logkind="ESMF_LOGKIND_MULTI_ON_ERROR" #Options: ESMF_LOGKIND_MULTI_ON_ERROR, ESMF_LOGKIND_MULTI, ESMF_LOGKIND_NONE | ||
|
||
|
||
####################################################################### | ||
|
||
export FORECASTSH="${SCRgfs}/exglobal_forecast.sh" | ||
#export FORECASTSH="${SCRgfs}/exglobal_forecast.py" # Temp. while this is worked on | ||
export FCSTEXEC="${NET}_model.x" | ||
|
||
####################################################################### | ||
# Model configuration | ||
export TYPE=@TYPE@ | ||
export MONO=@MONO@ | ||
|
||
# Use stratosphere h2o physics | ||
export h2o_phys=".true." | ||
|
||
# Options of stratosphere O3 physics reaction coefficients | ||
export new_o3forc="YES" | ||
|
||
export gwd_opt=2 | ||
|
||
# --GFS.v16 uGWD.v0, used for suite FV3_GFS_v16 and UFS p6 etc | ||
# do_ugwp=T: use unified CGWD and OGWD, and turbulent orographic form drag (TOFD) | ||
# do_ugwp=F: use unified CGWD but old OGWD, TOFD is not uded. | ||
if (( gwd_opt == 1 )); then | ||
export knob_ugwp_version=0 | ||
export do_ugwp=".false." | ||
export do_tofd=".false." | ||
launch_level=$(echo "${LEVS}/2.35" |bc) | ||
export launch_level | ||
fi | ||
|
||
|
||
# -- uGWD.v1, for suite FV3_GFS_v17 and FV3_GFS_v17p8b etc | ||
if (( gwd_opt == 2 )); then | ||
|
||
#--used for UFS p7 and p8a | ||
#export knob_ugwp_version=1 | ||
#export do_ugwp=".false." | ||
#export do_tofd=".false." | ||
#export do_ugwp_v0=".false." | ||
#export do_ugwp_v1=".true." | ||
#export do_ugwp_v0_orog_only=".false." | ||
#export do_ugwp_v0_nst_only=".false." | ||
#export do_gsl_drag_ls_bl=".true." | ||
#export do_gsl_drag_ss=".true." | ||
#export do_gsl_drag_tofd=".true." | ||
#export do_ugwp_v1_orog_only=".false." | ||
|
||
#--used for UFS p8 | ||
export knob_ugwp_version=1 | ||
export do_ugwp=".false." | ||
export do_tofd=".false." | ||
export do_ugwp_v0=".false." | ||
export do_ugwp_v1=".true." | ||
export do_ugwp_v0_orog_only=".false." | ||
export do_ugwp_v0_nst_only=".false." | ||
export do_gsl_drag_ls_bl=".true." | ||
export do_gsl_drag_ss=".false." | ||
export do_gsl_drag_tofd=".true." | ||
export do_gwd_opt_psl=".true." | ||
export do_ugwp_v1_orog_only=".false." | ||
launch_level=$(echo "${LEVS}/2.35" |bc) | ||
export launch_level | ||
fi | ||
|
||
# Sponge layer settings | ||
export d2_bg_k1=0.20 | ||
export d2_bg_k2=0.04 | ||
export dz_min=6 | ||
export n_sponge=42 | ||
|
||
# PBL/turbulance schemes | ||
export hybedmf=".false." | ||
export satmedmf=".true." | ||
export isatmedmf=1 | ||
tbf="" | ||
if [[ "${satmedmf}" == ".true." ]]; then tbf="_satmedmf" ; fi | ||
|
||
#Convection schemes | ||
export progsigma=".true." | ||
tbp="" | ||
if [[ "${progsigma}" == ".true." ]]; then tbp="_progsigma" ; fi | ||
|
||
# Radiation options | ||
if [[ "${DO_AERO_FCST}" == "YES" ]]; then | ||
export IAER=2011 # spectral band mapping method for aerosol optical properties | ||
else | ||
export IAER=1011 | ||
fi | ||
export iovr_lw=3 ; #de-correlation length cloud overlap method (Barker, 2008) | ||
export iovr_sw=3 ; #de-correlation length cloud overlap method (Barker, 2008) | ||
export iovr=3 ; #de-correlation length cloud overlap method (Barker, 2008) | ||
export icliq_sw=2 ; #cloud optical coeffs from AER's newer version v3.9-v4.0 for hu and stamnes | ||
export isubc_sw=2 | ||
export isubc_lw=2 | ||
|
||
# RRTMGP radiation scheme | ||
export do_RRTMGP=.false. | ||
export doGP_cldoptics_LUT=.false. | ||
export doGP_lwscat=.false. | ||
|
||
# LSM configuration | ||
# NoahMP only | ||
export iopt_sfc="3" | ||
export iopt_trs="2" | ||
|
||
# Microphysics configuration | ||
export dnats=0 | ||
export cal_pre=".true." | ||
export do_sat_adj=".false." | ||
export random_clds=".true." | ||
|
||
case ${imp_physics} in | ||
99) # ZhaoCarr | ||
export ncld=1 | ||
export FIELD_TABLE="${PARMgfs}/ufs/fv3/field_table_zhaocarr${tbf}${tbp}" | ||
export nwat=2 | ||
;; | ||
6) # WSM6 | ||
export ncld=2 | ||
export FIELD_TABLE="${PARMgfs}/ufs/fv3/field_table_wsm6${tbf}${tbp}" | ||
export nwat=6 | ||
;; | ||
8) # Thompson | ||
export ncld=2 | ||
export FIELD_TABLE="${PARMgfs}/ufs/fv3/field_table_thompson_noaero_tke${tbp}" | ||
export nwat=6 | ||
|
||
export cal_pre=".false." | ||
export random_clds=".false." | ||
export effr_in=".true." | ||
export ltaerosol=".false." | ||
export lradar=".true." | ||
export ttendlim="-999" | ||
export dt_inner=$((DELTIM/2)) | ||
export sedi_semi=.true. | ||
if [[ "${sedi_semi}" == .true. ]]; then export dt_inner=${DELTIM} ; fi | ||
if [[ dt_inner -gt 300 ]]; then export dt_inner=300 ; fi | ||
export decfl=10 | ||
|
||
export hord_mt_nh_nonmono=5 | ||
export hord_xx_nh_nonmono=5 | ||
export hord_dp_nh_nonmono=-5 | ||
export vtdm4_nh_nonmono=0.02 | ||
export nord=2 | ||
if [[ "${TYPE}" == "nh"* ]]; then | ||
export dddmp=0.1 | ||
else | ||
export dddmp=0. | ||
fi | ||
export d4_bg=0.12 | ||
;; | ||
11) # GFDL | ||
export ncld=5 | ||
export FIELD_TABLE="${PARMgfs}/ufs/fv3/field_table_gfdl${tbf}${tbp}" | ||
export nwat=6 | ||
export dnats=1 | ||
export cal_pre=".false." | ||
export do_sat_adj=".true." | ||
export random_clds=".false." | ||
export lgfdlmprad=".true." | ||
export effr_in=".true." | ||
export reiflag=2 | ||
|
||
export hord_mt_nh_nonmono=5 | ||
export hord_xx_nh_nonmono=5 | ||
export hord_dp_nh_nonmono=-5 | ||
export vtdm4_nh_nonmono=0.02 | ||
export nord=2 | ||
export d4_bg=0.12 | ||
if [[ "${TYPE}" == "nh"* ]]; then | ||
export dddmp=0.1 | ||
else | ||
export dddmp=0. | ||
fi | ||
;; | ||
*) echo "Unknown microphysics option, ABORT!" ;; | ||
esac | ||
|
||
# Stochastic physics | ||
export DO_SPPT="NO" | ||
export DO_SKEB="NO" | ||
export DO_SHUM="NO" | ||
export DO_LAND_PERT="NO" | ||
export DO_OCN_SPPT="NO" | ||
export DO_OCN_PERT_EPBL="NO" | ||
|
||
#coupling settings | ||
export cplmode="ufs.frac" | ||
if [[ "${FRAC_GRID:-".true."}" == ".false." ]]; then | ||
export cplmode="ufs.nfrac" | ||
fi | ||
export psm_bc="1" | ||
|
||
export min_lakeice="0.15" | ||
export min_seaice=${min_seaice:-"0.15"} | ||
export use_cice_alb=${use_cice_alb:-".false."} | ||
|
||
export FSICL="0" | ||
export FSICS="0" | ||
|
||
#--------------------------------------------------------------------- | ||
# Write more variables to output | ||
if [[ "${REPLAY_ICS:-NO}" == "YES" ]]; then | ||
export DIAG_TABLE="${PARMgfs}/ufs/fv3/diag_table_replay" | ||
else | ||
export DIAG_TABLE="${PARMgfs}/ufs/fv3/diag_table" | ||
fi | ||
|
||
# Write gfs restart files to rerun fcst from any break point | ||
export restart_interval=${restart_interval_gfs:-12} | ||
|
||
# Turn off dry mass adjustment in GFS | ||
export adjust_dry_mass=".false." | ||
|
||
# Write each restart file in 16 small files to save time | ||
if [[ "${CASE}" = C768 ]]; then | ||
export io_layout="4,4" | ||
else | ||
export io_layout="1,1" | ||
fi | ||
|
||
export reforecast=@reforecast@ | ||
# Remember config.efcs will over-ride these values for ensemble forecasts | ||
# if these variables are re-defined there. | ||
# Otherwise, the ensemble forecast will inherit from config.fcst | ||
|
||
# Which ozone parameters to use | ||
# McCormack-empirical-sh-ozh is empirically-corrected to include ozone hole | ||
# McCormack is from the 2006 paper as updated for the 2015 implementation | ||
export o3forc_params="McCormack-empirical-sh-ozh" | ||
|
||
echo "END: config.fcst" |