diff --git a/atmos_model.F90 b/atmos_model.F90
index e8cc8b832..d32077bed 100644
--- a/atmos_model.F90
+++ b/atmos_model.F90
@@ -331,6 +331,28 @@ subroutine update_atmos_radiation_physics (Atmos)
! print *,'in atmos_model, after assign_importdata, rc=',rc
endif
+ ! Calculate total non-physics tendencies by substracting old IPD Stateout
+ ! variables from new/updated IPD Statein variables (gives the tendencies
+ ! due to anything else than physics)
+ if (IPD_Control%ldiag3d) then
+ do nb = 1,Atm_block%nblks
+ IPD_Data(nb)%Intdiag%du3dt(:,:,8) = IPD_Data(nb)%Intdiag%du3dt(:,:,8) &
+ + (IPD_Data(nb)%Statein%ugrs - IPD_Data(nb)%Stateout%gu0)
+ IPD_Data(nb)%Intdiag%dv3dt(:,:,8) = IPD_Data(nb)%Intdiag%dv3dt(:,:,8) &
+ + (IPD_Data(nb)%Statein%vgrs - IPD_Data(nb)%Stateout%gv0)
+ IPD_Data(nb)%Intdiag%dt3dt(:,:,11) = IPD_Data(nb)%Intdiag%dt3dt(:,:,11) &
+ + (IPD_Data(nb)%Statein%tgrs - IPD_Data(nb)%Stateout%gt0)
+ enddo
+ if (IPD_Control%qdiag3d) then
+ do nb = 1,Atm_block%nblks
+ IPD_Data(nb)%Intdiag%dq3dt(:,:,12) = IPD_Data(nb)%Intdiag%dq3dt(:,:,12) &
+ + (IPD_Data(nb)%Statein%qgrs(:,:,IPD_Control%ntqv) - IPD_Data(nb)%Stateout%gq0(:,:,IPD_Control%ntqv))
+ IPD_Data(nb)%Intdiag%dq3dt(:,:,13) = IPD_Data(nb)%Intdiag%dq3dt(:,:,13) &
+ + (IPD_Data(nb)%Statein%qgrs(:,:,IPD_Control%ntoz) - IPD_Data(nb)%Stateout%gq0(:,:,IPD_Control%ntoz))
+ enddo
+ endif
+ endif
+
call mpp_clock_end(setupClock)
if (mpp_pe() == mpp_root_pe() .and. debug) write(6,*) "radiation driver"
@@ -461,7 +483,7 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
integer :: bdat(8), cdat(8)
integer :: ntracers, maxhf, maxh
character(len=32), allocatable, target :: tracer_names(:)
- integer :: nthrds
+ integer :: nthrds, nb
!-----------------------------------------------------------------------
@@ -678,10 +700,22 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
call FV3GFS_restart_read (IPD_Data, IPD_Restart, Atm_block, IPD_Control, Atmos%domain)
#endif
-#ifdef CCPP
! Populate the IPD_Data%Statein container with the prognostic state
! in Atm_block, which contains the initial conditions/restart data.
call atmos_phys_driver_statein (IPD_data, Atm_block, flip_vc)
+
+ ! When asked to calculate 3-dim. tendencies, set Stateout variables to
+ ! Statein variables here in order to capture the first call to dycore
+ if (IPD_Control%ldiag3d) then
+ do nb = 1,Atm_block%nblks
+ IPD_Data(nb)%Stateout%gu0 = IPD_Data(nb)%Statein%ugrs
+ IPD_Data(nb)%Stateout%gv0 = IPD_Data(nb)%Statein%vgrs
+ IPD_Data(nb)%Stateout%gt0 = IPD_Data(nb)%Statein%tgrs
+ IPD_Data(nb)%Stateout%gq0 = IPD_Data(nb)%Statein%qgrs
+ enddo
+ endif
+
+#ifdef CCPP
! Initialize the CCPP framework
call CCPP_step (step="init", nblks=Atm_block%nblks, ierr=ierr)
if (ierr/=0) call mpp_error(FATAL, 'Call to CCPP init step failed')
diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py
index 46d6872d9..c3402bcdd 100755
--- a/ccpp/config/ccpp_prebuild_config.py
+++ b/ccpp/config/ccpp_prebuild_config.py
@@ -217,6 +217,7 @@
'FV3/ccpp/physics/physics/ozphys.f' : [ 'slow_physics' ],
'FV3/ccpp/physics/physics/ozphys_2015.f' : [ 'slow_physics' ],
'FV3/ccpp/physics/physics/precpd.f' : [ 'slow_physics' ],
+ 'FV3/ccpp/physics/physics/phys_tend.F90' : [ 'slow_physics' ],
'FV3/ccpp/physics/physics/radlw_main.f' : [ 'slow_physics' ],
'FV3/ccpp/physics/physics/radsw_main.f' : [ 'slow_physics' ],
'FV3/ccpp/physics/physics/rayleigh_damp.f' : [ 'slow_physics' ],
diff --git a/ccpp/physics b/ccpp/physics
index fadc3cd23..314c5f59c 160000
--- a/ccpp/physics
+++ b/ccpp/physics
@@ -1 +1 @@
-Subproject commit fadc3cd2359eac5ed874a7776724098f9445704d
+Subproject commit 314c5f59c81a194e68724d5202c25cd8bf17d1e4
diff --git a/ccpp/suites/suite_FV3_GFS_v15_mynn.xml b/ccpp/suites/suite_FV3_GFS_v15_mynn.xml
index 5ee55cda7..02f64bb0c 100644
--- a/ccpp/suites/suite_FV3_GFS_v15_mynn.xml
+++ b/ccpp/suites/suite_FV3_GFS_v15_mynn.xml
@@ -25,7 +25,7 @@
rrtmg_sw_post
rrtmg_lw_pre
rrtmg_lw
- sgscloud_radpre
+ sgscloud_radpost
rrtmg_lw_post
GFS_rrtmg_post
diff --git a/ccpp/suites/suite_FV3_GFS_v15_thompson_mynn.xml b/ccpp/suites/suite_FV3_GFS_v15_thompson_mynn.xml
index de709d38a..8feae747b 100644
--- a/ccpp/suites/suite_FV3_GFS_v15_thompson_mynn.xml
+++ b/ccpp/suites/suite_FV3_GFS_v15_thompson_mynn.xml
@@ -20,7 +20,7 @@
rrtmg_sw_post
rrtmg_lw_pre
rrtmg_lw
- sgscloud_radpre
+ sgscloud_radpost
rrtmg_lw_post
GFS_rrtmg_post
diff --git a/ccpp/suites/suite_FV3_GFS_v15p2.xml b/ccpp/suites/suite_FV3_GFS_v15p2.xml
index 1ab234105..96c430e06 100644
--- a/ccpp/suites/suite_FV3_GFS_v15p2.xml
+++ b/ccpp/suites/suite_FV3_GFS_v15p2.xml
@@ -88,6 +88,7 @@
GFS_stochastics
+ phys_tend
diff --git a/ccpp/suites/suite_FV3_GFS_v16beta.xml b/ccpp/suites/suite_FV3_GFS_v16beta.xml
index 8571ec1b4..62e78afe9 100644
--- a/ccpp/suites/suite_FV3_GFS_v16beta.xml
+++ b/ccpp/suites/suite_FV3_GFS_v16beta.xml
@@ -88,6 +88,7 @@
GFS_stochastics
+ phys_tend
diff --git a/ccpp/suites/suite_FV3_GSD_SAR.xml b/ccpp/suites/suite_FV3_GSD_SAR.xml
index e4d619abb..e20104229 100644
--- a/ccpp/suites/suite_FV3_GSD_SAR.xml
+++ b/ccpp/suites/suite_FV3_GSD_SAR.xml
@@ -20,7 +20,7 @@
rrtmg_sw_post
rrtmg_lw_pre
rrtmg_lw
- sgscloud_radpre
+ sgscloud_radpost
rrtmg_lw_post
GFS_rrtmg_post
diff --git a/ccpp/suites/suite_FV3_GSD_v0.xml b/ccpp/suites/suite_FV3_GSD_v0.xml
index fb7805b24..4dc4bd213 100644
--- a/ccpp/suites/suite_FV3_GSD_v0.xml
+++ b/ccpp/suites/suite_FV3_GSD_v0.xml
@@ -20,7 +20,7 @@
rrtmg_sw_post
rrtmg_lw_pre
rrtmg_lw
- sgscloud_radpre
+ sgscloud_radpost
rrtmg_lw_post
GFS_rrtmg_post
@@ -88,6 +88,7 @@
GFS_stochastics
+ phys_tend
diff --git a/ccpp/suites/suite_FV3_GSD_v0_drag_suite.xml b/ccpp/suites/suite_FV3_GSD_v0_drag_suite.xml
index 26cff57a6..22e354a1a 100644
--- a/ccpp/suites/suite_FV3_GSD_v0_drag_suite.xml
+++ b/ccpp/suites/suite_FV3_GSD_v0_drag_suite.xml
@@ -20,7 +20,7 @@
rrtmg_sw_post
rrtmg_lw_pre
rrtmg_lw
- sgscloud_radpre
+ sgscloud_radpost
rrtmg_lw_post
GFS_rrtmg_post
diff --git a/gfsphysics/GFS_layer/GFS_diagnostics.F90 b/gfsphysics/GFS_layer/GFS_diagnostics.F90
index 25657f760..9733b8b32 100644
--- a/gfsphysics/GFS_layer/GFS_diagnostics.F90
+++ b/gfsphysics/GFS_layer/GFS_diagnostics.F90
@@ -2230,173 +2230,454 @@ 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
- idx = idx + 1
- ExtDiag(idx)%axes = 3
- ExtDiag(idx)%name = 'dt3dt_lw'
- ExtDiag(idx)%desc = 'temperature change due to long wave radiation'
- 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(:,:,1)
- enddo
+!--- 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'
+ ExtDiag(idx)%desc = 'cumulative change in temperature due to long wave radiation'
+ 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(:,:,1)
+ enddo
- idx = idx + 1
- ExtDiag(idx)%axes = 3
- ExtDiag(idx)%name = 'dt3dt_sw'
- ExtDiag(idx)%desc = 'temperature change due to short wave radiation'
- 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(:,:,2)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dt3dt_sw'
+ ExtDiag(idx)%desc = 'cumulative change in temperature due to short wave radiation'
+ 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(:,:,2)
+ enddo
- idx = idx + 1
- ExtDiag(idx)%axes = 3
- ExtDiag(idx)%name = 'dt3dt_pbl'
- ExtDiag(idx)%desc = 'temperature change due to pbl'
- 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(:,:,3)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dt3dt_pbl'
+ ExtDiag(idx)%desc = 'cumulative change in temperature due to PBL'
+ 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(:,:,3)
+ enddo
- idx = idx + 1
- ExtDiag(idx)%axes = 3
- ExtDiag(idx)%name = 'dt3dt_deepcnv'
- ExtDiag(idx)%desc = 'temperature change due to deep convection'
- 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(:,:,4)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dt3dt_deepcnv'
+ ExtDiag(idx)%desc = 'cumulative change in temperature due to deep convection'
+ 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(:,:,4)
+ enddo
- idx = idx + 1
- ExtDiag(idx)%axes = 3
- ExtDiag(idx)%name = 'dt3dt_shlwcnv'
- ExtDiag(idx)%desc = 'temperature change due to shallow convection'
- 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(:,:,5)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dt3dt_shalcnv'
+ ExtDiag(idx)%desc = 'cumulative change in temperature due to shallow convection'
+ 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(:,:,5)
+ enddo
- idx = idx + 1
- ExtDiag(idx)%axes = 3
- ExtDiag(idx)%name = 'dt3dt_microphy'
- ExtDiag(idx)%desc = 'temperature change due to micro-physics'
- 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(:,:,6)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dt3dt_mp'
+ ExtDiag(idx)%desc = 'cumulative change in temperature due to microphysics'
+ 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(:,:,6)
+ enddo
- idx = idx + 1
- ExtDiag(idx)%axes = 3
- ExtDiag(idx)%name = 'dt3dt_orogwd'
- ExtDiag(idx)%desc = 'temperature change due to orographic gravity wave drag'
- 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(:,:,7)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dt3dt_orogwd'
+ ExtDiag(idx)%desc = 'cumulative change in temperature due to orographic gravity wave drag'
+ 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(:,:,7)
+ 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)%mod_name = 'gfs_phys'
- allocate (ExtDiag(idx)%data(nblks))
- do nb = 1,nblks
- ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%du3dt(:,:,1)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dt3dt_rdamp'
+ ExtDiag(idx)%desc = 'cumulative change in temperature 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 = 'dv3dt_pbl'
- ExtDiag(idx)%desc = 'v momentum change due to PBL'
- 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(:,:,1)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dt3dt_cnvgwd'
+ ExtDiag(idx)%desc = 'cumulative change in temperature due to convective gravity wave drag'
+ 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(:,:,9)
+ enddo
- idx = idx + 1
- 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)%mod_name = 'gfs_phys'
- allocate (ExtDiag(idx)%data(nblks))
- do nb = 1,nblks
- ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%du3dt(:,:,2)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dt3dt_phys'
+ ExtDiag(idx)%desc = 'cumulative change in temperature due to physics'
+ 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 = 'dv3dt_orogwd'
- ExtDiag(idx)%desc = 'v momentum change due to orographic gravity wave drag'
- 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(:,:,2)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dt3dt_nophys'
+ ExtDiag(idx)%desc = 'cumulative change in temperature due to non-physics processes'
+ 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 = 'du3dt_deepcnv'
- ExtDiag(idx)%desc = 'u momentum change due to deep convection'
- 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(:,:,3)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'du3dt_pbl'
+ ExtDiag(idx)%desc = 'cumulative change in u momentum due to PBL'
+ 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(:,:,1)
+ enddo
- idx = idx + 1
- ExtDiag(idx)%axes = 3
- ExtDiag(idx)%name = 'dv3dt_deepcnv'
- ExtDiag(idx)%desc = 'v momentum change due to deep convection'
- 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(:,:,3)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dv3dt_pbl'
+ ExtDiag(idx)%desc = 'cumulative change in v momentum due to PBL'
+ 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(:,:,1)
+ enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'du3dt_orogwd'
+ ExtDiag(idx)%desc = 'cumulative change in u momentum due to orographic gravity wave drag'
+ 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(:,:,2)
+ enddo
- idx = idx + 1
- ExtDiag(idx)%axes = 3
- ExtDiag(idx)%name = 'du3dt_cnvgwd'
- ExtDiag(idx)%desc = 'u momentum change due to convective gravity wave drag'
- 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(:,:,4)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dv3dt_orogwd'
+ ExtDiag(idx)%desc = 'cumulative change in v momentum due to orographic gravity wave drag'
+ 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(:,:,2)
+ enddo
- idx = idx + 1
- ExtDiag(idx)%axes = 3
- ExtDiag(idx)%name = 'dv3dt_cnvgwd'
- ExtDiag(idx)%desc = 'v momentum change due to convective gravity wave drag'
- 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(:,:,4)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'du3dt_deepcnv'
+ ExtDiag(idx)%desc = 'cumulative change in u momentum due to deep convection'
+ 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(:,:,3)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dv3dt_deepcnv'
+ ExtDiag(idx)%desc = 'cumulative change in v momentum due to deep convection'
+ 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(:,:,3)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'du3dt_cnvgwd'
+ ExtDiag(idx)%desc = 'cumulative change in u momentum due to convective gravity wave drag'
+ 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(:,:,4)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dv3dt_cnvgwd'
+ ExtDiag(idx)%desc = 'cumulative change in v momentum due to convective gravity wave drag'
+ 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(:,:,4)
+ enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'du3dt_rdamp'
+ ExtDiag(idx)%desc = 'cumulative change in u momentum 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 = 'cumulative change in v momentum 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_shalcnv'
+ ExtDiag(idx)%desc = 'cumulative change in u momentum due to shallow convection'
+ 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_shalcnv'
+ ExtDiag(idx)%desc = 'cumulative change in v momentum due to shallow convection'
+ 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_phys'
+ ExtDiag(idx)%desc = 'cumulative change in u momentum due to physics'
+ 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_phys'
+ ExtDiag(idx)%desc = 'cumulative change in v momentum due to physics'
+ 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_nophys'
+ ExtDiag(idx)%desc = 'cumulative change in u momentum due to non-physics processes'
+ 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_nophys'
+ ExtDiag(idx)%desc = 'cumulative change in v momentum due to non-physics processes'
+ 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
+
+#ifdef CCPP
+ if_qdiag3d: if(Model%qdiag3d) then
+ 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 convection'
+ 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_shalcnv'
+ ExtDiag(idx)%desc = 'cumulative change in water vapor specific humidity due to shallow convection'
+ 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_mp'
+ 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
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'dq3dt_phys'
+ ExtDiag(idx)%desc = 'cumulative change in water vapor specific humidity due to physics'
+ 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_o3phys'
+ ExtDiag(idx)%desc = 'cumulative change in ozone concentration due to physics'
+ 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_nophys'
+ ExtDiag(idx)%desc = 'cumulative change in water vapor specific humidity due to non-physics processes'
+ 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_o3nophys'
+ ExtDiag(idx)%desc = 'cumulative change in ozone concentration due to non-physics processes'
+ 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(:,:,13)
+ enddo
+
+#endif
+ end if if_ldiag3d
!rab
!rab do num = 1,5+Mdl_parms%pl_coeff
diff --git a/gfsphysics/GFS_layer/GFS_typedefs.F90 b/gfsphysics/GFS_layer/GFS_typedefs.F90
index db70dd030..dc83c03af 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
@@ -991,9 +996,9 @@ module GFS_typedefs
integer :: ntrac !< number of tracers
#ifdef CCPP
integer :: ntracp1 !< number of tracers plus one
- integer :: ntqv !< tracer index for water vapor (specific humidity)
integer :: nqrimef !< tracer index for mass weighted rime factor
#endif
+ integer :: ntqv !< tracer index for water vapor (specific humidity)
integer :: ntoz !< tracer index for ozone mixing ratio
integer :: ntcw !< tracer index for cloud condensate (or liquid water)
integer :: ntiw !< tracer index for ice water
@@ -2732,6 +2737,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 +3119,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 +3269,58 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
#endif
Model%fhzero = fhzero
Model%ldiag3d = ldiag3d
+ Model%qdiag3d = qdiag3d
+ if (Model%qdiag3d .and. .not. Model%ldiag3d) then
+ write(0,*) 'Logic error in GFS_typedefs.F90: qdiag3d requires ldiag3d'
+ stop
+ endif
+ 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
+
+ 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
!
@@ -3697,9 +3755,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
#endif
allocate (Model%tracer_names(Model%ntrac))
Model%tracer_names(:) = tracer_names(:)
-#ifdef CCPP
Model%ntqv = 1
-#endif
#ifdef MULTI_GASES
Model%nto = get_tracer_index(Model%tracer_names, 'spfo', Model%me, Model%master, Model%debug)
Model%nto2 = get_tracer_index(Model%tracer_names, 'spfo2', Model%me, Model%master, Model%debug)
@@ -4407,6 +4463,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
@@ -4684,9 +4741,9 @@ subroutine control_print(Model)
print *, ' tracer_names : ', Model%tracer_names
print *, ' ntrac : ', Model%ntrac
#ifdef CCPP
- print *, ' ntqv : ', Model%ntqv
print *, ' nqrimef : ', Model%nqrimef
#endif
+ print *, ' ntqv : ', Model%ntqv
print *, ' ntoz : ', Model%ntoz
print *, ' ntcw : ', Model%ntcw
print *, ' ntiw : ', Model%ntiw
@@ -5205,10 +5262,12 @@ 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,8))
+ allocate (Diag%dv3dt (IM,Model%levs,8))
+ allocate (Diag%dt3dt (IM,Model%levs,11))
+ if (Model%qdiag3d) then
+ allocate (Diag%dq3dt (IM,Model%levs,13))
+ endif
! allocate (Diag%dq3dt (IM,Model%levs,oz_coeff+5))
!--- needed to allocate GoCart coupling fields
! allocate (Diag%upd_mf (IM,Model%levs))
@@ -5513,7 +5572,9 @@ 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..4ebf4633b 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 = flag_for_generic_gravity_wave_drag_tendency
+ long_name = true if GFS_GWD_generic should calculate tendencies
+ units = flag
+ dimensions = ()
+ type = logical
+[flag_for_pbl_generic_tend]
+ standard_name = flag_for_generic_planetary_boundary_layer_tendency
+ long_name = true if GFS_PBL_generic should calculate tendencies
+ units = flag
+ dimensions = ()
+ type = logical
+[flag_for_dcnv_generic_tend]
+ standard_name = flag_for_generic_deep_convection_tendency
+ long_name = true if GFS_DCNV_generic should calculate tendencies
+ units = flag
+ dimensions = ()
+ type = logical
+[flag_for_scnv_generic_tend]
+ standard_name = flag_for_generic_shallow_convection_tendency
+ 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,34 @@
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_shallow_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_due_to_physics
+ long_name = cumulative change in x wind due to physics
+ units = m s-1
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[du3dt(:,:,8)]
+ standard_name = cumulative_change_in_x_wind_due_to_non_physics_processes
+ long_name = cumulative change in x wind due to non-physics processes
+ 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 +5486,34 @@
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_shallow_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_due_to_physics
+ long_name = cumulative change in y wind due to physics
+ units = m s-1
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[dv3dt(:,:,8)]
+ standard_name = cumulative_change_in_y_wind_due_to_non_physics_processes
+ long_name = cumulative change in y wind due to non-physics processes
+ 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
@@ -5457,7 +5543,7 @@
type = real
kind = kind_phys
[dt3dt(:,:,5)]
- standard_name = cumulative_change_in_temperature_due_to_shal_convection
+ standard_name = cumulative_change_in_temperature_due_to_shallow_convection
long_name = cumulative change in temperature due to shallow convection
units = K
dimensions = (horizontal_dimension,vertical_dimension)
@@ -5477,6 +5563,34 @@
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_due_to_physics
+ long_name = cumulative change in temperature due to physics
+ units = K
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[dt3dt(:,:,11)]
+ standard_name = cumulative_change_in_temperature_due_to_non_physics_processes
+ long_name = cumulative change in temperature due to non-physics processed
+ 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
@@ -5492,7 +5606,7 @@
type = real
kind = kind_phys
[dq3dt(:,:,3)]
- standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_shal_convection
+ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_shallow_convection
long_name = cumulative change in water vapor specific humidity due to shallow convection
units = kg kg-1
dimensions = (horizontal_dimension,vertical_dimension)
@@ -5540,6 +5654,34 @@
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
+[dq3dt(:,:,10)]
+ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_physics
+ long_name = cumulative change in water vapor specific humidity due to physics
+ units = kg kg-1
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[dq3dt(:,:,11)]
+ standard_name = cumulative_change_in_ozone_concentration_due_to_physics
+ long_name = cumulative change in ozone concentration due to physics
+ 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_due_to_non_physics_processes
+ long_name = cumulative change in water vapor specific humidity due to non-physics processes
+ units = kg kg-1
+ dimensions = (horizontal_dimension,vertical_dimension)
+ type = real
+ kind = kind_phys
+[dq3dt(:,:,13)]
+ standard_name = cumulative_change_in_ozone_concentration_due_to_non_physics_processes
+ long_name = cumulative change in ozone_concentration due to non-physics processes
+ units = kg kg-1
+ 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 +7774,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