Skip to content

Commit

Permalink
Merge pull request NCAR#3 from HelinWei-NOAA/additional_land_output
Browse files Browse the repository at this point in the history
modification to add extra land fields to the output
  • Loading branch information
HelinWei-NOAA authored Sep 5, 2021
2 parents 2fe2998 + 9b4f1f0 commit c207c64
Show file tree
Hide file tree
Showing 3 changed files with 182 additions and 0 deletions.
34 changes: 34 additions & 0 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1538,6 +1538,7 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: evbsa (:) => null() !< noah lsm diagnostics
real (kind=kind_phys), pointer :: evcwa (:) => null() !< noah lsm diagnostics
real (kind=kind_phys), pointer :: snohfa (:) => null() !< noah lsm diagnostics
real (kind=kind_phys), pointer :: paha (:) => null() !< noah lsm diagnostics
real (kind=kind_phys), pointer :: transa (:) => null() !< noah lsm diagnostics
real (kind=kind_phys), pointer :: sbsnoa (:) => null() !< noah lsm diagnostics
real (kind=kind_phys), pointer :: snowca (:) => null() !< noah lsm diagnostics
Expand All @@ -1556,6 +1557,10 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: suntim (:) => null() !< sunshine duration time (s)
real (kind=kind_phys), pointer :: runoff (:) => null() !< total water runoff
real (kind=kind_phys), pointer :: ep (:) => null() !< potential evaporation
real (kind=kind_phys), pointer :: tecan (:) => null() !< total evaporation of intercepted water
real (kind=kind_phys), pointer :: tetran (:) => null() !< total transpiration rate
real (kind=kind_phys), pointer :: tedir (:) => null() !< total soil surface evaporation rate
real (kind=kind_phys), pointer :: twa (:) => null() !< total water storage in aquifer
real (kind=kind_phys), pointer :: cldwrk (:) => null() !< cloud workfunction (valid only with sas)
real (kind=kind_phys), pointer :: dugwd (:) => null() !< vertically integrated u change by OGWD
real (kind=kind_phys), pointer :: dvgwd (:) => null() !< vertically integrated v change by OGWD
Expand Down Expand Up @@ -1622,6 +1627,7 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: dtsfci (:) => null() !< instantaneous sfc sensible heat flux
real (kind=kind_phys), pointer :: dqsfci (:) => null() !< instantaneous sfc latent heat flux
real (kind=kind_phys), pointer :: gfluxi (:) => null() !< instantaneous sfc ground heat flux
real (kind=kind_phys), pointer :: pahi (:) => null() !< instantaneous precipitation advected heat flux
real (kind=kind_phys), pointer :: epi (:) => null() !< instantaneous sfc potential evaporation
real (kind=kind_phys), pointer :: smcwlt2(:) => null() !< wilting point (volumetric)
real (kind=kind_phys), pointer :: smcref2(:) => null() !< soil moisture threshold (volumetric)
Expand Down Expand Up @@ -1885,6 +1891,10 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: evap_water(:) => null() !<
real (kind=kind_phys), pointer :: evbs(:) => null() !<
real (kind=kind_phys), pointer :: evcw(:) => null() !<
real (kind=kind_phys), pointer :: pah(:) => null() !<
real (kind=kind_phys), pointer :: ecan(:) => null() !<
real (kind=kind_phys), pointer :: etran(:) => null() !<
real (kind=kind_phys), pointer :: edir(:) => null() !<
real (kind=kind_phys), pointer :: faerlw(:,:,:,:) => null() !<
real (kind=kind_phys), pointer :: faersw(:,:,:,:) => null() !<
real (kind=kind_phys), pointer :: ffhh_ice(:) => null() !<
Expand Down Expand Up @@ -6441,6 +6451,7 @@ subroutine diag_create (Diag, IM, Model)
allocate (Diag%snohfa (IM))
allocate (Diag%transa (IM))
allocate (Diag%sbsnoa (IM))
allocate (Diag%paha (IM))
allocate (Diag%snowca (IM))
allocate (Diag%soilm (IM))
allocate (Diag%tmpmin (IM))
Expand All @@ -6456,6 +6467,10 @@ subroutine diag_create (Diag, IM, Model)
allocate (Diag%ulwsfc (IM))
allocate (Diag%suntim (IM))
allocate (Diag%runoff (IM))
allocate (Diag%tecan (IM))
allocate (Diag%tetran (IM))
allocate (Diag%tedir (IM))
allocate (Diag%twa (IM))
allocate (Diag%ep (IM))
allocate (Diag%cldwrk (IM))
allocate (Diag%dugwd (IM))
Expand Down Expand Up @@ -6504,6 +6519,7 @@ subroutine diag_create (Diag, IM, Model)
allocate (Diag%dtsfci (IM))
allocate (Diag%dqsfci (IM))
allocate (Diag%gfluxi (IM))
allocate (Diag%pahi (IM))
allocate (Diag%epi (IM))
allocate (Diag%smcwlt2 (IM))
allocate (Diag%smcref2 (IM))
Expand Down Expand Up @@ -6722,6 +6738,7 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center)
Diag%transa = zero
Diag%sbsnoa = zero
Diag%snowca = zero
Diag%paha = zero
Diag%soilm = zero
Diag%tmpmin = huge
Diag%tmpmax = zero
Expand All @@ -6734,6 +6751,10 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center)
Diag%ulwsfc = zero
Diag%suntim = zero
Diag%runoff = zero
Diag%tecan = zero
Diag%tetran = zero
Diag%tedir = zero
Diag%twa = zero
Diag%ep = zero
Diag%cldwrk = zero
Diag%dugwd = zero
Expand Down Expand Up @@ -6776,6 +6797,7 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center)
Diag%dtsfci = zero
Diag%dqsfci = zero
Diag%gfluxi = zero
Diag%pahi = zero
Diag%epi = zero
Diag%smcwlt2 = zero
Diag%smcref2 = zero
Expand Down Expand Up @@ -7032,6 +7054,10 @@ subroutine interstitial_create (Interstitial, IM, Model)
allocate (Interstitial%evap_water (IM))
allocate (Interstitial%evbs (IM))
allocate (Interstitial%evcw (IM))
allocate (Interstitial%pah (IM))
allocate (Interstitial%ecan (IM))
allocate (Interstitial%etran (IM))
allocate (Interstitial%edir (IM))
allocate (Interstitial%faerlw (IM,Model%levr+LTP,NBDLW,NF_AELW))
allocate (Interstitial%faersw (IM,Model%levr+LTP,NBDSW,NF_AESW))
allocate (Interstitial%ffhh_ice (IM))
Expand Down Expand Up @@ -7784,6 +7810,10 @@ subroutine interstitial_phys_reset (Interstitial, Model)
Interstitial%evap_water = huge
Interstitial%evbs = clear_val
Interstitial%evcw = clear_val
Interstitial%pah = clear_val
Interstitial%ecan = clear_val
Interstitial%etran = clear_val
Interstitial%edir = clear_val
Interstitial%ffhh_ice = huge
Interstitial%ffhh_land = huge
Interstitial%ffhh_water = huge
Expand Down Expand Up @@ -8139,6 +8169,10 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno)
write (0,*) 'sum(Interstitial%evap_water ) = ', sum(Interstitial%evap_water )
write (0,*) 'sum(Interstitial%evbs ) = ', sum(Interstitial%evbs )
write (0,*) 'sum(Interstitial%evcw ) = ', sum(Interstitial%evcw )
write (0,*) 'sum(Interstitial%pah ) = ', sum(Interstitial%pah )
write (0,*) 'sum(Interstitial%ecan ) = ', sum(Interstitial%ecan )
write (0,*) 'sum(Interstitial%etran ) = ', sum(Interstitial%etran )
write (0,*) 'sum(Interstitial%edir ) = ', sum(Interstitial%edir )
write (0,*) 'sum(Interstitial%faerlw ) = ', sum(Interstitial%faerlw )
write (0,*) 'sum(Interstitial%faersw ) = ', sum(Interstitial%faersw )
write (0,*) 'sum(Interstitial%ffhh_ice ) = ', sum(Interstitial%ffhh_ice )
Expand Down
70 changes: 70 additions & 0 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -6326,6 +6326,13 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[paha]
standard_name = cumulative_precipitation_advected_heat_flux_multiplied_by_timestep
long_name = cumulative precipitation advected heat flux multiplied by timestep
units = W m-2 s
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[transa]
standard_name = cumulative_transpiration_flux_multiplied_by_timestep
long_name = cumulative total plant transpiration rate multiplied by timestep
Expand Down Expand Up @@ -6502,6 +6509,34 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[tecan]
standard_name = total_evaporation_of_intercepted_water
long_name = total evaporation of intercepted water
units = kg m-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[tetran]
standard_name = total_transpiration_rate
long_name = total transpiration rate
units = kg m-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[tedir]
standard_name = total_soil_surface_evaporation_rate
long_name = total soil surface evaporation rate
units = kg m-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[twa]
standard_name = total_water_storage_in_aquifer
long_name = total water storage in aquifer
units = kg m-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[cldwrk]
standard_name = cumulative_cloud_work_function
long_name = cumulative cloud work function (valid only with sas)
Expand Down Expand Up @@ -6789,6 +6824,13 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[pahi]
standard_name = instantaneous_total_precipitation_advected_heat
long_name = instantaneous precipitation advected heat - total
units = W m-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[epi]
standard_name = instantaneous_surface_potential_evaporation
long_name = instantaneous sfc potential evaporation
Expand Down Expand Up @@ -8291,6 +8333,34 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[pah]
standard_name = total_precipitation_advected_heat
long_name = precipitation advected heat - total
units = W m-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[ecan]
standard_name = evaporation_of_intercepted_water
long_name = evaporation of intercepted water
units = kg m-2 s-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[etran]
standard_name = transpiration_rate
long_name = transpiration rate
units = kg m-2 s-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[edir]
standard_name = soil_surface_evaporation_rate
long_name = soil surface evaporation rate
units = kg m-2 s-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[faerlw]
standard_name = aerosol_optical_properties_for_longwave_bands_01_16
long_name = aerosol optical properties for longwave bands 01-16
Expand Down
78 changes: 78 additions & 0 deletions ccpp/driver/GFS_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,18 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%snohfa(:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'pah_ave'
ExtDiag(idx)%desc = ' Total Precipitation Advected Heat - GFS lsm'
ExtDiag(idx)%unit = 'W/m**2'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%time_avg = .TRUE.
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%paha(:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'trans_ave'
Expand Down Expand Up @@ -1197,6 +1209,50 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%runoff(:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'ecan_acc'
ExtDiag(idx)%desc = 'total evaporation of intercepted water'
ExtDiag(idx)%unit = 'kg/m**2'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%tecan(:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'etran_acc'
ExtDiag(idx)%desc = 'total plant transpiration'
ExtDiag(idx)%unit = 'kg/m**2'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%tetran(:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'edir_acc'
ExtDiag(idx)%desc = 'total soil surface evaporation'
ExtDiag(idx)%unit = 'kg/m**2'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%tedir(:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'wa_acc'
ExtDiag(idx)%desc = 'total water storage in aquifer'
ExtDiag(idx)%unit = 'kg/m**2'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%twa(:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'pevpr_ave'
Expand Down Expand Up @@ -1854,6 +1910,17 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%gfluxi(:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'pahi'
ExtDiag(idx)%desc = 'instantaneous precipitation advected heat flux'
ExtDiag(idx)%unit = 'W/m**2'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%pahi(:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'pevpr'
Expand Down Expand Up @@ -2727,6 +2794,17 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%stype(:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'lfrac'
ExtDiag(idx)%desc = 'land fraction'
ExtDiag(idx)%unit = 'fraction [0:1]'
ExtDiag(idx)%mod_name = 'gfs_sfc'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%landfrac(:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'q2m'
Expand Down

0 comments on commit c207c64

Please sign in to comment.