Skip to content

Commit 1666136

Browse files
committed
Merge branch 'lakefrac_ice_sfcr' into ufs-dev-PR281
2 parents 04cb62d + 4365f5f commit 1666136

7 files changed

Lines changed: 3586 additions & 55 deletions

File tree

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

0 commit comments

Comments
 (0)