Skip to content

Commit

Permalink
Diagnostic 3D instantaneous cloud fractions added (#154)
Browse files Browse the repository at this point in the history
* Diagnostic 3D instantaneous cloud fractions added.
* Bug fix for reflectivity in restart files.
* Update to GFS_restart.F90 to include if block to test for reflectivity flag.
  • Loading branch information
ericaligo-NOAA authored Aug 20, 2020
1 parent 0e83a92 commit 5dbea25
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 6 deletions.
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/NCAR/ccpp-physics.git
branch = master
2 changes: 1 addition & 1 deletion ccpp/physics
11 changes: 11 additions & 0 deletions gfsphysics/GFS_layer/GFS_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1937,6 +1937,17 @@ 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 = 'cldfra'
ExtDiag(idx)%desc = 'Instantaneous 3D Cloud Fraction'
ExtDiag(idx)%unit = 'frac'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%cldfra(:,:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 3
ExtDiag(idx)%name = 'cnvw'
Expand Down
7 changes: 5 additions & 2 deletions gfsphysics/GFS_layer/GFS_restart.F90
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,12 @@ subroutine GFS_restart_populate (Restart, Model, Statein, Stateout, Sfcprop, &
enddo
endif
#ifdef CCPP
if (Model%lrefres) then
num = Model%ntot3d+1
else
num = Model%ntot3d
endif
!--- RAP/HRRR-specific variables, 3D
num = Model%ntot3d

! GF
if (Model%imfdeepcnv == Model%imfdeepcnv_gf) then
num = num + 1
Expand Down
12 changes: 11 additions & 1 deletion gfsphysics/GFS_layer/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1551,7 +1551,9 @@ module GFS_typedefs
#ifdef CCPP
real (kind=kind_phys), pointer :: TRAIN (:,:) => null() !< accumulated stratiform T tendency (K s-1)
#endif

#ifdef CCPP
real (kind=kind_phys), pointer :: cldfra (:,:) => null() !< instantaneous 3D cloud fraction
#endif
!--- MP quantities for 3D diagnositics
real (kind=kind_phys), pointer :: refl_10cm(:,:) => null() !< instantaneous refl_10cm
!
Expand Down Expand Up @@ -5613,6 +5615,10 @@ subroutine diag_create (Diag, IM, Model)
end if
#endif

#ifdef CCPP
allocate (Diag%cldfra (IM,Model%levs))
#endif

allocate (Diag%ca_deep (IM))
allocate (Diag%ca_turb (IM))
allocate (Diag%ca_shal (IM))
Expand Down Expand Up @@ -5930,6 +5936,10 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center)
Diag%TRAIN = zero
end if
#endif
#ifdef CCPP
Diag%cldfra = zero
#endif

Diag%totprcpb = zero
Diag%cnvprcpb = zero
Diag%toticeb = zero
Expand Down
7 changes: 7 additions & 0 deletions gfsphysics/GFS_layer/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -6030,6 +6030,13 @@
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
[cldfra]
standard_name = instantaneous_3d_cloud_fraction
long_name = instantaneous 3D cloud fraction for all MPs
units = frac
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
[ndust]
standard_name = number_of_dust_bins_for_diagnostics
long_name = number of dust bins for diagnostics
Expand Down

0 comments on commit 5dbea25

Please sign in to comment.