Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
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
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
branch = master
[submodule "ccpp/physics"]
path = ccpp/physics
url = https://github.com/NCAR/ccpp-physics
branch = master
url = https://github.com/hafs-community/ccpp-physics
branch = feature/dkudiagnostic
17 changes: 13 additions & 4 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1562,6 +1562,11 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: cldfra (:,:) => null() !< instantaneous 3D cloud fraction
!--- MP quantities for 3D diagnositics
real (kind=kind_phys), pointer :: refl_10cm(:,:) => null() !< instantaneous refl_10cm

!--- Extra PBL diagnostics
real (kind=kind_phys), pointer :: dkt(:,:) => null() !< Eddy diffusitivity for heat
real (kind=kind_phys), pointer :: dku(:,:) => null() !< Eddy diffusitivity for momentum

!
!---vay-2018 UGWP-diagnostics instantaneous
!
Expand Down Expand Up @@ -1755,7 +1760,6 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: del(:,:) => null() !<
real (kind=kind_phys), pointer :: del_gz(:,:) => null() !<
real (kind=kind_phys), pointer :: delr(:,:) => null() !<
real (kind=kind_phys), pointer :: dkt(:,:) => null() !<
real (kind=kind_phys), pointer :: dlength(:) => null() !<
real (kind=kind_phys), pointer :: dqdt(:,:,:) => null() !<
real (kind=kind_phys), pointer :: dqsdt2(:) => null() !<
Expand Down Expand Up @@ -5800,6 +5804,10 @@ subroutine diag_create (Diag, IM, Model)
!--- 3D diagnostics for Thompson MP / GFDL MP
allocate (Diag%refl_10cm(IM,Model%levs))

!--- New PBL Diagnostics
allocate (Diag%dkt(IM,Model%levs-1))
allocate (Diag%dku(IM,Model%levs-1))

!-- New max hourly diag.
allocate (Diag%refdmax(IM))
allocate (Diag%refdmax263k(IM))
Expand Down Expand Up @@ -6096,6 +6104,10 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center)
!
!-----------------------------

! Extra PBL diagnostics
Diag%dkt = zero
Diag%dku = zero

! max hourly diagnostics
Diag%refl_10cm = zero
Diag%refdmax = -35.
Expand Down Expand Up @@ -6281,7 +6293,6 @@ subroutine interstitial_create (Interstitial, IM, Model)
allocate (Interstitial%del (IM,Model%levs))
allocate (Interstitial%del_gz (IM,Model%levs+1))
allocate (Interstitial%delr (IM,Model%levr+LTP))
allocate (Interstitial%dkt (IM,Model%levs-1))
allocate (Interstitial%dlength (IM))
allocate (Interstitial%dqdt (IM,Model%levs,Model%ntrac))
allocate (Interstitial%dqsfc1 (IM))
Expand Down Expand Up @@ -6971,7 +6982,6 @@ subroutine interstitial_phys_reset (Interstitial, Model)
Interstitial%dd_mf = clear_val
Interstitial%del = clear_val
Interstitial%del_gz = clear_val
Interstitial%dkt = clear_val
Interstitial%dlength = clear_val
Interstitial%dqdt = clear_val
Interstitial%dqsfc1 = clear_val
Expand Down Expand Up @@ -7321,7 +7331,6 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno)
write (0,*) 'sum(Interstitial%del ) = ', sum(Interstitial%del )
write (0,*) 'sum(Interstitial%del_gz ) = ', sum(Interstitial%del_gz )
write (0,*) 'sum(Interstitial%delr ) = ', sum(Interstitial%delr )
write (0,*) 'sum(Interstitial%dkt ) = ', sum(Interstitial%dkt )
write (0,*) 'sum(Interstitial%dlength ) = ', sum(Interstitial%dlength )
write (0,*) 'sum(Interstitial%dqdt ) = ', sum(Interstitial%dqdt )
write (0,*) 'sum(Interstitial%dqsfc1 ) = ', sum(Interstitial%dqsfc1 )
Expand Down
21 changes: 14 additions & 7 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -6938,6 +6938,20 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
[dkt]
standard_name = atmosphere_heat_diffusivity
long_name = diffusivity for heat
Comment thread
BinLiu-NOAA marked this conversation as resolved.
units = m2 s-1
dimensions = (horizontal_loop_extent,vertical_dimension_minus_one)
type = real
kind = kind_phys
[dku]
standard_name = atmosphere_momentum_diffusivity
long_name = diffusivity for momentum
units = m2 s-1
dimensions = (horizontal_loop_extent,vertical_dimension_minus_one)
type = real
kind = kind_phys
[cldfra]
standard_name = instantaneous_3d_cloud_fraction
long_name = instantaneous 3D cloud fraction for all MPs
Expand Down Expand Up @@ -7994,13 +8008,6 @@
dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation)
type = real
kind = kind_phys
[dkt]
standard_name = atmosphere_heat_diffusivity
long_name = diffusivity for heat
units = m2 s-1
dimensions = (horizontal_loop_extent,vertical_dimension_minus_one)
type = real
kind = kind_phys
[dlength]
standard_name = characteristic_grid_length_scale
long_name = representative horizontal length scale of grid box
Expand Down
22 changes: 22 additions & 0 deletions ccpp/driver/GFS_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1933,6 +1933,28 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%refl_10cm(:,:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 3
ExtDiag(idx)%name = 'dkt'
ExtDiag(idx)%desc = 'Eddy diffusivity for heat'
ExtDiag(idx)%unit = 'm2s-1'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dkt(:,:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 3
ExtDiag(idx)%name = 'dku'
ExtDiag(idx)%desc = 'Eddy diffusivity for momentum'
ExtDiag(idx)%unit = 'm2s-1'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dku(:,:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 3
ExtDiag(idx)%name = 'cldfra'
Expand Down