Skip to content

Commit d1c0d4e

Browse files
jimmielinnusbaume
andauthored
sima0_09_000: Complete CCPPization of gravity wave drag (#426)
Tag name (required for release branches): sima0_09_000 Originator(s): @jimmielin Description (include the issue title, and the keyword ['closes', 'fixes', 'resolves'] followed by the issue number): - Completes CCPPization of gravity wave drag parameterizations for CAM4 through CAM7. - Ports frontogenesis bug fix for SE dycore from ESCOMP/CAM#1415 - Adds vorticity calculation for gravity waves from existing CAM SE dycore. Describe any changes made to build system: N/A Describe any changes made to the namelist: NLCOMP will fail due to added gamma file `/gw_drag_input_nl/ bnd_rdggm` List any changes to the defaults for the input datasets (e.g. boundary datasets): N/A List all files eliminated and why: N/A List all files added and what they do: see below with `A` flag List all existing files that have been modified, and describe the changes: (Helpful git command: `git diff --name-status development...<your_branch_name>`) ``` M cime_config/testdefs/testlist_cam.xml A cime_config/testdefs/testmods_dirs/cam/outfrq_gw_cam4_derecho/shell_commands A cime_config/testdefs/testmods_dirs/cam/outfrq_gw_cam4_derecho/user_nl_cam A cime_config/testdefs/testmods_dirs/cam/outfrq_gw_cam7_derecho/shell_commands A cime_config/testdefs/testmods_dirs/cam/outfrq_gw_cam7_derecho/user_nl_cam - add tests for CAM4 and CAM7 gravity wave schemes M cime_config/testdefs/testmods_dirs/cam/outfrq_se_cslam_analy_ic/user_nl_cam - add topo file to analytic ic FCAM7 test for now. this should be removed in the future when FCAM7 test runs standalone without analytic ICs. M src/control/runtime_obj.F90 M src/control/runtime_opts.F90 - remove gw_front and gw_front_igw from runtime object. This controls the provisioning of frontogenesis fields from the SE dycore to the physics state. - These two parameters were not read from namelist and were controlled independently from the schemes, and changing them would not enable/disable the frontogenesis gw scheme, so I removed them to avoid further confusion. I think this needs a more elegant solution to determine active schemes from the host model end. M src/data/registry.xml M src/dynamics/se/dp_coupling.F90 M src/dynamics/se/dyn_comp.F90 M src/dynamics/se/gravity_waves_sources.F90 - always provide frontgf, frontga to physics state - port vorticity code (vort4gw) for moving mountains gravity wave parameterization from CAM SE dycore to SIMA. M src/control/cam_comp.F90 A src/physics/utils/gravity_wave_drag_ridge_read.F90 A src/physics/utils/gravity_wave_drag_ridge_read.meta M cime_config/namelist_definition_cam.xml - add host-model utility to read topo and gamma ridge file (on model decomp) for gravity wave parameterizations. M src/data/ref_pres.F90 M src/data/ref_pres.meta - add bottom pressure and index of gravity wave tapering at top of model to ref_pres. - change standard name of do_molec_diff to do_molecular_diffusion. M test/unit/python/sample_files/ref_pres.meta M test/unit/python/sample_files/ref_pres_SourceMods.meta - change standard name of do_molec_diff to do_molecular_diffusion. ``` If there are new failures (compared to the `test/existing-test-failures.txt` file), have them OK'd by the gatekeeper, note them here, and add them to the file. If there are baseline differences, include the test and the reason for the diff. What is the nature of the change? Roundoff? derecho/intel/aux_sima: ``` SMS_Ln9.mpasa480_mpasa480.FKESSLER.derecho_intel.cam-outfrq_kessler_mpas_derecho (Overall: NLFAIL) details: SMS_Ln9.ne3pg3_ne3pg3_mg37.FADIAB.derecho_intel.cam-outfrq_se_cslam (Overall: NLFAIL) details: SMS_Ln9.ne3pg3_ne3pg3_mg37.FHS94.derecho_intel.cam-outfrq_se_cslam (Overall: NLFAIL) details: SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_intel.cam-outfrq_se_cslam (Overall: NLFAIL) details: SMS_Ln9.ne3pg3_ne3pg3_mg37.FTJ16.derecho_intel.cam-outfrq_se_cslam (Overall: NLFAIL) details: - new namelist group gw_drag_input_nl SMS_Ln9.ne3pg3_ne3pg3_mg37.FCAM4.derecho_intel.cam-outfrq_se_cslam_analy_ic_cam4 (Overall: DIFF) details: SMS_Ln9.ne3pg3_ne3pg3_mg37.FCAM7.derecho_intel.cam-outfrq_se_cslam_analy_ic (Overall: DIFF) details: - answer change: SDFs added gravity wave drag parameterizations SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_intel.cam-outfrq_se_cslam_multitape (Overall: NLFAIL) details: - pre-existing failure due to NLCOMP not supporting multiple history tapes ``` derecho/gnu/aux_sima: ``` SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_dme_adjust_derecho (Overall: NLFAIL) details: SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_hack_shallow_derecho (Overall: NLFAIL) details: SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_hb_vdiff_derecho (Overall: NLFAIL) details: SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_held_suarez_derecho (Overall: NLFAIL) details: SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_kessler_derecho (Overall: NLFAIL) details: SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_rk_stratiform_derecho (Overall: NLFAIL) details: SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_tj2016_after_coupler_derecho (Overall: NLFAIL) details: SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_tj2016_before_coupler_derecho (Overall: NLFAIL) details: SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_zm_derecho (Overall: NLFAIL) details: SMS_Ln9.mpasa480_mpasa480.FKESSLER.derecho_gnu.cam-outfrq_kessler_mpas_derecho (Overall: NLFAIL) details: - new namelist group gw_drag_input_nl SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_gw_cam4_derecho (Overall: DIFF) details: SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_gw_cam7_derecho (Overall: DIFF) details: - new baselines for new physics test (gravity waves for CAM4 and CAM7 SE). SMS_Ln9.ne3pg3_ne3pg3_mg37.FCAM4.derecho_gnu.cam-outfrq_se_cslam_analy_ic_cam4 (Overall: DIFF) details: SMS_Ln9.ne3pg3_ne3pg3_mg37.FCAM7.derecho_gnu.cam-outfrq_se_cslam_analy_ic (Overall: DIFF) details: - answer change: SDFs added gravity wave drag parameterizations SMS_Ln9.ne3pg3_ne3pg3_mg37.FADIAB.derecho_gnu.cam-outfrq_se_cslam (Overall: DIFF) details: SMS_Ln9.ne3pg3_ne3pg3_mg37.FHS94.derecho_gnu.cam-outfrq_se_cslam (Overall: DIFF) details: SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_gnu.cam-outfrq_se_cslam (Overall: DIFF) details: SMS_Ln9.ne3pg3_ne3pg3_mg37.FTJ16.derecho_gnu.cam-outfrq_se_cslam (Overall: DIFF) details: - SE dycore answer differences after Derecho upgrade, unrelated to this PR. - new baselines are being established. see #443 (comment) ``` If this changes climate describe any run(s) done to evaluate the new climate in enough detail that it(they) could be reproduced: CAM-SIMA date used for the baseline comparison tests if different than latest: --------- Co-authored-by: Jesse Nusbaumer <[email protected]>
1 parent 04a0b5a commit d1c0d4e

File tree

22 files changed

+979
-117
lines changed

22 files changed

+979
-117
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
[submodule "ncar-physics"]
2121
path = src/physics/ncar_ccpp
2222
url = https://github.com/ESCOMP/atmospheric_physics
23-
fxtag = 73fce2706c1f70e1ba63ff4bb3dcb80323bb9cc6
23+
fxtag = atmos_phys0_19_000
2424
fxrequired = AlwaysRequired
2525
fxDONOTUSEurl = https://github.com/ESCOMP/atmospheric_physics
2626
[submodule "rrtmgp-data"]

cime_config/namelist_definition_cam.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,19 @@
377377
</values>
378378
</entry>
379379

380+
<!-- Gravity wave ridge parameterization inputs -->
381+
<entry id="bnd_rdggm">
382+
<type>char*256</type>
383+
<category>gravity_wave_drag</category>
384+
<group>gw_drag_input_nl</group>
385+
<desc>
386+
Full pathname of boundary dataset for meso-gamma ridges.
387+
</desc>
388+
<values>
389+
<value>UNSET_PATH</value>
390+
</values>
391+
</entry>
392+
380393
<!-- Vertical Coordinate -->
381394

382395
<entry id="pver">

cime_config/testdefs/testlist_cam.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,24 @@
8888
<option name="comment">Test for Holtslag-Boville boundary layer scheme and vertical diffusion</option>
8989
</options>
9090
</test>
91+
<test compset="FPHYStest" grid="ne3pg3_ne3pg3_mg37" name="SMS_Ln2" testmods="cam/outfrq_gw_cam4_derecho">
92+
<machines>
93+
<machine name="derecho" compiler="gnu" category="aux_sima"/>
94+
</machines>
95+
<options>
96+
<option name="wallclock">00:10:00</option>
97+
<option name="comment">Test for orographic gravity wave scheme (CAM4)</option>
98+
</options>
99+
</test>
100+
<test compset="FPHYStest" grid="ne3pg3_ne3pg3_mg37" name="SMS_Ln2" testmods="cam/outfrq_gw_cam7_derecho">
101+
<machines>
102+
<machine name="derecho" compiler="gnu" category="aux_sima"/>
103+
</machines>
104+
<options>
105+
<option name="wallclock">00:10:00</option>
106+
<option name="comment">Test for moving mountain, deep convective, frontogenesis, beta ridge gravity wave scheme suite (CAM7)</option>
107+
</options>
108+
</test>
91109

92110
<!-- Derecho dycore tests -->
93111
<test compset="FKESSLER" grid="mpasa480_mpasa480" name="SMS_Ln9" testmods="cam/outfrq_kessler_mpas_derecho">
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./xmlchange CAM_CONFIG_OPTS="--dyn none --physics-suites gw_cam4"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
! cam4 snapshot
2+
pver = 26
3+
ncdata = '/glade/campaign/cesm/community/amwg/sima_baselines/cam_sima_test_snapshots/cam_ne3pg3_fhistc4_gw_drag_cam4_oro_snapshot_derecho_gnu_before_c20250826.nc'
4+
ncdata_check = '/glade/campaign/cesm/community/amwg/sima_baselines/cam_sima_test_snapshots/cam_ne3pg3_fhistc4_gw_drag_cam4_oro_snapshot_derecho_gnu_after_c20250826.nc'
5+
6+
debug_output = 0
7+
8+
! tolerances for testing
9+
ncdata_check_err = .true.
10+
min_difference = 2e-15
11+
12+
effgw_oro = 0.125D0
13+
gw_apply_tndmax = .true.
14+
gw_dc = 0.D0
15+
gw_lndscl_sgh = .true.
16+
gw_oro_south_fac = 1.d0
17+
gw_prndl = 0.25d0
18+
gw_qbo_hdepth_scaling = 1.0D0
19+
gw_top_taper = .false.
20+
pgwv = 0
21+
tau_0_ubc = .false.
22+
23+
! diagnostics for gravity wave drag
24+
hist_add_inst_fields;h1: EKGW
25+
hist_output_frequency;h1: 1*nsteps
26+
hist_write_nstep0;h1: .true.
27+
hist_precision;h1: REAL64
28+
hist_max_frames;h1: 1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./xmlchange CAM_CONFIG_OPTS="--dyn none --physics-suites gw_cam7_se"
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
! fhistc_ltso snapshot
2+
pver = 58
3+
ncdata = '/glade/campaign/cesm/community/amwg/sima_baselines/cam_sima_test_snapshots/cam_ne3pg3_fhistc_ltso_gw_drag_cam7se_snapshot_derecho_gnu_before_c20251013.nc'
4+
ncdata_check = '/glade/campaign/cesm/community/amwg/sima_baselines/cam_sima_test_snapshots/cam_ne3pg3_fhistc_ltso_gw_drag_cam7se_snapshot_derecho_gnu_after_c20251013.nc'
5+
6+
debug_output = 0
7+
8+
! tolerances for testing
9+
ncdata_check_err = .true.
10+
min_difference = 2e-15
11+
12+
! topo file for beta ridge scheme input
13+
bnd_topo = '/glade/campaign/cesm/cesmdata/inputdata/atm/cam/topo/se/ne3pg3_gmted2010_modis_bedmachine_nc0540_Laplace1000_noleak_20230209.nc'
14+
15+
gw_movmtn_use_pbl_source = .true. ! se dycore
16+
gw_movmtn_alpha = 0.01d0
17+
effgw_beres_dp = 0.15D0
18+
effgw_cm = 1.D0
19+
effgw_movmtn_pbl = 1.0d0
20+
effgw_rdg_beta = 0.5D0
21+
effgw_rdg_beta_max = 0.5D0
22+
front_gaussian_width = 30.D0
23+
gw_frontgfc = 1.25D-15
24+
gw_apply_tndmax = .false.
25+
gw_dc = 2.5D0
26+
gw_dc_long = 0.D0
27+
gw_drag_file_dp = '/glade/campaign/cesm/cesmdata/inputdata/atm/waccm/gw/newmfspectra40_dc25.nc'
28+
gw_drag_file_movmtn = '/glade/campaign/cesm/cesmdata/inputdata/atm/waccm/gw/mfc0lookup_mm.nc'
29+
gw_lndscl_sgh = .true.
30+
gw_oro_south_fac = 1.d0
31+
gw_polar_taper = .false.
32+
gw_prndl = 0.5D0
33+
gw_qbo_hdepth_scaling = 0.32D0
34+
gw_movmtn_plaunch = 32500.0d0
35+
gw_movmtn_psteer = 65000.0d0
36+
gw_movmtn_source = 1
37+
gw_rdg_beta_nrdg = 10
38+
pgwv = 32
39+
pgwv_long = 0
40+
gw_rdg_beta_cd_llb = 1.0D0
41+
tau_0_ubc = .true.
42+
gw_front_taubgnd = 1.5D-3
43+
gw_rdg_beta_trpd_leewv = .false.
44+
45+
! diagnostics for gravity wave drag
46+
hist_add_inst_fields;h1: EKGW
47+
hist_output_frequency;h1: 1*nsteps
48+
hist_write_nstep0;h1: .true.
49+
hist_precision;h1: REAL64
50+
hist_max_frames;h1: 1

cime_config/testdefs/testmods_dirs/cam/outfrq_se_cslam_analy_ic/user_nl_cam

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,11 @@ hist_add_inst_fields;h1: T, Q, U, V, PS
22
hist_output_frequency;h1: 1*nsteps
33
hist_write_nstep0;h1: .true.
44
analytic_ic_type=held_suarez_1994
5+
6+
! generally, analytic_ic runs do not need a topo file (see namelist_definition_cam.xml)
7+
! however, a topo file needs to be supplied to run the Beta Ridge gravity wave scheme.
8+
!
9+
! in the future, the FCAM7 test can be migrated to using 'real' initial conditions,
10+
! and this line can be removed, and
11+
! analytic ic runs can go back to having no topo file supplied as it is by default.
12+
bnd_topo='/glade/campaign/cesm/cesmdata/inputdata/atm/cam/topo/se/ne3pg3_gmted2010_modis_bedmachine_nc0540_Laplace1000_noleak_20230209.nc'

src/control/cam_comp.F90

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ subroutine cam_init(caseid, ctitle, model_doi_url, &
101101
use vert_coord, only: pver
102102
use phys_vars_init_check, only: mark_as_initialized
103103
use tropopause_climo_read, only: tropopause_climo_read_file
104+
use gravity_wave_drag_ridge_read, only: gravity_wave_drag_ridge_read_file
104105
use orbital_data, only: orbital_data_init
105106
use ccpp_kinds, only: kind_phys
106107
use ccpp_constituent_prop_mod, only: ccpp_constituent_prop_ptr_t
@@ -243,6 +244,9 @@ subroutine cam_init(caseid, ctitle, model_doi_url, &
243244
! Read tropopause climatology
244245
call tropopause_climo_read_file()
245246

247+
! Read gravity wave drag data for ridge parameterization
248+
call gravity_wave_drag_ridge_read_file()
249+
246250
! TEMPORARY: Prescribe realistic but inaccurate physical quantities
247251
! necessary for MUSICA that are currently unavailable in CAM-SIMA.
248252
!

src/control/runtime_obj.F90

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ module runtime_obj
2020
type, public :: runtime_options
2121
character(len=CS), private :: phys_suite = unset_str
2222
character(len=16), private :: waccmx_opt = unset_str
23-
! use_gw_front: Frontogenesis
24-
logical, private :: use_gw_front = .false.
25-
! use_gw_front_igw: Frontogenesis to inertial spectrum.
26-
logical, private :: use_gw_front_igw = .false.
2723
! update_thermo_variables: update thermo "constants" to composition-dependent thermo variables
2824
logical, private :: update_thermo_variables = .false.
2925
contains
@@ -33,8 +29,6 @@ module runtime_obj
3329
! Runtime parameters of interest to dycore
3430
procedure, public :: waccmx_on
3531
procedure, public :: waccmx_option
36-
procedure, public :: gw_front
37-
procedure, public :: gw_front_igw
3832
procedure, public :: update_thermodynamic_variables
3933
end type runtime_options
4034

@@ -74,35 +68,19 @@ pure character(len=16) function waccmx_option(self)
7468

7569
end function waccmx_option
7670

77-
pure logical function gw_front(self)
78-
class(runtime_options), intent(in) :: self
79-
80-
gw_front = self%use_gw_front
81-
82-
end function gw_front
83-
84-
pure logical function gw_front_igw(self)
85-
class(runtime_options), intent(in) :: self
86-
87-
gw_front_igw = self%use_gw_front_igw
88-
89-
end function gw_front_igw
90-
9171
pure logical function update_thermodynamic_variables(self)
9272
class(runtime_options), intent(in) :: self
9373

9474
update_thermodynamic_variables = self%update_thermo_variables
9575

9676
end function update_thermodynamic_variables
9777

98-
subroutine cam_set_runtime_opts(phys_suite, waccmx_opt, &
99-
gw_front, gw_front_igw)
78+
subroutine cam_set_runtime_opts(phys_suite, waccmx_opt)
10079
use cam_abortutils, only: endrun
80+
10181
! Initialize the CAM runtime object
10282
character(len=CS), intent(in) :: phys_suite
10383
character(len=16), intent(in) :: waccmx_opt
104-
logical, intent(in) :: gw_front
105-
logical, intent(in) :: gw_front_igw
10684

10785
if (runtime_configured) then
10886
! We might need more action to reset this so do not allow it now
@@ -111,8 +89,6 @@ subroutine cam_set_runtime_opts(phys_suite, waccmx_opt, &
11189

11290
cam_runtime_opts%phys_suite = trim(phys_suite)
11391
cam_runtime_opts%waccmx_opt = trim(waccmx_opt)
114-
cam_runtime_opts%use_gw_front = gw_front
115-
cam_runtime_opts%use_gw_front_igw = gw_front_igw
11692
cam_runtime_opts%update_thermo_variables = (trim(waccmx_opt) == 'ionosphere' .or. &
11793
trim(waccmx_opt) == 'neutral')
11894

0 commit comments

Comments
 (0)