Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions config_src/drivers/FMS_cap/MOM_surface_forcing_gfdl.F90
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ module MOM_surface_forcing_gfdl
real :: Flux_const !< Piston velocity for surface restoring [Z T-1 ~> m s-1]
real :: Flux_const_salt !< Piston velocity for surface salt restoring [Z T-1 ~> m s-1]
real :: Flux_const_temp !< Piston velocity for surface temp restoring [Z T-1 ~> m s-1]
logical :: trestore_SPEAR_ECDA !< If true, modify restoring data wrt local SSS
logical :: salt_restore_as_sflux !< If true, SSS restore as salt flux instead of water flux
logical :: adjust_net_srestore_to_zero !< Adjust srestore to zero (for both salt_flux or vprec)
logical :: adjust_net_srestore_by_scaling !< Adjust srestore w/o moving zero contour
Expand Down Expand Up @@ -400,6 +401,14 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,
! SST restoring logic
if (CS%restore_temp) then
call time_interp_external(CS%id_trestore, Time, data_restore)
if ( CS%trestore_SPEAR_ECDA ) then
do j=js,je ; do i=is,ie
if (abs(data_restore(i,j)+1.8)<0.0001) then
data_restore(i,j) = -0.0539*sfc_state%SSS(i,j)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This particular expression has a hard-coded constant that may be specific to the particular choice of the expression (here linear) for the freezing point. Would it be better to replace this with a call to the MOM6 code that actually calculates the freezing point based on the salinity?

Also, elsewhere in this routine, I think that it would be a good to make it clear in the comments that this option is only changing the target temperatures when they appear to be very close to the freezing point.

endif
enddo ; enddo
endif

do j=js,je ; do i=is,ie
delta_sst = data_restore(i,j)- sfc_state%SST(i,j)
delta_sst = sign(1.0,delta_sst)*min(abs(delta_sst),CS%max_delta_trestore)
Expand Down Expand Up @@ -1448,6 +1457,8 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, wind_stagger)
"If true, read a file (temp_restore_mask) containing "//&
"a mask for SST restoring.", default=.false.)

call get_param(param_file, mdl, "SPEAR_ECDA_SST_RESTORE_TFREEZE", CS%trestore_SPEAR_ECDA, &
"If true, modify SST restoring field using SSS state.", default=.false.)
endif

! Optionally read tidal amplitude from input file [Z T-1 ~> m s-1] on model grid.
Expand Down