Skip to content

Commit

Permalink
Add use_climatological_sst namelist flag (#173)
Browse files Browse the repository at this point in the history
This must be set to `.false.` if one would like to override the SST from within the Python wrapper.
  • Loading branch information
spencerkclark authored Mar 25, 2021
1 parent 2381f35 commit e3f2abd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion FV3/gfsphysics/GFS_layer/GFS_physics_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ subroutine GFS_physics_driver &
real(kind=kind_phys), allocatable, dimension(:,:) :: den
real(kind=kind_phys), allocatable, dimension(:,:) :: dqdt_work
real(kind=kind_phys), pointer :: adjsfcdlw_for_lsm(:), adjsfcdsw_for_lsm(:), adjsfcnsw_for_lsm(:)
real(kind=kind_phys), pointer :: sea_surface_temperature(:)
integer :: nwat

!! Initialize local variables (mainly for debugging purposes, because the
Expand Down Expand Up @@ -728,6 +729,11 @@ subroutine GFS_physics_driver &
adjsfcnsw_for_lsm => adjsfcnsw
endif

if (Model%use_climatological_sst) then
sea_surface_temperature => Sfcprop%tsfc
else
sea_surface_temperature => Sfcprop%tsfco
endif
!-------
! For COORDE-2019 averaging with fwindow, it was done before
! 3Diag fixes and averaging ingested using "fdaily"-factor
Expand Down Expand Up @@ -1129,7 +1135,7 @@ subroutine GFS_physics_driver &
do i = 1, IM
frland(i) = zero
if (islmsk(i) == 0) then
Sfcprop%tsfco(i) = Sfcprop%tsfc(i)
Sfcprop%tsfco(i) = sea_surface_temperature(i)
wet(i) = .true.
fice(i) = zero
elseif (islmsk(i) == 1) then
Expand Down
6 changes: 5 additions & 1 deletion FV3/gfsphysics/GFS_layer/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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 :: use_climatological_sst ! Whether to allow the Python wrapper to override the sea surface temperature
#ifdef CCPP
! From physcons.F90, updated/set in control_initialize
real(kind=kind_phys) :: dxinv ! inverse scaling factor for critical relative humidity, replaces dxinv in physcons.F90
Expand Down Expand Up @@ -3128,6 +3129,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 :: use_climatological_sst = .true.
!--- END NAMELIST VARIABLES

NAMELIST /gfs_physics_nml/ &
Expand Down Expand Up @@ -3219,7 +3221,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!--- aerosol scavenging factors ('name:value' string array)
fscav_aero, &
sst_perturbation, &
override_surface_radiative_fluxes
override_surface_radiative_fluxes, use_climatological_sst

!--- other parameters
integer :: nctp = 0 !< number of cloud types in CS scheme
Expand Down Expand Up @@ -3688,6 +3690,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%use_climatological_sst = use_climatological_sst
!--- tracer handling
Model%ntrac = size(tracer_names)
#ifdef CCPP
Expand Down Expand Up @@ -4496,6 +4499,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 *, ' use_climatological_sst: ', Model%use_climatological_sst
if (Model%lsm == Model%lsm_noahmp) then
print *, ' Noah MP LSM is used, the options are'
print *, ' iopt_dveg : ', Model%iopt_dveg
Expand Down

0 comments on commit e3f2abd

Please sign in to comment.