diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index 75c25cccb..876ac1ed2 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -27,7 +27,7 @@ end subroutine GFS_surface_composites_pre_finalize !! \htmlinclude GFS_surface_composites_pre_run.html !! subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx, cplwav2atm, & - landfrac, lakefrac, lakedepth, oceanfrac, frland, dry, icy, lake, ocean, wet, & + landfrac, lakefrac, lakedepth, oceanfrac, frland, dry, icy, use_flake, ocean, wet, & hice, cice, snowd, snowd_wat, snowd_lnd, snowd_ice, tprcp, tprcp_wat, & tprcp_lnd, tprcp_ice, uustar, uustar_wat, uustar_lnd, uustar_ice, & weasd, weasd_wat, weasd_lnd, weasd_ice, ep1d_ice, tsfc, tsfco, tsfcl, tsfc_wat, & @@ -44,7 +44,7 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx integer, intent(in ) :: im, lkm logical, intent(in ) :: frac_grid, cplflx, cplwav2atm logical, dimension(im), intent(inout) :: flag_cice - logical, dimension(im), intent(inout) :: dry, icy, lake, ocean, wet + logical, dimension(im), intent(inout) :: dry, icy, use_flake, ocean, wet real(kind=kind_phys), dimension(im), intent(in ) :: landfrac, lakefrac, lakedepth, oceanfrac real(kind=kind_phys), dimension(im), intent(inout) :: cice, hice real(kind=kind_phys), dimension(im), intent( out) :: frland @@ -229,14 +229,14 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx ! to prepare to separate lake from ocean under water category do i = 1, im - if(lkm == 1) then + if(wet(i) .and. lkm == 1) then if(lakefrac(i) >= 0.15 .and. lakedepth(i) > one) then - lake(i) = .true. + use_flake(i) = .true. else - lake(i) = .false. + use_flake(i) = .false. endif else - lake(i) = .false. + use_flake(i) = .false. endif enddo diff --git a/physics/GFS_surface_composites.meta b/physics/GFS_surface_composites.meta index ff07c1de2..7603299c8 100644 --- a/physics/GFS_surface_composites.meta +++ b/physics/GFS_surface_composites.meta @@ -116,7 +116,7 @@ type = logical intent = inout optional = F -[lake] +[use_flake] standard_name = flag_nonzero_lake_surface_fraction long_name = flag indicating presence of some lake surface area fraction units = flag diff --git a/physics/flake_driver.F90 b/physics/flake_driver.F90 index b882c7404..535d2b9f2 100644 --- a/physics/flake_driver.F90 +++ b/physics/flake_driver.F90 @@ -51,7 +51,7 @@ SUBROUTINE flake_driver_run ( & ! ---- Inputs im, ps, t1, q1, wind, & dlwflx, dswsfc, weasd, lakedepth, & - lake, xlat, delt, zlvl, elev, & + use_flake, xlat, delt, zlvl, elev, & wet, flag_iter, yearlen, julian, imon, & ! ---- in/outs snwdph, hice, tsurf, fice, T_sfc, hflx, evap, & @@ -95,7 +95,7 @@ SUBROUTINE flake_driver_run ( & real (kind=kind_phys), intent(in) :: julian - logical, dimension(im), intent(in) :: flag_iter, wet, lake + logical, dimension(im), intent(in) :: flag_iter, wet, use_flake character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -187,6 +187,10 @@ SUBROUTINE flake_driver_run ( & REAL (KIND = kind_phys) :: & lake_depth_max, T_bot_2_in, T_bot_2_out, dxlat,tb,tr,tt,temp,Kbar, DelK + +REAL (KIND = kind_phys) :: x, y !temperarory variables used for Tbot and Tsfc + !initilizations + INTEGER :: i,ipr,iter LOGICAL :: lflk_botsed_use @@ -212,7 +216,7 @@ SUBROUTINE flake_driver_run ( & do i = 1, im if (flag(i)) then - if( lake(i) ) then + if( use_flake(i) ) then T_ice(i) = 273.15 T_snow(i) = 273.15 fetch(i) = 2.0E+03 @@ -237,9 +241,23 @@ SUBROUTINE flake_driver_run ( & ! else ! T_sfc(i) = tsurf(i) ! endif - T_sfc(i) = 0.2*tt + 0.8* tsurf(i) + T_sfc(i) = 0.1*tt + 0.9* tsurf(i) + endif +! +! Add empirical climatology of lake Tsfc and Tbot to the current Tsfc and Tbot +! to make sure Tsfc and Tbot are warmer than Tair in Winter or colder than Tair +! in Summer + + x = 0.03279*julian + if(xlat(i) .ge. 0.0) then + y = ((((0.0034*x-0.1241)*x+1.6231)*x-8.8666)*x+17.206)*x-4.2929 + T_sfc(i) = T_sfc(i) + 0.3*y + tb = tb + 0.05*y + else + y = ((((0.0034*x-0.1241)*x+1.6231)*x-8.8666)*x+17.206)*x-4.2929 + T_sfc(i) = T_sfc(i) - 0.3*y + tb = tb - 0.05*y endif - T_bot(i) = tb T_B1(i) = tb @@ -275,7 +293,7 @@ SUBROUTINE flake_driver_run ( & ! print*,'inside flake driver' ! print*, julian,xlat(i),w_albedo(I),w_extinc(i),lakedepth(i),elev(i),tb,tt,tsurf(i),T_sfc(i) - endif !lake fraction and depth + endif !lake endif !flag enddo 1001 format ( 'At icount=', i5, ' x = ', f5.2,5x, 'y = ', & @@ -288,7 +306,7 @@ SUBROUTINE flake_driver_run ( & ! call lake interface do i=1,im if (flag(i)) then - if( lake(i) ) then + if( use_flake(i) ) then dMsnowdt_in = weasd(i)/delt I_atm_in = dswsfc(i) Q_atm_lw_in = dlwflx(i) diff --git a/physics/flake_driver.meta b/physics/flake_driver.meta index 0dd90b4c7..3584b2d8e 100644 --- a/physics/flake_driver.meta +++ b/physics/flake_driver.meta @@ -131,7 +131,7 @@ kind = kind_phys intent = in optional = F -[lake] +[use_flake] standard_name = flag_nonzero_lake_surface_fraction long_name = flag indicating presence of some lake surface area fraction units = flag diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index c9048f20d..517aa7ff0 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -27,9 +27,9 @@ end subroutine sfc_nst_finalize !> @{ subroutine sfc_nst_run & & ( im, hvap, cp, hfus, jcal, eps, epsm1, rvrdm1, rd, rhw0, & ! --- inputs: - & pi, tgice, sbc, ps, u1, v1, t1, q1, tref, cm, ch, & - & prsl1, prslki, prsik1, prslk1, wet, xlon, sinlat, & - & stress, & + & pi, tgice, sbc, ps, u1, v1, t1, q1, tref, cm, ch, & + & prsl1, prslki, prsik1, prslk1, wet, use_flake, xlon, & + & sinlat, stress, & & sfcemis, dlwflx, sfcnsw, rain, timestep, kdt, solhr,xcosz, & & wind, flag_iter, flag_guess, nstf_name1, nstf_name4, & & nstf_name5, lprnt, ipr, & @@ -47,7 +47,7 @@ subroutine sfc_nst_run & ! call sfc_nst ! ! inputs: ! ! ( im, ps, u1, v1, t1, q1, tref, cm, ch, ! -! prsl1, prslki, wet, xlon, sinlat, stress, ! +! prsl1, prslki, wet, use_flake, xlon, sinlat, stress, ! ! sfcemis, dlwflx, sfcnsw, rain, timestep, kdt,solhr,xcosz, ! ! wind, flag_iter, flag_guess, nstf_name1, nstf_name4, ! ! nstf_name5, lprnt, ipr, ! @@ -94,6 +94,7 @@ subroutine sfc_nst_run & ! prsik1 - real, im ! ! prslk1 - real, im ! ! wet - logical, =T if any ocn/lake water (F otherwise) im ! +! use_flake - logical, =T if any lake otherwise ocn ! icy - logical, =T if any ice im ! ! xlon - real, longitude (radians) im ! ! sinlat - real, sin of latitude im ! @@ -194,7 +195,8 @@ subroutine sfc_nst_run & real (kind=kind_phys), intent(in) :: timestep real (kind=kind_phys), intent(in) :: solhr - logical, dimension(im), intent(in) :: flag_iter, flag_guess, wet + logical, dimension(im), intent(in) :: flag_iter, flag_guess, wet, & + & use_flake ! &, icy logical, intent(in) :: lprnt @@ -259,14 +261,14 @@ subroutine sfc_nst_run & ! do i = 1, im ! flag(i) = wet(i) .and. .not.icy(i) .and. flag_iter(i) - flag(i) = wet(i) .and. flag_iter(i) + flag(i) = wet(i) .and. flag_iter(i) .and. .not. use_flake(i) enddo ! ! save nst-related prognostic fields for guess run ! do i=1, im ! if(wet(i) .and. .not.icy(i) .and. flag_guess(i)) then - if(wet(i) .and. flag_guess(i)) then + if(wet(i) .and. flag_guess(i) .and. .not. use_flake(i)) then xt_old(i) = xt(i) xs_old(i) = xs(i) xu_old(i) = xu(i) @@ -582,7 +584,7 @@ subroutine sfc_nst_run & ! restore nst-related prognostic fields for guess run do i=1, im ! if (wet(i) .and. .not.icy(i)) then - if (wet(i)) then + if (wet(i) .and. .not. use_flake(i)) then if (flag_guess(i)) then ! when it is guess of xt(i) = xt_old(i) xs(i) = xs_old(i) @@ -668,8 +670,9 @@ end subroutine sfc_nst_pre_finalize !> \section NSST_general_pre_algorithm General Algorithm !! @{ subroutine sfc_nst_pre_run - & (im,wet,tgice,tsfco,tsfc_wat,tsurf_wat,tseal,xt,xz,dt_cool, - & z_c, tref, cplflx, oceanfrac, nthreads, errmsg, errflg) + & (im, wet, use_flake, tgice, tsfco, tsfc_wat, tsurf_wat, + & tseal, xt, xz, dt_cool, z_c, tref, cplflx, + & oceanfrac, nthreads, errmsg, errflg) use machine , only : kind_phys use module_nst_water_prop, only: get_dtzm_2d @@ -680,10 +683,11 @@ subroutine sfc_nst_pre_run ! --- inputs: integer, intent(in) :: im, nthreads - logical, dimension(im), intent(in) :: wet + logical, dimension(im), intent(in) :: wet, use_flake real (kind=kind_phys), intent(in) :: tgice real (kind=kind_phys), dimension(im), intent(in) :: - & tsfco, tsfc_wat, xt, xz, dt_cool, z_c, oceanfrac + & tsfc_wat, xt, xz, dt_cool, z_c, oceanfrac, + & tsfco logical, intent(in) :: cplflx ! --- input/outputs: @@ -708,7 +712,7 @@ subroutine sfc_nst_pre_run errflg = 0 do i=1,im - if (wet(i)) then + if (wet(i) .and. .not. use_flake(i)) then ! tem = (oro(i)-oro_uf(i)) * rlapse ! DH* 20190927 simplyfing this code because tem is zero !tem = zero @@ -727,7 +731,7 @@ subroutine sfc_nst_pre_run call get_dtzm_2d (xt, xz, dt_cool, & & z_c_0, wet, zero, omz1, im, 1, nthreads, dtzm) do i=1,im - if (wet(i) .and. oceanfrac(i) > zero) then + if (wet(i) .and. oceanfrac(i)>zero .and..not.use_flake(i)) then ! 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 @@ -775,7 +779,8 @@ end subroutine sfc_nst_post_finalize ! \section NSST_detailed_post_algorithm Detailed Algorithm ! @{ subroutine sfc_nst_post_run & - & ( im, kdt, rlapse, tgice, wet, icy, oro, oro_uf, nstf_name1, & + & ( im, kdt, rlapse, tgice, wet, use_flake, 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 & & ) @@ -789,7 +794,7 @@ subroutine sfc_nst_post_run & ! --- inputs: integer, intent(in) :: im, kdt, nthreads - logical, dimension(im), intent(in) :: wet, icy + logical, dimension(im), intent(in) :: wet, icy, use_flake 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 @@ -835,7 +840,7 @@ subroutine sfc_nst_post_run & do i = 1, im ! if (wet(i) .and. .not.icy(i)) then ! if (wet(i) .and. (frac_grid .or. .not. icy(i))) then - if (wet(i)) then + if (wet(i) .and. .not. use_flake(i)) then tsfc_wat(i) = max(tgice, tref(i) + dtzm(i)) ! tsfc_wat(i) = max(271.2, tref(i) + dtzm(i)) - & ! (oro(i)-oro_uf(i))*rlapse diff --git a/physics/sfc_nst.meta b/physics/sfc_nst.meta index ffd994096..a29f10f90 100644 --- a/physics/sfc_nst.meta +++ b/physics/sfc_nst.meta @@ -96,15 +96,6 @@ kind = kind_phys intent = in optional = F -[sbc] - standard_name = stefan_boltzmann_constant - long_name = Stefan-Boltzmann constant - units = W m-2 K-4 - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F [pi] standard_name = pi long_name = ratio of a circle's circumference to its diameter @@ -123,6 +114,15 @@ kind = kind_phys intent = in optional = F +[sbc] + standard_name = stefan_boltzmann_constant + long_name = Stefan-Boltzmann constant + units = W m-2 K-4 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [ps] standard_name = surface_air_pressure long_name = surface pressure @@ -239,6 +239,14 @@ type = logical intent = in optional = F +[use_flake] + standard_name = flag_nonzero_lake_surface_fraction + long_name = flag indicating presence of some lake surface area fraction + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F [xlon] standard_name = longitude long_name = longitude @@ -680,6 +688,14 @@ type = logical intent = in optional = F +[use_flake] + standard_name = flag_nonzero_lake_surface_fraction + long_name = flag indicating presence of some lake surface area fraction + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F [tgice] standard_name = freezing_point_temperature_of_seawater long_name = freezing point temperature of seawater @@ -865,6 +881,14 @@ type = logical intent = in optional = F +[use_flake] + standard_name = flag_nonzero_lake_surface_fraction + long_name = flag indicating presence of some lake surface area fraction + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F [icy] standard_name = flag_nonzero_sea_ice_surface_fraction long_name = flag indicating presence of some sea ice surface area fraction diff --git a/physics/sfc_ocean.F b/physics/sfc_ocean.F index 8da60bb01..736b45f92 100644 --- a/physics/sfc_ocean.F +++ b/physics/sfc_ocean.F @@ -27,7 +27,7 @@ subroutine sfc_ocean_run & !................................... ! --- inputs: & ( im, rd, eps, epsm1, rvrdm1, ps, t1, q1, & - & tskin, cm, ch, prsl1, prslki, wet, lake, wind, &, ! --- inputs + & tskin, cm, ch, prsl1, prslki, wet, use_flake, wind, &, ! --- inputs & flag_iter, & & qsurf, cmm, chh, gflux, evap, hflx, ep, & ! --- outputs & errmsg, errflg & @@ -42,7 +42,7 @@ subroutine sfc_ocean_run & ! inputs: ! ! ( im, ps, t1, q1, tskin, cm, ch, ! !! ( im, ps, u1, v1, t1, q1, tskin, cm, ch, ! -! prsl1, prslki, wet, lake, wind, flag_iter, ! +! prsl1, prslki, wet, use_flake, wind, flag_iter, ! ! outputs: ! ! qsurf, cmm, chh, gflux, evap, hflx, ep ) ! ! ! @@ -102,7 +102,7 @@ subroutine sfc_ocean_run & real (kind=kind_phys), dimension(im), intent(in) :: ps, & & t1, q1, tskin, cm, ch, prsl1, prslki, wind - logical, dimension(im), intent(in) :: flag_iter, wet, lake + logical, dimension(im), intent(in) :: flag_iter, wet, use_flake ! --- outputs: real (kind=kind_phys), dimension(im), intent(inout) :: qsurf, & @@ -130,7 +130,7 @@ subroutine sfc_ocean_run & ! ps is in pascals, wind is wind speed, ! rho is density, qss is sat. hum. at surface - if (wet(i) .and. flag_iter(i) .and. .not. lake(i)) then + if (wet(i) .and. flag_iter(i) .and. .not. use_flake(i)) then q0 = max( q1(i), qmin ) rho = prsl1(i) / (rd*t1(i)*(one + rvrdm1*q0)) diff --git a/physics/sfc_ocean.meta b/physics/sfc_ocean.meta index 6fdfa0555..f27c2207d 100644 --- a/physics/sfc_ocean.meta +++ b/physics/sfc_ocean.meta @@ -131,7 +131,7 @@ type = logical intent = in optional = F -[lake] +[use_flake] standard_name = flag_nonzero_lake_surface_fraction long_name = flag indicating presence of some lake surface area fraction units = flag