-
Notifications
You must be signed in to change notification settings - Fork 177
/
Copy pathconfig.fcst
307 lines (257 loc) · 9.02 KB
/
config.fcst
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
#! /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}
# Forecast length for GFS forecast
case ${RUN} in
*gfs)
# 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}
;;
*gdas)
export FHMAX_HF=0
export FHOUT_HF=0
;;
*)
echo "FATAL ERROR: Unsupported RUN '${RUN}'"
exit 1
esac
# 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="gfs_model.x"
#######################################################################
# Model configuration
export TYPE="nh"
export MONO="non-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."
if [[ "${CCPP_SUITE}" == "FV3_global_nest"* ]]; then
export satmedmf=".false."
else
export satmedmf=".true."
fi
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
export dddmp=0.1
export d4_bg=0.12
if [[ "${CCPP_SUITE}" == "FV3_global_nest"* ]]; then
export FIELD_TABLE="${PARMgfs}/ufs/fv3/field_table_thompson_aero_tke${tbp}"
export ltaerosol=".true."
export lcnorm=".true."
export do_mynnedmf=".true."
export do_mynnsfclay=".true."
export imfshalcnv=5
export imfdeepcnv=5
export betascu=0.5
export betamcu=1.5
export betadcu=8.0
fi
;;
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
export dddmp=0.1
;;
*) 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"
#---------------------------------------------------------------------
if [[ "${RUN}" =~ "gdas" ]] ; then # GDAS cycle specific parameters
# Variables used in DA cycling
export DIAG_TABLE="${PARMgfs}/ufs/fv3/diag_table_da"
# Write gfs restart files to rerun fcst from any break point
export restart_interval=${restart_interval_gdas:-6}
# Turn on dry mass adjustment in GDAS
export adjust_dry_mass=".true."
elif [[ "${RUN}" =~ "gfs" ]] ; then # GFS cycle specific parameters
# Write more variables to output
export DIAG_TABLE="${PARMgfs}/ufs/fv3/diag_table"
# 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
fi
# 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
echo "END: config.fcst"