@@ -158,6 +158,7 @@ subroutine phys_register
158158 use hemco_interface, only: HCOI_Chunk_Init
159159 use surface_emissions_mod, only: surface_emissions_reg
160160 use elevated_emissions_mod, only: elevated_emissions_reg
161+ use ctem_diags_mod, only: ctem_diags_reg
161162
162163 !- --------------------------Local variables-----------------------------
163164 !
@@ -345,6 +346,9 @@ subroutine phys_register
345346 call HCOI_Chunk_Init()
346347 endif
347348
349+ ! TEM diagnostics
350+ call ctem_diags_reg()
351+
348352 ! This needs to be last as it requires all pbuf fields to be added
349353 if (cam_snapshot_before_num > 0 .or. cam_snapshot_after_num > 0 ) then
350354 call pbuf_cam_snapshot_register()
@@ -772,6 +776,7 @@ subroutine phys_init( phys_state, phys_tend, pbuf2d, cam_in, cam_out )
772776 use elevated_emissions_mod, only: elevated_emissions_init
773777
774778 use ccpp_constituent_prop_mod, only: ccpp_const_props_init
779+ use ctem_diags_mod, only: ctem_diags_init
775780
776781 ! Input/output arguments
777782 type (physics_state), pointer :: phys_state(:)
@@ -1053,6 +1058,8 @@ subroutine phys_init( phys_state, phys_tend, pbuf2d, cam_in, cam_out )
10531058
10541059 psl_idx = pbuf_get_index(' PSL' )
10551060
1061+ call ctem_diags_init()
1062+
10561063 end subroutine phys_init
10571064
10581065 !
@@ -1076,6 +1083,7 @@ subroutine phys_run1(phys_state, ztodt, phys_tend, pbuf2d, cam_in, cam_out)
10761083#if ( defined OFFLINE_DYN )
10771084 use metdata, only: get_met_srf1
10781085#endif
1086+ use ctem_diags_mod, only: ctem_diags_calc
10791087 !
10801088 ! Input arguments
10811089 !
@@ -1121,6 +1129,9 @@ subroutine phys_run1(phys_state, ztodt, phys_tend, pbuf2d, cam_in, cam_out)
11211129 call pbuf_allocate(pbuf2d, ' physpkg' )
11221130 call diag_allocate()
11231131
1132+ ! TEM diagnostics
1133+ call ctem_diags_calc(phys_state)
1134+
11241135 !- ----------------------------------------------------------------------
11251136 ! Advance time information
11261137 !- ----------------------------------------------------------------------
@@ -1310,6 +1321,7 @@ subroutine phys_final( phys_state, phys_tend, pbuf2d )
13101321 use phys_grid_ctem, only: phys_grid_ctem_final
13111322 use nudging, only: Nudge_Model, nudging_final
13121323 use hemco_interface, only: HCOI_Chunk_Final
1324+ use ctem_diags_mod, only: ctem_diags_final
13131325
13141326 !- ----------------------------------------------------------------------
13151327 !
@@ -1336,10 +1348,12 @@ subroutine phys_final( phys_state, phys_tend, pbuf2d )
13361348 if (Nudge_Model) call nudging_final()
13371349
13381350 if (use_hemco) then
1339- ! cleanup hemco
1340- call HCOI_Chunk_Final
1351+ ! cleanup hemco
1352+ call HCOI_Chunk_Final
13411353 endif
13421354
1355+ call ctem_diags_final()
1356+
13431357 end subroutine phys_final
13441358
13451359
0 commit comments