From 8c749c1ff9dceeefe4688de44c52c7bb14876c47 Mon Sep 17 00:00:00 2001 From: Spencer Clark Date: Fri, 17 Dec 2021 16:48:52 +0000 Subject: [PATCH 1/3] Add option to derive net shortwave radiative flux in physics driver When using ML to predict the surface radiative fluxes, it is important to use an albedo that is at least consistent with the coarse model when computing the net shortwave radiative flux at the surface. This adds an option to do this by computing the absorption (i.e. 1 - albedo) using the RRTMG fluxes, and makes the assumption that the absorption is zero if the RRTMG downward shortwave flux at the surface is zero. --- FV3/gfsphysics/GFS_layer/GFS_physics_driver.F90 | 7 +++++++ FV3/gfsphysics/GFS_layer/GFS_typedefs.F90 | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/FV3/gfsphysics/GFS_layer/GFS_physics_driver.F90 b/FV3/gfsphysics/GFS_layer/GFS_physics_driver.F90 index f2b5f806e..dea828344 100644 --- a/FV3/gfsphysics/GFS_layer/GFS_physics_driver.F90 +++ b/FV3/gfsphysics/GFS_layer/GFS_physics_driver.F90 @@ -745,6 +745,13 @@ subroutine GFS_physics_driver & if (Model%override_surface_radiative_fluxes) then adjsfcdlw_for_lsm => Statein%adjsfcdlw_override adjsfcdsw_for_lsm => Statein%adjsfcdsw_override + if (Model%derive_net_shortwave_radiative_flux) then + where (adjsfcdsw .gt. 0.0) + Statein%adjsfcnsw_override = (adjsfcnsw / adjsfcdsw) * Statein%adjsfcdsw_override + elsewhere + Statein%adjsfcnsw_override = 0.0 + endwhere + endif adjsfcnsw_for_lsm => Statein%adjsfcnsw_override else adjsfcdlw_for_lsm => adjsfcdlw diff --git a/FV3/gfsphysics/GFS_layer/GFS_typedefs.F90 b/FV3/gfsphysics/GFS_layer/GFS_typedefs.F90 index 788788d16..fe9f6dcc8 100644 --- a/FV3/gfsphysics/GFS_layer/GFS_typedefs.F90 +++ b/FV3/gfsphysics/GFS_layer/GFS_typedefs.F90 @@ -1084,6 +1084,7 @@ module GFS_typedefs logical :: iau_filter_increments real(kind=kind_phys) :: sst_perturbation ! Sea surface temperature perturbation to climatology or nudging SST (default 0.0 K) logical :: override_surface_radiative_fluxes ! Whether to use Statein to override the surface radiative fluxes + logical :: derive_net_shortwave_radiative_flux ! Whether to compute the net shortwave radiative flux using override downward shortwave flux and the RRTMG effective albedo logical :: use_climatological_sst ! Whether to allow the Python wrapper to override the sea surface temperature logical :: emulate_zc_microphysics ! Use an emulator in place of ZC microphysics logical :: save_zc_microphysics ! Save ZC microphysics state @@ -3162,6 +3163,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & real(kind=kind_phys) :: sst_perturbation = 0.0 ! Sea surface temperature perturbation [K] logical :: override_surface_radiative_fluxes = .false. + logical :: derive_net_shortwave_radiative_flux = .false. logical :: use_climatological_sst = .true. logical :: emulate_zc_microphysics = .false. logical :: save_zc_microphysics = .false. @@ -3256,8 +3258,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- aerosol scavenging factors ('name:value' string array) fscav_aero, & sst_perturbation, & - override_surface_radiative_fluxes, use_climatological_sst, & - emulate_zc_microphysics, save_zc_microphysics + override_surface_radiative_fluxes, & + derive_net_shortwave_radiative_flux, & + use_climatological_sst, emulate_zc_microphysics, & + save_zc_microphysics !--- other parameters integer :: nctp = 0 !< number of cloud types in CS scheme @@ -3726,6 +3730,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%sst_perturbation = sst_perturbation Model%override_surface_radiative_fluxes = override_surface_radiative_fluxes + Model%derive_net_shortwave_radiative_flux = derive_net_shortwave_radiative_flux Model%use_climatological_sst = use_climatological_sst !--- emulation parameters @@ -4544,6 +4549,7 @@ subroutine control_print(Model) print *, ' isot : ', Model%isot print *, ' sst_perturbation : ', Model%sst_perturbation print *, ' override_surface_radiative_fluxes: ', Model%override_surface_radiative_fluxes + print *, ' derive_net_shortwave_radiative_flux: ', Model%derive_net_shortwave_radiative_flux print *, ' use_climatological_sst: ', Model%use_climatological_sst if (Model%lsm == Model%lsm_noahmp) then print *, ' Noah MP LSM is used, the options are' From 89c4b30ea807fc880b898008b119d8002826b993 Mon Sep 17 00:00:00 2001 From: Spencer Clark Date: Fri, 17 Dec 2021 16:56:17 +0000 Subject: [PATCH 2/3] Update name of namelist parameter --- FV3/gfsphysics/GFS_layer/GFS_physics_driver.F90 | 2 +- FV3/gfsphysics/GFS_layer/GFS_typedefs.F90 | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/FV3/gfsphysics/GFS_layer/GFS_physics_driver.F90 b/FV3/gfsphysics/GFS_layer/GFS_physics_driver.F90 index dea828344..13d66da8b 100644 --- a/FV3/gfsphysics/GFS_layer/GFS_physics_driver.F90 +++ b/FV3/gfsphysics/GFS_layer/GFS_physics_driver.F90 @@ -745,7 +745,7 @@ subroutine GFS_physics_driver & if (Model%override_surface_radiative_fluxes) then adjsfcdlw_for_lsm => Statein%adjsfcdlw_override adjsfcdsw_for_lsm => Statein%adjsfcdsw_override - if (Model%derive_net_shortwave_radiative_flux) then + if (Model%derive_net_surface_shortwave_radiative_flux) then where (adjsfcdsw .gt. 0.0) Statein%adjsfcnsw_override = (adjsfcnsw / adjsfcdsw) * Statein%adjsfcdsw_override elsewhere diff --git a/FV3/gfsphysics/GFS_layer/GFS_typedefs.F90 b/FV3/gfsphysics/GFS_layer/GFS_typedefs.F90 index fe9f6dcc8..584b0380d 100644 --- a/FV3/gfsphysics/GFS_layer/GFS_typedefs.F90 +++ b/FV3/gfsphysics/GFS_layer/GFS_typedefs.F90 @@ -1084,7 +1084,7 @@ module GFS_typedefs logical :: iau_filter_increments real(kind=kind_phys) :: sst_perturbation ! Sea surface temperature perturbation to climatology or nudging SST (default 0.0 K) logical :: override_surface_radiative_fluxes ! Whether to use Statein to override the surface radiative fluxes - logical :: derive_net_shortwave_radiative_flux ! Whether to compute the net shortwave radiative flux using override downward shortwave flux and the RRTMG effective albedo + logical :: derive_net_surface_shortwave_radiative_flux ! Whether to compute the net shortwave radiative flux using override downward shortwave flux and the RRTMG effective albedo logical :: use_climatological_sst ! Whether to allow the Python wrapper to override the sea surface temperature logical :: emulate_zc_microphysics ! Use an emulator in place of ZC microphysics logical :: save_zc_microphysics ! Save ZC microphysics state @@ -3163,7 +3163,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & real(kind=kind_phys) :: sst_perturbation = 0.0 ! Sea surface temperature perturbation [K] logical :: override_surface_radiative_fluxes = .false. - logical :: derive_net_shortwave_radiative_flux = .false. + logical :: derive_net_surface_shortwave_radiative_flux = .false. logical :: use_climatological_sst = .true. logical :: emulate_zc_microphysics = .false. logical :: save_zc_microphysics = .false. @@ -3259,7 +3259,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & fscav_aero, & sst_perturbation, & override_surface_radiative_fluxes, & - derive_net_shortwave_radiative_flux, & + derive_net_surface_shortwave_radiative_flux, & use_climatological_sst, emulate_zc_microphysics, & save_zc_microphysics @@ -3730,7 +3730,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%sst_perturbation = sst_perturbation Model%override_surface_radiative_fluxes = override_surface_radiative_fluxes - Model%derive_net_shortwave_radiative_flux = derive_net_shortwave_radiative_flux + Model%derive_net_surface_shortwave_radiative_flux = derive_net_surface_shortwave_radiative_flux Model%use_climatological_sst = use_climatological_sst !--- emulation parameters @@ -4549,7 +4549,7 @@ subroutine control_print(Model) print *, ' isot : ', Model%isot print *, ' sst_perturbation : ', Model%sst_perturbation print *, ' override_surface_radiative_fluxes: ', Model%override_surface_radiative_fluxes - print *, ' derive_net_shortwave_radiative_flux: ', Model%derive_net_shortwave_radiative_flux + print *, ' derive_net_surface_shortwave_radiative_flux: ', Model%derive_net_surface_shortwave_radiative_flux print *, ' use_climatological_sst: ', Model%use_climatological_sst if (Model%lsm == Model%lsm_noahmp) then print *, ' Noah MP LSM is used, the options are' From 1ef20c859fbc05b429c690625e0364f69b5752df Mon Sep 17 00:00:00 2001 From: Spencer Clark Date: Sun, 19 Dec 2021 14:55:40 +0000 Subject: [PATCH 3/3] Be sure to compute derived net shortwave after adjsfcdsw and adjsfcnsw are computed --- FV3/gfsphysics/GFS_layer/GFS_physics_driver.F90 | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/FV3/gfsphysics/GFS_layer/GFS_physics_driver.F90 b/FV3/gfsphysics/GFS_layer/GFS_physics_driver.F90 index 13d66da8b..8753107f8 100644 --- a/FV3/gfsphysics/GFS_layer/GFS_physics_driver.F90 +++ b/FV3/gfsphysics/GFS_layer/GFS_physics_driver.F90 @@ -745,13 +745,6 @@ subroutine GFS_physics_driver & if (Model%override_surface_radiative_fluxes) then adjsfcdlw_for_lsm => Statein%adjsfcdlw_override adjsfcdsw_for_lsm => Statein%adjsfcdsw_override - if (Model%derive_net_surface_shortwave_radiative_flux) then - where (adjsfcdsw .gt. 0.0) - Statein%adjsfcnsw_override = (adjsfcnsw / adjsfcdsw) * Statein%adjsfcdsw_override - elsewhere - Statein%adjsfcnsw_override = 0.0 - endwhere - endif adjsfcnsw_for_lsm => Statein%adjsfcnsw_override else adjsfcdlw_for_lsm => adjsfcdlw @@ -1464,6 +1457,14 @@ subroutine GFS_physics_driver & !--------------------------------------------------------------------- endif ! + if (Model%override_surface_radiative_fluxes .and. Model%derive_net_surface_shortwave_radiative_flux) then + where (adjsfcdsw .gt. adjsfcnsw) + Statein%adjsfcnsw_override = (adjsfcnsw / adjsfcdsw) * Statein%adjsfcdsw_override + elsewhere + Statein%adjsfcnsw_override = 0.0 + endwhere + endif + if (Model%lsidea) then !idea jw dtdt(:,:) = zero endif