Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 3 additions & 1 deletion physics/module_nst_parameters.f90
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
!! \ingroup gfs_nst_main
!! This module contains constants and parameters used in GFS
!! near surface sea temperature scheme.
!! history:
!! 20210305: X.Li, reduce z_w_max from 30 m to 20 m
module module_nst_parameters
use machine, only : kind_phys &
,kind_rad ! for astronomy (date) calculations
Expand Down Expand Up @@ -42,7 +44,7 @@ module module_nst_parameters
,eps_z_w=0.01 & !< criteria to finish iterations for z_w
,eps_conv=0.01 & !< criteria to finish iterations for d_conv
,eps_sfs=0.01 & !< criteria to finish iterations for d_sfs
,z_w_max=30.0 & !< max warm layer thickness
,z_w_max=20.0 & !< max warm layer thickness
,z_w_min=0.2 & !< min warm layer thickness
,z_w_ini=0.2 & !< initial warm layer thickness in dtl_onset
,z_c_max=0.01 & !< maximum of sub-layer thickness (m)
Expand Down
26 changes: 14 additions & 12 deletions physics/sfc_nst.f
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ end subroutine sfc_nst_finalize
!> @{
subroutine sfc_nst_run &
& ( im, hvap, cp, hfus, jcal, eps, epsm1, rvrdm1, rd, rhw0, & ! --- inputs:
& pi, sbc, ps, u1, v1, t1, q1, tref, cm, ch, &
& pi, tgice, sbc, ps, u1, v1, t1, q1, tref, cm, ch, &
& prsl1, prslki, prsik1, prslk1, wet, xlon, sinlat, &
& stress, &
& sfcemis, dlwflx, sfcnsw, rain, timestep, kdt, solhr,xcosz, &
Expand Down Expand Up @@ -186,7 +186,7 @@ subroutine sfc_nst_run &
integer, intent(in) :: im, kdt, ipr, nstf_name1, nstf_name4, &
& nstf_name5
real (kind=kind_phys), intent(in) :: hvap, cp, hfus, jcal, eps, &
& epsm1, rvrdm1, rd, rhw0, sbc, pi
& epsm1, rvrdm1, rd, rhw0, sbc, pi, tgice
real (kind=kind_phys), dimension(im), intent(in) :: ps, u1, v1, &
& t1, q1, tref, cm, ch, prsl1, prslki, prsik1, prslk1, &
& xlon,xcosz, &
Expand Down Expand Up @@ -553,7 +553,7 @@ subroutine sfc_nst_run &
!> - Call get_dtzm_point() to computes \a dtz and \a tsurf.
call get_dtzm_point(xt(i),xz(i),dt_cool(i),z_c(i),
& zsea1,zsea2,dtz)
tsurf(i) = max(271.2_kp, tref(i) + dtz )
tsurf(i) = max(tgice, tref(i) + dtz )

! if (lprnt .and. i == ipr) print *,' tsurf=',tsurf(i),' tref=',
! &tref(i),' xz=',xz(i),' dt_cool=',dt_cool(i)
Expand Down Expand Up @@ -668,7 +668,7 @@ end subroutine sfc_nst_pre_finalize
!> \section NSST_general_pre_algorithm General Algorithm
!! @{
subroutine sfc_nst_pre_run
& (im, wet, tsfc_wat, tsurf_wat, tseal, xt, xz, dt_cool,
& (im,wet,tgice,tsfco,tsfc_wat,tsurf_wat,tseal,xt,xz,dt_cool,
& z_c, tref, cplflx, oceanfrac, nthreads, errmsg, errflg)

use machine , only : kind_phys
Expand All @@ -681,8 +681,9 @@ subroutine sfc_nst_pre_run
! --- inputs:
integer, intent(in) :: im, nthreads
logical, dimension(im), intent(in) :: wet
real (kind=kind_phys), intent(in) :: tgice
real (kind=kind_phys), dimension(im), intent(in) ::
& tsfc_wat, xt, xz, dt_cool, z_c, oceanfrac
& tsfco, tsfc_wat, xt, xz, dt_cool, z_c, oceanfrac
logical, intent(in) :: cplflx

! --- input/outputs:
Expand All @@ -700,7 +701,7 @@ subroutine sfc_nst_pre_run
& half = 0.5_kp,
& omz1 = 2.0_kp
real(kind=kind_phys) :: tem1, tem2, dnsst
real(kind=kind_phys), dimension(im) :: dtzm
real(kind=kind_phys), dimension(im) :: dtzm,z_c_0

! Initialize CCPP error handling variables
errmsg = ''
Expand All @@ -722,13 +723,14 @@ subroutine sfc_nst_pre_run
! update tsfc & tref with T1 from OGCM & NSST Profile if coupled
!
if (cplflx) then
z_c_0 = 0.0
call get_dtzm_2d (xt, xz, dt_cool, &
& z_c, wet, zero, omz1, im, 1, nthreads, dtzm)
& z_c_0, wet, zero, omz1, im, 1, nthreads, dtzm)
do i=1,im
if (wet(i) .and. oceanfrac(i) > zero) then
! dnsst = tsfc_wat(i) - tref(i) ! retrive/get difference of Ts and Tf
tref(i) = tsfc_wat(i) - dtzm(i) ! update Tf with T1 and NSST T-Profile
! tsfc_wat(i) = max(271.2,tref(i) + dnsst) ! get Ts updated due to Tf update
! dnsst = tsfc_wat(i) - tref(i) ! retrive/get difference of Ts and Tf
tref(i) = max(tgice, tsfco(i) - dtzm(i)) ! update Tf with T1 and NSST T-Profile
! tsfc_wat(i) = max(271.2,tref(i) + dnsst) ! get Ts updated due to Tf update
! tseal(i) = tsfc_wat(i)
if (abs(xz(i)) > zero) then
tem2 = one / xz(i)
Expand Down Expand Up @@ -773,7 +775,7 @@ end subroutine sfc_nst_post_finalize
! \section NSST_detailed_post_algorithm Detailed Algorithm
! @{
subroutine sfc_nst_post_run &
& ( im, rlapse, tgice, wet, icy, oro, oro_uf, nstf_name1, &
& ( im, kdt, rlapse, tgice, wet, icy, oro, oro_uf, nstf_name1, &

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Adding kdt is not necessary here, but it doesn't matter right now, given that all the regression tests have been run at this time.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Adding kdt is not necessary here, but it doesn't matter right now, given that all the regression tests have been run at this time.

@climbfuji : True. It was done for debugging originally, and then I think it is OK to keep it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We will remove it again in the future, but it is not worth rerunning all the tests because of such a simple change now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Got it.

& nstf_name4, nstf_name5, xt, xz, dt_cool, z_c, tref, xlon, &
& tsurf_wat, tsfc_wat, nthreads, dtzm, errmsg, errflg &
& )
Expand All @@ -786,7 +788,7 @@ subroutine sfc_nst_post_run &
integer, parameter :: kp = kind_phys

! --- inputs:
integer, intent(in) :: im, nthreads
integer, intent(in) :: im, kdt, nthreads
logical, dimension(im), intent(in) :: wet, icy
real (kind=kind_phys), intent(in) :: rlapse, tgice
real (kind=kind_phys), dimension(im), intent(in) :: oro, oro_uf
Expand Down
35 changes: 35 additions & 0 deletions physics/sfc_nst.meta
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,15 @@
kind = kind_phys
intent = in
optional = F
[tgice]
standard_name = freezing_point_temperature_of_seawater
long_name = freezing point temperature of seawater
units = K
dimensions = ()
type = real
kind = kind_phys
intent = in
optional = F
[ps]
standard_name = surface_air_pressure
long_name = surface pressure
Expand Down Expand Up @@ -671,6 +680,24 @@
type = logical
intent = in
optional = F
[tgice]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It seems tgice is set as a constant (271.2). It is not the actual freezing point temperature of seawater but the minimum allowed temperature of sea water (~ -0.054*salinity) assuming a maximum salinity in the ocean of about 36 ppt.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@XuLi-NOAA didn't make up these names, the were defined previously in GFS_typedefs.meta and CCPP other physics schemes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@climbfuji I see. Thanks. I do think the naming is not quite correct in any case.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If so, then we should record an issue in ccpp-physics or fv3atm to change this in a future commit. Thanks for spotting this!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If so, then we should record an issue in ccpp-physics or fv3atm to change this in a future commit. Thanks for spotting this!

@climbfuji @DeniseWorthen : I just use tgice which is available, as DOM pointed out. Yes, it is a constant as a safeguard. A salinity dependent frozen temperatures are better or is there an even better way? The naming can be updated when ready.

standard_name = freezing_point_temperature_of_seawater
long_name = freezing point temperature of seawater
units = K
dimensions = ()
type = real
kind = kind_phys
intent = in
optional = F
[tsfco]
standard_name = sea_surface_temperature
long_name = sea surface temperature
units = K
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
optional = F
[tsfc_wat]
standard_name = surface_skin_temperature_over_ocean_interstitial
long_name = surface skin temperature over ocean (temporary use as interstitial)
Expand Down Expand Up @@ -804,6 +831,14 @@
type = integer
intent = in
optional = F
[kdt]
standard_name = index_of_time_step
long_name = current time step index
units = index
dimensions = ()
type = integer
intent = in
optional = F
[rlapse]
standard_name = air_temperature_lapse_rate_constant
long_name = environmental air temperature lapse rate constant
Expand Down