Skip to content

Commit

Permalink
[production/RRFS.v1] Add clear-sky shortwave downward at surface flux…
Browse files Browse the repository at this point in the history
… to available diagnostics. (#825)

* Add SW clear-sky downward flux at surface to available diagnostics
---------
Co-authored-by: Dustin Swales <[email protected]>
  • Loading branch information
dustinswales authored May 7, 2024
1 parent ec0ae9e commit cf8d14d
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ module GFS_typedefs
!--- In (physics only)
real (kind=kind_phys), pointer :: sfcdsw(:) => null() !< total sky sfc downward sw flux ( w/m**2 )
!< GFS_radtend_type%sfcfsw%dnfxc
real (kind=kind_phys), pointer :: sfcdswc(:) => null() !< total sky sfc downward sw flux assuming clear sky conditions( w/m**2 )
real (kind=kind_phys), pointer :: sfcnsw(:) => null() !< total sky sfc netsw flx into ground(w/m**2)
!< difference of dnfxc & upfxc from GFS_radtend_type%sfcfsw
real (kind=kind_phys), pointer :: sfcdlw(:) => null() !< total sky sfc downward lw flux ( w/m**2 )
Expand Down Expand Up @@ -1977,6 +1978,7 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: dlwsfci(:) => null() !< instantaneous sfc dnwd lw flux ( w/m**2 )
real (kind=kind_phys), pointer :: ulwsfci(:) => null() !< instantaneous sfc upwd lw flux ( w/m**2 )
real (kind=kind_phys), pointer :: dswsfci(:) => null() !< instantaneous sfc dnwd sw flux ( w/m**2 )
real (kind=kind_phys), pointer :: dswsfcci(:) => null() !< instantaneous sfc dnwd sw flux ( w/m**2 ) (clear-sky)
real (kind=kind_phys), pointer :: nswsfci(:) => null() !< instantaneous sfc net dnwd sw flux ( w/m**2 )
real (kind=kind_phys), pointer :: uswsfci(:) => null() !< instantaneous sfc upwd sw flux ( w/m**2 )
real (kind=kind_phys), pointer :: dusfci (:) => null() !< instantaneous u component of surface stress
Expand Down Expand Up @@ -3052,11 +3054,13 @@ subroutine coupling_create (Coupling, IM, Model)
Coupling%visbmui = clear_val
Coupling%visdfui = clear_val

allocate (Coupling%sfcdswc (IM))
allocate (Coupling%sfcdsw (IM))
allocate (Coupling%sfcnsw (IM))
allocate (Coupling%sfcdlw (IM))
allocate (Coupling%sfculw (IM))

Coupling%sfcdswc = clear_val
Coupling%sfcdsw = clear_val
Coupling%sfcnsw = clear_val
Coupling%sfcdlw = clear_val
Expand Down Expand Up @@ -8098,6 +8102,7 @@ subroutine diag_create (Diag, IM, Model)
allocate (Diag%dlwsfci (IM))
allocate (Diag%ulwsfci (IM))
allocate (Diag%dswsfci (IM))
allocate (Diag%dswsfcci(IM))
allocate (Diag%nswsfci (IM))
allocate (Diag%uswsfci (IM))
allocate (Diag%dusfci (IM))
Expand Down Expand Up @@ -8526,6 +8531,7 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center)
Diag%dlwsfci = zero
Diag%ulwsfci = zero
Diag%dswsfci = zero
Diag%dswsfcci = zero
Diag%nswsfci = zero
Diag%uswsfci = zero
Diag%dusfci = zero
Expand Down
14 changes: 14 additions & 0 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -2424,6 +2424,13 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[sfcdswc]
standard_name = surface_downwelling_shortwave_flux_on_radiation_timestep_assuming_clear_sky
long_name = total sky sfc downward sw flux assuming clear sky conditions
units = W m-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[sfcnsw]
standard_name = surface_net_downwelling_shortwave_flux_on_radiation_timestep
long_name = total sky sfc netsw flx into ground
Expand Down Expand Up @@ -9041,6 +9048,13 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[dswsfcci]
standard_name = surface_downwelling_shortwave_flux_assuming_clear_sky
long_name = surface downwelling shortwave flux at current time assuming clear sky
units = W m-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[nswsfci]
standard_name = surface_net_downwelling_shortwave_flux
long_name = surface net downwelling shortwave flux at current time
Expand Down
12 changes: 12 additions & 0 deletions ccpp/driver/GFS_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,18 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%dswsfci(:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'DSWRFCI'
ExtDiag(idx)%desc = 'instantaneous surface downward shortwave flux assuming clear sky'
ExtDiag(idx)%unit = 'w/m**2'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%intpl_method = 'bilinear'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%dswsfcci(:)
enddo

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

0 comments on commit cf8d14d

Please sign in to comment.