Skip to content

Commit

Permalink
Code update for HR4_roughness
Browse files Browse the repository at this point in the history
  • Loading branch information
Qingfu-Liu committed Oct 16, 2023
1 parent dd91c3a commit 4e45989
Showing 1 changed file with 29 additions and 14 deletions.
43 changes: 29 additions & 14 deletions physics/sfc_diff.f
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,26 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in)
tvs = half * (tsurf_wat(i)+tskin_wat(i))/prsik1(i)
& * virtfac
endif
z0 = 0.01_kp * z0rl_wat(i)
z0max = max(zmin, min(z0,z1(i)))
! ustar_wat(i) = sqrt(grav * z0 / charnock)
!
wind10m = sqrt(u10m(i)*u10m(i)+v10m(i)*v10m(i))
!
if (sfc_z0_type == -1) then ! using wave model derived momentum roughness
tem1 = 0.11 * vis / ustar_wat(i)
z0 = tem1 + 0.01_kp * z0rl_wav(i)
if (redrag) then
z0max = max(min(z0, z0s_max),1.0e-7_kp)
else
z0max = max(min(z0,0.1_kp), 1.0e-7_kp)
endif
z0rl_wat(i) = 100.0_kp * z0max ! cm
else
z0 = 0.01_kp * z0rl_wat(i)
z0max = max(zmin, min(z0,z1(i)))
endif
!
! ustar_wat(i) = sqrt(grav * z0 / charnock)
!
!** test xubin's new z0

! ztmax = z0max
Expand Down Expand Up @@ -423,17 +437,18 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in)
z0rl_wat(i) = 1.0e-4_kp
endif

elseif (z0rl_wav(i) <= 1.0e-7_kp .or. &
& z0rl_wav(i) > 1.0_kp) then
! z0 = (charnock / grav) * ustar_wat(i) * ustar_wat(i)
tem1 = 0.11 * vis / ustar_wat(i)
z0 = tem1 + (charnock/grav)*ustar_wat(i)*ustar_wat(i)
! elseif (z0rl_wav(i) <= 1.0e-7_kp .or. &
! & z0rl_wav(i) > 1.0_kp) then
!! z0 = (charnock / grav) * ustar_wat(i) * ustar_wat(i)
! tem1 = 0.11 * vis / ustar_wat(i)
! z0 = tem1 + (charnock/grav)*ustar_wat(i)*ustar_wat(i)

! if (redrag) then
! z0rl_wat(i) = 100.0_kp * max(min(z0, z0s_max),1.0e-7_kp)
! else
! z0rl_wat(i) = 100.0_kp * max(min(z0,0.1_kp), 1.0e-7_kp)
! endif

if (redrag) then
z0rl_wat(i) = 100.0_kp * max(min(z0, z0s_max),1.0e-7_kp)
else
z0rl_wat(i) = 100.0_kp * max(min(z0,0.1_kp), 1.0e-7_kp)
endif
endif

endif ! end of if(open ocean)
Expand Down

0 comments on commit 4e45989

Please sign in to comment.