Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cam6_3_089: TEM diagnostics calculated on the physics grid #677

Merged
merged 25 commits into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8e12246
initial implementation of physics grid TEM diagnostics
fvitt Oct 17, 2022
f059e4e
add conditionals for doing the TEM daigs
fvitt Oct 17, 2022
7683d54
calculate scale height; add comments
fvitt Oct 19, 2022
706ede3
fix bug in do_tem_diags setting
fvitt Oct 20, 2022
e9caadc
declare lower bound begchunk in assumed shape array args
fvitt Nov 1, 2022
145da7b
update default IC for waccmsc on ne30pg3 grid; new testmods dir
fvitt Nov 3, 2022
14ae0a6
test with mpas dycore
fvitt Nov 7, 2022
b2f6a14
remove debugging diagnostics (*zm3d history fields)
fvitt Nov 8, 2022
185d688
Implement nfreq namelist variable; misc changes requested by code rev…
fvitt Nov 9, 2022
5bbcc0e
misc changes requested by code reviewer (round 2)
fvitt Nov 10, 2022
f45f732
implement final routines; mics changes
fvitt Nov 10, 2022
5ef0f8b
tweaks to some of the comments
fvitt Nov 10, 2022
82e8203
check allocation status
fvitt Nov 18, 2022
a01b652
use physconst pi
fvitt Nov 21, 2022
3d9d37d
Remove vertical interpolation onto layer interfaces
fvitt Dec 21, 2022
b39baa3
correction to array ncol extent
fvitt Jan 3, 2023
d29da6e
the majority of Jesse's change requests
fvitt Jan 3, 2023
a9a24d7
more misc changes suggested by Jesse
fvitt Jan 4, 2023
d229916
add regression tests
fvitt Jan 4, 2023
8927292
update to history fields; move mpas tem test to prealpha
fvitt Jan 6, 2023
b2901b0
fix 2pi issue; misc clean up
fvitt Jan 9, 2023
1457f8e
initialize dcor in sh_create_gaus_grid
fvitt Jan 9, 2023
8fc80b8
Merge remote-tracking branch 'ESCOMP/cam_development' into physgrid_t…
fvitt Jan 9, 2023
903c2df
ChangeLog draft
fvitt Jan 10, 2023
479bf60
ChangeLog updates
fvitt Jan 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bld/namelist_files/namelist_defaults_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@

<ncdata dyn="se" hgrid="ne5np4" nlev="66" ic_ymd="101">atm/waccm/ic/wa3_ne5np4_1950_spinup.cam2.i.1960-01-01-00000_c150810.nc</ncdata>
<ncdata dyn="se" hgrid="ne30np4" nlev="70" ic_ymd="101">atm/waccm/ic/FW2000_ne30_L70_01-01-0001_c200602.nc</ncdata>
<ncdata dyn="se" hgrid="ne30np4" nlev="70" npg="3" chem="waccm_sc_mam4">atm/waccm/ic/FWsc2000climo_ne30pg3_L70_0002-01-01_c221103.nc</ncdata>
cacraigucar marked this conversation as resolved.
Show resolved Hide resolved
nusbaume marked this conversation as resolved.
Show resolved Hide resolved
<ncdata dyn="se" hgrid="ne30np4" nlev="70" npg="3" ic_ymd="101">atm/waccm/ic/FW2000_ne30pg3_L70_01-01-0001_c200602.nc</ncdata>
<ncdata dyn="se" hgrid="ne30np4" nlev="110" ic_ymd="101">atm/waccm/ic/FWsc2000_ne30pg3_L110_01-01-0001_c200521.nc</ncdata>

Expand Down
18 changes: 18 additions & 0 deletions bld/namelist_files/namelist_definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,24 @@ Default: .false., unless it is overridden (WACCM with interactive chemistry and
configurations do this)
</entry>

<entry id="phys_grid_ctem_zm_nbas" type="integer" category="diagnostics"
group="phys_grid_ctem_opts" valid_values="" >
Number of zonal mean basis functions (number of m=0 spherical harmonics) used in
Transformed Eulerian Mean (TEM) diagnostics
</entry>

<entry id="phys_grid_ctem_za_nlat" type="integer" category="diagnostics"
group="phys_grid_ctem_opts" valid_values="" >
Number of latitude grid points for zonal average TEM diagnostics history fields
</entry>

<entry id="phys_grid_ctem_nfreq" type="integer" category="diagnostics"
group="phys_grid_ctem_opts" valid_values="" >
Frequency of TEM diagnostics calucation.
If &gt; 0, frequency is specified as number of timesteps.
If &lt; 0, frequency is specified as number of hours.
</entry>

<entry id="print_energy_errors" type="logical" category="diagnostics"
group="check_energy_nl" valid_values="" >
Turn on verbose output identifying columns that fail energy/water
Expand Down
6 changes: 3 additions & 3 deletions bld/namelist_files/use_cases/waccm_sc_2000_cam6.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<solar_parms_data_file>atm/cam/solar/SolarForcing1995-2005avg_c160929.nc</solar_parms_data_file>

<!--Species IC -->
<ncdata dyn="fv" hgrid="0.9x1.25">cesm2_init/f.e21.FWsc2000climo.f09_f09_mg17.cesm2.1-exp011.001/0003-01-01/f.e21.FWsc2000climo.f09_f09_mg17.cesm2.1-exp011.001.cam.i.0003-01-01-00000.nc</ncdata>
<ncdata dyn="fv" hgrid="0.9x1.25">cesm2_init/f.e21.FWsc2000climo.f09_f09_mg17.cesm2.1-exp011.001_v2/0003-01-01/f.e21.FWsc2000climo.f09_f09_mg17.cesm2.1-exp011.001_v2.cam.i.0003-01-01-00000.nc</ncdata>
nusbaume marked this conversation as resolved.
Show resolved Hide resolved
<ncdata dyn="fv" hgrid="1.9x2.5" >atm/waccm/ic/f2000.waccm-mam3_1.9x2.5_L70.cam2.i.0017-01-01.c120410.nc</ncdata>

<!-- LBC, UBC Files -->
Expand Down Expand Up @@ -91,7 +91,7 @@
</srf_emis_specifier>

<!-- History Files -->
<do_circulation_diags>.true.</do_circulation_diags>
<do_circulation_diags dyn="fv">.true.</do_circulation_diags>
<history_chemistry>.true.</history_chemistry>

<mfilt> 1, 30, 120, 240, 240, 480, 365, 73, 30 </mfilt>
Expand All @@ -109,7 +109,7 @@
</fincl7>

<!-- Reduce output size by removing some variables. -->
<fexcl1>
<fexcl1 dyn="fv">
'BTAUN', 'BTAUS', 'BTAUE', 'BTAUW', 'BTAUNET', 'BUTEND1', 'BUTEND2', 'BUTEND3', 'BUTEND4', 'BUTEND5', 'BVTGWSPEC',
'MAXQ0', 'HDEPTH', 'NETDT', 'TAUN', 'TAUS', 'TAUE', 'TAUW', 'TAUGWX', 'TAUGWY', 'UTEND1', 'UTEND2', 'UTEND3',
'UTEND4', 'UTEND5', 'FRONTGF', 'FRONTGFA', 'EKGW', 'QNO', 'QRLNLTE', 'QRL_TOT', 'DUV', 'DVV', 'TTPXMLC'
Expand Down
35 changes: 35 additions & 0 deletions cime_config/testdefs/testlist_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,41 @@
<option name="wallclock">00:30:00</option>
</options>
</test>
<!-- TEM diagnostics and zonal-average output -->
<test compset="QPWmaC4" grid="ne5_ne5_mg37" name="SMS_D_Ln6_Vnuopc" testmods="cam/outfrq3s_physgrid_tem">
<machines>
<machine name="izumi" compiler="nag" category="aux_cam"/>
<machine name="izumi" compiler="nag" category="waccm"/>
<machine name="cheyenne" compiler="intel" category="waccm"/>
<machine name="izumi" compiler="nag" category="tem_diags"/>
<machine name="cheyenne" compiler="intel" category="tem_diags"/>
</machines>
<options>
<option name="comment" >TEM diagnostics and zonal-average output</option>
<option name="wallclock">00:10:00</option>
</options>
</test>
<test compset="FWsc2000climo" grid="mpasa120_mpasa120" name="ERS_Ld3_Vnuopc_P360x1" testmods="cam/outfrq1d_physgrid_tem_mpasa120_wcmsc">
<machines>
<machine name="cheyenne" compiler="intel" category="prealpha"/>
<machine name="cheyenne" compiler="intel" category="waccm"/>
<machine name="cheyenne" compiler="intel" category="tem_diags"/>
</machines>
<options>
<option name="comment" >TEM diagnostics and zonal-average output</option>
<option name="wallclock">00:20:00</option>
</options>
</test>
<test compset="FWsc2000climo" grid="f09_f09_mg17" name="ERP_Ln9_Vnuopc" testmods="cam/outfrq9s_physgrid_tem_1deg">
<machines>
<machine name="cheyenne" compiler="intel" category="waccm"/>
<machine name="cheyenne" compiler="intel" category="tem_diags"/>
</machines>
<options>
<option name="comment" >TEM diagnostics and zonal-average output</option>
<option name="wallclock">00:20:00</option>
</options>
</test>
<!-- carma sulfate -->
<test compset="FW4ma2000" grid="f10_f10_mg37" name="SMS_D_Ln9_Vnuopc" testmods="cam/carma_sulfate">
<machines>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
./xmlchange ROF_NCPL=\$ATM_NCPL
./xmlchange LND_DOMAIN_FILE="domain.lnd.mpasa120_gx1v7.201215.nc"
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
ncdata = '$DIN_LOC_ROOT/atm/waccm/ic/mpasa120km.waccm_fulltopo_c220818.nc'

mpas_cam_coef = 0.2D0
cacraigucar marked this conversation as resolved.
Show resolved Hide resolved
mpas_rayleigh_damp_u_timescale_days = 5.D0
mpas_zd = 80000.0D0
mpas_apvm_upwinding = 0.0D0
mpas_dt = 600.D0
mpas_dynamics_split_steps = 4
mpas_epssm = 0.5D0

use_gw_front = .false.

phys_grid_ctem_nfreq = -12
phys_grid_ctem_zm_nbas = 120
phys_grid_ctem_za_nlat = 90

fincl1 = ' '
fexcl1 = ' '

fincl2 = 'VTHzaphys','WTHzaphys','UVzaphys','UWzaphys'

mfilt=1,1,1,1,1,1,1,1,1,1
ndens=1,1,1,1,1,1,1,1,1,1
nhtfrq=-24,-24,-24,-24,-24,-24,-24,-24,-24,-24
inithist='ENDOFRUN'
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
hist_nhtfrq = -24
hist_mfilt = 1
hist_ndens = 1
fsurdat = '${DIN_LOC_ROOT}/lnd/clm2/surfdata_map/release-clm5.0.34/surfdata_mpasa120_hist_78pfts_CMIP6_simyr2000_c201215.nc'
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
./xmlchange ROF_NCPL=\$ATM_NCPL
./xmlchange GLC_NCPL=\$ATM_NCPL
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mfilt=1,1,1,1,1,1,1,1,1
ndens=1,1,1,1,1,1,1,1,1
nhtfrq=3,3,3,3,3,3,3,3,3
inithist='ENDOFRUN'
phys_grid_ctem_nfreq=3
phys_grid_ctem_zm_nbas=16
phys_grid_ctem_za_nlat=15
fincl3 = 'VTHzaphys','WTHzaphys','UVzaphys','UWzaphys'
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
!----------------------------------------------------------------------------------
! Users should add all user specific namelist changes below in the form of
! namelist_var = new_namelist_value
!
! Include namelist variables for drv_flds_in ONLY if -megan and/or -drydep options
! are set in the CLM_NAMELIST_OPTS env variable.
!
! EXCEPTIONS:
! Set use_cndv by the compset you use and the CLM_BLDNML_OPTS -dynamic_vegetation setting
! Set use_vichydro by the compset you use and the CLM_BLDNML_OPTS -vichydro setting
! Set use_cn by the compset you use and CLM_BLDNML_OPTS -bgc setting
! Set use_crop by the compset you use and CLM_BLDNML_OPTS -crop setting
! Set spinup_state by the CLM_BLDNML_OPTS -bgc_spinup setting
! Set irrigate by the CLM_BLDNML_OPTS -irrig setting
! Set dtime with L_NCPL option
! Set fatmlndfrc with LND_DOMAIN_PATH/LND_DOMAIN_FILE options
! Set finidat with RUN_REFCASE/RUN_REFDATE/RUN_REFTOD options for hybrid or branch cases
! (includes $inst_string for multi-ensemble cases)
! Set glc_grid with CISM_GRID option
! Set glc_smb with GLC_SMB option
! Set maxpatch_glcmec with GLC_NEC option
! Set glc_do_dynglacier with GLC_TWO_WAY_COUPLING env variable
!----------------------------------------------------------------------------------
hist_nhtfrq = 3
hist_mfilt = 1
hist_ndens = 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
./xmlchange ROF_NCPL=\$ATM_NCPL
./xmlchange GLC_NCPL=\$ATM_NCPL
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mfilt=1,1,1,1,1,1,1,1,1
ndens=1,1,1,1,1,1,1,1,1
nhtfrq=9,9,9,9,9,9,9,9,9
inithist='ENDOFRUN'
phys_grid_ctem_nfreq=-2
phys_grid_ctem_zm_nbas=120
phys_grid_ctem_za_nlat=90
fincl3 = 'VTHzaphys','WTHzaphys','UVzaphys','UWzaphys'
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
!----------------------------------------------------------------------------------
! Users should add all user specific namelist changes below in the form of
! namelist_var = new_namelist_value
!
! Include namelist variables for drv_flds_in ONLY if -megan and/or -drydep options
! are set in the CLM_NAMELIST_OPTS env variable.
!
! EXCEPTIONS:
! Set use_cndv by the compset you use and the CLM_BLDNML_OPTS -dynamic_vegetation setting
! Set use_vichydro by the compset you use and the CLM_BLDNML_OPTS -vichydro setting
! Set use_cn by the compset you use and CLM_BLDNML_OPTS -bgc setting
! Set use_crop by the compset you use and CLM_BLDNML_OPTS -crop setting
! Set spinup_state by the CLM_BLDNML_OPTS -bgc_spinup setting
! Set irrigate by the CLM_BLDNML_OPTS -irrig setting
! Set dtime with L_NCPL option
! Set fatmlndfrc with LND_DOMAIN_PATH/LND_DOMAIN_FILE options
! Set finidat with RUN_REFCASE/RUN_REFDATE/RUN_REFTOD options for hybrid or branch cases
! (includes $inst_string for multi-ensemble cases)
! Set glc_grid with CISM_GRID option
! Set glc_smb with GLC_SMB option
! Set maxpatch_glcmec with GLC_NEC option
! Set glc_do_dynglacier with GLC_TWO_WAY_COUPLING env variable
!----------------------------------------------------------------------------------
hist_nhtfrq = 9
hist_mfilt = 1
hist_ndens = 1

4 changes: 4 additions & 0 deletions src/control/cam_comp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ subroutine cam_init( &
#if (defined BFB_CAM_SCAM_IOP)
use history_defaults, only: initialize_iop_history
#endif
use phys_grid_ctem, only: phys_grid_ctem_reg

! Arguments
character(len=cl), intent(in) :: caseid ! case ID
Expand Down Expand Up @@ -168,6 +169,9 @@ subroutine cam_init( &
! Initialize physics grid decomposition
call phys_grid_init()

! Register zonal average grid for phys TEM diagnostics
call phys_grid_ctem_reg()

! Register advected tracers and physics buffer fields
call phys_register ()

Expand Down
2 changes: 2 additions & 0 deletions src/control/runtime_opts.F90
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ subroutine read_namelist(nlfilename, single_column, scmlat, scmlon)
use qneg_module, only: qneg_readnl
use lunar_tides, only: lunar_tides_readnl
use upper_bc, only: ubc_readnl
use phys_grid_ctem, only: phys_grid_ctem_readnl

!---------------------------Arguments-----------------------------------

Expand Down Expand Up @@ -195,6 +196,7 @@ subroutine read_namelist(nlfilename, single_column, scmlat, scmlon)
call dyn_readnl(nlfilename)
call ionosphere_readnl(nlfilename)
call qneg_readnl(nlfilename)
call phys_grid_ctem_readnl(nlfilename)

end subroutine read_namelist

Expand Down
Loading