From 3d7a722ddf9b7ab9fa813111714c0ba2000cf021 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 12 Apr 2024 19:52:43 +0000 Subject: [PATCH 1/3] Add clear-sky shortwave downwrd at surface flux to available diagnostics --- ccpp/data/GFS_typedefs.F90 | 6 ++++++ ccpp/data/GFS_typedefs.meta | 14 ++++++++++++++ ccpp/driver/GFS_diagnostics.F90 | 12 ++++++++++++ ccpp/physics | 2 +- 4 files changed, 33 insertions(+), 1 deletion(-) diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 07eecbe20..1f3f6da17 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -511,6 +511,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 :: sfcdswclr(:) => null() 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 ) @@ -1978,6 +1979,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 @@ -2892,11 +2894,13 @@ subroutine coupling_create (Coupling, IM, Model) Coupling%visbmui = clear_val Coupling%visdfui = clear_val + allocate (Coupling%sfcdswclr (IM)) allocate (Coupling%sfcdsw (IM)) allocate (Coupling%sfcnsw (IM)) allocate (Coupling%sfcdlw (IM)) allocate (Coupling%sfculw (IM)) + Coupling%sfcdswclr = clear_val Coupling%sfcdsw = clear_val Coupling%sfcnsw = clear_val Coupling%sfcdlw = clear_val @@ -7684,6 +7688,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)) @@ -8009,6 +8014,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 diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index 92e2cdf37..51ec6297b 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -2438,6 +2438,13 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys +[sfcdswclr] + standard_name = surface_downwelling_shortwave_flux_on_radiation_timestep_assuming_clear_sky + long_name = clear sky sfc downward sw flux + 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 @@ -9038,6 +9045,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 diff --git a/ccpp/driver/GFS_diagnostics.F90 b/ccpp/driver/GFS_diagnostics.F90 index 68f89ae89..2b4cbbd74 100644 --- a/ccpp/driver/GFS_diagnostics.F90 +++ b/ccpp/driver/GFS_diagnostics.F90 @@ -2106,6 +2106,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 = 'dswsfcci' + ExtDiag(idx)%desc = 'instantaneous sfc downward sw 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 = 'uswsfci' diff --git a/ccpp/physics b/ccpp/physics index 9b0ac7b16..125a0a8f2 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 9b0ac7b16a45afe5e7f1abf9571d3484158a5b43 +Subproject commit 125a0a8f2f39ce9b2205e139bf4b7a0e18ceaf3f From bbdd5d8134a91133d754d3690dfe6f8749f44b89 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 12 Apr 2024 19:57:04 +0000 Subject: [PATCH 2/3] Omission from previous commit --- ccpp/data/GFS_typedefs.F90 | 3 --- ccpp/data/GFS_typedefs.meta | 7 ------- 2 files changed, 10 deletions(-) diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 1f3f6da17..7e850ed67 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -511,7 +511,6 @@ 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 :: sfcdswclr(:) => null() 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 ) @@ -2894,13 +2893,11 @@ subroutine coupling_create (Coupling, IM, Model) Coupling%visbmui = clear_val Coupling%visdfui = clear_val - allocate (Coupling%sfcdswclr (IM)) allocate (Coupling%sfcdsw (IM)) allocate (Coupling%sfcnsw (IM)) allocate (Coupling%sfcdlw (IM)) allocate (Coupling%sfculw (IM)) - Coupling%sfcdswclr = clear_val Coupling%sfcdsw = clear_val Coupling%sfcnsw = clear_val Coupling%sfcdlw = clear_val diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index 51ec6297b..258275b56 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -2438,13 +2438,6 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys -[sfcdswclr] - standard_name = surface_downwelling_shortwave_flux_on_radiation_timestep_assuming_clear_sky - long_name = clear sky sfc downward sw flux - 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 From ab5752078e4cb95e2f1d5867c93246f762197588 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 15 Apr 2024 16:03:45 +0000 Subject: [PATCH 3/3] Working --- ccpp/data/GFS_typedefs.F90 | 3 +++ ccpp/data/GFS_typedefs.meta | 7 +++++++ ccpp/driver/GFS_diagnostics.F90 | 24 ++++++++++++------------ 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 7e850ed67..8423578d5 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -511,6 +511,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 ) @@ -2893,11 +2894,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 diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index 258275b56..820c5fbd2 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -2438,6 +2438,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 diff --git a/ccpp/driver/GFS_diagnostics.F90 b/ccpp/driver/GFS_diagnostics.F90 index 2b4cbbd74..7e8c0cf2a 100644 --- a/ccpp/driver/GFS_diagnostics.F90 +++ b/ccpp/driver/GFS_diagnostics.F90 @@ -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' @@ -2105,18 +2117,6 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%dswsfci(:) enddo - - idx = idx + 1 - ExtDiag(idx)%axes = 2 - ExtDiag(idx)%name = 'dswsfcci' - ExtDiag(idx)%desc = 'instantaneous sfc downward sw 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