Skip to content

Commit 97b38cb

Browse files
committed
Merge remote-tracking branch 'remotes/upstream/ufs/dev' into feature/3dtke_gfspbl
2 parents a6c6bbd + 2574825 commit 97b38cb

File tree

9 files changed

+3647
-101
lines changed

9 files changed

+3647
-101
lines changed

physics/SFC_Layer/UFS/sfc_diff.f

Lines changed: 43 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in)
6060
& sigmaf,vegtype,shdmax,ivegsrc, & !intent(in)
6161
& z0pert,ztpert, & ! mg, sfc-perts !intent(in)
6262
& flag_iter,redrag, & !intent(in)
63-
& flag_lakefreeze, & !intent(in)
63+
& flag_lakefreeze,lakefrac,fice, & !intent(in)
6464
& u10m,v10m,sfc_z0_type, & !hafs,z0 type !intent(in)
6565
& u1,v1,usfco,vsfco,icplocn2atm, &
6666
& wet,dry,icy, & !intent(in)
@@ -106,6 +106,8 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in)
106106
& ps,t1,q1,z1,garea,prsl1,prslki,prsik1,prslk1, &
107107
& wind,sigmaf,shdmax, &
108108
& z0pert,ztpert ! mg, sfc-perts
109+
real(kind=kind_phys), dimension(:), intent(in) :: lakefrac
110+
real(kind=kind_phys), dimension(:), intent(in) :: fice
109111
real(kind=kind_phys), dimension(:), intent(in) :: &
110112
& tskin_wat, tskin_lnd, tskin_ice, &
111113
& tsurf_wat, tsurf_lnd, tsurf_ice
@@ -340,7 +342,7 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in)
340342
! --- outputs:
341343
& rb_ice(i), fm_ice(i), fh_ice(i), fm10_ice(i), fh2_ice(i),
342344
& cm_ice(i), ch_ice(i), stress_ice(i), ustar_ice(i))
343-
endif ! Icy points
345+
endif ! Icy points
344346
345347
! BWG: Everything from here to end of subroutine was after
346348
! the stuff now put into "stability"
@@ -364,20 +366,8 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in)
364366
windrel=sqrt((u1(i)-usfco(i))**2+(v1(i)-vsfco(i))**2)
365367
endif
366368
367-
if (sfc_z0_type == -1) then ! using wave model derived momentum roughness
368-
tem1 = 0.11 * vis / ustar_wat(i)
369-
z0 = tem1 + 0.01_kp * z0rl_wav(i)
370-
371-
if (redrag) then
372-
z0max = max(min(z0, z0s_max),1.0e-7_kp)
373-
else
374-
z0max = max(min(z0,0.1_kp), 1.0e-7_kp)
375-
endif
376-
z0rl_wat(i) = 100.0_kp * z0max ! cm
377-
else
378-
z0 = 0.01_kp * z0rl_wat(i)
379-
z0max = max(zmin, min(z0,z1(i)))
380-
endif
369+
z0 = 0.01_kp * z0rl_wat(i)
370+
z0max = max(zmin, min(z0,z1(i)))
381371
!
382372
!** test xubin's new z0
383373

@@ -416,52 +406,51 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in)
416406
!
417407
! update z0 over ocean
418408
!
419-
if (sfc_z0_type >= 0) then
420-
if (sfc_z0_type == 0) then
421-
! z0 = (charnock / grav) * ustar_wat(i) * ustar_wat(i)
422-
tem1 = 0.11 * vis / ustar_wat(i)
423-
z0 = tem1 + (charnock/grav)*ustar_wat(i)*ustar_wat(i)
409+
if ((sfc_z0_type == -1) .and.
410+
& (lakefrac(i) == 0.0 .and. fice(i) == 0.0) .and.
411+
& (z0rl_wav(i)>1.0e-7_kp .and. z0rl_wav(i)<0.1_kp)) then
412+
! using wave model derived momentum roughness
413+
tem1 = 0.11 * vis / ustar_wat(i)
414+
z0 = tem1 + 0.01_kp * z0rl_wav(i)
415+
416+
if (redrag) then
417+
z0rl_wat(i) = 100.0_kp * max(min(z0,z0s_max),1.0e-7_kp)
418+
else
419+
z0rl_wat(i) = 100.0_kp * max(min(z0,0.1_kp), 1.e-7_kp)
420+
endif
421+
422+
elseif ((sfc_z0_type == 0) .or.
423+
& ((sfc_z0_type == -1) .and.
424+
& (z0rl_wav(i)<=1.0e-7_kp .or. z0rl_wav(i)>=0.1_kp))) then
425+
! z0 = (charnock / grav) * ustar_wat(i) * ustar_wat(i)
426+
tem1 = 0.11 * vis / ustar_wat(i)
427+
z0 = tem1 + (charnock/grav)*ustar_wat(i)*ustar_wat(i)
424428

425429

426430
! mbek -- toga-coare flux algorithm
427-
! z0 = (charnock / grav) * ustar(i)*ustar(i) + arnu/ustar(i)
431+
! z0 = (charnock / grav) * ustar(i)*ustar(i) + arnu/ustar(i)
428432
! new implementation of z0
429-
! cc = ustar(i) * z0 / rnu
430-
! pp = cc / (1. + cc)
431-
! ff = grav * arnu / (charnock * ustar(i) ** 3)
432-
! z0 = arnu / (ustar(i) * ff ** pp)
433-
434-
if (redrag) then
435-
z0rl_wat(i) = 100.0_kp * max(min(z0, z0s_max), &
436-
& 1.0e-7_kp)
437-
else
438-
z0rl_wat(i) = 100.0_kp * max(min(z0,0.1_kp), 1.e-7_kp)
439-
endif
440-
441-
elseif (sfc_z0_type == 6) then ! wang
442-
call znot_m_v6(wind10m, z0) ! wind, m/s, z0, m
443-
z0rl_wat(i) = 100.0_kp * z0 ! cm
444-
elseif (sfc_z0_type == 7) then ! wang
445-
call znot_m_v7(wind10m, z0) ! wind, m/s, z0, m
446-
z0rl_wat(i) = 100.0_kp * z0 ! cm
433+
! cc = ustar(i) * z0 / rnu
434+
! pp = cc / (1. + cc)
435+
! ff = grav * arnu / (charnock * ustar(i) ** 3)
436+
! z0 = arnu / (ustar(i) * ff ** pp)
437+
438+
if (redrag) then
439+
z0rl_wat(i) = 100.0_kp * max(min(z0,z0s_max),1.0e-7_kp)
447440
else
448-
z0rl_wat(i) = 1.0e-4_kp
441+
z0rl_wat(i) = 100.0_kp * max(min(z0,0.1_kp), 1.e-7_kp)
449442
endif
450443

451-
elseif (z0rl_wav(i) <= 1.0e-7_kp .or.
452-
& z0rl_wav(i) > 1.0_kp) then
453-
! z0 = (charnock / grav) * ustar_wat(i) * ustar_wat(i)
454-
tem1 = 0.11 * vis / ustar_wat(i)
455-
z0 = tem1 + (charnock/grav)*ustar_wat(i)*ustar_wat(i)
456-
457-
if (redrag) then
458-
z0rl_wat(i) = 100.0_kp * max(min(z0, z0s_max),1.0e-7_kp)
459-
else
460-
z0rl_wat(i) = 100.0_kp * max(min(z0,0.1_kp), 1.0e-7_kp)
461-
endif
462-
444+
elseif (sfc_z0_type == 6) then ! wang
445+
call znot_m_v6(wind10m, z0) ! wind, m/s, z0, m
446+
z0rl_wat(i) = 100.0_kp * z0 ! cm
447+
elseif (sfc_z0_type == 7) then ! wang
448+
call znot_m_v7(wind10m, z0) ! wind, m/s, z0, m
449+
z0rl_wat(i) = 100.0_kp * z0 ! cm
450+
else
451+
z0rl_wat(i) = 1.0e-4_kp
463452
endif
464-
453+
!
465454
endif ! end of if(open ocean)
466455
!
467456
endif ! end of if(flagiter) loop

physics/SFC_Layer/UFS/sfc_diff.meta

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,22 @@
143143
type = real
144144
kind = kind_phys
145145
intent = in
146+
[lakefrac]
147+
standard_name = lake_area_fraction
148+
long_name = fraction of horizontal grid area occupied by lake
149+
units = frac
150+
dimensions = (horizontal_loop_extent)
151+
type = real
152+
kind = kind_phys
153+
intent = in
154+
[fice]
155+
standard_name = sea_ice_area_fraction_of_sea_area_fraction
156+
long_name = ice fraction over open water
157+
units = frac
158+
dimensions = (horizontal_loop_extent)
159+
type = real
160+
kind = kind_phys
161+
intent = in
146162
[vegtype]
147163
standard_name = vegetation_type_classification
148164
long_name = vegetation type at each grid cell

physics/SFC_Models/Land/Noahmp/module_sf_noahmp_glacier.F90

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2630,15 +2630,24 @@ subroutine snowwater_glacier (nsnow ,nsoil ,imelt ,dt ,sfctmp , & !in
26302630
snliq ,imelt ,ficeold, & !in
26312631
isnow ,dzsnso ) !inout
26322632

2633+
if(isnow < 0) & !when multi-layer
26332634
call combine_glacier (nsnow ,nsoil , & !in
26342635
isnow ,sh2o ,stc ,snice ,snliq , & !inout
26352636
dzsnso ,sice ,snowh ,sneqv , & !inout
26362637
ponding1 ,ponding2) !out
26372638

2639+
if(isnow < 0) & !when multi-layer
26382640
call divide_glacier (nsnow ,nsoil , & !in
26392641
isnow ,stc ,snice ,snliq ,dzsnso ) !inout
26402642
end if
26412643

2644+
call snowh2o_glacier (nsnow ,nsoil ,dt ,qsnfro ,qsnsub , & !in
2645+
qrain , & !in
2646+
isnow ,dzsnso ,snowh ,sneqv ,snice , & !inout
2647+
snliq ,sh2o ,sice ,stc , & !inout
2648+
ponding1 ,ponding2 ,fsh , & !inout
2649+
qsnbot ) !out
2650+
26422651
!set empty snow layers to zero
26432652

26442653
do iz = -nsnow+1, isnow
@@ -2649,16 +2658,9 @@ subroutine snowwater_glacier (nsnow ,nsoil ,imelt ,dt ,sfctmp , & !in
26492658
zsnso(iz) = 0.
26502659
enddo
26512660

2652-
call snowh2o_glacier (nsnow ,nsoil ,dt ,qsnfro ,qsnsub , & !in
2653-
qrain , & !in
2654-
isnow ,dzsnso ,snowh ,sneqv ,snice , & !inout
2655-
snliq ,sh2o ,sice ,stc , & !inout
2656-
ponding1 ,ponding2 ,fsh , & !inout
2657-
qsnbot ) !out
2658-
26592661
!to obtain equilibrium state of snow in glacier region
26602662

2661-
if(sneqv > mwd .and. isnow /= 0) then ! 100 mm -> maximum water depth
2663+
if(sneqv > mwd) then ! 100 mm -> maximum water depth
26622664
bdsnow = snice(0) / dzsnso(0)
26632665
snoflow = (sneqv - mwd)
26642666
snice(0) = snice(0) - snoflow
@@ -2668,7 +2670,7 @@ subroutine snowwater_glacier (nsnow ,nsoil ,imelt ,dt ,sfctmp , & !in
26682670

26692671
! sum up snow mass for layered snow
26702672

2671-
if(isnow /= 0) then
2673+
if(isnow < 0) then
26722674
sneqv = 0.
26732675
snowh = 0.
26742676
do iz = isnow+1,0
@@ -2744,7 +2746,7 @@ subroutine snowfall_glacier (nsoil ,nsnow ,dt ,qsnow ,snowhin , & !in
27442746

27452747
! creating a new layer
27462748

2747-
if(isnow == 0 .and. qsnow>0. .and. snowh >= 0.05) then
2749+
if(isnow == 0 .and. qsnow>0. .and. snowh >= 0.025) then
27482750
isnow = -1
27492751
newnode = 1
27502752
dzsnso(0)= snowh
@@ -2902,8 +2904,8 @@ subroutine combine_glacier (nsnow ,nsoil , & !in
29022904
real (kind=kind_phys) :: zwice !< total ice mass in snow
29032905
real (kind=kind_phys) :: zwliq !< total liquid water in snow
29042906
real (kind=kind_phys) :: dzmin(3) !< minimum of top snow layer
2905-
data dzmin /0.045, 0.05, 0.2/
2906-
! data dzmin /0.025, 0.025, 0.1/ ! mb: change limit
2907+
! data dzmin /0.045, 0.05, 0.2/
2908+
data dzmin /0.025, 0.025, 0.1/ ! mb: change limit
29072909
!-----------------------------------------------------------------------
29082910

29092911
isnow_old = isnow
@@ -2913,17 +2915,29 @@ subroutine combine_glacier (nsnow ,nsoil , & !in
29132915
if(j /= 0) then
29142916
snliq(j+1) = snliq(j+1) + snliq(j)
29152917
snice(j+1) = snice(j+1) + snice(j)
2918+
dzsnso(j+1) = dzsnso(j+1) + dzsnso(j)
29162919
else
29172920
if (isnow_old < -1) then
29182921
snliq(j-1) = snliq(j-1) + snliq(j)
29192922
snice(j-1) = snice(j-1) + snice(j)
2923+
dzsnso(j-1) = dzsnso(j-1) + dzsnso(j)
29202924
else
2921-
ponding1 = ponding1 + snliq(j) ! isnow will get set to zero below
2922-
sneqv = snice(j) ! ponding will get added to ponding from
2923-
snowh = dzsnso(j) ! phasechange which should be zero here
2924-
snliq(j) = 0.0 ! because there it was only calculated
2925-
snice(j) = 0.0 ! for thin snow
2926-
dzsnso(j) = 0.0
2925+
if(snice(j) >= 0.) then
2926+
ponding1 = snliq(j) ! isnow will get set to zero below; ponding1 will get
2927+
sneqv = snice(j) ! added to ponding from phasechange ponding should be
2928+
snowh = dzsnso(j) ! zero here because it was calculated for thin snow
2929+
else ! snice over-sublimated earlier
2930+
ponding1 = snliq(j) + snice(j)
2931+
if(ponding1 < 0.) then ! if snice and snliq sublimates remove from soil
2932+
sice(1) = max(0.0,sice(1)+ponding1/(dzsnso(1)*1000.))
2933+
ponding1 = 0.0
2934+
end if
2935+
sneqv = 0.0
2936+
snowh = 0.0
2937+
end if
2938+
snliq(j) = 0.0
2939+
snice(j) = 0.0
2940+
dzsnso(j) = 0.0
29272941
endif
29282942
! sh2o(1) = sh2o(1)+snliq(j)/(dzsnso(1)*1000.)
29292943
! sice(1) = sice(1)+snice(j)/(dzsnso(1)*1000.)
@@ -2966,8 +2980,8 @@ subroutine combine_glacier (nsnow ,nsoil , & !in
29662980
! check the snow depth - all snow gone
29672981
! the liquid water assumes ponding on soil surface.
29682982

2969-
! if (snowh < 0.025 .and. isnow < 0 ) then ! mb: change limit
2970-
if (snowh < 0.05 .and. isnow < 0 ) then
2983+
if (snowh < 0.025 .and. isnow < 0 ) then ! mb: change limit
2984+
! if (snowh < 0.05 .and. isnow < 0 ) then
29712985
isnow = 0
29722986
sneqv = zwice
29732987
ponding2 = ponding2 + zwliq ! limit of isnow < 0 means input ponding
@@ -3165,8 +3179,8 @@ subroutine divide_glacier (nsnow ,nsoil , & !in
31653179
zwliq, zwice, tsno(1))
31663180

31673181
! subdivide a new layer
3168-
! if (msno <= 2 .and. dz(2) > 0.20) then ! mb: change limit
3169-
if (msno <= 2 .and. dz(2) > 0.10) then
3182+
if (msno <= 2 .and. dz(2) > 0.20) then ! mb: change limit
3183+
! if (msno <= 2 .and. dz(2) > 0.10) then
31703184
msno = 3
31713185
dtdz = (tsno(1) - tsno(2))/((dz(1)+dz(2))/2.)
31723186
dz(2) = dz(2)/2.
@@ -3293,6 +3307,7 @@ subroutine snowh2o_glacier (nsnow ,nsoil ,dt ,qsnfro ,qsnsub , & !in
32933307
sneqv = sneqv - qsnsub*dt + qsnfro*dt
32943308
propor = sneqv/temp
32953309
snowh = max(0.,propor * snowh)
3310+
snowh = min(max(snowh,sneqv/500.0),sneqv/50.0) ! limit adjustment to a reasonable density
32963311
elseif(opt_gla == 2) then
32973312
fsh = fsh - (qsnfro-qsnsub)*hsub
32983313
qsnfro = 0.0

physics/SFC_Models/Land/Noahmp/noahmpdrv.F90

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,34 +1205,34 @@ subroutine noahmpdrv_run &
12051205
!
12061206

12071207
snow_cover_fraction = 1.0
1208-
temperature_leaf = undefined
1209-
canopy_ice = undefined
1210-
canopy_liquid = undefined
1211-
vapor_pres_canopy_air = undefined
1212-
temperature_canopy_air = undefined
1213-
canopy_wet_fraction = undefined
1214-
lake_water = undefined
1215-
depth_water_table = undefined
1216-
aquifer_water = undefined
1217-
saturated_water = undefined
1218-
leaf_carbon = undefined
1219-
root_carbon = undefined
1220-
stem_carbon = undefined
1221-
wood_carbon = undefined
1222-
soil_carbon_stable = undefined
1223-
soil_carbon_fast = undefined
1224-
leaf_area_index = undefined
1225-
stem_area_index = undefined
1226-
evaporation_canopy = undefined
1227-
transpiration = undefined
1228-
aquifer_water = undefined
1229-
precip_adv_heat_total = undefined
1208+
temperature_leaf = temperature_radiative
1209+
canopy_ice = 0.0
1210+
canopy_liquid = 0.0
1211+
vapor_pres_canopy_air = 2000.0
1212+
temperature_canopy_air = temperature_radiative
1213+
canopy_wet_fraction = 0.0
1214+
lake_water = 0.0
1215+
depth_water_table = 0.0
1216+
aquifer_water = 0.0
1217+
saturated_water = 0.0
1218+
leaf_carbon = 0.0
1219+
root_carbon = 0.0
1220+
stem_carbon = 0.0
1221+
wood_carbon = 0.0
1222+
soil_carbon_stable = 0.0
1223+
soil_carbon_fast = 0.0
1224+
leaf_area_index = 0.0
1225+
stem_area_index = 0.0
1226+
evaporation_canopy = 0.0
1227+
transpiration = 0.0
1228+
aquifer_water = 0.0
1229+
precip_adv_heat_total = 0.0
12301230
soil_moisture_wtd = 0.0
12311231
recharge = 0.0
12321232
deep_recharge = 0.0
12331233
eq_soil_water_vol = soil_moisture_vol
1234-
transpiration_heat = undefined
1235-
latent_heat_canopy = undefined
1234+
transpiration_heat = 0.0
1235+
latent_heat_canopy = 0.0
12361236
z0_total = 0.002
12371237
latent_heat_total = latent_heat_ground
12381238
t2mmp(i) = temperature_bare_2m

0 commit comments

Comments
 (0)