diff --git a/.gitmodules b/.gitmodules
index bdc0ffbf1..7b257df89 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -8,5 +8,5 @@
branch = gsd/develop
[submodule "ccpp/physics"]
path = ccpp/physics
- url = https://github.com/NOAA-GSD/ccpp-physics
+ url = https://github.com/SamuelTrahanNOAA/ccpp-physics
branch = gsd/develop
diff --git a/atmos_model.F90 b/atmos_model.F90
index e8cc8b832..6343c267c 100644
--- a/atmos_model.F90
+++ b/atmos_model.F90
@@ -297,6 +297,7 @@ subroutine update_atmos_radiation_physics (Atmos)
!--- execute the IPD atmospheric setup step
call mpp_clock_begin(setupClock)
+
#ifdef CCPP
call CCPP_step (step="time_vary", nblks=Atm_block%nblks, ierr=ierr)
if (ierr/=0) call mpp_error(FATAL, 'Call to CCPP time_vary step failed')
@@ -331,6 +332,11 @@ subroutine update_atmos_radiation_physics (Atmos)
! print *,'in atmos_model, after assign_importdata, rc=',rc
endif
+#ifdef CCPP
+ call CCPP_step (step="timestep_init", nblks=Atm_block%nblks, ierr=ierr)
+ if (ierr/=0) call mpp_error(FATAL, 'Call to CCPP timestep_init step failed')
+#endif
+
call mpp_clock_end(setupClock)
if (mpp_pe() == mpp_root_pe() .and. debug) write(6,*) "radiation driver"
@@ -394,6 +400,9 @@ subroutine update_atmos_radiation_physics (Atmos)
#ifdef CCPP
call CCPP_step (step="stochastics", nblks=Atm_block%nblks, ierr=ierr)
if (ierr/=0) call mpp_error(FATAL, 'Call to CCPP stochastics step failed')
+
+ call CCPP_step (step="timestep_final", nblks=Atm_block%nblks, ierr=ierr)
+ if (ierr/=0) call mpp_error(FATAL, 'Call to CCPP timestep_final step failed')
#else
Func0d => physics_step2
!$OMP parallel do default (none) &
@@ -404,13 +413,16 @@ subroutine update_atmos_radiation_physics (Atmos)
call IPD_step (IPD_Control, IPD_Data(nb:nb), IPD_Diag, IPD_Restart, IPD_func0d=Func0d)
enddo
#endif
+
call mpp_clock_end(physClock)
if (chksum_debug) then
if (mpp_pe() == mpp_root_pe()) print *,'PHYSICS STEP2 ', IPD_Control%kdt, IPD_Control%fhour
call FV3GFS_IPD_checksum(IPD_Control, IPD_Data, Atm_block)
endif
+
call getiauforcing(IPD_Control,IAU_data)
+
if (mpp_pe() == mpp_root_pe() .and. debug) write(6,*) "end of radiation and physics step"
endif
diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py
index 46d6872d9..c3f6e4846 100755
--- a/ccpp/config/ccpp_prebuild_config.py
+++ b/ccpp/config/ccpp_prebuild_config.py
@@ -114,6 +114,9 @@
'FV3/ccpp/physics/physics/mfpblt.f',
'FV3/ccpp/physics/physics/mfpbltq.f',
'FV3/ccpp/physics/physics/mfscu.f',
+ 'FV3/ccpp/physics/physics/total_tend.F90',
+ 'FV3/ccpp/physics/physics/model_tend_pre.F90',
+ 'FV3/ccpp/physics/physics/model_tend_post.F90',
'FV3/ccpp/physics/physics/mfscuq.f',
'FV3/ccpp/physics/physics/noahmp_tables.f90',
'FV3/ccpp/physics/physics/num_parthds.F',
@@ -184,7 +187,10 @@
'FV3/ccpp/physics/physics/gcm_shoc.F90' : [ 'slow_physics' ],
'FV3/ccpp/physics/physics/get_prs_fv3.F90' : [ 'slow_physics' ],
'FV3/ccpp/physics/physics/gfdl_cloud_microphys.F90' : [ 'slow_physics' ],
- 'FV3/ccpp/physics/physics/gfdl_fv_sat_adj.F90' : [ 'fast_physics' ],
+ 'FV3/ccpp/physics/physics/gfdl_fv_sat_adj.F90' : [ 'slow_physics' ],
+ 'FV3/ccpp/physics/physics/total_tend.F90' : [ 'slow_physics' ],
+ 'FV3/ccpp/physics/physics/model_tend_pre.F90' : [ 'slow_physics' ],
+ 'FV3/ccpp/physics/physics/model_tend_post.F90' : [ 'slow_physics' ],
'FV3/ccpp/physics/physics/gscond.f' : [ 'slow_physics' ],
'FV3/ccpp/physics/physics/gwdc.f' : [ 'slow_physics' ],
'FV3/ccpp/physics/physics/gwdps.f' : [ 'slow_physics' ],
diff --git a/ccpp/driver/CCPP_driver.F90 b/ccpp/driver/CCPP_driver.F90
index 449aaf03c..0bf88b218 100644
--- a/ccpp/driver/CCPP_driver.F90
+++ b/ccpp/driver/CCPP_driver.F90
@@ -49,7 +49,7 @@ module CCPP_driver
! number nthrdsX in case of non-uniform block sizes) !
!--------------------------------------------------------!
logical :: non_uniform_blocks
- integer :: nthrds, nthrdsX
+ integer :: nthrds, nthrdsX, ithread
!----------------
! Public Entities
@@ -205,7 +205,8 @@ subroutine CCPP_step (step, nblks, ierr)
end if
! Radiation and stochastic physics
- else if (trim(step)=="radiation" .or. trim(step)=="physics" .or. trim(step)=="stochastics") then
+ else if (trim(step)=="radiation" .or. trim(step)=="physics" .or. trim(step)=="stochastics" &
+ .or. trim(step)=="timestep_init" .or. trim(step)=="timestep_final") then
! Set number of threads available to physics schemes to one,
! because threads are used on the outside for blocking
diff --git a/ccpp/framework b/ccpp/framework
index 463a72cce..78d5d5b15 160000
--- a/ccpp/framework
+++ b/ccpp/framework
@@ -1 +1 @@
-Subproject commit 463a72cce605ae0f8f8725574d5e3b9cf6c9d90c
+Subproject commit 78d5d5b155385c2d67276b31e8154cea9bfb1d34
diff --git a/ccpp/physics b/ccpp/physics
index fadc3cd23..e4b80ea01 160000
--- a/ccpp/physics
+++ b/ccpp/physics
@@ -1 +1 @@
-Subproject commit fadc3cd2359eac5ed874a7776724098f9445704d
+Subproject commit e4b80ea016899c7c23fa07396bd7fcbc0195a0f9
diff --git a/ccpp/suites/suite_FV3_GFS_v15p2.xml b/ccpp/suites/suite_FV3_GFS_v15p2.xml
index 1ab234105..46234fdc9 100644
--- a/ccpp/suites/suite_FV3_GFS_v15p2.xml
+++ b/ccpp/suites/suite_FV3_GFS_v15p2.xml
@@ -15,6 +15,11 @@
GFS_phys_time_vary
+
+
+ model_tend_pre
+
+
GFS_suite_interstitial_rad_reset
@@ -90,5 +95,11 @@
GFS_stochastics
+
+
+ model_tend_post
+ total_tend
+
+
diff --git a/ccpp/suites/suite_FV3_GFS_v15plus.xml b/ccpp/suites/suite_FV3_GFS_v15plus.xml
index 04f1d5f46..57a0d921b 100644
--- a/ccpp/suites/suite_FV3_GFS_v15plus.xml
+++ b/ccpp/suites/suite_FV3_GFS_v15plus.xml
@@ -9,14 +9,17 @@
+ model_tend_pre
GFS_time_vary_pre
GFS_rrtmg_setup
GFS_rad_time_vary
GFS_phys_time_vary
+ model_tend_post
+ model_tend_pre
GFS_suite_interstitial_rad_reset
GFS_rrtmg_pre
rrtmg_sw_pre
@@ -26,10 +29,13 @@
rrtmg_lw
rrtmg_lw_post
GFS_rrtmg_post
+ model_tend_post
+ model_tend_pre
+ total_tend
GFS_suite_interstitial_phys_reset
GFS_suite_stateout_reset
get_prs_fv3
@@ -39,9 +45,11 @@
dcyc2t3
GFS_surface_composites_inter
GFS_suite_interstitial_2
+ model_tend_post
+ model_tend_pre
sfc_diff
GFS_surface_loop_control_part1
sfc_nst_pre
@@ -50,9 +58,11 @@
lsm_noah
sfc_sice
GFS_surface_loop_control_part2
+ model_tend_post
+ model_tend_pre
GFS_surface_composites_post
dcyc2t3_post
sfc_diag
@@ -83,11 +93,14 @@
gfdl_cloud_microphys
GFS_MP_generic_post
maximum_hourly_diagnostics
+ model_tend_post
+ model_tend_pre
GFS_stochastics
+ model_tend_post
diff --git a/ccpp/suites/suite_FV3_GFS_v16beta.xml b/ccpp/suites/suite_FV3_GFS_v16beta.xml
index 8571ec1b4..ede385cf0 100644
--- a/ccpp/suites/suite_FV3_GFS_v16beta.xml
+++ b/ccpp/suites/suite_FV3_GFS_v16beta.xml
@@ -15,6 +15,11 @@
GFS_phys_time_vary
+
+
+ model_tend_pre
+
+
GFS_suite_interstitial_rad_reset
@@ -90,5 +95,11 @@
GFS_stochastics
+
+
+ model_tend_post
+ total_tend
+
+
diff --git a/ccpp/suites/suite_FV3_GSD_v0.xml b/ccpp/suites/suite_FV3_GSD_v0.xml
index fb7805b24..e572fdc39 100644
--- a/ccpp/suites/suite_FV3_GSD_v0.xml
+++ b/ccpp/suites/suite_FV3_GSD_v0.xml
@@ -10,6 +10,11 @@
GFS_phys_time_vary
+
+
+ model_tend_pre
+
+
GFS_suite_interstitial_rad_reset
@@ -90,5 +95,11 @@
GFS_stochastics
+
+
+ model_tend_post
+ total_tend
+
+
diff --git a/gfsphysics/GFS_layer/GFS_diagnostics.F90 b/gfsphysics/GFS_layer/GFS_diagnostics.F90
index 25657f760..7f5bddbf1 100644
--- a/gfsphysics/GFS_layer/GFS_diagnostics.F90
+++ b/gfsphysics/GFS_layer/GFS_diagnostics.F90
@@ -2231,6 +2231,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
! if(mpp_pe()==mpp_root_pe())print *,'in gfdl_diag_register,af shum_wts,idx=',idx
!--- three-dimensional variables that need to be handled special when writing
+ if_ldiag3d: if(Model%ldiag3d) then
idx = idx + 1
ExtDiag(idx)%axes = 3
ExtDiag(idx)%name = 'dt3dt_lw'
@@ -2308,11 +2309,22 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dt3dt(:,:,7)
enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dt3dt_rdamp'
+ ExtDiag(idx)%desc = 'temperature change due to Rayleigh damping'
+ ExtDiag(idx)%unit = 'K'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dt3dt(:,:,8)
+ enddo
+
idx = idx + 1
ExtDiag(idx)%axes = 3
ExtDiag(idx)%name = 'du3dt_pbl'
- ExtDiag(idx)%desc = 'u momentum change due to PBL'
- ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%desc = 'u wind change due to PBL'
+ ExtDiag(idx)%unit = 'm/s'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
@@ -2334,7 +2346,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%axes = 3
ExtDiag(idx)%name = 'du3dt_orogwd'
ExtDiag(idx)%desc = 'u momentum change due to orographic gravity wave drag'
- ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%unit = 'm/s'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
@@ -2398,6 +2410,287 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'du3dt_rdamp'
+ ExtDiag(idx)%desc = 'u momentum change due to Rayleigh damping'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%du3dt(:,:,5)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dv3dt_damp'
+ ExtDiag(idx)%desc = 'v momentum change due to Rayleigh damping'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dv3dt(:,:,5)
+ enddo
+
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'du3dt_shlwcnv'
+ ExtDiag(idx)%desc = 'u momentum change due to shal conv.'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%du3dt(:,:,6)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dv3dt_shlwcnv'
+ ExtDiag(idx)%desc = 'v momentum change due to shal conv.'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dv3dt(:,:,6)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'du3dt_ccpp'
+ ExtDiag(idx)%desc = 'cumulative change in x wind from CCPP'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%du3dt(:,:,7)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dv3dt_ccpp'
+ ExtDiag(idx)%desc = 'cumulative change in y wind from CCPP'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dv3dt(:,:,7)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'du3dt_model'
+ ExtDiag(idx)%desc = 'cumulative change in x wind from model'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%du3dt(:,:,8)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dv3dt_model'
+ ExtDiag(idx)%desc = 'cumulative change in y wind from model'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dv3dt(:,:,8)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'du3dt_total'
+ ExtDiag(idx)%desc = 'cumulative change in x wind'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%du3dt(:,:,9)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dv3dt_total'
+ ExtDiag(idx)%desc = 'cumulative change in y wind'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dv3dt(:,:,9)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dt3dt_ccpp'
+ ExtDiag(idx)%desc = 'cumulative change in temperature from CCPP'
+ ExtDiag(idx)%unit = 'K'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dt3dt(:,:,10)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dt3dt_model'
+ ExtDiag(idx)%desc = 'cumulative change in temperature from model'
+ ExtDiag(idx)%unit = 'K'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dt3dt(:,:,11)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dt3dt_total'
+ ExtDiag(idx)%desc = 'cumulative change in temperature'
+ ExtDiag(idx)%unit = 'K'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dt3dt(:,:,12)
+ enddo
+
+#ifdef CCPP
+ if_qdiag3d: if(Model%qdiag3d) then
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dq3dt_ccpp'
+ ExtDiag(idx)%desc = 'cumulative change in water vapor specific humidity from CCPP'
+ ExtDiag(idx)%unit = 'kg kg-1'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dq3dt(:,:,10)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dq3dt_model'
+ ExtDiag(idx)%desc = 'cumulative change in water vapor specific humidity from model'
+ ExtDiag(idx)%unit = 'kg kg-1'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dq3dt(:,:,11)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dq3dt_total'
+ ExtDiag(idx)%desc = 'cumulative change in water vapor specific humidity'
+ ExtDiag(idx)%unit = 'kg kg-1'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dq3dt(:,:,12)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dq3dt_pbl'
+ ExtDiag(idx)%desc = 'cumulative change in water vapor specific humidity due to PBL'
+ ExtDiag(idx)%unit = 'kg kg-1'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dq3dt(:,:,1)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dq3dt_deepcnv'
+ ExtDiag(idx)%desc = 'cumulative change in water vapor specific humidity due to deep conv.'
+ ExtDiag(idx)%unit = 'kg kg-1'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dq3dt(:,:,2)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dq3dt_shlwcnv'
+ ExtDiag(idx)%desc = 'cumulative change in water vapor specific humidity due to shal conv.'
+ ExtDiag(idx)%unit = 'kg kg-1'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dq3dt(:,:,3)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dq3dt_microphy'
+ ExtDiag(idx)%desc = 'cumulative change in water vapor specific humidity due to microphysics'
+ ExtDiag(idx)%unit = 'kg kg-1'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dq3dt(:,:,4)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dq3dt_o3pbl'
+ ExtDiag(idx)%desc = 'cumulative change in ozone mixing ratio due to PBL'
+ ExtDiag(idx)%unit = 'kg kg-1'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dq3dt(:,:,5)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dq3dt_o3prodloss'
+ ExtDiag(idx)%desc = 'cumulative change in ozone concentration due to production and loss rate'
+ ExtDiag(idx)%unit = 'kg kg-1'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dq3dt(:,:,6)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dq3dt_o3mix'
+ ExtDiag(idx)%desc = 'cumulative change in ozone concentration due to ozone mixing ratio'
+ ExtDiag(idx)%unit = 'kg kg-1'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dq3dt(:,:,7)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dq3dt_o3temp'
+ ExtDiag(idx)%desc = 'cumulative change in ozone concentration due to temperature'
+ ExtDiag(idx)%unit = 'kg kg-1'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dq3dt(:,:,8)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dq3dt_o3column'
+ ExtDiag(idx)%desc = 'cumulative change in ozone concentration due to overhead ozone column'
+ ExtDiag(idx)%unit = 'kg kg-1'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dq3dt(:,:,9)
+ enddo
+ end if if_qdiag3d
+#endif
+ end if if_ldiag3d
+
!rab
!rab do num = 1,5+Mdl_parms%pl_coeff
!rab write (xtra,'(I1)') num
diff --git a/gfsphysics/GFS_layer/GFS_physics_driver.F90 b/gfsphysics/GFS_layer/GFS_physics_driver.F90
index 36266aab8..a1f6b1ad2 100644
--- a/gfsphysics/GFS_layer/GFS_physics_driver.F90
+++ b/gfsphysics/GFS_layer/GFS_physics_driver.F90
@@ -2335,7 +2335,7 @@ subroutine GFS_physics_driver &
Diag%v10m, Sfcprop%ffmm, Sfcprop%ffhh, Sfcprop%tsfc, hflx,&
evap, stress, wind, kpbl, Statein%prsi, del, Statein%prsl,&
Statein%prslk, Statein%phii, Statein%phil, dtp, dusfc1, &
- dvsfc1, dtsfc1, dqsfc1, dkt, Diag%hpbl, kinver, &
+ dvsfc1, dtsfc1, dqsfc1, dkt, tbd%hpbl, kinver, &
Model%xkzm_m, Model%xkzm_h, Model%xkzm_s, Model%xkzminv, &
lprnt, ipr, me)
! if (lprnt) write(0,*)'aftmonshoc=',Statein%tgrs(ipr,:)
@@ -2356,7 +2356,7 @@ subroutine GFS_physics_driver &
Sfcprop%ffmm, Sfcprop%ffhh, Sfcprop%tsfc, hflx, evap, &
stress, wind, kpbl, Statein%prsi, del, Statein%prsl, &
Statein%prslk, Statein%phii, Statein%phil, dtp, &
- Model%dspheat, dusfc1, dvsfc1, dtsfc1, dqsfc1, Diag%hpbl, &
+ Model%dspheat, dusfc1, dvsfc1, dtsfc1, dqsfc1, tbd%hpbl, &
kinver, Model%xkzm_m, Model%xkzm_h, Model%xkzm_s)
!*## CCPP ##
elseif (Model%isatmedmf == 1) then ! updated version of satmedmfvdif (May 2019)
@@ -2369,7 +2369,7 @@ subroutine GFS_physics_driver &
Sfcprop%ffmm, Sfcprop%ffhh, Sfcprop%tsfc, hflx, evap, &
stress, wind, kpbl, Statein%prsi, del, Statein%prsl, &
Statein%prslk, Statein%phii, Statein%phil, dtp, &
- Model%dspheat, dusfc1, dvsfc1, dtsfc1, dqsfc1, Diag%hpbl, &
+ Model%dspheat, dusfc1, dvsfc1, dtsfc1, dqsfc1, tbd%hpbl, &
kinver, Model%xkzm_m, Model%xkzm_h, Model%xkzm_s, &
Model%dspfac, Model%bl_upfr, Model%bl_dnfr)
!*## CCPP ##
@@ -2383,7 +2383,7 @@ subroutine GFS_physics_driver &
Sfcprop%ffhh, Sfcprop%tsfc, qss, hflx, evap, stress, &
wind, kpbl, Statein%prsi, del, Statein%prsl, &
Statein%prslk, Statein%phii, Statein%phil, dtp, &
- Model%dspheat, dusfc1, dvsfc1, dtsfc1, dqsfc1, Diag%hpbl,&
+ Model%dspheat, dusfc1, dvsfc1, dtsfc1, dqsfc1, tbd%hpbl,&
gamt, gamq, dkt, kinver, Model%xkzm_m, Model%xkzm_h, &
Model%xkzm_s, lprnt, ipr, &
Model%xkzminv, Model%moninq_fac)
@@ -2395,7 +2395,7 @@ subroutine GFS_physics_driver &
Sfcprop%ffhh, Sfcprop%tsfc, qss, hflx, evap, stress, &
wind, kpbl, Statein%prsi, del, Statein%prsl, &
Statein%prslk, Statein%phii, Statein%phil, dtp, &
- Model%dspheat, dusfc1, dvsfc1, dtsfc1, dqsfc1, Diag%hpbl,&
+ Model%dspheat, dusfc1, dvsfc1, dtsfc1, dqsfc1, tbd%hpbl,&
gamt, gamq, dkt, kinver, Model%xkzm_m, Model%xkzm_h, &
Model%xkzm_s, lprnt, ipr, &
Model%xkzminv, Model%moninq_fac,islmsk)
@@ -2419,7 +2419,7 @@ subroutine GFS_physics_driver &
Sfcprop%ffmm, Sfcprop%ffhh, Sfcprop%tsfc, qss, hflx, evap, &
stress, wind, kpbl, Statein%prsi, del, Statein%prsl, &
Statein%prslk, Statein%phii, Statein%phil, dtp, &
- Model%dspheat, dusfc1, dvsfc1, dtsfc1, dqsfc1, Diag%hpbl, &
+ Model%dspheat, dusfc1, dvsfc1, dtsfc1, dqsfc1, tbd%hpbl, &
gamt, gamq, dkt, kinver, Model%xkzm_m, Model%xkzm_h, &
Model%xkzm_s, lprnt, ipr, &
Model%xkzminv, Model%moninq_fac, Model%rbcr)
@@ -2431,7 +2431,7 @@ subroutine GFS_physics_driver &
Sfcprop%tsfc, qss, hflx, evap, stress, wind, kpbl, &
Statein%prsi, del, Statein%prsl, Statein%prslk, &
Statein%phii, Statein%phil, dtp, dusfc1, dvsfc1, &
- dtsfc1, dqsfc1, Diag%hpbl, gamt, gamq, dkt, kinver, &
+ dtsfc1, dqsfc1, tbd%hpbl, gamt, gamq, dkt, kinver, &
Model%xkzm_m, Model%xkzm_h)
else
call moninp(ix, im, levs, nvdiff, dvdt, dudt, dtdt, dqdt, &
@@ -2440,7 +2440,7 @@ subroutine GFS_physics_driver &
Sfcprop%tsfc, qss, hflx, evap, stress, wind, kpbl, &
Statein%prsi, del, Statein%prsl, Statein%phii, &
Statein%phil, dtp, dusfc1, dvsfc1, dtsfc1, dqsfc1, &
- Diag%hpbl, gamt, gamq, dkt, Model%xkzm_m, Model%xkzm_h)
+ tbd%hpbl, gamt, gamq, dkt, Model%xkzm_m, Model%xkzm_h)
endif
endif ! end if_hybedmf
@@ -2593,7 +2593,7 @@ subroutine GFS_physics_driver &
Diag%v10m, Sfcprop%ffmm, Sfcprop%ffhh, Sfcprop%tsfc, hflx, &
evap, stress, wind, kpbl, Statein%prsi, del, Statein%prsl, &
Statein%prslk, Statein%phii, Statein%phil, dtp, dusfc1, &
- dvsfc1, dtsfc1, dqsfc1, dkt, Diag%hpbl, kinver, &
+ dvsfc1, dtsfc1, dqsfc1, dkt, tbd%hpbl, kinver, &
Model%xkzm_m, Model%xkzm_h, Model%xkzm_s, Model%xkzminv, &
lprnt, ipr, me)
!*## CCPP ##
@@ -2609,7 +2609,7 @@ subroutine GFS_physics_driver &
Sfcprop%ffmm, Sfcprop%ffhh, Sfcprop%tsfc, hflx, evap, &
stress, wind, kpbl, Statein%prsi, del, Statein%prsl, &
Statein%prslk, Statein%phii, Statein%phil, dtp, &
- Model%dspheat, dusfc1, dvsfc1, dtsfc1, dqsfc1, Diag%hpbl, &
+ Model%dspheat, dusfc1, dvsfc1, dtsfc1, dqsfc1, tbd%hpbl, &
kinver, Model%xkzm_m, Model%xkzm_h, Model%xkzm_s)
!*## CCPP ##
elseif (Model%isatmedmf == 1) then ! updated version of satmedmfvdif (May 2019)
@@ -2622,7 +2622,7 @@ subroutine GFS_physics_driver &
Sfcprop%ffmm, Sfcprop%ffhh, Sfcprop%tsfc, hflx, evap, &
stress, wind, kpbl, Statein%prsi, del, Statein%prsl, &
Statein%prslk, Statein%phii, Statein%phil, dtp, &
- Model%dspheat, dusfc1, dvsfc1, dtsfc1, dqsfc1, Diag%hpbl, &
+ Model%dspheat, dusfc1, dvsfc1, dtsfc1, dqsfc1, tbd%hpbl, &
kinver, Model%xkzm_m, Model%xkzm_h, Model%xkzm_s, &
Model%dspfac, Model%bl_upfr, Model%bl_dnfr)
!*## CCPP ##
@@ -2638,7 +2638,7 @@ subroutine GFS_physics_driver &
Sfcprop%ffhh, Sfcprop%tsfc, qss, hflx, evap, stress, &
wind, kpbl, Statein%prsi, del, Statein%prsl, &
Statein%prslk, Statein%phii, Statein%phil, dtp, &
- Model%dspheat, dusfc1, dvsfc1, dtsfc1, dqsfc1, Diag%hpbl, &
+ Model%dspheat, dusfc1, dvsfc1, dtsfc1, dqsfc1, tbd%hpbl, &
gamt, gamq, dkt, kinver, Model%xkzm_m, Model%xkzm_h, &
Model%xkzm_s, lprnt, ipr, &
Model%xkzminv, Model%moninq_fac)
@@ -2652,7 +2652,7 @@ subroutine GFS_physics_driver &
Sfcprop%ffhh, Sfcprop%tsfc, qss, hflx, evap, stress, &
wind, kpbl, Statein%prsi, del, Statein%prsl, &
Statein%prslk, Statein%phii, Statein%phil, dtp, &
- Model%dspheat, dusfc1, dvsfc1, dtsfc1, dqsfc1, Diag%hpbl, &
+ Model%dspheat, dusfc1, dvsfc1, dtsfc1, dqsfc1, tbd%hpbl, &
gamt, gamq, dkt, kinver, Model%xkzm_m, Model%xkzm_h, &
Model%xkzm_s, lprnt, ipr, &
Model%xkzminv, Model%moninq_fac,islmsk)
@@ -2664,7 +2664,7 @@ subroutine GFS_physics_driver &
Sfcprop%ffmm, Sfcprop%ffhh, Sfcprop%tsfc, qss, hflx, evap, &
stress, wind, kpbl, Statein%prsi, del, Statein%prsl, &
Statein%prslk, Statein%phii, Statein%phil, dtp, &
- Model%dspheat, dusfc1, dvsfc1, dtsfc1, dqsfc1, Diag%hpbl, &
+ Model%dspheat, dusfc1, dvsfc1, dtsfc1, dqsfc1, tbd%hpbl, &
gamt, gamq, dkt, kinver, Model%xkzm_m, Model%xkzm_h, &
Model%xkzm_s, lprnt, ipr, &
Model%xkzminv, Model%moninq_fac, Model%rbcr)
@@ -2676,7 +2676,7 @@ subroutine GFS_physics_driver &
Sfcprop%tsfc, qss, hflx, evap, stress, wind, kpbl, &
Statein%prsi, del, Statein%prsl, Statein%prslk, &
Statein%phii, Statein%phil, dtp, dusfc1, dvsfc1, &
- dtsfc1, dqsfc1, Diag%hpbl, gamt, gamq, dkt, kinver, &
+ dtsfc1, dqsfc1, tbd%hpbl, gamt, gamq, dkt, kinver, &
Model%xkzm_m, Model%xkzm_h)
else
call moninp(ix, im, levs, nvdiff, dvdt, dudt, dtdt, dvdftra, &
@@ -2685,7 +2685,7 @@ subroutine GFS_physics_driver &
Sfcprop%tsfc, qss, hflx, evap, stress, wind, kpbl, &
Statein%prsi, del, Statein%prsl, Statein%phii, &
Statein%phil, dtp, dusfc1, dvsfc1, dtsfc1, dqsfc1, &
- Diag%hpbl, gamt, gamq, dkt, Model%xkzm_m, Model%xkzm_h)
+ tbd%hpbl, gamt, gamq, dkt, Model%xkzm_m, Model%xkzm_h)
endif
endif ! end if_satmedmf
@@ -4265,7 +4265,7 @@ subroutine GFS_physics_driver &
Statein%pgr, Statein%phil, clw, Stateout%gq0, &
Stateout%gt0, Stateout%gu0, Stateout%gv0, rain1, &
kbot, ktop, kcnv, islmsk, Statein%vvl, ncld, &
- Diag%hpbl, hflx, evap, ud_mf, dt_mf, cnvw, cnvc, &
+ tbd%hpbl, hflx, evap, ud_mf, dt_mf, cnvw, cnvc, &
Model%clam_shal, Model%c0s_shal, Model%c1_shal, &
Model%pgcon_shal)
!*## CCPP ##
@@ -4305,7 +4305,7 @@ subroutine GFS_physics_driver &
Stateout%gq0(:,:,1), Stateout%gt0, &
Stateout%gu0, Stateout%gv0, Model%fscav, &
rain1, kbot, ktop, kcnv, islmsk, garea, &
- Statein%vvl, ncld, Diag%hpbl, ud_mf, &
+ Statein%vvl, ncld, tbd%hpbl, ud_mf, &
dt_mf, cnvw, cnvc, &
Model%clam_shal, Model%c0s_shal, Model%c1_shal, &
Model%pgcon_shal, Model%asolfac_shal)
@@ -4904,8 +4904,8 @@ subroutine GFS_physics_driver &
Statein%prsi, Statein%phil, Statein%phii, &
Statein%vvl, clw(1,1,2), QLCN, clw(1,1,1), QICN, &
Radtend%htrlw, Radtend%htrsw, w_upi, cf_upi, &
- FRLAND, Diag%HPBL, CNV_MFD, CNV_DQLDT, &
-! FRLAND, Diag%HPBL, CNV_MFD, CNV_PRC3, CNV_DQLDT, &
+ FRLAND, Tbd%Hpbl, CNV_MFD, CNV_DQLDT, &
+! FRLAND, Tbd%Hpbl, CNV_MFD, CNV_PRC3, CNV_DQLDT, &
CLCN, Stateout%gu0, Stateout%gv0, Diag%dusfc, &
Diag%dvsfc, dusfc1, dvsfc1, dusfc1, dvsfc1, &
CNV_FICE, CNV_NDROP, CNV_NICE, Stateout%gq0(1,1,1), &
diff --git a/gfsphysics/GFS_layer/GFS_typedefs.F90 b/gfsphysics/GFS_layer/GFS_typedefs.F90
index db70dd030..89c9db948 100644
--- a/gfsphysics/GFS_layer/GFS_typedefs.F90
+++ b/gfsphysics/GFS_layer/GFS_typedefs.F90
@@ -549,6 +549,11 @@ module GFS_typedefs
#endif
real(kind=kind_phys) :: fhzero !< hours between clearing of diagnostic buckets
logical :: ldiag3d !< flag for 3d diagnostic fields
+ logical :: qdiag3d !< flag for 3d tracer diagnostic fields
+ logical :: flag_for_gwd_generic_tend!< true if GFS_GWD_generic should calculate tendencies
+ logical :: flag_for_pbl_generic_tend!< true if GFS_PBL_generic should calculate tendencies
+ logical :: flag_for_scnv_generic_tend!< true if GFS_DCNV_generic should calculate tendencies
+ logical :: flag_for_dcnv_generic_tend!< true if GFS_DCNV_generic should calculate tendencies
logical :: lssav !< logical flag for storing diagnostics
real(kind=kind_phys) :: fhcyc !< frequency for surface data cycling (hours)
integer :: thermodyn_id !< valid for GFS only for get_prs/phi
@@ -1468,6 +1473,7 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: dv3dt (:,:,:) => null() !< v momentum change due to physics
real (kind=kind_phys), pointer :: dt3dt (:,:,:) => null() !< temperature change due to physics
real (kind=kind_phys), pointer :: dq3dt (:,:,:) => null() !< moisture change due to physics
+ real (kind=kind_phys), pointer :: tend_book(:,:,:)=>null() !< CCPP tendency storage
real (kind=kind_phys), pointer :: refdmax (:) => null() !< max hourly 1-km agl reflectivity
real (kind=kind_phys), pointer :: refdmax263k(:) => null() !< max hourly -10C reflectivity
real (kind=kind_phys), pointer :: t02max (:) => null() !< max hourly 2m T
@@ -2732,6 +2738,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!--- BEGIN NAMELIST VARIABLES
real(kind=kind_phys) :: fhzero = 0.0 !< hours between clearing of diagnostic buckets
logical :: ldiag3d = .false. !< flag for 3d diagnostic fields
+ logical :: qdiag3d = .false. !< flag for 3d tracer diagnostic fields
logical :: lssav = .false. !< logical flag for storing diagnostics
real(kind=kind_phys) :: fhcyc = 0. !< frequency for surface data cycling (hours)
@@ -3113,7 +3120,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
NAMELIST /gfs_physics_nml/ &
!--- general parameters
- fhzero, ldiag3d, lssav, fhcyc, &
+ fhzero, ldiag3d, qdiag3d, lssav, fhcyc, &
thermodyn_id, sfcpress_id, &
!--- coupling parameters
cplflx, cplwav, cplchm, lsidea, &
@@ -3263,6 +3270,57 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
#endif
Model%fhzero = fhzero
Model%ldiag3d = ldiag3d
+ Model%qdiag3d = qdiag3d
+ Model%flag_for_gwd_generic_tend = .true.
+ Model%flag_for_pbl_generic_tend = .true.
+ Model%flag_for_scnv_generic_tend = .true.
+ Model%flag_for_dcnv_generic_tend = .true.
+
+#ifdef CCPP
+
+ write(0,*) 'GOT HERE (stderr)'
+ print *,'GOT HERE (stdout)'
+
+ if(gwd_opt==1) then
+ write(0,*) 'FLAG: gwd_opt==1 so gwd not generic'
+ Model%flag_for_gwd_generic_tend=.false.
+ else
+ write(0,*) 'NO FLAG: gwd is generic'
+ endif
+
+ if(satmedmf .and. isatmedmf==0) then
+ write(0,*) 'FLAG: satmedmf and isatedmf=0 so pbl not generic'
+ Model%flag_for_pbl_generic_tend=.false.
+ else if(hybedmf) then
+ write(0,*) 'FLAG: hybedmf so pbl not generic'
+ Model%flag_for_pbl_generic_tend=.false.
+ else if(do_mynnedmf) then
+ write(0,*) 'FLAG: do_mynnedmf so pbl not generic'
+ Model%flag_for_pbl_generic_tend=.false.
+ else
+ write(0,*) 'NO FLAG: pbl is generic'
+ endif
+
+ if(imfshalcnv == Model%imfshalcnv_gf) then
+ write(0,*) 'FLAG: imfshalcnv_gf so scnv not generic'
+ Model%flag_for_scnv_generic_tend=.false.
+ ! else if(imfshalcnv == Model%imfshalcnv_samf) then
+ ! write(0,*) 'FLAG: imfshalcnv_samf so scnv not generic'
+ ! Model%flag_for_scnv_generic_tend=.false.
+ else
+ write(0,*) 'NO FLAG: scnv is generic'
+ endif
+
+ if(imfdeepcnv == Model%imfdeepcnv_gf) then
+ write(0,*) 'FLAG: imfdeepcnv_gf so dcnv not generic'
+ Model%flag_for_dcnv_generic_tend=.false.
+ ! else if(imfdeepcnv == Model%imfdeepcnv_samf) then
+ ! write(0,*) 'FLAG: imfdeepcnv_samf so dcnv not generic'
+ ! Model%flag_for_dcnv_generic_tend=.false.
+ else
+ write(0,*) 'NO FLAG: dcnv is generic'
+ endif
+#endif
!
!VAY-ugwp --- set some GW-related switches
!
@@ -4407,6 +4465,7 @@ subroutine control_print(Model)
print *, ' fn_nml : ', trim(Model%fn_nml)
print *, ' fhzero : ', Model%fhzero
print *, ' ldiag3d : ', Model%ldiag3d
+ print *, ' qdiag3d : ', Model%qdiag3d
print *, ' lssav : ', Model%lssav
print *, ' fhcyc : ', Model%fhcyc
print *, ' thermodyn_id : ', Model%thermodyn_id
@@ -5205,10 +5264,16 @@ subroutine diag_create (Diag, IM, Model)
!--- 3D diagnostics
if (Model%ldiag3d) then
- allocate (Diag%du3dt (IM,Model%levs,4))
- allocate (Diag%dv3dt (IM,Model%levs,4))
- allocate (Diag%dt3dt (IM,Model%levs,7))
- allocate (Diag%dq3dt (IM,Model%levs,9))
+ allocate (Diag%du3dt (IM,Model%levs,9))
+ allocate (Diag%dv3dt (IM,Model%levs,9))
+ allocate (Diag%dt3dt (IM,Model%levs,12))
+ if (Model%qdiag3d) then
+ allocate (Diag%dq3dt (IM,Model%levs,12))
+ allocate (Diag%tend_book(IM,Model%levs,12))
+ else
+ allocate (Diag%tend_book(IM,Model%levs,9))
+ endif
+ Diag%tend_book=0
! allocate (Diag%dq3dt (IM,Model%levs,oz_coeff+5))
!--- needed to allocate GoCart coupling fields
! allocate (Diag%upd_mf (IM,Model%levs))
@@ -5513,7 +5578,10 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center)
Diag%du3dt = zero
Diag%dv3dt = zero
Diag%dt3dt = zero
-! Diag%dq3dt = zero
+
+ if (Model%qdiag3d) then
+ Diag%dq3dt = zero
+ endif
! Diag%upd_mf = zero
! Diag%dwn_mf = zero
! Diag%det_mf = zero
diff --git a/gfsphysics/GFS_layer/GFS_typedefs.meta b/gfsphysics/GFS_layer/GFS_typedefs.meta
index 1c3011902..60de65c75 100644
--- a/gfsphysics/GFS_layer/GFS_typedefs.meta
+++ b/gfsphysics/GFS_layer/GFS_typedefs.meta
@@ -1962,6 +1962,36 @@
units = flag
dimensions = ()
type = logical
+[qdiag3d]
+ standard_name = flag_tracer_diagnostics_3D
+ long_name = flag for 3d tracer diagnostic fields
+ units = flag
+ dimensions = ()
+ type = logical
+[flag_for_gwd_generic_tend]
+ standard_name = true_if_GFS_GWD_generic_should_calculate_tendencies
+ long_name = true if GFS_GWD_generic should calculate tendencies
+ units = flag
+ dimensions = ()
+ type = logical
+[flag_for_pbl_generic_tend]
+ standard_name = true_if_GFS_PBL_generic_should_calculate_tendencies
+ long_name = true if GFS_PBL_generic should calculate tendencies
+ units = flag
+ dimensions = ()
+ type = logical
+[flag_for_dcnv_generic_tend]
+ standard_name = true_if_GFS_DCNV_generic_should_calculate_tendencies
+ long_name = true if GFS_DCNV_generic should calculate tendencies
+ units = flag
+ dimensions = ()
+ type = logical
+[flag_for_scnv_generic_tend]
+ standard_name = true_if_GFS_SCNV_generic_should_calculate_tendencies
+ long_name = true if GFS_SCNV_generic should calculate tendencies
+ units = flag
+ dimensions = ()
+ type = logical
[lssav]
standard_name = flag_diagnostics
long_name = logical flag for storing diagnostics
@@ -5400,6 +5430,41 @@
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
+[du3dt(:,:,5)]
+ standard_name = cumulative_change_in_x_wind_due_to_rayleigh_damping
+ long_name = cumulative change in x wind due to Rayleigh damping
+ units = m s-1
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[du3dt(:,:,6)]
+ standard_name = cumulative_change_in_x_wind_due_to_shal_convection
+ long_name = cumulative change in x wind due to shallow convection
+ units = m s-1
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[du3dt(:,:,7)]
+ standard_name = cumulative_change_in_x_wind_from_ccpp
+ long_name = cumulative change in x wind from CCPP
+ units = m s-1
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[du3dt(:,:,8)]
+ standard_name = cumulative_change_in_x_wind_from_model
+ long_name = cumulative change in x wind from model
+ units = m s-1
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[du3dt(:,:,9)]
+ standard_name = cumulative_change_in_x_wind
+ long_name = cumulative change in x wind
+ units = m s-1
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
[dv3dt(:,:,1)]
standard_name = cumulative_change_in_y_wind_due_to_PBL
long_name = cumulative change in y wind due to PBL
@@ -5428,6 +5493,41 @@
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
+[dv3dt(:,:,5)]
+ standard_name = cumulative_change_in_y_wind_due_to_rayleigh_damping
+ long_name = cumulative change in y wind due to Rayleigh damping
+ units = m s-1
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[dv3dt(:,:,6)]
+ standard_name = cumulative_change_in_y_wind_due_to_shal_convection
+ long_name = cumulative change in y wind due to shallow convection
+ units = m s-1
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[dv3dt(:,:,7)]
+ standard_name = cumulative_change_in_y_wind_from_ccpp
+ long_name = cumulative change in y wind from CCPP
+ units = m s-1
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[dv3dt(:,:,8)]
+ standard_name = cumulative_change_in_y_wind_from_model
+ long_name = cumulative change in y wind from model
+ units = m s-1
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[dv3dt(:,:,9)]
+ standard_name = cumulative_change_in_y_wind
+ long_name = cumulative change in y wind
+ units = m s-1
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
[dt3dt(:,:,1)]
standard_name = cumulative_change_in_temperature_due_to_longwave_radiation
long_name = cumulative change in temperature due to longwave radiation
@@ -5477,6 +5577,41 @@
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
+[dt3dt(:,:,8)]
+ standard_name = cumulative_change_in_temperature_due_to_rayleigh_damping
+ long_name = cumulative change in temperature due to Rayleigh damping
+ units = K
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[dt3dt(:,:,9)]
+ standard_name = cumulative_change_in_temperature_due_to_convective_gravity_wave_drag
+ long_name = cumulative change in temperature due to convective gravity wave drag
+ units = K
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[dt3dt(:,:,10)]
+ standard_name = cumulative_change_in_temperature_from_ccpp
+ long_name = cumulative change in temperature from CCPP
+ units = K
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[dt3dt(:,:,11)]
+ standard_name = cumulative_change_in_temperature_from_model
+ long_name = cumulative change in temperature from model
+ units = K
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[dt3dt(:,:,12)]
+ standard_name = cumulative_change_in_temperature
+ long_name = cumulative change in temperature
+ units = K
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
[dq3dt(:,:,1)]
standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL
long_name = cumulative change in water vapor specific humidity due to PBL
@@ -5540,6 +5675,111 @@
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
+[dq3dt(:,:,10)]
+ standard_name = cumulative_change_in_water_vapor_specific_humidity_from_CCPP
+ long_name = cumulative change in water vapor specific humidity from CCPP
+ units = kg kg-1
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[dq3dt(:,:,11)]
+ standard_name = cumulative_change_in_water_vapor_specific_humidity_from_model
+ long_name = cumulative change in water vapor specific humidity from model
+ units = kg kg-1
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[dq3dt(:,:,12)]
+ standard_name = cumulative_change_in_water_vapor_specific_humidity
+ long_name = cumulative change in water vapor specific humidity
+ units = kg kg-1
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[tend_book(:,:,1)]
+ standard_name = temperature_at_start_of_ccpp
+ long_name = temperature at start of ccpp
+ units = K
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[tend_book(:,:,2)]
+ standard_name = temperature_at_end_of_ccpp
+ long_name = temperature at end of ccpp
+ units = K
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[tend_book(:,:,3)]
+ standard_name = temperature_at_total_check_point
+ long_name = temperature when model total is calculated in ccpp
+ units = K
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[tend_book(:,:,4)]
+ standard_name = x_wind_at_start_of_ccpp
+ long_name = x wind at start of ccpp
+ units = K
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[tend_book(:,:,5)]
+ standard_name = x_wind_at_end_of_ccpp
+ long_name = x wind at end of ccpp
+ units = K
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[tend_book(:,:,6)]
+ standard_name = x_wind_at_total_check_point
+ long_name = x when model total is calculated in ccpp
+ units = K
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[tend_book(:,:,7)]
+ standard_name = y_wind_at_start_of_ccpp
+ long_name = y wind at start of ccpp
+ units = K
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[tend_book(:,:,8)]
+ standard_name = y_wind_at_end_of_ccpp
+ long_name = y wind at start of ccpp
+ units = K
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[tend_book(:,:,9)]
+ standard_name = y_wind_at_total_check_point
+ long_name = y when model total is calculated in ccpp
+ units = K
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[tend_book(:,:,10)]
+ standard_name = water_vapor_specific_humidity_at_start_of_ccpp
+ long_name = water vapor specific humidity at start of ccpp
+ units = K
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[tend_book(:,:,11)]
+ standard_name = water_vapor_specific_humidity_at_end_of_ccpp
+ long_name = water vapor specific humidity at end of ccpp
+ units = K
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[tend_book(:,:,12)]
+ standard_name = water_vapor_specific_humidity_at_total_check_point
+ long_name = water vapor specific humidity when model total is calculated in ccpp
+ units = K
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
[refdmax]
standard_name = maximum_reflectivity_at_1km_agl_over_maximum_hourly_time_interval
long_name = maximum reflectivity at 1km agl over maximum hourly time interval
@@ -7632,6 +7872,13 @@
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
+[save_q(:,:,index_for_ozone)]
+ standard_name = ozone_mixing_ratio_save
+ long_name = ozone mixing ratio before entering a physics scheme
+ units = kg kg-1
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
[save_q(:,:,index_for_liquid_cloud_condensate)]
standard_name = cloud_condensed_water_mixing_ratio_save
long_name = moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) before entering a physics scheme