Skip to content

Commit ad4f39c

Browse files
namelist cleanup:
1. no more full_zs_filter 2. &surf_map_nml entries that do not have the namelist default are variables 3. Reorganize and comment gnv1_nested
1 parent 1a9bc33 commit ad4f39c

File tree

3 files changed

+97
-31
lines changed

3 files changed

+97
-31
lines changed

tests/parm/input_global_nest.nml.IN

+9-6
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@
9393
fast_tau_w_sec = @[FAST_TAU_W_SEC_NEST02]
9494
consv_am = .false.
9595
fill = .true.
96-
full_zs_filter = @[FULL_ZS_FILTER]
9796
dwind_2d = .false.
9897
print_freq = 6
9998
warm_start = @[WARM_START]
@@ -120,11 +119,11 @@
120119
cd2 = -1
121120
cd4 = 0.15
122121
max_slope = 0.15
123-
n_del2_strong = 0
124-
n_del2_weak = 24
125-
n_del4 = 2
126-
peak_fac = 1.
127-
zero_ocean = .false.
122+
n_del2_strong = @[N_DEL2_STRONG]
123+
n_del2_weak = @[N_DEL2_WEAK_NEST02]
124+
n_del4 = @[N_DEL4]
125+
peak_fac = @[PEAK_FAC]
126+
zero_ocean = @[ZERO_OCEAN]
128127
/
129128

130129
&gfs_physics_nml
@@ -200,6 +199,10 @@
200199
imfshalcnv = @[IMFSHALCNV_NEST02]
201200
imfdeepcnv = @[IMFDEEPCNV_NEST02]
202201
do_deep = @[DO_DEEP_NEST02]
202+
! NOTE: progsigma should be .true. for the global_nest_v1 suite.
203+
! The code turns it off automatically at low resolutions (nominally, less than C768 resolution).
204+
! That means it would turn off for the regression tests (C96 globe, C384 resolution nest).
205+
! Hence, we turn it off manually, to avoid advecting a field of 0.
203206
progsigma = @[PROGSIGMA_NEST02]
204207
betascu = @[BETASCU_NEST02]
205208
betamcu = @[BETAMCU_NEST02]

tests/parm/input_global_parent.nml.IN

+9-6
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@
9292
fast_tau_w_sec = @[FAST_TAU_W_SEC]
9393
consv_am = .false.
9494
fill = .true.
95-
full_zs_filter = @[FULL_ZS_FILTER]
9695
dwind_2d = .false.
9796
print_freq = 6
9897
warm_start = @[WARM_START]
@@ -120,11 +119,11 @@
120119
cd2 = -1
121120
cd4 = 0.15
122121
max_slope = 0.15
123-
n_del2_strong = 0
124-
n_del2_weak = 15
125-
n_del4 = 2
126-
peak_fac = 1.
127-
zero_ocean = .false.
122+
n_del2_strong = @[N_DEL2_STRONG]
123+
n_del2_weak = @[N_DEL2_WEAK]
124+
n_del4 = @[N_DEL4]
125+
peak_fac = @[PEAK_FAC]
126+
zero_ocean = @[ZERO_OCEAN]
128127
/
129128

130129
&gfs_physics_nml
@@ -202,6 +201,10 @@
202201
imfshalcnv = @[IMFSHALCNV]
203202
imfdeepcnv = @[IMFDEEPCNV]
204203
do_deep = @[DO_DEEP]
204+
! NOTE: progsigma should be .true. for the global_nest_v1 suite.
205+
! The code turns it off automatically at low resolutions (nominally, less than C768 resolution).
206+
! That means it would turn off for the regression tests (C96 globe, C384 resolution nest).
207+
! Hence, we turn it off manually, to avoid advecting a field of 0.
205208
progsigma = @[PROGSIGMA]
206209
betascu = @[BETASCU]
207210
betamcu = @[BETAMCU]

tests/tests/gnv1_nested

+79-19
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,21 @@ export LIST_FILES="atmf002.nc \
5353
RESTART/fv_BC_ne.res.nest02.nc \
5454
RESTART/fv_BC_sw.res.nest02.nc"
5555

56+
# Get all default variables for FV3
57+
export_fv3 # Must come before all other exports
5658

57-
export_fv3
58-
export_tiled
59+
# Request tiled inputs in &namsfc
60+
export_tiled # Must come second, after export_fv3, before all export statements
61+
export TILEDFIX=.true.
62+
63+
# Select input directories in control_run.IN
64+
export ATMRES=C96-nested
5965

66+
# Master flag to enable nesting in control_run.IN. Also sent to &fv_core_nml
6067
export NESTED=.true.
6168

69+
# ----------------------------------------
70+
# model_configure
6271
export SYEAR=2023
6372
export SMONTH=02
6473
export SDAY=24
@@ -83,6 +92,11 @@ export KCHUNK3D=1
8392
export IMO=384
8493
export JMO=192
8594
export OUTPUT_FH='1 -1'
95+
96+
# NOTE: This script uses NTILES=6 despite having 7 tiles in total.
97+
# This is to match the logic inside FV3, which is based on mosaics.
98+
# The globe has one mosiac with 6 tiles, and each nest has one mosaic with 1 tile each.
99+
# Our workflow scripts are not aware of that detail; they only know about the global mosaic.
86100
export NTILES=6
87101

88102
export OUTPUT_GRID_2=regional_latlon
@@ -97,19 +111,38 @@ export LAT2_2=72.500000
97111
export DLON_2=0.25
98112
export DLAT_2=0.25
99113

114+
# ----------------------------------------
115+
# &atmos_model_nml
100116
export BLOCKSIZE=32
101117
export CCPP_SUITE=FV3_global_nest_v1
118+
119+
# ----------------------------------------
120+
# &diag_manager_nml
102121
export MAX_OUTPUT_FIELDS=300
122+
123+
# ----------------------------------------
124+
# &fms_nml
103125
export DOMAINS_STACK_SIZE=16000000
104126

127+
# ----------------------------------------
128+
# &fv_nest_nml
105129
export TILE_COARSE="0,6"
106130
export NUM_TILE_TOP=6
107131
export NEST_REFINE="0,4"
108132
export NEST_IOFFSETS="0,4"
109133
export NEST_JOFFSETS="0,9"
110134

135+
# ----------------------------------------
136+
# &fv_core_nml
137+
export INPES=4
138+
export JNPES=4
139+
export INPES_NEST02=12
140+
export JNPES_NEST02=10
141+
111142
export NPX=97
112143
export NPY=97
144+
export NPX_NEST02=361
145+
export NPY_NEST02=241
113146
export NPZ=127
114147
export DNATS=0
115148
export DO_SAT_ADJ=.false.
@@ -118,9 +151,6 @@ export FV_CORE_TAU=0.
118151
export RF_CUTOFF=10.
119152
export FAST_TAU_W_SEC=0.2
120153

121-
export LDIAG3D=.true.
122-
export LDIAG_UGWP=.true.
123-
124154
export FV_CORE_TAU_NEST02=$FV_CORE_TAU
125155
export RF_CUTOFF_NEST02=$RF_CUTOFF
126156
export FAST_TAU_W_SEC_NEST02=$FAST_TAU_W_SEC
@@ -129,6 +159,13 @@ export TARGET_LON=-135.0
129159
export TARGET_LAT=32.5
130160
export TWOWAYNEST02=.true.
131161

162+
export TWOWAYNEST=.true.
163+
164+
# ----------------------------------------
165+
# &gfs_physics_nml
166+
export LDIAG3D=.true.
167+
export LDIAG_UGWP=.true.
168+
132169
export H2O_PHYS=.true.
133170
export IMP_PHYSICS=8
134171
export IOVR=3
@@ -155,8 +192,6 @@ export LHEATSTRG=.false.
155192
export LSEASPRAY=.false.
156193
export IMFDEEPCNV=5
157194
export IMFDEEPCNV_NEST02=5
158-
export PROGSIGMA=.false.
159-
export PROGSIGMA_NEST02=.false.
160195
export IOPT_DIAG=1
161196
export NSTF_NAME=2,0,0,0,0
162197
export EFFR_IN=.true.
@@ -191,7 +226,6 @@ export D2_BG_K1_NEST02=0.20
191226
export D2_BG_K2_NEST02=0.15
192227
export D4_BG_NEST02=0.15
193228
export DZ_MIN=2.0
194-
export FULL_ZS_FILTER=.false. # Must be false to avoid model instability
195229
export FV_SG_ADJ=300
196230
export HORD_DP=6
197231
export HORD_MT=6
@@ -244,8 +278,24 @@ export KNOB_UGWP_VERSION=1
244278
export KNOB_UGWP_PALAUNCH=275.0e2
245279
export LIGHTNING_THREAT=.true.
246280

247-
export ATMRES=C96-nested
281+
# NOTE: The global_nest_v1 uses prognostic sigma, so this should be
282+
# .true. HOWEVER, the code turns it off automatically for this
283+
# resolution. Hence, we turn it off here so we're not advecting a grid
284+
# of 0. The field_table must match this setting (see below).
285+
export PROGSIGMA=.false.
286+
export PROGSIGMA_NEST02=.false.
287+
288+
# ----------------------------------------
289+
# &surf_map_nml
290+
export N_DEL2_STRONG=0 # namelist default is -1
291+
export N_DEL2_WEAK=15 # namelist default is 12
292+
export N_DEL2_WEAK_NEST02=24 # namelist default is 12
293+
export N_DEL4=2 # namelist default is -1
294+
export PEAK_FAC=1. # namelist default is 1.05
295+
export ZERO_OCEAN=.false. # namelist default is .true.
248296

297+
# ----------------------------------------
298+
# &namsfc
249299
export FNALBC="'${ATMRES}.snowfree_albedo.tileX.nc'"
250300
export FNALBC2="'${ATMRES}.facsf.tileX.nc'"
251301
export FNTG3C="'${ATMRES}.substrate_temperature.tileX.nc'"
@@ -265,22 +315,32 @@ export FNACNA="''"
265315
export FNSNOA="''"
266316

267317
export LANDICE=.false.
268-
export NPX_NEST02=361
269-
export NPY_NEST02=241
270-
export INPES_NEST02=12
271-
export JNPES_NEST02=10
272-
export TWOWAYNEST=.true.
273-
274-
export INPES=4
275-
export JNPES=4
276318

277-
export GRID_PES="$(( INPES * JNPES * 6 )),$(( INPES_NEST02 * JNPES_NEST02 ))"
319+
# ----------------------------------------
320+
# Select input files and resources for the regression test system.
278321

322+
# Select model_configure template:
279323
export MODEL_CONFIGURE=model_configure_gnv1.IN
324+
325+
# Select input.nml template:
280326
export INPUT_NML=input_global_parent.nml.IN
327+
328+
# Select input_nest02.nml template:
281329
export INPUT_NEST02_NML=input_global_nest.nml.IN
282-
export TILEDFIX=.true.
330+
331+
# Select the field_table.
332+
333+
# NOTE: The global_nest_v1 uses prognostic sigma, so this should be
334+
# the progsigma field table. HOWEVER, the code turns it off
335+
# automatically for this resolution. Hence, we turn it off here so
336+
# we're not advecting a grid of 0
337+
283338
export FIELD_TABLE=field_table_thompson_aero_tke
339+
340+
# Request additional contents in diag_table for gravity wave diagnostics:
284341
export DIAG_TABLE_ADDITIONAL=diag_additional_ldiag3d_ugwp
285342

343+
# Override atmosphere compute task count to include the nest (tile 7).
344+
# Note that NTILES=6, which is the size of the global mosaic.
345+
export GRID_PES="$(( INPES * JNPES * 6 )),$(( INPES_NEST02 * JNPES_NEST02 ))"
286346
ATM_compute_tasks=$(( INPES*JNPES*NTILES + INPES_NEST02*JNPES_NEST02 ))

0 commit comments

Comments
 (0)