From ae4e43a03220a7495e9f8fe32e2c53b46063b324 Mon Sep 17 00:00:00 2001 From: "xu.li" Date: Fri, 5 Mar 2021 08:08:00 -0500 Subject: [PATCH 1/3] A bug fix related NSST model in the coupled mode and a reduction of z_w_max (30 m to 20 m) --- physics/module_nst_parameters.f90 | 4 +++- physics/sfc_nst.f | 28 +++++++++++++++------------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/physics/module_nst_parameters.f90 b/physics/module_nst_parameters.f90 index 502ef976a..6d8c8794b 100644 --- a/physics/module_nst_parameters.f90 +++ b/physics/module_nst_parameters.f90 @@ -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 @@ -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) diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index 9e6a1c0cc..f9c0cdfc7 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -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, & @@ -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, & @@ -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) @@ -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 @@ -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: @@ -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 = '' @@ -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) @@ -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, & & nstf_name4, nstf_name5, xt, xz, dt_cool, z_c, tref, xlon, & & tsurf_wat, tsfc_wat, nthreads, dtzm, errmsg, errflg & & ) @@ -786,12 +788,12 @@ 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 integer, intent(in) :: nstf_name1, nstf_name4, nstf_name5 - real (kind=kind_phys), dimension(im), intent(in) :: xt, xz, & + real (kind=kind_phys), dimension(im), intent(inout) :: xt, xz, & & dt_cool, z_c, tref, xlon ! --- input/outputs: From 80203958726d93f72b1f893317883386f382f57e Mon Sep 17 00:00:00 2001 From: "xu.li" Date: Fri, 5 Mar 2021 10:00:23 -0500 Subject: [PATCH 2/3] Modifed sfc_nst.meta (related to the update in sfc_nst.f) --- physics/sfc_nst.meta | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/physics/sfc_nst.meta b/physics/sfc_nst.meta index 2c32ca106..dce87e8c4 100644 --- a/physics/sfc_nst.meta +++ b/physics/sfc_nst.meta @@ -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 @@ -671,6 +680,24 @@ type = logical 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 +[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) @@ -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 From 54705a0365f9ccd68829b20747930bd76157fd76 Mon Sep 17 00:00:00 2001 From: "xu.li" Date: Thu, 25 Mar 2021 14:30:52 -0400 Subject: [PATCH 3/3] Change inout to be in for 6 variables (xt,xz ...) in post run --- physics/sfc_nst.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index f9c0cdfc7..c9048f20d 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -793,7 +793,7 @@ subroutine sfc_nst_post_run & real (kind=kind_phys), intent(in) :: rlapse, tgice real (kind=kind_phys), dimension(im), intent(in) :: oro, oro_uf integer, intent(in) :: nstf_name1, nstf_name4, nstf_name5 - real (kind=kind_phys), dimension(im), intent(inout) :: xt, xz, & + real (kind=kind_phys), dimension(im), intent(in) :: xt, xz, & & dt_cool, z_c, tref, xlon ! --- input/outputs: