Skip to content

Commit 248a9de

Browse files
authored
Merge pull request #1543 from fvitt/tem_omega_shgt
cam6_4_170: Updates to TEM diags
2 parents 904f80f + d2bf2b2 commit 248a9de

11 files changed

Lines changed: 290 additions & 126 deletions

File tree

bld/build-namelist

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,18 @@ if ($docosp) {
798798
add_default($nl, 'docosp', 'val'=>'.true.');
799799
}
800800

801+
# TEM diags
802+
if ($phys =~ /cam7/) {
803+
add_default($nl, 'ctem_diags_numlats');
804+
}
805+
# check for conflicting TEM diagnostics settings
806+
if ((defined $nl->get_value('ctem_diags_numlats')) and (defined $nl->get_value('phys_grid_ctem_za_nlat'))) {
807+
my $esmf_nlats = $nl->get_value('ctem_diags_numlats');
808+
my $sphr_nlats = $nl->get_value('phys_grid_ctem_za_nlat');
809+
if ($esmf_nlats>0 and $sphr_nlats>0) {
810+
die "Cannot set both Spherical Harmonics and ESMF regrid methods of TEM zonal mean diagnostics.\n";
811+
}
812+
}
801813

802814
# Constituents
803815
# ============
@@ -3123,7 +3135,6 @@ else {
31233135
# present in the namelist.
31243136
add_default($nl, 'use_hemco');
31253137
if ($nl->get_value('use_hemco') =~ m/$TRUE/io) {
3126-
add_default($nl, 'cam_physics_mesh');
31273138
add_default($nl, 'hemco_data_root');
31283139
add_default($nl, 'hemco_config_file');
31293140
add_default($nl, 'hemco_diagn_file');
@@ -3211,7 +3222,6 @@ if ($waccmx) {
32113222
add_default($nl, 'fv_high_altitude', 'val'=>'.true.');
32123223
}
32133224
if ($ionos ne 'none') {
3214-
add_default($nl, 'cam_physics_mesh');
32153225
add_default($nl, 'oplus_grid');
32163226
add_default($nl, 'edyn_grid');
32173227
}

bld/namelist_files/namelist_defaults_cam.xml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -959,18 +959,10 @@
959959
<edyn_grid hgrid="0.47x0.63">320x385</edyn_grid>
960960
<edyn_grid hgrid="ne120np4" >320x385</edyn_grid>
961961

962-
<!-- ESMF mesh files for physics decomposition -->
963-
<cam_physics_mesh hgrid="0.47x0.63">atm/cam/coords/fv0.47x0.63_esmf_c210305.nc</cam_physics_mesh>
964-
<cam_physics_mesh hgrid="0.9x1.25">atm/cam/coords/fv0.9x1.25_esmf_c210305.nc</cam_physics_mesh>
965-
<cam_physics_mesh hgrid="1.9x2.5">atm/cam/coords/fv1.9x2.5_esmf_200428.nc</cam_physics_mesh>
966-
<cam_physics_mesh hgrid="4x5">atm/cam/coords/fv4x5_esmf_c210305.nc</cam_physics_mesh>
967-
<cam_physics_mesh hgrid="ne5np4">atm/cam/coords/ne5np4_esmf_20191204.nc</cam_physics_mesh>
968-
<cam_physics_mesh hgrid="ne5np4" npg="3">atm/cam/coords/ne5np4.pg3_esmf_mesh_c210121.nc</cam_physics_mesh>
969-
<cam_physics_mesh hgrid="ne16np4">atm/cam/coords/ne16np4_esmf_c210305.nc</cam_physics_mesh>
970-
<cam_physics_mesh hgrid="ne16np4" npg="3">share/meshes/ne16pg3_ESMFmesh_cdf5_c20211018.nc</cam_physics_mesh>
971-
<cam_physics_mesh hgrid="ne30np4">atm/cam/coords/ne30np4_esmf_c210305.nc</cam_physics_mesh>
972-
<cam_physics_mesh hgrid="ne30np4" npg="3">atm/cam/coords/ne30pg3_esmf_20200428.nc</cam_physics_mesh>
973-
<cam_physics_mesh hgrid="ne120np4" npg="3">share/meshes/ne120pg3_ESMFmesh_cdf5_c20211018.nc</cam_physics_mesh>
962+
<!-- For ESMF regrid zonal-mean TEM diagnostics -->
963+
<ctem_diags_numlats>0</ctem_diags_numlats>
964+
<ctem_diags_numlats hgrid="ne16np4">90</ctem_diags_numlats>
965+
<ctem_diags_numlats hgrid="ne30np4">180</ctem_diags_numlats>
974966

975967
<!-- For scaling lightning sources of NOx -->
976968
<lght_no_prd_factor >1.00D0</lght_no_prd_factor>

bld/namelist_files/use_cases/1850_trop_strat_t4s_cam7.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,6 @@
114114
'HCFC22', 'N2O', 'CFC114', 'CFC115', 'HCFC141B', 'HCFC142B', 'CH2BR2', 'CHBR3', 'H2402', 'OCS', 'SF6', 'CFC11eq'
115115
</flbc_list>
116116

117-
<!-- TEM -- REMOVE (will be default namelist parms) -->
118-
<!-- cam_physics_mesh = '$ATM_DOMAIN_MESH' -->
119-
<cam_physics_mesh hgrid="ne16np4" npg="3">share/meshes/ne16pg3_ESMFmesh_cdf5_c20211018.nc</cam_physics_mesh>
120-
<cam_physics_mesh hgrid="ne30np4" npg="3">share/meshes/ne30pg3_ESMFmesh_cdf5_c20211018.nc</cam_physics_mesh>
121-
<ctem_diags_numlats hgrid="ne16np4"> 90</ctem_diags_numlats>
122-
<ctem_diags_numlats hgrid="ne30np4">180</ctem_diags_numlats>
123-
124117
<!-- history output -->
125118

126119
<mfilt > 0, 5, 20, 40, 12, 120, 73</mfilt>

cime_config/buildnml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def buildnml(case, caseroot, compname):
4949
COMP_INTERFACE = case.get_value("COMP_INTERFACE")
5050
CALENDAR = case.get_value("CALENDAR")
5151
COMPSET = case.get_value("COMPSET")
52+
mesh_file = case.get_value("ATM_DOMAIN_MESH")
5253

5354
# The Gregorian calendar currently can't be used with spinup compsets
5455
# because CAM's stream-handling code can't handle a request for data
@@ -153,6 +154,9 @@ def buildnml(case, caseroot, compname):
153154
if ninst > 1:
154155
logger.info("%s is being used for cam_branch_file", cam_branch_file)
155156

157+
# ESMF mesh file
158+
infile_lines.append(" cam_physics_mesh = '" + mesh_file + "'")
159+
156160
# In python3 integer division returns a float value.
157161
# Adjust argument of int() to get nearest integer.
158162
dtime = int( (3600*24)/int(atm_ncpl) + .5)

cime_config/testdefs/testmods_dirs/cam/outfrq3s_physgrid_tem/user_nl_cam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ phys_grid_ctem_nfreq=3
66
phys_grid_ctem_zm_nbas=16
77
phys_grid_ctem_za_nlat=15
88
fincl3 = 'Uzm','Vzm','Wzm','THzm', 'VTHzm','WTHzm','UVzm','UWzm'
9+
ctem_diags_numlats=0

cime_config/testdefs/testmods_dirs/cam/outfrq9s_ctem/user_nl_cam

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ nhtfrq=9,9,9,9,9,9,9,9,9,9
44
write_nstep0=.true.
55
inithist='ENDOFRUN'
66

7-
cam_physics_mesh = '$ATM_DOMAIN_MESH'
87
ctem_diags_numlats = 90
98

109
fincl2 = 'THtem','Utem','Vtem','Wtem','VTHtem','WTHtem','UVtem', 'UWtem', 'MSKtem', 'PStem'

cime_config/testdefs/testmods_dirs/cam/outfrq9s_physgrid_tem_1deg/user_nl_cam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ phys_grid_ctem_nfreq=-2
66
phys_grid_ctem_zm_nbas=120
77
phys_grid_ctem_za_nlat=90
88
fincl3 = 'Uzm','Vzm','Wzm','THzm', 'VTHzm','WTHzm','UVzm','UWzm'
9+
ctem_diags_numlats=0

doc/ChangeLog

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,199 @@
11
===============================================================
22

3+
Tag name: cam6_4_170
4+
Originator(s): fvitt
5+
Date: 30 Apr 2026
6+
One-line Summary: TEM diagnostics updates
7+
Github PR URL: https://github.com/ESCOMP/CAM/pull/1543
8+
9+
Purpose of changes (include the issue number and title text for each relevant GitHub issue):
10+
11+
Issue #1542
12+
Implement the following updates to TEM diagnostics:
13+
- Set up default namelist settings so that ESMF regrid method is used by default
14+
in cam7 configurations
15+
- ESMF bilinear interpolation for the zonal mean calculations
16+
- Use constant scale height of 7 km
17+
- Correct calculation of potential temperature (Exner bug fix)
18+
- Vertically interpolate to constant pressures before TEM terms are calculated
19+
20+
Describe any changes made to build system: N/A
21+
22+
Describe any changes made to the namelist: N/A
23+
24+
List any changes to the defaults for the boundary datasets: N/A
25+
26+
Describe any substantial timing or memory changes: N/A
27+
28+
Code reviewed by: cacraigucar
29+
30+
List all files eliminated: N/A
31+
32+
List all files added and what they do: N/A
33+
34+
List all existing files that have been modified, and describe the changes:
35+
36+
M bld/build-namelist
37+
- set default TEM diags namelist settings
38+
- add check for conflicting namelist settings
39+
- remove add_default for cam_physics_mesh -- now set by buildnml for all configurations
40+
41+
M bld/namelist_files/namelist_defaults_cam.xml
42+
- remove cam_physics_mesh defaults -- now set to $ATM_DOMAIN_MESH in buildnml
43+
- default TEM num lats for ne16 and ne30 grids
44+
45+
M bld/namelist_files/use_cases/1850_trop_strat_t4s_cam7.xml
46+
- remove TEM settings -- now set by default
47+
48+
M cime_config/buildnml
49+
- set cam_physics_mesh to $ATM_DOMAIN_MESH for all configurations
50+
51+
M cime_config/testdefs/testmods_dirs/cam/outfrq3s_physgrid_tem/user_nl_cam
52+
M cime_config/testdefs/testmods_dirs/cam/outfrq9s_physgrid_tem_1deg/user_nl_cam
53+
- avoid conflicting TEM settings
54+
55+
M cime_config/testdefs/testmods_dirs/cam/outfrq9s_ctem/user_nl_cam
56+
- remove cam_physics_mesh settings -- now default
57+
58+
M src/physics/cam/phys_grid_ctem.F90
59+
- use constant scale height of 7 km
60+
- correct calculation of potential temperature (Exner bug fix)
61+
62+
M src/utils/ctem_diags_mod.F90
63+
- use constant scale height of 7 km
64+
- correct calculation of potential temperature (Exner bug fix)
65+
- vertically interpolate to constant pressures before TEM terms are calculated
66+
67+
M src/utils/esmf_phys2lonlat_mod.F90
68+
- ESMF bilinear interpolation for the zonal mean calculations
69+
70+
If there were any failures reported from running test_driver.sh on any test
71+
platform, and checkin with these failures has been OK'd by the gatekeeper,
72+
then copy the lines from the td.*.status files for the failed tests to the
73+
appropriate machine below. All failed tests must be justified.
74+
75+
derecho/intel/aux_cam:
76+
NLFAIL ERC_D_Ln9.f09_f09_mt232.FHIST_BDRD.derecho_intel.cam-outfrq9s
77+
NLFAIL ERC_D_Ln9.f19_f19_mg17.QPMOZ.derecho_intel.cam-outfrq3s
78+
NLFAIL ERC_D_Ln9.f19_f19_mt232.QPC6.derecho_intel.cam-outfrq3s_cosp
79+
NLFAIL ERC_D_Ln9.mpasa120_mpasa120.F2000climo.derecho_intel.cam-outfrq9s_mpasa120
80+
NLFAIL ERC_D_Ln9.mpasa120_mpasa120.FHISTC_LTso.derecho_intel.cam-outfrq9s_mpasa120
81+
NLFAIL ERC_D_Ln9.mpasa120_mpasa120.QPC7.derecho_intel.cam-outfrq9s_mpasa120
82+
NLFAIL ERC_D_Ln9.ne30pg2_ne30pg2_mt232.QPC7.derecho_intel.cam-outfrq9s
83+
NLFAIL ERC_D_Ln9.ne30pg3_ne30pg3_mt232.F1850C_LTso.derecho_intel.cam-outfrq9s
84+
NLFAIL ERC_Ln9.C96_C96_mt232.F2000climo.derecho_intel.cam-outfrq9s
85+
NLFAIL ERI_D_Ln18.f09_f09_mt232.FHIST.derecho_intel.cam-outfrq3s_eri
86+
NLFAIL ERI_D_Ln18.f19_f19_mt232.FHIST_C5.derecho_intel.cam-outfrq3s_eri
87+
NLFAIL ERI_D_Ln18.ne16pg3_ne16pg3_mt232.FHIST_C4.derecho_intel.cam-outfrq3s_eri
88+
NLFAIL ERI_D_Ln18.ne30pg3_ne30pg3_mt232.FHISTC_LTso.derecho_intel.cam-outfrq3s_eri
89+
NLFAIL ERP_D_Ln9.ne30pg3_ne30pg3_mt232.F1850C_MTso.derecho_intel.cam-outfrq9s
90+
NLFAIL ERP_D_Ln9_P64x2.f09_f09_mg17.QSC6.derecho_intel.cam-outfrq9s
91+
NLFAIL ERP_Ld3.ne16pg3_ne16pg3_mg17.FHISTC_WAt1ma.derecho_intel.cam-reduced_hist1d
92+
NLFAIL ERP_Ld3.ne30pg3_ne30pg3_mt232.FHISTC_MTt4s.derecho_intel.cam-outfrq1d_aoa
93+
NLFAIL ERP_Lh12.f19_f19_mg17.FW4madSD.derecho_intel.cam-outfrq3h
94+
NLFAIL ERP_Ln9.f19_f19_mg17.FWsc1850.derecho_intel.cam-outfrq9s
95+
NLFAIL ERP_Ln9.ne30pg3_ne30pg3_mg17.FCnudged.derecho_intel.cam-outfrq9s
96+
NLFAIL ERP_Ln9.ne30pg3_ne30pg3_mg17.FHISTC_WAma.derecho_intel.cam-outfrq9s
97+
NLFAIL ERR_Ln9.ne16pg3_ne16pg3_mt232.FHISTC_LTso.derecho_intel.cam-outfrq9s_bwic
98+
NLFAIL SCT_D_Ln7.ne3_ne3_mg37.QPC5.derecho_intel.cam-scm_prep
99+
NLFAIL SMS_C2_D_Ln9.ne16pg3_ne16pg3_mg17.FHISTC_WXma.derecho_intel.cam-outfrq9s
100+
NLFAIL SMS_D_Ld5.f09_f09_mt232.PC6.derecho_intel.cam-cam6_port_f09
101+
NLFAIL SMS_D_Ld5.f19_f19_mt232.PC4.derecho_intel.cam-cam4_port5d
102+
NLFAIL SMS_D_Ln9.f09_f09_mg17.FCts2nudged.derecho_intel.cam-outfrq9s_leapday
103+
NLFAIL SMS_D_Ln9.f09_f09_mg17.FCvbsxHIST.derecho_intel.cam-outfrq9s
104+
NLFAIL SMS_D_Ln9.f09_f09_mg17.FSD.derecho_intel.cam-outfrq9s
105+
NLFAIL SMS_D_Ln9.f19_f19_mg17.FCARMA2000climo.derecho_intel.cam-outfrq9s
106+
NLFAIL SMS_D_Ln9.f19_f19_mg17.FCHIST_SLH.derecho_intel.cam-outfrq9s
107+
NLFAIL SMS_D_Ln9.f19_f19_mg17.FWma2000climo.derecho_intel.cam-outfrq9s
108+
NLFAIL SMS_D_Ln9.f19_f19_mg17.FWma2000climo.derecho_intel.cam-outfrq9s_waccm_ma_mam4
109+
NLFAIL SMS_D_Ln9.f19_f19_mg17.QPC2000climo.derecho_intel.cam-outfrq3s_usecase
110+
NLFAIL SMS_D_Ln9.f19_f19_mt232.FHIST_C5.derecho_intel.cam-mam7
111+
NLFAIL SMS_D_Ln9.ne0ARCTICne30x4_ne0ARCTICne30x4_mt12.FHIST.derecho_intel.cam-outfrq9s
112+
NLFAIL SMS_D_Ln9.ne30pg3_ne30pg3_mt232.FHISTC_MTso.derecho_intel.cam-outfrq9s
113+
NLFAIL SMS_D_Ln9_P1280x1.ne30pg3_ne30pg3_mt232.FHISTC_MTt1s.derecho_intel.cam-outfrq9s_Leung_dust
114+
NLFAIL SMS_D_Ln9_P1536x1.ne0CONUSne30x8_ne0CONUSne30x8_mt12.FCHIST.derecho_intel.cam-outfrq9s
115+
NLFAIL SMS_Ld1.f09_f09_mg17.FW2000climo.derecho_intel.cam-outfrq1d
116+
NLFAIL SMS_Ld1.ne30pg3_ne30pg3_mg17.FC2010climo.derecho_intel.cam-outfrq1d
117+
NLFAIL SMS_Ln9.f09_f09_mg17.F2010climo.derecho_intel.cam-nudging
118+
NLFAIL SMS_Ln9.f09_f09_mg17.FW1850.derecho_intel.cam-reduced_hist3s
119+
NLFAIL SMS_Ln9.f19_f19_mt232.F2000climo.derecho_intel.cam-silhs
120+
NLFAIL SMS_Ln9.ne30pg3_ne30pg3_mg17.FW2000climo.derecho_intel.cam-outfrq9s_rrtmgp
121+
- cam_physics_mesh setting added to atm_in, otherwise bit-for-bit
122+
123+
DIFF ERP_Ln9.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq9s
124+
DIFF ERS_Ln9.f09_f09_mg17.FX2000.derecho_intel.cam-outfrq9s
125+
DIFF ERS_Ln9.f19_f19_mg17.FXSD.derecho_intel.cam-outfrq9s
126+
DIFF SMS_Ld1.f09_f09_mg17.FCHIST_GC.derecho_intel.cam-outfrq1d
127+
DIFF SMS_Lh12.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq3h
128+
DIFF SMS_D_Ln9.ne16_ne16_mg17.QPX2000.derecho_intel.cam-outfrq9s_amie
129+
- change in default cam_physics_mesh has caused differences
130+
131+
DIFF ERS_Ln9.ne30pg3_ne30pg3_mg17.FHISTC_WXma.derecho_intel.cam-outfrq9s_ctem
132+
DIFF SMS_D_Ln9.ne30pg3_ne30pg3_mt232.1850C_CAM70%MT%CT4S2_CLM60%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV_SESP.derecho_intel.cam-outfrq9s
133+
- TEM diags update -- corrections in scale height and Exner, otherwise bit-for-bit
134+
135+
derecho/nvhpc/aux_cam:
136+
NLFAIL ERS_Ln9.ne30pg3_ne30pg3_mt232.FHISTC_LTso.derecho_nvhpc.cam-outfrq9s_gpu_default
137+
138+
izumi/nag/aux_cam:
139+
FAIL ERC_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_nag.cam-outfrq3s_subcol COMPARE_base_rest
140+
- pre-existing failure -- see https://github.com/ESCOMP/CAM/issues/1514
141+
142+
NLFAIL ERC_D_Ln27.ne3pg3_ne3pg3_mt232.FKESSLER.izumi_nag.cam-outfrq9s
143+
NLFAIL ERC_D_Ln9.f10_f10_mg37.QPWmaC6.izumi_nag.cam-outfrq3s
144+
NLFAIL ERC_D_Ln9.f10_f10_mt232.FHIST.izumi_nag.cam-outfrq3s_cospsathist
145+
NLFAIL ERC_D_Ln9.mpasa480_mpasa480_mt232.FHS94.izumi_nag.cam-outfrq9s
146+
NLFAIL ERC_D_Ln9.mpasa480_mpasa480_mt232.QPC7.izumi_nag.cam-outfrq9s_mpasa480
147+
NLFAIL ERC_D_Ln9.ne3pg3_ne3pg3_mt232.FHISTC_LTso.izumi_nag.cam-cosp_rad_diags
148+
NLFAIL ERC_D_Ln9.ne3pg3_ne3pg3_mt232.FHISTC_LTso.izumi_nag.cam-outfrq9s_nochem
149+
NLFAIL ERC_D_Ln9.ne3pg3_ne3pg3_mt232.QPC4.izumi_nag.cam-outfrq9s
150+
NLFAIL ERC_D_Ln9_P1x1.ne3pg3_ne3pg3_mt232.FADIAB.izumi_nag.cam-outfrq9s
151+
NLFAIL SMS_D_Ld2.f45_f45_mg37.PC5.izumi_nag.cam-outfrq24h_port
152+
NLFAIL SMS_D_Ln9.f10_f10_mt232.F1850.izumi_nag.cam-outfrq9s
153+
NLFAIL SMS_D_Ln9.ne3pg3_ne3pg3_mt232.QPC7.izumi_nag.cam-carma_test_tracers
154+
NLFAIL TMC_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_nag.cam-mc_ttrac
155+
- cam_physics_mesh setting added to atm_in, otherwise bit-for-bit
156+
157+
DIFF SMS_D_Ln3.ne5pg3_ne5pg3_mg37.QPX2000.izumi_nag.cam-outfrq3s
158+
- change in cam_physics_mesh has caused differences in WACCM-X
159+
-- slight differences in physics-ionosphere mapping (regridding)
160+
161+
DIFF SMS_D_Ln6.ne5_ne5_mg37.QPWmaC4.izumi_nag.cam-outfrq3s_physgrid_tem
162+
- TEM diags update -- corrections in scale height and Exner, otherwise bit-for-bit
163+
164+
izumi/gnu/aux_cam:
165+
NLFAIL ERC_D_Ln9.C48_C48_mg17.QPC6.izumi_gnu.cam-outfrq9s
166+
NLFAIL ERC_D_Ln9.f10_f10_mg37.QPC4.izumi_gnu.cam-outfrq3s_diags
167+
NLFAIL ERC_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_gnu.cam-rad_diag
168+
NLFAIL ERC_D_Ln9.f19_f19_mt232.FHIST.izumi_gnu.cam-lonlat_fv_diags
169+
NLFAIL ERC_D_Ln9.mpasa480_mpasa480_mt232.FHISTC_LTso.izumi_gnu.cam-outfrq9s_mpasa480
170+
NLFAIL ERC_D_Ln9.ne3pg3_ne3pg3_mt232.F1850_C4.izumi_gnu.cam-co2rmp
171+
NLFAIL ERC_D_Ln9.ne3pg3_ne3pg3_mt232.FGRAYRAD.izumi_gnu.cam-outfrq9s
172+
NLFAIL ERC_D_Ln9.ne3pg3_ne3pg3_mt232.FHIST_C5.izumi_gnu.cam-carma_cosp_rad_diag_mam
173+
NLFAIL ERC_D_Ln9.ne3pg3_ne3pg3_mt232.FHISTC_LTso.izumi_gnu.cam-sat_lcltod
174+
NLFAIL ERC_D_Ln9.ne3pg3_ne3pg3_mt232.FHIST.izumi_gnu.cam-nochem_clubbmf
175+
NLFAIL ERC_D_Ln9.ne3pg3_ne3pg3_mt232.FTJ16.izumi_gnu.cam-outfrq9s
176+
NLFAIL ERC_D_Ln9.ne3pg3_ne3pg3_mt232.QPC5.izumi_gnu.cam-outfrq9s
177+
NLFAIL ERC_D_Ln9.ne3pg3_ne3pg3_mt232.QPC7.izumi_gnu.cam-outfrq9s
178+
NLFAIL ERC_D_Ln9.ne5_ne5_mg37.QPC4.izumi_gnu.cam-outfrq3s_nudging_ne5_L26
179+
NLFAIL ERS_Ln9_P24x1.mpasa480_mpasa480.F2000climo.izumi_gnu.cam-outfrq9s_mpasa480
180+
NLFAIL PLB_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_gnu.cam-ttrac_loadbal0
181+
NLFAIL PLB_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_gnu.cam-ttrac_loadbal1
182+
NLFAIL PLB_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_gnu.cam-ttrac_loadbal3
183+
NLFAIL SCT_D_Ln7.ne3_ne3_mg37.QPC6.izumi_gnu.cam-scm_prep_c6
184+
NLFAIL SMS_D_Ln3.f10_f10_mg37.QPMOZ.izumi_gnu.cam-outfrq3s_chemproc
185+
NLFAIL SMS_D_Ln3.ne3pg3_ne3pg3_mt232.PC7.izumi_gnu.cam-pc7_ne3pg3
186+
NLFAIL SMS_D_Ln9.f10_f10_mg37.FWmaHIST.izumi_gnu.cam-outfrq9s_mee_fluxes
187+
NLFAIL SMS_D_Ln9.f10_f10_mg37.QPWmaC4.izumi_gnu.cam-outfrq9s_apmee
188+
NLFAIL SMS_D_Ln9.f19_f19_mt232.FW4madSD.izumi_gnu.cam-outfrq9s
189+
NLFAIL SUB_D_Ln9.ne3pg3_ne3pg3_mt232.FHIST.izumi_gnu.cam-outfrq9s
190+
- cam_physics_mesh setting added to atm_in, otherwise bit-for-bit
191+
192+
Summarize any changes to answers: bit-for-bit climate -- differences in TEM diags
193+
194+
===============================================================
195+
===============================================================
196+
3197
Tag name: cam6_4_169
4198
Originator(s): fvitt
5199
Date: 28 Apr 2026

src/physics/cam/phys_grid_ctem.F90

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ end subroutine phys_grid_ctem_init
222222
!-----------------------------------------------------------------------------
223223
!-----------------------------------------------------------------------------
224224
subroutine phys_grid_ctem_diags(phys_state)
225+
use air_composition, only: cappav
226+
use physconst, only: pref
225227
type(physics_state), intent(in) :: phys_state(begchunk:endchunk)
226228

227229
character(len=*), parameter :: prefix = 'phys_grid_ctem_diags: '
@@ -260,22 +262,20 @@ subroutine phys_grid_ctem_diags(phys_state)
260262
real(r8) :: wza(nzalat,pver)
261263
real(r8) :: thza(nzalat,pver)
262264

263-
real(r8) :: sheight(pcols,pver) ! pressure scale height (m)
265+
real(r8), parameter :: hscale = 7000._r8 ! pressure scale height (meters)
264266

265267
if (.not.do_calc()) return
266268

267269
do lchnk = begchunk,endchunk
268270

269271
ncol = phys_state(lchnk)%ncol
270272

271-
! scale height
272-
sheight(:ncol,:) = phys_state(lchnk)%t(:ncol,:) * rgas / ( mbarv(:ncol,:,lchnk) * grav ) ! meters
273-
274273
! potential temperature
275-
theta(:ncol,:,lchnk) = phys_state(lchnk)%t(:ncol,:) * phys_state(lchnk)%exner(:ncol,:)
274+
theta(:ncol,:,lchnk) = phys_state(lchnk)%t(:ncol,:) * &
275+
(pref/ phys_state(lchnk)%pmid(:ncol,:))**cappav(:ncol,:,lchnk)
276276

277277
! vertical velocity
278-
w(:ncol,:,lchnk) = -sheight(:ncol,:) * phys_state(lchnk)%omega(:ncol,:) / phys_state(lchnk)%pmid(:ncol,:)
278+
w(:ncol,:,lchnk) = -hscale * phys_state(lchnk)%omega(:ncol,:) / phys_state(lchnk)%pmid(:ncol,:)
279279

280280
u(:ncol,:,lchnk) = phys_state(lchnk)%u(:ncol,:)
281281
v(:ncol,:,lchnk) = phys_state(lchnk)%v(:ncol,:)

0 commit comments

Comments
 (0)