From 55d395f35301b39b6bafdc49b1109af9f07dc17b Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Mon, 8 Mar 2021 14:48:20 +0000 Subject: [PATCH 01/19] Updated sfc_nst.f, sfc_nst.meta, module_nst_water_prop.f90 and flake_driver.F90 --- physics/flake_driver.F90 | 17 ++- physics/module_nst_water_prop.f90 | 7 +- physics/sfc_nst.f | 46 +++++--- physics/sfc_nst.meta | 170 +++++++++++++++++------------- 4 files changed, 146 insertions(+), 94 deletions(-) diff --git a/physics/flake_driver.F90 b/physics/flake_driver.F90 index b882c7404..474aea24d 100644 --- a/physics/flake_driver.F90 +++ b/physics/flake_driver.F90 @@ -187,6 +187,9 @@ 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 + INTEGER :: i,ipr,iter LOGICAL :: lflk_botsed_use @@ -237,9 +240,19 @@ 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 + x = 0.03279*julian + if(xlat(i) .ge. 0.0) then + y = 0.0034*x**5 -0.1241*x**4+1.6231*x**3-8.8666*x**2+17.206*x-4.2929 + T_sfc(i) = T_sfc(i) + 0.3*y + tb = tb + 0.05*y + else + y = 0.0034*x**5 -0.1241*x**4+1.6231*x**3-8.8666*x**2+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 +288,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 = ', & diff --git a/physics/module_nst_water_prop.f90 b/physics/module_nst_water_prop.f90 index 39020526c..e02a60c62 100644 --- a/physics/module_nst_water_prop.f90 +++ b/physics/module_nst_water_prop.f90 @@ -657,7 +657,7 @@ subroutine get_dtzm_point(xt,xz,dt_cool,zc,z1,z2,dtm) end subroutine get_dtzm_point !>\ingroup waterprop - subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,z1,z2,nx,ny,nth,dtm) + subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,lake,z1,z2,nx,ny,nth,dtm) !subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,icy,z1,z2,nx,ny,dtm) ! ===================================================================== ! ! ! @@ -682,6 +682,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,z1,z2,nx,ny,nth,dtm) ! dt_cool - real, sub-layer cooling amount 1 ! ! zc - sub-layer cooling thickness 1 ! ! wet - logical, flag for wet point (ocean or lake) 1 ! +! lake - logical, flag for lake point only 1 ! ! icy - logical, flag for ice point (ocean or lake) 1 ! ! nx - integer, dimension in x-direction (zonal) 1 ! ! ny - integer, dimension in y-direction (meridional) 1 ! @@ -697,7 +698,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,z1,z2,nx,ny,nth,dtm) integer, intent(in) :: nx,ny, nth real (kind=kind_phys), dimension(nx,ny), intent(in) :: xt,xz,dt_cool,zc - logical, dimension(nx,ny), intent(in) :: wet + logical, dimension(nx,ny), intent(in) :: wet, lake ! logical, dimension(nx,ny), intent(in) :: wet,icy real (kind=kind_phys), intent(in) :: z1,z2 real (kind=kind_phys), dimension(nx,ny), intent(out) :: dtm @@ -713,7 +714,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,z1,z2,nx,ny,nth,dtm) dtm(i,j) = zero ! initialize dtm - if ( wet(i,j) ) then + if ( wet(i,j) .and. .not. lake(i,j)) then ! ! get the mean warming in the range of z=z1 to z=z2 ! diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index 9e6a1c0cc..5e65b0eae 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -8,12 +8,15 @@ module sfc_nst ! \brief This subroutine is empty since there are no procedures that need to be done to initialize the GFS NSST code. !! This subroutine is empty since there are no procedures that need to be done to initialize the GFS NSST code. +!! +!! \section arg_table_sfc_nst_init Argument Table !! subroutine sfc_nst_init end subroutine sfc_nst_init ! \brief This subroutine is empty since there are no procedures that need to be done to finalize the GFS NSST code. !! This subroutine is empty since there are no procedures that need to be done to finalize the GFS NSST code. +!! \section arg_table_sfc_nst_finalize Argument Table !! subroutine sfc_nst_finalize end subroutine sfc_nst_finalize @@ -28,7 +31,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, & - & prsl1, prslki, prsik1, prslk1, wet, xlon, sinlat, & + & prsl1, prslki, prsik1, prslk1, wet, lake, xlon, sinlat, & & stress, & & sfcemis, dlwflx, sfcnsw, rain, timestep, kdt, solhr,xcosz, & & wind, flag_iter, flag_guess, nstf_name1, nstf_name4, & @@ -47,7 +50,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, lake, 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 +97,7 @@ subroutine sfc_nst_run & ! prsik1 - real, im ! ! prslk1 - real, im ! ! wet - logical, =T if any ocn/lake water (F otherwise) im ! +! lake - 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 +198,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, & + & lake ! &, icy logical, intent(in) :: lprnt @@ -259,14 +264,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. lake(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. lake(i)) then xt_old(i) = xt(i) xs_old(i) = xs(i) xu_old(i) = xu(i) @@ -582,7 +587,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. lake(i)) then if (flag_guess(i)) then ! when it is guess of xt(i) = xt_old(i) xs(i) = xs_old(i) @@ -655,10 +660,14 @@ module sfc_nst_pre !! The NSST scheme is one of the three schemes used to represent the !! surface in the GFS physics suite. The other two are the Noah land !! surface model and the sice simplified ice model. +!! +!! \section arg_table_sfc_nst_init Argument Table !! subroutine sfc_nst_pre_init end subroutine sfc_nst_pre_init +!! \section arg_table_sfc_nst_finalize Argument Table +!! subroutine sfc_nst_pre_finalize end subroutine sfc_nst_pre_finalize @@ -668,7 +677,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, lake, tsfc_wat, tsurf_wat, tseal, xt, xz, dt_cool, & z_c, tref, cplflx, oceanfrac, nthreads, errmsg, errflg) use machine , only : kind_phys @@ -680,7 +689,7 @@ subroutine sfc_nst_pre_run ! --- inputs: integer, intent(in) :: im, nthreads - logical, dimension(im), intent(in) :: wet + logical, dimension(im), intent(in) :: wet, lake real (kind=kind_phys), dimension(im), intent(in) :: & tsfc_wat, xt, xz, dt_cool, z_c, oceanfrac logical, intent(in) :: cplflx @@ -707,7 +716,7 @@ subroutine sfc_nst_pre_run errflg = 0 do i=1,im - if (wet(i)) then + if (wet(i) .and. .not. lake(i)) then ! tem = (oro(i)-oro_uf(i)) * rlapse ! DH* 20190927 simplyfing this code because tem is zero !tem = zero @@ -722,10 +731,11 @@ subroutine sfc_nst_pre_run ! update tsfc & tref with T1 from OGCM & NSST Profile if coupled ! if (cplflx) then - call get_dtzm_2d (xt, xz, dt_cool, & - & z_c, wet, zero, omz1, im, 1, nthreads, dtzm) + call get_dtzm_2d (xt, xz, dt_cool, + & z_c, wet, lake, 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. lake(i)) 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 @@ -754,11 +764,15 @@ module sfc_nst_post ! \defgroup GFS_NSST_POST GFS Near-Surface Sea Temperature Post !! \brief Brief description of the parameterization +!! +!! \section arg_table_sfc_nst_post_init Argument Table !! subroutine sfc_nst_post_init end subroutine sfc_nst_post_init ! \brief Brief description of the subroutine +!! +!! \section arg_table_sfc_nst_post_finalize Argument Table !! subroutine sfc_nst_post_finalize end subroutine sfc_nst_post_finalize @@ -773,7 +787,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, rlapse, tgice, wet, lake,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 & & ) @@ -787,7 +801,7 @@ subroutine sfc_nst_post_run & ! --- inputs: integer, intent(in) :: im, nthreads - logical, dimension(im), intent(in) :: wet, icy + logical, dimension(im), intent(in) :: wet, icy, lake 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 @@ -828,12 +842,12 @@ subroutine sfc_nst_post_run & if (nstf_name1 > 1) then zsea1 = 0.001_kp*real(nstf_name4) zsea2 = 0.001_kp*real(nstf_name5) - call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, zsea1, zsea2, & + call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, lake, zsea1, zsea2, & & im, 1, nthreads, dtzm) 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. lake(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 2c32ca106..ba0876b01 100644 --- a/physics/sfc_nst.meta +++ b/physics/sfc_nst.meta @@ -118,7 +118,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -127,7 +127,7 @@ standard_name = x_wind_at_lowest_model_layer long_name = x component of surface layer wind units = m s-1 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -136,7 +136,7 @@ standard_name = y_wind_at_lowest_model_layer long_name = y component of surface layer wind units = m s-1 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -145,7 +145,7 @@ standard_name = air_temperature_at_lowest_model_layer long_name = surface layer mean temperature units = K - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -154,7 +154,7 @@ standard_name = water_vapor_specific_humidity_at_lowest_model_layer long_name = surface layer mean specific humidity units = kg kg-1 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -163,7 +163,7 @@ standard_name = sea_surface_reference_temperature long_name = reference/foundation temperature units = K - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -172,7 +172,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean long_name = surface exchange coeff for momentum over ocean units = none - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -181,7 +181,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean long_name = surface exchange coeff heat & moisture over ocean units = none - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -190,7 +190,7 @@ standard_name = air_pressure_at_lowest_model_layer long_name = surface layer mean pressure units = Pa - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -199,7 +199,7 @@ standard_name = ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer long_name = Exner function ratio bt midlayer and interface at 1st layer units = ratio - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -208,7 +208,7 @@ standard_name = dimensionless_exner_function_at_lowest_model_interface long_name = dimensionless Exner function at the ground surface units = none - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -217,7 +217,7 @@ standard_name = dimensionless_exner_function_at_lowest_model_layer long_name = dimensionless Exner function at the lowest model layer units = none - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -226,7 +226,15 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) + type = logical + intent = in + optional = F +[lake] + standard_name = flag_nonzero_lake_surface_fraction + long_name = flag indicating presence of some lake surface area fraction + units = flag + dimensions = (horizontal_dimension) type = logical intent = in optional = F @@ -234,7 +242,7 @@ standard_name = longitude long_name = longitude units = radian - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -243,7 +251,7 @@ standard_name = sine_of_latitude long_name = sine of latitude units = none - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -252,7 +260,7 @@ standard_name = surface_wind_stress_over_ocean long_name = surface wind stress over ocean units = m2 s-2 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -261,7 +269,7 @@ standard_name = surface_longwave_emissivity_over_ocean_interstitial long_name = surface lw emissivity in fraction over ocean (temporary use as interstitial) units = frac - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -270,7 +278,7 @@ standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_ocean long_name = total sky surface downward longwave flux absorbed by the ground over ocean units = W m-2 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -279,7 +287,7 @@ standard_name = surface_net_downwelling_shortwave_flux long_name = total sky sfc net sw flx into ocean units = W m-2 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -288,7 +296,7 @@ standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ocean long_name = total precipitation amount in each time step over ocean units = m - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -323,7 +331,7 @@ standard_name = instantaneous_cosine_of_zenith_angle long_name = cosine of solar zenith angle units = none - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -332,7 +340,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -341,7 +349,7 @@ standard_name = flag_for_iteration long_name = flag for iteration units = flag - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = logical intent = in optional = F @@ -349,7 +357,7 @@ standard_name = flag_for_guess_run long_name = flag for guess run units = flag - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = logical intent = in optional = F @@ -397,7 +405,7 @@ standard_name = surface_skin_temperature_for_nsst long_name = ocean surface skin temperature units = K - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -406,7 +414,7 @@ standard_name = surface_skin_temperature_after_iteration_over_ocean long_name = surface skin temperature after iteration over ocean units = K - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -415,7 +423,7 @@ standard_name = diurnal_thermocline_layer_heat_content long_name = heat content in diurnal thermocline layer units = K m - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -424,7 +432,7 @@ standard_name = sea_water_salinity long_name = salinity content in diurnal thermocline layer units = ppt m - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -433,7 +441,7 @@ standard_name = diurnal_thermocline_layer_x_current long_name = u-current content in diurnal thermocline layer units = m2 s-1 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -442,7 +450,7 @@ standard_name = diurnal_thermocline_layer_y_current long_name = v-current content in diurnal thermocline layer units = m2 s-1 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -451,7 +459,7 @@ standard_name = diurnal_thermocline_layer_thickness long_name = diurnal thermocline layer thickness units = m - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -460,7 +468,7 @@ standard_name = ocean_mixed_layer_thickness long_name = mixed layer thickness units = m - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -469,7 +477,7 @@ standard_name = sensitivity_of_dtl_heat_content_to_surface_temperature long_name = d(xt)/d(ts) units = m - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -478,7 +486,7 @@ standard_name = sensitivity_of_dtl_thickness_to_surface_temperature long_name = d(xz)/d(ts) units = m K-1 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -487,7 +495,7 @@ standard_name = sub_layer_cooling_amount long_name = sub-layer cooling amount units = K - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -496,7 +504,7 @@ standard_name = sub_layer_cooling_thickness long_name = sub-layer cooling thickness units = m - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -505,7 +513,7 @@ standard_name = coefficient_c_0 long_name = coefficient1 to calculate d(tz)/d(ts) units = none - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -514,7 +522,7 @@ standard_name = coefficient_c_d long_name = coefficient2 to calculate d(tz)/d(ts) units = none - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -523,7 +531,7 @@ standard_name = coefficient_w_0 long_name = coefficient3 to calculate d(tz)/d(ts) units = none - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -532,7 +540,7 @@ standard_name = coefficient_w_d long_name = coefficient4 to calculate d(tz)/d(ts) units = none - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -541,7 +549,7 @@ standard_name = free_convection_layer_thickness long_name = thickness of free convection layer units = m - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -550,7 +558,7 @@ standard_name = index_of_dtlm_start long_name = index to start dtlm run or not units = index - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -559,7 +567,7 @@ standard_name = sensible_heat_flux_due_to_rainfall long_name = sensible heat flux due to rainfall units = W - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -568,7 +576,7 @@ standard_name = surface_specific_humidity_over_ocean long_name = surface air saturation specific humidity over ocean units = kg kg-1 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -577,7 +585,7 @@ standard_name = upward_heat_flux_in_soil_over_ocean long_name = soil heat flux over ocean units = W m-2 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -586,7 +594,7 @@ standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ocean long_name = momentum exchange coefficient over ocean units = m s-1 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -595,7 +603,7 @@ standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ocean long_name = thermal exchange coefficient over ocean units = kg m-2 s-1 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -604,7 +612,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean long_name = kinematic surface upward latent heat flux over ocean units = kg kg-1 m s-1 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -613,7 +621,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean long_name = kinematic surface upward sensible heat flux over ocean units = K m s-1 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -622,7 +630,7 @@ standard_name = surface_upward_potential_latent_heat_flux_over_ocean long_name = surface upward potential latent heat flux over ocean units = W m-2 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -667,7 +675,15 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) + type = logical + intent = in + optional = F +[lake] + standard_name = flag_nonzero_lake_surface_fraction + long_name = flag indicating presence of some lake surface area fraction + units = flag + dimensions = (horizontal_dimension) type = logical intent = in optional = F @@ -675,7 +691,7 @@ standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -684,7 +700,7 @@ standard_name = surface_skin_temperature_after_iteration_over_ocean long_name = surface skin temperature after iteration over ocean units = K - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -693,7 +709,7 @@ standard_name = surface_skin_temperature_for_nsst long_name = ocean surface skin temperature units = K - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -702,7 +718,7 @@ standard_name = diurnal_thermocline_layer_heat_content long_name = heat content in diurnal thermocline layer units = K m - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -711,7 +727,7 @@ standard_name = diurnal_thermocline_layer_thickness long_name = diurnal thermocline layer thickness units = m - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -720,7 +736,7 @@ standard_name = sub_layer_cooling_amount long_name = sub-layer cooling amount units = K - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -729,7 +745,7 @@ standard_name = sub_layer_cooling_thickness long_name = sub-layer cooling thickness units = m - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -738,7 +754,7 @@ standard_name = sea_surface_reference_temperature long_name = reference/foundation temperature units = K - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -755,7 +771,7 @@ standard_name = sea_area_fraction long_name = fraction of horizontal grid area occupied by ocean units = frac - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -826,7 +842,15 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) + type = logical + intent = in + optional = F +[lake] + standard_name = flag_nonzero_lake_surface_fraction + long_name = flag indicating presence of some lake surface area fraction + units = flag + dimensions = (horizontal_dimension) type = logical intent = in optional = F @@ -834,7 +858,7 @@ standard_name = flag_nonzero_sea_ice_surface_fraction long_name = flag indicating presence of some sea ice surface area fraction units = flag - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = logical intent = in optional = F @@ -842,7 +866,7 @@ standard_name = orography long_name = orography units = m - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -851,7 +875,7 @@ standard_name = orography_unfiltered long_name = unfiltered orography units = m - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -884,7 +908,7 @@ standard_name = diurnal_thermocline_layer_heat_content long_name = heat content in diurnal thermocline layer units = K m - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -893,7 +917,7 @@ standard_name = diurnal_thermocline_layer_thickness long_name = diurnal thermocline layer thickness units = m - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -902,7 +926,7 @@ standard_name = sub_layer_cooling_amount long_name = sub-layer cooling amount units = K - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -911,7 +935,7 @@ standard_name = sub_layer_cooling_thickness long_name = sub-layer cooling thickness units = m - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -920,7 +944,7 @@ standard_name = sea_surface_reference_temperature long_name = reference/foundation temperature units = K - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -929,7 +953,7 @@ standard_name = longitude long_name = longitude units = radian - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -938,7 +962,7 @@ standard_name = surface_skin_temperature_after_iteration_over_ocean long_name = surface skin temperature after iteration over ocean units = K - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -947,7 +971,7 @@ standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -964,7 +988,7 @@ standard_name = mean_change_over_depth_in_sea_water_temperature long_name = mean of dT(z) (zsea1 to zsea2) units = K - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = out From 26340ba007e561e4757c81e4ab7b6b07fca1b44c Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Thu, 18 Mar 2021 18:16:04 +0000 Subject: [PATCH 02/19] Updated sfc_nst.f & sfc_nst.meta --- physics/sfc_nst.f | 2 +- physics/sfc_nst.meta | 152 +++++++++++++++++++++---------------------- 2 files changed, 77 insertions(+), 77 deletions(-) diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index 5e65b0eae..8e653c4de 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -787,7 +787,7 @@ end subroutine sfc_nst_post_finalize ! \section NSST_detailed_post_algorithm Detailed Algorithm ! @{ subroutine sfc_nst_post_run & - & ( im, rlapse, tgice, wet, lake,icy, oro, oro_uf, nstf_name1, & + & ( im, rlapse, tgice, wet, lake,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 & & ) diff --git a/physics/sfc_nst.meta b/physics/sfc_nst.meta index ba0876b01..29766f6c8 100644 --- a/physics/sfc_nst.meta +++ b/physics/sfc_nst.meta @@ -118,7 +118,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -127,7 +127,7 @@ standard_name = x_wind_at_lowest_model_layer long_name = x component of surface layer wind units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -136,7 +136,7 @@ standard_name = y_wind_at_lowest_model_layer long_name = y component of surface layer wind units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -145,7 +145,7 @@ standard_name = air_temperature_at_lowest_model_layer long_name = surface layer mean temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -154,7 +154,7 @@ standard_name = water_vapor_specific_humidity_at_lowest_model_layer long_name = surface layer mean specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -163,7 +163,7 @@ standard_name = sea_surface_reference_temperature long_name = reference/foundation temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -172,7 +172,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean long_name = surface exchange coeff for momentum over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -181,7 +181,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean long_name = surface exchange coeff heat & moisture over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -190,7 +190,7 @@ standard_name = air_pressure_at_lowest_model_layer long_name = surface layer mean pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -199,7 +199,7 @@ standard_name = ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer long_name = Exner function ratio bt midlayer and interface at 1st layer units = ratio - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -208,7 +208,7 @@ standard_name = dimensionless_exner_function_at_lowest_model_interface long_name = dimensionless Exner function at the ground surface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -217,7 +217,7 @@ standard_name = dimensionless_exner_function_at_lowest_model_layer long_name = dimensionless Exner function at the lowest model layer units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -226,7 +226,7 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -234,7 +234,7 @@ standard_name = flag_nonzero_lake_surface_fraction long_name = flag indicating presence of some lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -242,7 +242,7 @@ standard_name = longitude long_name = longitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -251,7 +251,7 @@ standard_name = sine_of_latitude long_name = sine of latitude units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -260,7 +260,7 @@ standard_name = surface_wind_stress_over_ocean long_name = surface wind stress over ocean units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -269,7 +269,7 @@ standard_name = surface_longwave_emissivity_over_ocean_interstitial long_name = surface lw emissivity in fraction over ocean (temporary use as interstitial) units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -278,7 +278,7 @@ standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_ocean long_name = total sky surface downward longwave flux absorbed by the ground over ocean units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -287,7 +287,7 @@ standard_name = surface_net_downwelling_shortwave_flux long_name = total sky sfc net sw flx into ocean units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -296,7 +296,7 @@ standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ocean long_name = total precipitation amount in each time step over ocean units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -331,7 +331,7 @@ standard_name = instantaneous_cosine_of_zenith_angle long_name = cosine of solar zenith angle units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -340,7 +340,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -349,7 +349,7 @@ standard_name = flag_for_iteration long_name = flag for iteration units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -357,7 +357,7 @@ standard_name = flag_for_guess_run long_name = flag for guess run units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -405,7 +405,7 @@ standard_name = surface_skin_temperature_for_nsst long_name = ocean surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -414,7 +414,7 @@ standard_name = surface_skin_temperature_after_iteration_over_ocean long_name = surface skin temperature after iteration over ocean units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -423,7 +423,7 @@ standard_name = diurnal_thermocline_layer_heat_content long_name = heat content in diurnal thermocline layer units = K m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -432,7 +432,7 @@ standard_name = sea_water_salinity long_name = salinity content in diurnal thermocline layer units = ppt m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -441,7 +441,7 @@ standard_name = diurnal_thermocline_layer_x_current long_name = u-current content in diurnal thermocline layer units = m2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -450,7 +450,7 @@ standard_name = diurnal_thermocline_layer_y_current long_name = v-current content in diurnal thermocline layer units = m2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -459,7 +459,7 @@ standard_name = diurnal_thermocline_layer_thickness long_name = diurnal thermocline layer thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -468,7 +468,7 @@ standard_name = ocean_mixed_layer_thickness long_name = mixed layer thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -477,7 +477,7 @@ standard_name = sensitivity_of_dtl_heat_content_to_surface_temperature long_name = d(xt)/d(ts) units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -486,7 +486,7 @@ standard_name = sensitivity_of_dtl_thickness_to_surface_temperature long_name = d(xz)/d(ts) units = m K-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -495,7 +495,7 @@ standard_name = sub_layer_cooling_amount long_name = sub-layer cooling amount units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -504,7 +504,7 @@ standard_name = sub_layer_cooling_thickness long_name = sub-layer cooling thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -513,7 +513,7 @@ standard_name = coefficient_c_0 long_name = coefficient1 to calculate d(tz)/d(ts) units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -522,7 +522,7 @@ standard_name = coefficient_c_d long_name = coefficient2 to calculate d(tz)/d(ts) units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -531,7 +531,7 @@ standard_name = coefficient_w_0 long_name = coefficient3 to calculate d(tz)/d(ts) units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -540,7 +540,7 @@ standard_name = coefficient_w_d long_name = coefficient4 to calculate d(tz)/d(ts) units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -549,7 +549,7 @@ standard_name = free_convection_layer_thickness long_name = thickness of free convection layer units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -558,7 +558,7 @@ standard_name = index_of_dtlm_start long_name = index to start dtlm run or not units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -567,7 +567,7 @@ standard_name = sensible_heat_flux_due_to_rainfall long_name = sensible heat flux due to rainfall units = W - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -576,7 +576,7 @@ standard_name = surface_specific_humidity_over_ocean long_name = surface air saturation specific humidity over ocean units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -585,7 +585,7 @@ standard_name = upward_heat_flux_in_soil_over_ocean long_name = soil heat flux over ocean units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -594,7 +594,7 @@ standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ocean long_name = momentum exchange coefficient over ocean units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -603,7 +603,7 @@ standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ocean long_name = thermal exchange coefficient over ocean units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -612,7 +612,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean long_name = kinematic surface upward latent heat flux over ocean units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -621,7 +621,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean long_name = kinematic surface upward sensible heat flux over ocean units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -630,7 +630,7 @@ standard_name = surface_upward_potential_latent_heat_flux_over_ocean long_name = surface upward potential latent heat flux over ocean units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -675,7 +675,7 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -683,7 +683,7 @@ standard_name = flag_nonzero_lake_surface_fraction long_name = flag indicating presence of some lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -691,7 +691,7 @@ standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -700,7 +700,7 @@ standard_name = surface_skin_temperature_after_iteration_over_ocean long_name = surface skin temperature after iteration over ocean units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -709,7 +709,7 @@ standard_name = surface_skin_temperature_for_nsst long_name = ocean surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -718,7 +718,7 @@ standard_name = diurnal_thermocline_layer_heat_content long_name = heat content in diurnal thermocline layer units = K m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -727,7 +727,7 @@ standard_name = diurnal_thermocline_layer_thickness long_name = diurnal thermocline layer thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -736,7 +736,7 @@ standard_name = sub_layer_cooling_amount long_name = sub-layer cooling amount units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -745,7 +745,7 @@ standard_name = sub_layer_cooling_thickness long_name = sub-layer cooling thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -754,7 +754,7 @@ standard_name = sea_surface_reference_temperature long_name = reference/foundation temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -771,7 +771,7 @@ standard_name = sea_area_fraction long_name = fraction of horizontal grid area occupied by ocean units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -842,7 +842,7 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -850,7 +850,7 @@ standard_name = flag_nonzero_lake_surface_fraction long_name = flag indicating presence of some lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -858,7 +858,7 @@ standard_name = flag_nonzero_sea_ice_surface_fraction long_name = flag indicating presence of some sea ice surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -866,7 +866,7 @@ standard_name = orography long_name = orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -875,7 +875,7 @@ standard_name = orography_unfiltered long_name = unfiltered orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -908,7 +908,7 @@ standard_name = diurnal_thermocline_layer_heat_content long_name = heat content in diurnal thermocline layer units = K m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -917,7 +917,7 @@ standard_name = diurnal_thermocline_layer_thickness long_name = diurnal thermocline layer thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -926,7 +926,7 @@ standard_name = sub_layer_cooling_amount long_name = sub-layer cooling amount units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -935,7 +935,7 @@ standard_name = sub_layer_cooling_thickness long_name = sub-layer cooling thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -944,7 +944,7 @@ standard_name = sea_surface_reference_temperature long_name = reference/foundation temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -953,7 +953,7 @@ standard_name = longitude long_name = longitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -962,7 +962,7 @@ standard_name = surface_skin_temperature_after_iteration_over_ocean long_name = surface skin temperature after iteration over ocean units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -971,7 +971,7 @@ standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -988,7 +988,7 @@ standard_name = mean_change_over_depth_in_sea_water_temperature long_name = mean of dT(z) (zsea1 to zsea2) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out From 17ccdcf03fcf22d1c5df89e646e1b28c04160c2b Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Thu, 18 Mar 2021 22:27:32 +0000 Subject: [PATCH 03/19] Updated sfc_nst.f to remove unnecessary statements --- physics/sfc_nst.f | 7 ------- 1 file changed, 7 deletions(-) diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index 8e653c4de..38a910169 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -8,15 +8,12 @@ module sfc_nst ! \brief This subroutine is empty since there are no procedures that need to be done to initialize the GFS NSST code. !! This subroutine is empty since there are no procedures that need to be done to initialize the GFS NSST code. -!! -!! \section arg_table_sfc_nst_init Argument Table !! subroutine sfc_nst_init end subroutine sfc_nst_init ! \brief This subroutine is empty since there are no procedures that need to be done to finalize the GFS NSST code. !! This subroutine is empty since there are no procedures that need to be done to finalize the GFS NSST code. -!! \section arg_table_sfc_nst_finalize Argument Table !! subroutine sfc_nst_finalize end subroutine sfc_nst_finalize @@ -660,14 +657,10 @@ module sfc_nst_pre !! The NSST scheme is one of the three schemes used to represent the !! surface in the GFS physics suite. The other two are the Noah land !! surface model and the sice simplified ice model. -!! -!! \section arg_table_sfc_nst_init Argument Table !! subroutine sfc_nst_pre_init end subroutine sfc_nst_pre_init -!! \section arg_table_sfc_nst_finalize Argument Table -!! subroutine sfc_nst_pre_finalize end subroutine sfc_nst_pre_finalize From 465167f65bf2330a62af64950edce19b3b542e66 Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Thu, 1 Apr 2021 15:58:39 +0000 Subject: [PATCH 04/19] Removed a line not needed --- physics/sfc_nst.f | 4 ---- 1 file changed, 4 deletions(-) diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index 38a910169..d9727e4ff 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -757,15 +757,11 @@ module sfc_nst_post ! \defgroup GFS_NSST_POST GFS Near-Surface Sea Temperature Post !! \brief Brief description of the parameterization -!! -!! \section arg_table_sfc_nst_post_init Argument Table !! subroutine sfc_nst_post_init end subroutine sfc_nst_post_init ! \brief Brief description of the subroutine -!! -!! \section arg_table_sfc_nst_post_finalize Argument Table !! subroutine sfc_nst_post_finalize end subroutine sfc_nst_post_finalize From 8f78249209e6ef321a58764292e4087c5f9a5b23 Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Thu, 1 Apr 2021 16:15:14 +0000 Subject: [PATCH 05/19] Added comments to briefily describe some temporary variables in the code --- physics/flake_driver.F90 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/physics/flake_driver.F90 b/physics/flake_driver.F90 index 474aea24d..ea47e4ce0 100644 --- a/physics/flake_driver.F90 +++ b/physics/flake_driver.F90 @@ -188,7 +188,8 @@ SUBROUTINE flake_driver_run ( & lake_depth_max, T_bot_2_in, T_bot_2_out, dxlat,tb,tr,tt,temp,Kbar, DelK -REAL (KIND = kind_phys) :: x, y +REAL (KIND = kind_phys) :: x, y !temperarory variables used for Tbot and Tsfc + !initilizations INTEGER :: i,ipr,iter @@ -242,6 +243,10 @@ SUBROUTINE flake_driver_run ( & ! endif 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 From 7adb61fc72a186badad3b296fbc994c034f5564d Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Mon, 12 Apr 2021 18:47:07 +0000 Subject: [PATCH 06/19] Fixed conflicts --- physics/sfc_nst.f | 51 +++++++++----------------------------------- physics/sfc_nst.meta | 3 --- 2 files changed, 10 insertions(+), 44 deletions(-) diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index 0c8a90db3..6bec39288 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -27,13 +27,8 @@ end subroutine sfc_nst_finalize !> @{ subroutine sfc_nst_run & & ( im, hvap, cp, hfus, jcal, eps, epsm1, rvrdm1, rd, rhw0, & ! --- inputs: -<<<<<<< HEAD - & 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, lake, xlon, sinlat, & -======= - & pi, tgice, sbc, ps, u1, v1, t1, q1, tref, cm, ch, & - & prsl1, prslki, prsik1, prslk1, wet, xlon, sinlat, & ->>>>>>> 990b9d0416e340e40e4b136561a85f63d46671e2 & stress, & & sfcemis, dlwflx, sfcnsw, rain, timestep, kdt, solhr,xcosz, & & wind, flag_iter, flag_guess, nstf_name1, nstf_name4, & @@ -675,11 +670,7 @@ end subroutine sfc_nst_pre_finalize !> \section NSST_general_pre_algorithm General Algorithm !! @{ subroutine sfc_nst_pre_run -<<<<<<< HEAD - & (im, wet, lake, tsfc_wat, tsurf_wat, tseal, xt, xz, dt_cool, -======= - & (im,wet,tgice,tsfco,tsfc_wat,tsurf_wat,tseal,xt,xz,dt_cool, ->>>>>>> 990b9d0416e340e40e4b136561a85f63d46671e2 + & (im, wet, tgice, lake, tsfco, tsfc_wat, tsurf_wat, tseal, xt, xz, dt_cool, & z_c, tref, cplflx, oceanfrac, nthreads, errmsg, errflg) use machine , only : kind_phys @@ -691,12 +682,8 @@ subroutine sfc_nst_pre_run ! --- inputs: integer, intent(in) :: im, nthreads -<<<<<<< HEAD logical, dimension(im), intent(in) :: wet, lake -======= - logical, dimension(im), intent(in) :: wet real (kind=kind_phys), intent(in) :: tgice ->>>>>>> 990b9d0416e340e40e4b136561a85f63d46671e2 real (kind=kind_phys), dimension(im), intent(in) :: & tsfco, tsfc_wat, xt, xz, dt_cool, z_c, oceanfrac logical, intent(in) :: cplflx @@ -738,25 +725,16 @@ subroutine sfc_nst_pre_run ! update tsfc & tref with T1 from OGCM & NSST Profile if coupled ! if (cplflx) then -<<<<<<< HEAD + z_c_0 = 0.0 call get_dtzm_2d (xt, xz, dt_cool, & z_c, wet, lake, zero, omz1, im, 1, & nthreads, dtzm) do i=1,im if (wet(i) .and. oceanfrac(i) > zero .and. .not. lake(i)) 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 +! tref(i) = tsfc_wat(i) - dtzm(i) ! update Tf with T1 and NSST T-Profile + 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 -======= - z_c_0 = 0.0 - 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 -! 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 ->>>>>>> 990b9d0416e340e40e4b136561a85f63d46671e2 ! tseal(i) = tsfc_wat(i) if (abs(xz(i)) > zero) then tem2 = one / xz(i) @@ -800,14 +778,10 @@ end subroutine sfc_nst_post_finalize ! ! \section NSST_detailed_post_algorithm Detailed Algorithm ! @{ - subroutine sfc_nst_post_run & -<<<<<<< HEAD - & ( im, rlapse, tgice, wet, lake,icy, oro, oro_uf, nstf_name1, & -======= - & ( im, kdt, rlapse, tgice, wet, icy, oro, oro_uf, nstf_name1, & ->>>>>>> 990b9d0416e340e40e4b136561a85f63d46671e2 - & nstf_name4, nstf_name5, xt, xz, dt_cool, z_c, tref, xlon, & - & tsurf_wat, tsfc_wat, nthreads, dtzm, errmsg, errflg & + subroutine sfc_nst_post_run & + & ( im, kdt, rlapse, tgice, wet, lake, 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 & & ) use machine , only : kind_phys @@ -818,13 +792,8 @@ subroutine sfc_nst_post_run & integer, parameter :: kp = kind_phys ! --- inputs: -<<<<<<< HEAD - integer, intent(in) :: im, nthreads - logical, dimension(im), intent(in) :: wet, icy, lake -======= integer, intent(in) :: im, kdt, nthreads - logical, dimension(im), intent(in) :: wet, icy ->>>>>>> 990b9d0416e340e40e4b136561a85f63d46671e2 + logical, dimension(im), intent(in) :: wet, icy, lake 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 diff --git a/physics/sfc_nst.meta b/physics/sfc_nst.meta index cf2d451df..b214fabc3 100644 --- a/physics/sfc_nst.meta +++ b/physics/sfc_nst.meta @@ -688,14 +688,12 @@ type = logical intent = in optional = F -<<<<<<< HEAD [lake] 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 -======= [tgice] standard_name = freezing_point_temperature_of_seawater long_name = freezing point temperature of seawater @@ -712,7 +710,6 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys ->>>>>>> 990b9d0416e340e40e4b136561a85f63d46671e2 intent = in optional = F [tsfc_wat] From e1f64173ba60c0b2fb8cdad995d3505889dd2f39 Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Tue, 13 Apr 2021 01:47:47 +0000 Subject: [PATCH 07/19] Fixed errors created during merge processes --- physics/sfc_nst.f | 26 ++++++++++++++------------ physics/sfc_nst.meta | 2 ++ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index 6bec39288..4fb72b28e 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, tgice, sbc, ps, u1, v1, t1, q1, tref, cm, ch, & + & sbc, pi,tgice, ps, u1, v1, t1, q1, tref, cm, ch, & & prsl1, prslki, prsik1, prslk1, wet, lake, xlon, sinlat, & & stress, & & sfcemis, dlwflx, sfcnsw, rain, timestep, kdt, solhr,xcosz, & @@ -555,6 +555,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=', @@ -670,8 +671,9 @@ end subroutine sfc_nst_pre_finalize !> \section NSST_general_pre_algorithm General Algorithm !! @{ subroutine sfc_nst_pre_run - & (im, wet, tgice, lake, tsfco, tsfc_wat, tsurf_wat, tseal, xt, xz, dt_cool, - & z_c, tref, cplflx, oceanfrac, nthreads, errmsg, errflg) + & (im, wet, lake, 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 @@ -685,7 +687,8 @@ subroutine sfc_nst_pre_run logical, dimension(im), intent(in) :: wet, lake 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: @@ -703,7 +706,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,z_c_0 + real(kind=kind_phys), dimension(im) :: dtzm ! Initialize CCPP error handling variables errmsg = '' @@ -725,15 +728,13 @@ 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, lake, zero, omz1, im, 1, & nthreads, dtzm) do i=1,im if (wet(i) .and. oceanfrac(i) > zero .and. .not. lake(i)) 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 - tref(i) = max(tgice, tsfco(i) - dtzm(i)) ! update Tf with T1 and NSST T-Profile + 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 ! tseal(i) = tsfc_wat(i) if (abs(xz(i)) > zero) then @@ -778,10 +779,11 @@ end subroutine sfc_nst_post_finalize ! ! \section NSST_detailed_post_algorithm Detailed Algorithm ! @{ - subroutine sfc_nst_post_run & - & ( im, kdt, rlapse, tgice, wet, lake, 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 & + subroutine sfc_nst_post_run & + & ( im, kdt, rlapse, tgice, wet, lake,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 & & ) use machine , only : kind_phys diff --git a/physics/sfc_nst.meta b/physics/sfc_nst.meta index b214fabc3..febf9fd28 100644 --- a/physics/sfc_nst.meta +++ b/physics/sfc_nst.meta @@ -694,6 +694,8 @@ 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 From 6a08c3ae2bb98ec82b2086ebc1bd84cbe6b52f40 Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Tue, 13 Apr 2021 02:03:50 +0000 Subject: [PATCH 08/19] Fixed some code errors caused during merging processes --- physics/flake_driver.F90 | 24 ++++++++++++-- physics/module_nst_water_prop.f90 | 7 ++-- physics/sfc_nst.f | 54 +++++++++++++++++-------------- physics/sfc_nst.meta | 24 ++++++++++++++ 4 files changed, 79 insertions(+), 30 deletions(-) diff --git a/physics/flake_driver.F90 b/physics/flake_driver.F90 index b882c7404..ea47e4ce0 100644 --- a/physics/flake_driver.F90 +++ b/physics/flake_driver.F90 @@ -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 @@ -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**5 -0.1241*x**4+1.6231*x**3-8.8666*x**2+17.206*x-4.2929 + T_sfc(i) = T_sfc(i) + 0.3*y + tb = tb + 0.05*y + else + y = 0.0034*x**5 -0.1241*x**4+1.6231*x**3-8.8666*x**2+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 = ', & diff --git a/physics/module_nst_water_prop.f90 b/physics/module_nst_water_prop.f90 index 39020526c..e02a60c62 100644 --- a/physics/module_nst_water_prop.f90 +++ b/physics/module_nst_water_prop.f90 @@ -657,7 +657,7 @@ subroutine get_dtzm_point(xt,xz,dt_cool,zc,z1,z2,dtm) end subroutine get_dtzm_point !>\ingroup waterprop - subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,z1,z2,nx,ny,nth,dtm) + subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,lake,z1,z2,nx,ny,nth,dtm) !subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,icy,z1,z2,nx,ny,dtm) ! ===================================================================== ! ! ! @@ -682,6 +682,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,z1,z2,nx,ny,nth,dtm) ! dt_cool - real, sub-layer cooling amount 1 ! ! zc - sub-layer cooling thickness 1 ! ! wet - logical, flag for wet point (ocean or lake) 1 ! +! lake - logical, flag for lake point only 1 ! ! icy - logical, flag for ice point (ocean or lake) 1 ! ! nx - integer, dimension in x-direction (zonal) 1 ! ! ny - integer, dimension in y-direction (meridional) 1 ! @@ -697,7 +698,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,z1,z2,nx,ny,nth,dtm) integer, intent(in) :: nx,ny, nth real (kind=kind_phys), dimension(nx,ny), intent(in) :: xt,xz,dt_cool,zc - logical, dimension(nx,ny), intent(in) :: wet + logical, dimension(nx,ny), intent(in) :: wet, lake ! logical, dimension(nx,ny), intent(in) :: wet,icy real (kind=kind_phys), intent(in) :: z1,z2 real (kind=kind_phys), dimension(nx,ny), intent(out) :: dtm @@ -713,7 +714,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,z1,z2,nx,ny,nth,dtm) dtm(i,j) = zero ! initialize dtm - if ( wet(i,j) ) then + if ( wet(i,j) .and. .not. lake(i,j)) then ! ! get the mean warming in the range of z=z1 to z=z2 ! diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index c9048f20d..4fb72b28e 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -27,8 +27,8 @@ 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, & + & sbc, pi,tgice, ps, u1, v1, t1, q1, tref, cm, ch, & + & prsl1, prslki, prsik1, prslk1, wet, lake, xlon, sinlat, & & stress, & & sfcemis, dlwflx, sfcnsw, rain, timestep, kdt, solhr,xcosz, & & wind, flag_iter, flag_guess, nstf_name1, nstf_name4, & @@ -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, lake, 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 ! +! lake - 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, & + & lake ! &, 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. lake(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. lake(i)) then xt_old(i) = xt(i) xs_old(i) = xs(i) xu_old(i) = xu(i) @@ -553,6 +555,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=', @@ -582,7 +585,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. lake(i)) then if (flag_guess(i)) then ! when it is guess of xt(i) = xt_old(i) xs(i) = xs_old(i) @@ -668,8 +671,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, lake, 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 +684,11 @@ subroutine sfc_nst_pre_run ! --- inputs: integer, intent(in) :: im, nthreads - logical, dimension(im), intent(in) :: wet + logical, dimension(im), intent(in) :: wet, lake 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: @@ -701,14 +706,14 @@ 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,z_c_0 + real(kind=kind_phys), dimension(im) :: dtzm ! Initialize CCPP error handling variables errmsg = '' errflg = 0 do i=1,im - if (wet(i)) then + if (wet(i) .and. .not. lake(i)) then ! tem = (oro(i)-oro_uf(i)) * rlapse ! DH* 20190927 simplyfing this code because tem is zero !tem = zero @@ -723,14 +728,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_0, wet, zero, omz1, im, 1, nthreads, dtzm) + call get_dtzm_2d (xt, xz, dt_cool, + & z_c, wet, lake, 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) = 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 + if (wet(i) .and. oceanfrac(i) > zero .and. .not. lake(i)) 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 ! tseal(i) = tsfc_wat(i) if (abs(xz(i)) > zero) then tem2 = one / xz(i) @@ -775,7 +780,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, lake,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 +795,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, lake 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 @@ -830,12 +836,12 @@ subroutine sfc_nst_post_run & if (nstf_name1 > 1) then zsea1 = 0.001_kp*real(nstf_name4) zsea2 = 0.001_kp*real(nstf_name5) - call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, zsea1, zsea2, & + call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, lake, zsea1, zsea2, & & im, 1, nthreads, dtzm) 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. lake(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 dce87e8c4..febf9fd28 100644 --- a/physics/sfc_nst.meta +++ b/physics/sfc_nst.meta @@ -239,6 +239,14 @@ type = logical intent = in optional = F +[lake] + 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 +[lake] + 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 +[lake] + 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 From a81cdb9546dcd39024c2ee0c98db3b16bf4e67ab Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Tue, 13 Apr 2021 17:37:21 +0000 Subject: [PATCH 09/19] Corrected merge error --- 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 4fb72b28e..9725e434c 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -734,7 +734,7 @@ subroutine sfc_nst_pre_run do i=1,im if (wet(i) .and. oceanfrac(i) > zero .and. .not. lake(i)) 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 + 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 From 5411d4dd0a22feeec6c71221099889c9b363bb3e Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Tue, 13 Apr 2021 18:06:07 +0000 Subject: [PATCH 10/19] Fixed some issues --- physics/sfc_nst.f | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index 9725e434c..ef2a5be5c 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: - & sbc, pi,tgice, ps, u1, v1, t1, q1, tref, cm, ch, & + & pi, tgice, sbc, ps, u1, v1, t1, q1, tref, cm, ch, & & prsl1, prslki, prsik1, prslk1, wet, lake, xlon, sinlat, & & stress, & & sfcemis, dlwflx, sfcnsw, rain, timestep, kdt, solhr,xcosz, & @@ -555,7 +555,6 @@ 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=', @@ -706,7 +705,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 = '' @@ -728,6 +727,7 @@ 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, lake, zero, omz1, im, 1, & nthreads, dtzm) From 8cd133de15abbefb20ca7717a098eb8b699ff0af Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Wed, 14 Apr 2021 16:43:00 +0000 Subject: [PATCH 11/19] Modified code based on Moorthi's commits: recoded the polynomial equation, redifined lake to use_flake --- physics/GFS_surface_composites.F90 | 10 ++++----- physics/GFS_surface_composites.meta | 2 +- physics/flake_driver.F90 | 12 +++++----- physics/flake_driver.meta | 2 +- physics/module_nst_water_prop.f90 | 8 +++---- physics/sfc_nst.f | 34 ++++++++++++++--------------- physics/sfc_nst.meta | 6 ++--- physics/sfc_ocean.F | 8 +++---- physics/sfc_ocean.meta | 2 +- 9 files changed, 42 insertions(+), 42 deletions(-) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index d0f1829df..a85db3344 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -26,7 +26,7 @@ end subroutine GFS_surface_composites_pre_finalize !! subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx, cplwav2atm, & landfrac, lakefrac, lakedepth, oceanfrac, frland, & - dry, icy, lake, ocean, wet, hice, cice, zorl, zorlo, zorll, zorli, zorl_wat, & + dry, icy, use_flake, ocean, wet, hice, cice, zorl, zorlo, zorll, zorli, zorl_wat, & zorl_lnd, zorl_ice, 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, & @@ -41,7 +41,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 @@ -230,12 +230,12 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx do i = 1, im if(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 21b308357..5aa5f3cda 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 ea47e4ce0..f5fce8301 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 @@ -216,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 @@ -250,11 +250,11 @@ SUBROUTINE flake_driver_run ( & x = 0.03279*julian if(xlat(i) .ge. 0.0) then - y = 0.0034*x**5 -0.1241*x**4+1.6231*x**3-8.8666*x**2+17.206*x-4.2929 + 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**5 -0.1241*x**4+1.6231*x**3-8.8666*x**2+17.206*x-4.2929 + 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 @@ -306,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 2b857e509..8786abfd5 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/module_nst_water_prop.f90 b/physics/module_nst_water_prop.f90 index e02a60c62..3ca7366bd 100644 --- a/physics/module_nst_water_prop.f90 +++ b/physics/module_nst_water_prop.f90 @@ -657,7 +657,7 @@ subroutine get_dtzm_point(xt,xz,dt_cool,zc,z1,z2,dtm) end subroutine get_dtzm_point !>\ingroup waterprop - subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,lake,z1,z2,nx,ny,nth,dtm) + subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,use_flake,z1,z2,nx,ny,nth,dtm) !subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,icy,z1,z2,nx,ny,dtm) ! ===================================================================== ! ! ! @@ -682,7 +682,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,lake,z1,z2,nx,ny,nth,dtm) ! dt_cool - real, sub-layer cooling amount 1 ! ! zc - sub-layer cooling thickness 1 ! ! wet - logical, flag for wet point (ocean or lake) 1 ! -! lake - logical, flag for lake point only 1 ! +! use_flake - logical, flag for lake point only 1 ! ! icy - logical, flag for ice point (ocean or lake) 1 ! ! nx - integer, dimension in x-direction (zonal) 1 ! ! ny - integer, dimension in y-direction (meridional) 1 ! @@ -698,7 +698,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,lake,z1,z2,nx,ny,nth,dtm) integer, intent(in) :: nx,ny, nth real (kind=kind_phys), dimension(nx,ny), intent(in) :: xt,xz,dt_cool,zc - logical, dimension(nx,ny), intent(in) :: wet, lake + logical, dimension(nx,ny), intent(in) :: wet, use_flake ! logical, dimension(nx,ny), intent(in) :: wet,icy real (kind=kind_phys), intent(in) :: z1,z2 real (kind=kind_phys), dimension(nx,ny), intent(out) :: dtm @@ -714,7 +714,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,lake,z1,z2,nx,ny,nth,dtm) dtm(i,j) = zero ! initialize dtm - if ( wet(i,j) .and. .not. lake(i,j)) then + if ( wet(i,j) .and. .not. use_flake(i,j)) then ! ! get the mean warming in the range of z=z1 to z=z2 ! diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index ef2a5be5c..d8af2bb3c 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -28,7 +28,7 @@ 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, lake, xlon, sinlat, & + & 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, & @@ -47,7 +47,7 @@ subroutine sfc_nst_run & ! call sfc_nst ! ! inputs: ! ! ( im, ps, u1, v1, t1, q1, tref, cm, ch, ! -! prsl1, prslki, wet, lake, 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,7 +94,7 @@ subroutine sfc_nst_run & ! prsik1 - real, im ! ! prslk1 - real, im ! ! wet - logical, =T if any ocn/lake water (F otherwise) im ! -! lake - logical, =T if any lake otherwise ocn +! 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 ! @@ -196,7 +196,7 @@ subroutine sfc_nst_run & real (kind=kind_phys), intent(in) :: solhr logical, dimension(im), intent(in) :: flag_iter, flag_guess, wet, & - & lake + & use_flake ! &, icy logical, intent(in) :: lprnt @@ -261,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) .and. .not. lake(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) .and. .not. lake(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) @@ -584,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) .and. .not. lake(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) @@ -670,7 +670,7 @@ end subroutine sfc_nst_pre_finalize !> \section NSST_general_pre_algorithm General Algorithm !! @{ subroutine sfc_nst_pre_run - & (im, wet, lake, tgice, tsfco, tsfc_wat, tsurf_wat, + & (im, wet, use_flake, tgice, tsfco, tsfc_wat, tsurf_wat, & tseal, xt, xz, dt_cool, z_c, tref, cplflx, & oceanfrac, nthreads, errmsg, errflg) @@ -683,7 +683,7 @@ subroutine sfc_nst_pre_run ! --- inputs: integer, intent(in) :: im, nthreads - logical, dimension(im), intent(in) :: wet, lake + logical, dimension(im), intent(in) :: wet, use_flake real (kind=kind_phys), intent(in) :: tgice real (kind=kind_phys), dimension(im), intent(in) :: & tsfc_wat, xt, xz, dt_cool, z_c, oceanfrac, @@ -712,7 +712,7 @@ subroutine sfc_nst_pre_run errflg = 0 do i=1,im - if (wet(i) .and. .not. lake(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 @@ -729,10 +729,10 @@ subroutine sfc_nst_pre_run if (cplflx) then z_c_0 = 0.0 call get_dtzm_2d (xt, xz, dt_cool, - & z_c, wet, lake, zero, omz1, im, 1, + & z_c, wet, use_flake, zero, omz1, im, 1, & nthreads, dtzm) do i=1,im - if (wet(i) .and. oceanfrac(i) > zero .and. .not. lake(i)) 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 @@ -780,7 +780,7 @@ end subroutine sfc_nst_post_finalize ! \section NSST_detailed_post_algorithm Detailed Algorithm ! @{ subroutine sfc_nst_post_run & - & ( im, kdt, rlapse, tgice, wet, lake,icy, oro, oro_uf, & + & ( 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 & @@ -795,7 +795,7 @@ subroutine sfc_nst_post_run & ! --- inputs: integer, intent(in) :: im, kdt, nthreads - logical, dimension(im), intent(in) :: wet, icy, lake + 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 @@ -836,12 +836,12 @@ subroutine sfc_nst_post_run & if (nstf_name1 > 1) then zsea1 = 0.001_kp*real(nstf_name4) zsea2 = 0.001_kp*real(nstf_name5) - call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, lake, zsea1, zsea2, & - & im, 1, nthreads, dtzm) + call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, use_flake, & + & zsea1, zsea2, im, 1, nthreads, dtzm) 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) .and. .not. lake(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 febf9fd28..6b4835da2 100644 --- a/physics/sfc_nst.meta +++ b/physics/sfc_nst.meta @@ -239,7 +239,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 @@ -688,7 +688,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 @@ -881,7 +881,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 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 afdea6c3f..bd7bf241a 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 From 80ae7617e655ef91a743377a76e4eb9fd897df0b Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Wed, 14 Apr 2021 16:49:42 +0000 Subject: [PATCH 12/19] Recoded the polynomial equation and redefined lake as use_flake --- physics/GFS_surface_composites.F90 | 10 ++++----- physics/GFS_surface_composites.meta | 2 +- physics/flake_driver.F90 | 13 ++++++----- physics/flake_driver.meta | 2 +- physics/module_nst_water_prop.f90 | 8 +++---- physics/sfc_nst.f | 34 ++++++++++++++--------------- physics/sfc_nst.meta | 6 ++--- physics/sfc_ocean.F | 8 +++---- physics/sfc_ocean.meta | 2 +- 9 files changed, 43 insertions(+), 42 deletions(-) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index d0f1829df..a85db3344 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -26,7 +26,7 @@ end subroutine GFS_surface_composites_pre_finalize !! subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx, cplwav2atm, & landfrac, lakefrac, lakedepth, oceanfrac, frland, & - dry, icy, lake, ocean, wet, hice, cice, zorl, zorlo, zorll, zorli, zorl_wat, & + dry, icy, use_flake, ocean, wet, hice, cice, zorl, zorlo, zorll, zorli, zorl_wat, & zorl_lnd, zorl_ice, 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, & @@ -41,7 +41,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 @@ -230,12 +230,12 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx do i = 1, im if(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 21b308357..5aa5f3cda 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 ea47e4ce0..62c431a59 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 @@ -216,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 @@ -250,11 +250,11 @@ SUBROUTINE flake_driver_run ( & x = 0.03279*julian if(xlat(i) .ge. 0.0) then - y = 0.0034*x**5 -0.1241*x**4+1.6231*x**3-8.8666*x**2+17.206*x-4.2929 + 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**5 -0.1241*x**4+1.6231*x**3-8.8666*x**2+17.206*x-4.2929 + 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 @@ -306,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) @@ -409,3 +409,4 @@ END SUBROUTINE flake_driver_run !--------------------------------- end module flake_driver + \ No newline at end of file diff --git a/physics/flake_driver.meta b/physics/flake_driver.meta index 2b857e509..8786abfd5 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/module_nst_water_prop.f90 b/physics/module_nst_water_prop.f90 index e02a60c62..3ca7366bd 100644 --- a/physics/module_nst_water_prop.f90 +++ b/physics/module_nst_water_prop.f90 @@ -657,7 +657,7 @@ subroutine get_dtzm_point(xt,xz,dt_cool,zc,z1,z2,dtm) end subroutine get_dtzm_point !>\ingroup waterprop - subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,lake,z1,z2,nx,ny,nth,dtm) + subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,use_flake,z1,z2,nx,ny,nth,dtm) !subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,icy,z1,z2,nx,ny,dtm) ! ===================================================================== ! ! ! @@ -682,7 +682,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,lake,z1,z2,nx,ny,nth,dtm) ! dt_cool - real, sub-layer cooling amount 1 ! ! zc - sub-layer cooling thickness 1 ! ! wet - logical, flag for wet point (ocean or lake) 1 ! -! lake - logical, flag for lake point only 1 ! +! use_flake - logical, flag for lake point only 1 ! ! icy - logical, flag for ice point (ocean or lake) 1 ! ! nx - integer, dimension in x-direction (zonal) 1 ! ! ny - integer, dimension in y-direction (meridional) 1 ! @@ -698,7 +698,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,lake,z1,z2,nx,ny,nth,dtm) integer, intent(in) :: nx,ny, nth real (kind=kind_phys), dimension(nx,ny), intent(in) :: xt,xz,dt_cool,zc - logical, dimension(nx,ny), intent(in) :: wet, lake + logical, dimension(nx,ny), intent(in) :: wet, use_flake ! logical, dimension(nx,ny), intent(in) :: wet,icy real (kind=kind_phys), intent(in) :: z1,z2 real (kind=kind_phys), dimension(nx,ny), intent(out) :: dtm @@ -714,7 +714,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,lake,z1,z2,nx,ny,nth,dtm) dtm(i,j) = zero ! initialize dtm - if ( wet(i,j) .and. .not. lake(i,j)) then + if ( wet(i,j) .and. .not. use_flake(i,j)) then ! ! get the mean warming in the range of z=z1 to z=z2 ! diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index ef2a5be5c..d8af2bb3c 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -28,7 +28,7 @@ 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, lake, xlon, sinlat, & + & 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, & @@ -47,7 +47,7 @@ subroutine sfc_nst_run & ! call sfc_nst ! ! inputs: ! ! ( im, ps, u1, v1, t1, q1, tref, cm, ch, ! -! prsl1, prslki, wet, lake, 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,7 +94,7 @@ subroutine sfc_nst_run & ! prsik1 - real, im ! ! prslk1 - real, im ! ! wet - logical, =T if any ocn/lake water (F otherwise) im ! -! lake - logical, =T if any lake otherwise ocn +! 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 ! @@ -196,7 +196,7 @@ subroutine sfc_nst_run & real (kind=kind_phys), intent(in) :: solhr logical, dimension(im), intent(in) :: flag_iter, flag_guess, wet, & - & lake + & use_flake ! &, icy logical, intent(in) :: lprnt @@ -261,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) .and. .not. lake(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) .and. .not. lake(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) @@ -584,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) .and. .not. lake(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) @@ -670,7 +670,7 @@ end subroutine sfc_nst_pre_finalize !> \section NSST_general_pre_algorithm General Algorithm !! @{ subroutine sfc_nst_pre_run - & (im, wet, lake, tgice, tsfco, tsfc_wat, tsurf_wat, + & (im, wet, use_flake, tgice, tsfco, tsfc_wat, tsurf_wat, & tseal, xt, xz, dt_cool, z_c, tref, cplflx, & oceanfrac, nthreads, errmsg, errflg) @@ -683,7 +683,7 @@ subroutine sfc_nst_pre_run ! --- inputs: integer, intent(in) :: im, nthreads - logical, dimension(im), intent(in) :: wet, lake + logical, dimension(im), intent(in) :: wet, use_flake real (kind=kind_phys), intent(in) :: tgice real (kind=kind_phys), dimension(im), intent(in) :: & tsfc_wat, xt, xz, dt_cool, z_c, oceanfrac, @@ -712,7 +712,7 @@ subroutine sfc_nst_pre_run errflg = 0 do i=1,im - if (wet(i) .and. .not. lake(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 @@ -729,10 +729,10 @@ subroutine sfc_nst_pre_run if (cplflx) then z_c_0 = 0.0 call get_dtzm_2d (xt, xz, dt_cool, - & z_c, wet, lake, zero, omz1, im, 1, + & z_c, wet, use_flake, zero, omz1, im, 1, & nthreads, dtzm) do i=1,im - if (wet(i) .and. oceanfrac(i) > zero .and. .not. lake(i)) 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 @@ -780,7 +780,7 @@ end subroutine sfc_nst_post_finalize ! \section NSST_detailed_post_algorithm Detailed Algorithm ! @{ subroutine sfc_nst_post_run & - & ( im, kdt, rlapse, tgice, wet, lake,icy, oro, oro_uf, & + & ( 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 & @@ -795,7 +795,7 @@ subroutine sfc_nst_post_run & ! --- inputs: integer, intent(in) :: im, kdt, nthreads - logical, dimension(im), intent(in) :: wet, icy, lake + 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 @@ -836,12 +836,12 @@ subroutine sfc_nst_post_run & if (nstf_name1 > 1) then zsea1 = 0.001_kp*real(nstf_name4) zsea2 = 0.001_kp*real(nstf_name5) - call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, lake, zsea1, zsea2, & - & im, 1, nthreads, dtzm) + call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, use_flake, & + & zsea1, zsea2, im, 1, nthreads, dtzm) 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) .and. .not. lake(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 febf9fd28..6b4835da2 100644 --- a/physics/sfc_nst.meta +++ b/physics/sfc_nst.meta @@ -239,7 +239,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 @@ -688,7 +688,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 @@ -881,7 +881,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 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 afdea6c3f..bd7bf241a 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 From e20ad2901e85dbd363c1232f9eaaec196fb2b0a5 Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Thu, 15 Apr 2021 19:32:56 +0000 Subject: [PATCH 13/19] Corrected the orders of three parameters --- physics/sfc_nst.meta | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/physics/sfc_nst.meta b/physics/sfc_nst.meta index 6b4835da2..be466f132 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 From aa73104c1f7c52ce36506c6ea3ab5c5d6ebb9074 Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Thu, 15 Apr 2021 20:28:15 +0000 Subject: [PATCH 14/19] Updated to head of upstream --- physics/GFS_surface_composites.F90 | 12 +-- physics/GFS_surface_composites.meta | 2 +- physics/module_nst_water_prop.f90 | 7 +- physics/sfc_nst.f | 54 +++++++------ physics/sfc_nst.meta | 114 +++++++++++++++++----------- physics/sfc_ocean.F | 8 +- physics/sfc_ocean.meta | 2 +- 7 files changed, 115 insertions(+), 84 deletions(-) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index 75c25cccb..e1af66ad1 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/module_nst_water_prop.f90 b/physics/module_nst_water_prop.f90 index 39020526c..3ca7366bd 100644 --- a/physics/module_nst_water_prop.f90 +++ b/physics/module_nst_water_prop.f90 @@ -657,7 +657,7 @@ subroutine get_dtzm_point(xt,xz,dt_cool,zc,z1,z2,dtm) end subroutine get_dtzm_point !>\ingroup waterprop - subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,z1,z2,nx,ny,nth,dtm) + subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,use_flake,z1,z2,nx,ny,nth,dtm) !subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,icy,z1,z2,nx,ny,dtm) ! ===================================================================== ! ! ! @@ -682,6 +682,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,z1,z2,nx,ny,nth,dtm) ! dt_cool - real, sub-layer cooling amount 1 ! ! zc - sub-layer cooling thickness 1 ! ! wet - logical, flag for wet point (ocean or lake) 1 ! +! use_flake - logical, flag for lake point only 1 ! ! icy - logical, flag for ice point (ocean or lake) 1 ! ! nx - integer, dimension in x-direction (zonal) 1 ! ! ny - integer, dimension in y-direction (meridional) 1 ! @@ -697,7 +698,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,z1,z2,nx,ny,nth,dtm) integer, intent(in) :: nx,ny, nth real (kind=kind_phys), dimension(nx,ny), intent(in) :: xt,xz,dt_cool,zc - logical, dimension(nx,ny), intent(in) :: wet + logical, dimension(nx,ny), intent(in) :: wet, use_flake ! logical, dimension(nx,ny), intent(in) :: wet,icy real (kind=kind_phys), intent(in) :: z1,z2 real (kind=kind_phys), dimension(nx,ny), intent(out) :: dtm @@ -713,7 +714,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,z1,z2,nx,ny,nth,dtm) dtm(i,j) = zero ! initialize dtm - if ( wet(i,j) ) then + if ( wet(i,j) .and. .not. use_flake(i,j)) then ! ! get the mean warming in the range of z=z1 to z=z2 ! diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index c9048f20d..d8af2bb3c 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -27,8 +27,8 @@ 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, & + & 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, & @@ -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: @@ -701,14 +705,14 @@ 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,z_c_0 + real(kind=kind_phys), dimension(im) :: dtzm, z_c_0 ! Initialize CCPP error handling variables errmsg = '' 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 @@ -724,13 +728,14 @@ subroutine sfc_nst_pre_run ! if (cplflx) then z_c_0 = 0.0 - call get_dtzm_2d (xt, xz, dt_cool, & - & z_c_0, wet, zero, omz1, im, 1, nthreads, dtzm) + call get_dtzm_2d (xt, xz, dt_cool, + & z_c, wet, use_flake, 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) = 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 + 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 ! tseal(i) = tsfc_wat(i) if (abs(xz(i)) > zero) then tem2 = one / xz(i) @@ -775,7 +780,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 +795,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 @@ -830,12 +836,12 @@ subroutine sfc_nst_post_run & if (nstf_name1 > 1) then zsea1 = 0.001_kp*real(nstf_name4) zsea2 = 0.001_kp*real(nstf_name5) - call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, zsea1, zsea2, & - & im, 1, nthreads, dtzm) + call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, use_flake, & + & zsea1, zsea2, im, 1, nthreads, dtzm) 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..be466f132 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 @@ -178,8 +178,8 @@ intent = in optional = F [cm] - standard_name = surface_drag_coefficient_for_momentum_in_air_over_water - long_name = surface exchange coeff for momentum over water + standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean + long_name = surface exchange coeff for momentum over ocean units = none dimensions = (horizontal_loop_extent) type = real @@ -187,8 +187,8 @@ intent = in optional = F [ch] - standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_water - long_name = surface exchange coeff heat surface exchange coeff heat & moisture over ocean moisture over water + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean + long_name = surface exchange coeff heat & moisture over ocean units = none dimensions = (horizontal_loop_extent) type = real @@ -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 @@ -258,8 +266,8 @@ intent = in optional = F [stress] - standard_name = surface_wind_stress_over_water - long_name = surface wind stress over water + standard_name = surface_wind_stress_over_ocean + long_name = surface wind stress over ocean units = m2 s-2 dimensions = (horizontal_loop_extent) type = real @@ -267,8 +275,8 @@ intent = in optional = F [sfcemis] - standard_name = surface_longwave_emissivity_over_water_interstitial - long_name = surface lw emissivity in fraction over water (temporary use as interstitial) + standard_name = surface_longwave_emissivity_over_ocean_interstitial + long_name = surface lw emissivity in fraction over ocean (temporary use as interstitial) units = frac dimensions = (horizontal_loop_extent) type = real @@ -276,8 +284,8 @@ intent = in optional = F [dlwflx] - standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_water - long_name = total sky surface downward longwave flux absorbed by the ground over water + standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_ocean + long_name = total sky surface downward longwave flux absorbed by the ground over ocean units = W m-2 dimensions = (horizontal_loop_extent) type = real @@ -294,8 +302,8 @@ intent = in optional = F [rain] - standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_water - long_name = total precipitation amount in each time step over water + standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ocean + long_name = total precipitation amount in each time step over ocean units = m dimensions = (horizontal_loop_extent) type = real @@ -412,8 +420,8 @@ intent = inout optional = F [tsurf] - standard_name = surface_skin_temperature_after_iteration_over_water - long_name = surface skin temperature after iteration over water + standard_name = surface_skin_temperature_after_iteration_over_ocean + long_name = surface skin temperature after iteration over ocean units = K dimensions = (horizontal_loop_extent) type = real @@ -574,8 +582,8 @@ intent = inout optional = F [qsurf] - standard_name = surface_specific_humidity_over_water - long_name = surface air saturation specific humidity over water + standard_name = surface_specific_humidity_over_ocean + long_name = surface air saturation specific humidity over ocean units = kg kg-1 dimensions = (horizontal_loop_extent) type = real @@ -583,8 +591,8 @@ intent = inout optional = F [gflux] - standard_name = upward_heat_flux_in_soil_over_water - long_name = soil heat flux over water + standard_name = upward_heat_flux_in_soil_over_ocean + long_name = soil heat flux over ocean units = W m-2 dimensions = (horizontal_loop_extent) type = real @@ -592,8 +600,8 @@ intent = inout optional = F [cmm] - standard_name = surface_drag_wind_speed_for_momentum_in_air_over_water - long_name = momentum exchange coefficient over water + standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ocean + long_name = momentum exchange coefficient over ocean units = m s-1 dimensions = (horizontal_loop_extent) type = real @@ -601,8 +609,8 @@ intent = inout optional = F [chh] - standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_water - long_name = thermal exchange coefficient over water + standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ocean + long_name = thermal exchange coefficient over ocean units = kg m-2 s-1 dimensions = (horizontal_loop_extent) type = real @@ -610,8 +618,8 @@ intent = inout optional = F [evap] - standard_name = kinematic_surface_upward_latent_heat_flux_over_water - long_name = kinematic surface upward latent heat flux over water + standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean + long_name = kinematic surface upward latent heat flux over ocean units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) type = real @@ -619,8 +627,8 @@ intent = inout optional = F [hflx] - standard_name = kinematic_surface_upward_sensible_heat_flux_over_water - long_name = kinematic surface upward sensible heat flux over water + standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean + long_name = kinematic surface upward sensible heat flux over ocean units = K m s-1 dimensions = (horizontal_loop_extent) type = real @@ -628,8 +636,8 @@ intent = inout optional = F [ep] - standard_name = surface_upward_potential_latent_heat_flux_over_water - long_name = surface upward potential latent heat flux over water + standard_name = surface_upward_potential_latent_heat_flux_over_ocean + long_name = surface upward potential latent heat flux over ocean units = W m-2 dimensions = (horizontal_loop_extent) type = real @@ -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 @@ -699,8 +715,8 @@ intent = in optional = F [tsfc_wat] - standard_name = surface_skin_temperature_over_water_interstitial - long_name = surface skin temperature over water (temporary use as interstitial) + standard_name = surface_skin_temperature_over_ocean_interstitial + long_name = surface skin temperature over ocean (temporary use as interstitial) units = K dimensions = (horizontal_loop_extent) type = real @@ -708,8 +724,8 @@ intent = in optional = F [tsurf_wat] - standard_name = surface_skin_temperature_after_iteration_over_water - long_name = surface skin temperature after iteration over water + standard_name = surface_skin_temperature_after_iteration_over_ocean + long_name = surface skin temperature after iteration over ocean units = K dimensions = (horizontal_loop_extent) type = real @@ -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 @@ -970,8 +994,8 @@ intent = in optional = F [tsurf_wat] - standard_name = surface_skin_temperature_after_iteration_over_water - long_name = surface skin temperature after iteration over water + standard_name = surface_skin_temperature_after_iteration_over_ocean + long_name = surface skin temperature after iteration over ocean units = K dimensions = (horizontal_loop_extent) type = real @@ -979,8 +1003,8 @@ intent = inout optional = F [tsfc_wat] - standard_name = surface_skin_temperature_over_water_interstitial - long_name = surface skin temperature over water (temporary use as interstitial) + standard_name = surface_skin_temperature_over_ocean_interstitial + long_name = surface skin temperature over ocean (temporary use as interstitial) units = K dimensions = (horizontal_loop_extent) type = real 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 From 59ab0cd940090f68091974840868ae2024d1c7d0 Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Thu, 15 Apr 2021 20:55:32 +0000 Subject: [PATCH 15/19] Updated flake physics --- physics/module_nst_water_prop.f90 | 7 +++---- physics/sfc_nst.f | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/physics/module_nst_water_prop.f90 b/physics/module_nst_water_prop.f90 index 3ca7366bd..7e592053c 100644 --- a/physics/module_nst_water_prop.f90 +++ b/physics/module_nst_water_prop.f90 @@ -657,7 +657,7 @@ subroutine get_dtzm_point(xt,xz,dt_cool,zc,z1,z2,dtm) end subroutine get_dtzm_point !>\ingroup waterprop - subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,use_flake,z1,z2,nx,ny,nth,dtm) + subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,z1,z2,nx,ny,nth,dtm) !subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,icy,z1,z2,nx,ny,dtm) ! ===================================================================== ! ! ! @@ -682,7 +682,6 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,use_flake,z1,z2,nx,ny,nth,dtm) ! dt_cool - real, sub-layer cooling amount 1 ! ! zc - sub-layer cooling thickness 1 ! ! wet - logical, flag for wet point (ocean or lake) 1 ! -! use_flake - logical, flag for lake point only 1 ! ! icy - logical, flag for ice point (ocean or lake) 1 ! ! nx - integer, dimension in x-direction (zonal) 1 ! ! ny - integer, dimension in y-direction (meridional) 1 ! @@ -698,7 +697,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,use_flake,z1,z2,nx,ny,nth,dtm) integer, intent(in) :: nx,ny, nth real (kind=kind_phys), dimension(nx,ny), intent(in) :: xt,xz,dt_cool,zc - logical, dimension(nx,ny), intent(in) :: wet, use_flake + logical, dimension(nx,ny), intent(in) :: wet ! logical, dimension(nx,ny), intent(in) :: wet,icy real (kind=kind_phys), intent(in) :: z1,z2 real (kind=kind_phys), dimension(nx,ny), intent(out) :: dtm @@ -714,7 +713,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,use_flake,z1,z2,nx,ny,nth,dtm) dtm(i,j) = zero ! initialize dtm - if ( wet(i,j) .and. .not. use_flake(i,j)) then + if ( wet(i,j)) then ! ! get the mean warming in the range of z=z1 to z=z2 ! diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index d8af2bb3c..520e8b802 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -728,9 +728,8 @@ subroutine sfc_nst_pre_run ! if (cplflx) then z_c_0 = 0.0 - call get_dtzm_2d (xt, xz, dt_cool, - & z_c, wet, use_flake, zero, omz1, im, 1, - & nthreads, dtzm) + call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, & + & zero, omz1, im, 1, nthreads, dtzm) do i=1,im 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 @@ -836,7 +835,7 @@ subroutine sfc_nst_post_run & if (nstf_name1 > 1) then zsea1 = 0.001_kp*real(nstf_name4) zsea2 = 0.001_kp*real(nstf_name5) - call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, use_flake, & + call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, & & zsea1, zsea2, im, 1, nthreads, dtzm) do i = 1, im ! if (wet(i) .and. .not.icy(i)) then From b53829d763acb3668fb08d065004d905d10e5bbc Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Fri, 16 Apr 2021 17:45:02 +0000 Subject: [PATCH 16/19] Updated flake physics --- physics/module_nst_water_prop.f90 | 7 +++---- physics/sfc_nst.f | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/physics/module_nst_water_prop.f90 b/physics/module_nst_water_prop.f90 index 3ca7366bd..39020526c 100644 --- a/physics/module_nst_water_prop.f90 +++ b/physics/module_nst_water_prop.f90 @@ -657,7 +657,7 @@ subroutine get_dtzm_point(xt,xz,dt_cool,zc,z1,z2,dtm) end subroutine get_dtzm_point !>\ingroup waterprop - subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,use_flake,z1,z2,nx,ny,nth,dtm) + subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,z1,z2,nx,ny,nth,dtm) !subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,icy,z1,z2,nx,ny,dtm) ! ===================================================================== ! ! ! @@ -682,7 +682,6 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,use_flake,z1,z2,nx,ny,nth,dtm) ! dt_cool - real, sub-layer cooling amount 1 ! ! zc - sub-layer cooling thickness 1 ! ! wet - logical, flag for wet point (ocean or lake) 1 ! -! use_flake - logical, flag for lake point only 1 ! ! icy - logical, flag for ice point (ocean or lake) 1 ! ! nx - integer, dimension in x-direction (zonal) 1 ! ! ny - integer, dimension in y-direction (meridional) 1 ! @@ -698,7 +697,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,use_flake,z1,z2,nx,ny,nth,dtm) integer, intent(in) :: nx,ny, nth real (kind=kind_phys), dimension(nx,ny), intent(in) :: xt,xz,dt_cool,zc - logical, dimension(nx,ny), intent(in) :: wet, use_flake + logical, dimension(nx,ny), intent(in) :: wet ! logical, dimension(nx,ny), intent(in) :: wet,icy real (kind=kind_phys), intent(in) :: z1,z2 real (kind=kind_phys), dimension(nx,ny), intent(out) :: dtm @@ -714,7 +713,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,use_flake,z1,z2,nx,ny,nth,dtm) dtm(i,j) = zero ! initialize dtm - if ( wet(i,j) .and. .not. use_flake(i,j)) then + if ( wet(i,j) ) then ! ! get the mean warming in the range of z=z1 to z=z2 ! diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index d8af2bb3c..520e8b802 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -728,9 +728,8 @@ subroutine sfc_nst_pre_run ! if (cplflx) then z_c_0 = 0.0 - call get_dtzm_2d (xt, xz, dt_cool, - & z_c, wet, use_flake, zero, omz1, im, 1, - & nthreads, dtzm) + call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, & + & zero, omz1, im, 1, nthreads, dtzm) do i=1,im 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 @@ -836,7 +835,7 @@ subroutine sfc_nst_post_run & if (nstf_name1 > 1) then zsea1 = 0.001_kp*real(nstf_name4) zsea2 = 0.001_kp*real(nstf_name5) - call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, use_flake, & + call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, & & zsea1, zsea2, im, 1, nthreads, dtzm) do i = 1, im ! if (wet(i) .and. .not.icy(i)) then From 2d3b3c4816e7132bf6cd3ebdff72473341b99aca Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Fri, 16 Apr 2021 19:23:22 +0000 Subject: [PATCH 17/19] Reserved a part of the code --- physics/sfc_nst.f | 2 +- physics/sfc_nst.meta | 88 ++++++++++++++++++-------------------------- 2 files changed, 37 insertions(+), 53 deletions(-) diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index 520e8b802..634709af4 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -728,7 +728,7 @@ subroutine sfc_nst_pre_run ! if (cplflx) then z_c_0 = 0.0 - call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, & + 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.and..not.use_flake(i)) then diff --git a/physics/sfc_nst.meta b/physics/sfc_nst.meta index be466f132..9c4221080 100644 --- a/physics/sfc_nst.meta +++ b/physics/sfc_nst.meta @@ -178,8 +178,8 @@ intent = in optional = F [cm] - standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean - long_name = surface exchange coeff for momentum over ocean + standard_name = surface_drag_coefficient_for_momentum_in_air_over_water + long_name = surface exchange coeff for momentum over water units = none dimensions = (horizontal_loop_extent) type = real @@ -187,8 +187,8 @@ intent = in optional = F [ch] - standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean - long_name = surface exchange coeff heat & moisture over ocean + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_water + long_name = surface exchange coeff heat surface exchange coeff heat & moisture over ocean moisture over water units = none dimensions = (horizontal_loop_extent) type = real @@ -266,8 +266,8 @@ intent = in optional = F [stress] - standard_name = surface_wind_stress_over_ocean - long_name = surface wind stress over ocean + standard_name = surface_wind_stress_over_water + long_name = surface wind stress over water units = m2 s-2 dimensions = (horizontal_loop_extent) type = real @@ -275,8 +275,8 @@ intent = in optional = F [sfcemis] - standard_name = surface_longwave_emissivity_over_ocean_interstitial - long_name = surface lw emissivity in fraction over ocean (temporary use as interstitial) + standard_name = surface_longwave_emissivity_over_water_interstitial + long_name = surface lw emissivity in fraction over water (temporary use as interstitial) units = frac dimensions = (horizontal_loop_extent) type = real @@ -284,8 +284,8 @@ intent = in optional = F [dlwflx] - standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_ocean - long_name = total sky surface downward longwave flux absorbed by the ground over ocean + standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_water + long_name = total sky surface downward longwave flux absorbed by the ground over water units = W m-2 dimensions = (horizontal_loop_extent) type = real @@ -302,8 +302,8 @@ intent = in optional = F [rain] - standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ocean - long_name = total precipitation amount in each time step over ocean + standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_water + long_name = total precipitation amount in each time step over water units = m dimensions = (horizontal_loop_extent) type = real @@ -420,8 +420,8 @@ intent = inout optional = F [tsurf] - standard_name = surface_skin_temperature_after_iteration_over_ocean - long_name = surface skin temperature after iteration over ocean + standard_name = surface_skin_temperature_after_iteration_over_water + long_name = surface skin temperature after iteration over water units = K dimensions = (horizontal_loop_extent) type = real @@ -582,8 +582,8 @@ intent = inout optional = F [qsurf] - standard_name = surface_specific_humidity_over_ocean - long_name = surface air saturation specific humidity over ocean + standard_name = surface_specific_humidity_over_water + long_name = surface air saturation specific humidity over water units = kg kg-1 dimensions = (horizontal_loop_extent) type = real @@ -591,8 +591,8 @@ intent = inout optional = F [gflux] - standard_name = upward_heat_flux_in_soil_over_ocean - long_name = soil heat flux over ocean + standard_name = upward_heat_flux_in_soil_over_water + long_name = soil heat flux over water units = W m-2 dimensions = (horizontal_loop_extent) type = real @@ -600,8 +600,8 @@ intent = inout optional = F [cmm] - standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ocean - long_name = momentum exchange coefficient over ocean + standard_name = surface_drag_wind_speed_for_momentum_in_air_over_water + long_name = momentum exchange coefficient over water units = m s-1 dimensions = (horizontal_loop_extent) type = real @@ -609,8 +609,8 @@ intent = inout optional = F [chh] - standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ocean - long_name = thermal exchange coefficient over ocean + standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_water + long_name = thermal exchange coefficient over water units = kg m-2 s-1 dimensions = (horizontal_loop_extent) type = real @@ -618,8 +618,8 @@ intent = inout optional = F [evap] - standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean - long_name = kinematic surface upward latent heat flux over ocean + standard_name = kinematic_surface_upward_latent_heat_flux_over_water + long_name = kinematic surface upward latent heat flux over water units = kg kg-1 m s-1 dimensions = (horizontal_loop_extent) type = real @@ -627,8 +627,8 @@ intent = inout optional = F [hflx] - standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean - long_name = kinematic surface upward sensible heat flux over ocean + standard_name = kinematic_surface_upward_sensible_heat_flux_over_water + long_name = kinematic surface upward sensible heat flux over water units = K m s-1 dimensions = (horizontal_loop_extent) type = real @@ -636,8 +636,8 @@ intent = inout optional = F [ep] - standard_name = surface_upward_potential_latent_heat_flux_over_ocean - long_name = surface upward potential latent heat flux over ocean + standard_name = surface_upward_potential_latent_heat_flux_over_water + long_name = surface upward potential latent heat flux over water units = W m-2 dimensions = (horizontal_loop_extent) type = real @@ -688,14 +688,6 @@ 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 @@ -715,8 +707,8 @@ 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) + standard_name = surface_skin_temperature_over_water_interstitial + long_name = surface skin temperature over water (temporary use as interstitial) units = K dimensions = (horizontal_loop_extent) type = real @@ -724,8 +716,8 @@ intent = in optional = F [tsurf_wat] - standard_name = surface_skin_temperature_after_iteration_over_ocean - long_name = surface skin temperature after iteration over ocean + standard_name = surface_skin_temperature_after_iteration_over_water + long_name = surface skin temperature after iteration over water units = K dimensions = (horizontal_loop_extent) type = real @@ -881,14 +873,6 @@ 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 @@ -994,8 +978,8 @@ intent = in optional = F [tsurf_wat] - standard_name = surface_skin_temperature_after_iteration_over_ocean - long_name = surface skin temperature after iteration over ocean + standard_name = surface_skin_temperature_after_iteration_over_water + long_name = surface skin temperature after iteration over water units = K dimensions = (horizontal_loop_extent) type = real @@ -1003,8 +987,8 @@ intent = inout optional = F [tsfc_wat] - standard_name = surface_skin_temperature_over_ocean_interstitial - long_name = surface skin temperature over ocean (temporary use as interstitial) + standard_name = surface_skin_temperature_over_water_interstitial + long_name = surface skin temperature over water (temporary use as interstitial) units = K dimensions = (horizontal_loop_extent) type = real From b80f88fb75384c21c46f6a7924417f3dfb0aff1b Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 16 Apr 2021 13:45:07 -0600 Subject: [PATCH 18/19] Fix formatting/revert unnecessary formatting changes --- physics/flake_driver.F90 | 3 +-- physics/sfc_nst.f | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/physics/flake_driver.F90 b/physics/flake_driver.F90 index 62c431a59..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, & - use_flake, 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, & @@ -409,4 +409,3 @@ END SUBROUTINE flake_driver_run !--------------------------------- end module flake_driver - \ No newline at end of file diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index 634709af4..c2bd8b2dc 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,use_flake, 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, & @@ -705,7 +705,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, z_c_0 + real(kind=kind_phys), dimension(im) :: dtzm,z_c_0 ! Initialize CCPP error handling variables errmsg = '' @@ -728,13 +728,13 @@ subroutine sfc_nst_pre_run ! if (cplflx) then z_c_0 = 0.0 - call get_dtzm_2d (xt, xz, dt_cool, z_c_0, wet, & - & zero, omz1, im, 1, nthreads, dtzm) + 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.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 + 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 ! tseal(i) = tsfc_wat(i) if (abs(xz(i)) > zero) then tem2 = one / xz(i) @@ -779,7 +779,7 @@ end subroutine sfc_nst_post_finalize ! \section NSST_detailed_post_algorithm Detailed Algorithm ! @{ subroutine sfc_nst_post_run & - & ( im, kdt, rlapse, tgice, wet, use_flake,icy, oro, oro_uf, & + & ( 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 & @@ -835,8 +835,8 @@ subroutine sfc_nst_post_run & if (nstf_name1 > 1) then zsea1 = 0.001_kp*real(nstf_name4) zsea2 = 0.001_kp*real(nstf_name5) - call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, & - & zsea1, zsea2, im, 1, nthreads, dtzm) + call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, zsea1, zsea2, & + & im, 1, nthreads, dtzm) do i = 1, im ! if (wet(i) .and. .not.icy(i)) then ! if (wet(i) .and. (frac_grid .or. .not. icy(i))) then From 67ddd4f0834339fe12307f87e1d3204baa227f7b Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 16 Apr 2021 14:38:49 -0600 Subject: [PATCH 19/19] Fix compile errors in sfc_nst.f and sfc_nst.meta --- physics/sfc_nst.f | 2 +- physics/sfc_nst.meta | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index c2bd8b2dc..517aa7ff0 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -731,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 .and. .not.use_flake(i)) 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 diff --git a/physics/sfc_nst.meta b/physics/sfc_nst.meta index 9c4221080..a29f10f90 100644 --- a/physics/sfc_nst.meta +++ b/physics/sfc_nst.meta @@ -688,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 @@ -873,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