Skip to content

Commit

Permalink
implement zonal mean output for TEM diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
whannah1 committed Mar 27, 2024
1 parent a3f2186 commit 1b9b9a5
Show file tree
Hide file tree
Showing 11 changed files with 2,566 additions and 20 deletions.
20 changes: 20 additions & 0 deletions components/eam/bld/namelist_files/namelist_definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,26 @@ Turn on additional verbose output for integrated conservation checks.
Default: FALSE
</entry>

<!-- Transformed Eulerian Mean (TEM) budget outputs -->

<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 diagnostic calculations.
If &gt; 0, frequency is specified as number of timesteps.
If &lt; 0, frequency is specified as number of hours.
</entry>

<!-- Dry Convective Adjustment -->

<entry id="nlvdry" type="integer" category="dry_conv_adj"
Expand Down
2 changes: 1 addition & 1 deletion components/eam/src/control/cam_history.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2727,7 +2727,7 @@ subroutine patch_init(t)
end if
do i = 1, size(tape(t)%grid_ids)
call cam_grid_compute_patch(tape(t)%grid_ids(i), patchptr%patches(i),&
beglon, endlon, beglat, endlat)
beglon, endlon, beglat, endlat, collect_column_output(t))
end do
nullify(patchptr)
end do
Expand Down
2 changes: 2 additions & 0 deletions components/eam/src/control/runtime_opts.F90
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ subroutine read_namelist(single_column_in, scmlon_in, scmlat_in, scm_multcols_in
use cam_diagnostics, only: diag_readnl
use nudging, only: nudging_readnl
use radheat, only: radheat_readnl
use phys_grid_ctem, only: phys_grid_ctem_readnl
#if ( defined OFFLINE_DYN )
use metdata, only: metdata_readnl
#endif
Expand Down Expand Up @@ -540,6 +541,7 @@ subroutine read_namelist(single_column_in, scmlon_in, scmlat_in, scm_multcols_in
call nudging_readnl(nlfilename)
call radheat_readnl(nlfilename)
call vd_readnl(nlfilename)
call phys_grid_ctem_readnl(nlfilename,dtime)
#if ( defined OFFLINE_DYN )
call metdata_readnl(nlfilename)
#endif
Expand Down
4 changes: 4 additions & 0 deletions components/eam/src/dynamics/se/inital.F90
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ subroutine cam_initial(dyn_in, dyn_out, NLFileName)
use startup_initialconds, only: initial_conds
use cam_logfile, only: iulog
use perf_mod, only: t_startf, t_stopf
use phys_grid_ctem, only: phys_grid_ctem_reg

! modules from SE
use parallel_mod, only : par
Expand All @@ -42,6 +43,9 @@ subroutine cam_initial(dyn_in, dyn_out, NLFileName)
if(par%masterproc ) write(iulog,*) 'Running phys_grid_init()'
call phys_grid_init()

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

! Initialize index values for advected and non-advected tracers
call phys_register()

Expand Down
4 changes: 4 additions & 0 deletions components/eam/src/dynamics/se/restart_dynamics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ subroutine read_restart_dynamics (File, dyn_in, dyn_out, NLFileName)
use spmd_dyn, only: spmd_readnl
use control_mod, only: qsplit
use time_mod, only: TimeLevel_Qdp
use phys_grid_ctem, only: phys_grid_ctem_reg

!
! Input arguments
Expand Down Expand Up @@ -413,6 +414,9 @@ subroutine read_restart_dynamics (File, dyn_in, dyn_out, NLFileName)
if(par%masterproc ) write(iulog,*) 'Running phys_grid_init()'
call phys_grid_init()

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

! Initialize index values for advected and non-advected tracers
call phys_register()

Expand Down
Loading

0 comments on commit 1b9b9a5

Please sign in to comment.