Skip to content

Commit

Permalink
namelist cleanup:
Browse files Browse the repository at this point in the history
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
  • Loading branch information
SamuelTrahanNOAA committed May 30, 2024
1 parent 1a9bc33 commit ad4f39c
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 31 deletions.
15 changes: 9 additions & 6 deletions tests/parm/input_global_nest.nml.IN
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
fast_tau_w_sec = @[FAST_TAU_W_SEC_NEST02]
consv_am = .false.
fill = .true.
full_zs_filter = @[FULL_ZS_FILTER]
dwind_2d = .false.
print_freq = 6
warm_start = @[WARM_START]
Expand All @@ -120,11 +119,11 @@
cd2 = -1
cd4 = 0.15
max_slope = 0.15
n_del2_strong = 0
n_del2_weak = 24
n_del4 = 2
peak_fac = 1.
zero_ocean = .false.
n_del2_strong = @[N_DEL2_STRONG]
n_del2_weak = @[N_DEL2_WEAK_NEST02]
n_del4 = @[N_DEL4]
peak_fac = @[PEAK_FAC]
zero_ocean = @[ZERO_OCEAN]
/

&gfs_physics_nml
Expand Down Expand Up @@ -200,6 +199,10 @@
imfshalcnv = @[IMFSHALCNV_NEST02]
imfdeepcnv = @[IMFDEEPCNV_NEST02]
do_deep = @[DO_DEEP_NEST02]
! NOTE: progsigma should be .true. for the global_nest_v1 suite.
! The code turns it off automatically at low resolutions (nominally, less than C768 resolution).
! That means it would turn off for the regression tests (C96 globe, C384 resolution nest).
! Hence, we turn it off manually, to avoid advecting a field of 0.
progsigma = @[PROGSIGMA_NEST02]
betascu = @[BETASCU_NEST02]
betamcu = @[BETAMCU_NEST02]
Expand Down
15 changes: 9 additions & 6 deletions tests/parm/input_global_parent.nml.IN
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@
fast_tau_w_sec = @[FAST_TAU_W_SEC]
consv_am = .false.
fill = .true.
full_zs_filter = @[FULL_ZS_FILTER]
dwind_2d = .false.
print_freq = 6
warm_start = @[WARM_START]
Expand Down Expand Up @@ -120,11 +119,11 @@
cd2 = -1
cd4 = 0.15
max_slope = 0.15
n_del2_strong = 0
n_del2_weak = 15
n_del4 = 2
peak_fac = 1.
zero_ocean = .false.
n_del2_strong = @[N_DEL2_STRONG]
n_del2_weak = @[N_DEL2_WEAK]
n_del4 = @[N_DEL4]
peak_fac = @[PEAK_FAC]
zero_ocean = @[ZERO_OCEAN]
/

&gfs_physics_nml
Expand Down Expand Up @@ -202,6 +201,10 @@
imfshalcnv = @[IMFSHALCNV]
imfdeepcnv = @[IMFDEEPCNV]
do_deep = @[DO_DEEP]
! NOTE: progsigma should be .true. for the global_nest_v1 suite.
! The code turns it off automatically at low resolutions (nominally, less than C768 resolution).
! That means it would turn off for the regression tests (C96 globe, C384 resolution nest).
! Hence, we turn it off manually, to avoid advecting a field of 0.
progsigma = @[PROGSIGMA]
betascu = @[BETASCU]
betamcu = @[BETAMCU]
Expand Down
98 changes: 79 additions & 19 deletions tests/tests/gnv1_nested
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,21 @@ export LIST_FILES="atmf002.nc \
RESTART/fv_BC_ne.res.nest02.nc \
RESTART/fv_BC_sw.res.nest02.nc"

# Get all default variables for FV3
export_fv3 # Must come before all other exports

export_fv3
export_tiled
# Request tiled inputs in &namsfc
export_tiled # Must come second, after export_fv3, before all export statements
export TILEDFIX=.true.

# Select input directories in control_run.IN
export ATMRES=C96-nested

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

# ----------------------------------------
# model_configure
export SYEAR=2023
export SMONTH=02
export SDAY=24
Expand All @@ -83,6 +92,11 @@ export KCHUNK3D=1
export IMO=384
export JMO=192
export OUTPUT_FH='1 -1'

# NOTE: This script uses NTILES=6 despite having 7 tiles in total.
# This is to match the logic inside FV3, which is based on mosaics.
# The globe has one mosiac with 6 tiles, and each nest has one mosaic with 1 tile each.
# Our workflow scripts are not aware of that detail; they only know about the global mosaic.
export NTILES=6

export OUTPUT_GRID_2=regional_latlon
Expand All @@ -97,19 +111,38 @@ export LAT2_2=72.500000
export DLON_2=0.25
export DLAT_2=0.25

# ----------------------------------------
# &atmos_model_nml
export BLOCKSIZE=32
export CCPP_SUITE=FV3_global_nest_v1

# ----------------------------------------
# &diag_manager_nml
export MAX_OUTPUT_FIELDS=300

# ----------------------------------------
# &fms_nml
export DOMAINS_STACK_SIZE=16000000

# ----------------------------------------
# &fv_nest_nml
export TILE_COARSE="0,6"
export NUM_TILE_TOP=6
export NEST_REFINE="0,4"
export NEST_IOFFSETS="0,4"
export NEST_JOFFSETS="0,9"

# ----------------------------------------
# &fv_core_nml
export INPES=4
export JNPES=4
export INPES_NEST02=12
export JNPES_NEST02=10

export NPX=97
export NPY=97
export NPX_NEST02=361
export NPY_NEST02=241
export NPZ=127
export DNATS=0
export DO_SAT_ADJ=.false.
Expand All @@ -118,9 +151,6 @@ export FV_CORE_TAU=0.
export RF_CUTOFF=10.
export FAST_TAU_W_SEC=0.2

export LDIAG3D=.true.
export LDIAG_UGWP=.true.

export FV_CORE_TAU_NEST02=$FV_CORE_TAU
export RF_CUTOFF_NEST02=$RF_CUTOFF
export FAST_TAU_W_SEC_NEST02=$FAST_TAU_W_SEC
Expand All @@ -129,6 +159,13 @@ export TARGET_LON=-135.0
export TARGET_LAT=32.5
export TWOWAYNEST02=.true.

export TWOWAYNEST=.true.

# ----------------------------------------
# &gfs_physics_nml
export LDIAG3D=.true.
export LDIAG_UGWP=.true.

export H2O_PHYS=.true.
export IMP_PHYSICS=8
export IOVR=3
Expand All @@ -155,8 +192,6 @@ export LHEATSTRG=.false.
export LSEASPRAY=.false.
export IMFDEEPCNV=5
export IMFDEEPCNV_NEST02=5
export PROGSIGMA=.false.
export PROGSIGMA_NEST02=.false.
export IOPT_DIAG=1
export NSTF_NAME=2,0,0,0,0
export EFFR_IN=.true.
Expand Down Expand Up @@ -191,7 +226,6 @@ export D2_BG_K1_NEST02=0.20
export D2_BG_K2_NEST02=0.15
export D4_BG_NEST02=0.15
export DZ_MIN=2.0
export FULL_ZS_FILTER=.false. # Must be false to avoid model instability
export FV_SG_ADJ=300
export HORD_DP=6
export HORD_MT=6
Expand Down Expand Up @@ -244,8 +278,24 @@ export KNOB_UGWP_VERSION=1
export KNOB_UGWP_PALAUNCH=275.0e2
export LIGHTNING_THREAT=.true.

export ATMRES=C96-nested
# NOTE: The global_nest_v1 uses prognostic sigma, so this should be
# .true. HOWEVER, the code turns it off automatically for this
# resolution. Hence, we turn it off here so we're not advecting a grid
# of 0. The field_table must match this setting (see below).
export PROGSIGMA=.false.
export PROGSIGMA_NEST02=.false.

# ----------------------------------------
# &surf_map_nml
export N_DEL2_STRONG=0 # namelist default is -1
export N_DEL2_WEAK=15 # namelist default is 12
export N_DEL2_WEAK_NEST02=24 # namelist default is 12
export N_DEL4=2 # namelist default is -1
export PEAK_FAC=1. # namelist default is 1.05
export ZERO_OCEAN=.false. # namelist default is .true.

# ----------------------------------------
# &namsfc
export FNALBC="'${ATMRES}.snowfree_albedo.tileX.nc'"
export FNALBC2="'${ATMRES}.facsf.tileX.nc'"
export FNTG3C="'${ATMRES}.substrate_temperature.tileX.nc'"
Expand All @@ -265,22 +315,32 @@ export FNACNA="''"
export FNSNOA="''"

export LANDICE=.false.
export NPX_NEST02=361
export NPY_NEST02=241
export INPES_NEST02=12
export JNPES_NEST02=10
export TWOWAYNEST=.true.

export INPES=4
export JNPES=4

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

# Select model_configure template:
export MODEL_CONFIGURE=model_configure_gnv1.IN

# Select input.nml template:
export INPUT_NML=input_global_parent.nml.IN

# Select input_nest02.nml template:
export INPUT_NEST02_NML=input_global_nest.nml.IN
export TILEDFIX=.true.

# Select the field_table.

# NOTE: The global_nest_v1 uses prognostic sigma, so this should be
# the progsigma field table. HOWEVER, the code turns it off
# automatically for this resolution. Hence, we turn it off here so
# we're not advecting a grid of 0

export FIELD_TABLE=field_table_thompson_aero_tke

# Request additional contents in diag_table for gravity wave diagnostics:
export DIAG_TABLE_ADDITIONAL=diag_additional_ldiag3d_ugwp

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

0 comments on commit ad4f39c

Please sign in to comment.