Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UFS-dev PR#25 #989

Merged
merged 4 commits into from
Dec 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions physics/module_sf_noahmp_glacier.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1464,6 +1464,11 @@ subroutine glacier_flux (nsoil ,nsnow ,emg ,isnow ,df ,dzsnso
! 2m air temperature
ehb2 = fv*vkc/(log((2.+z0h)/z0h)-fh2)
cq2b = ehb2
! for opt_sfc 3
if (opt_sfc ==3) then
ehb2 = fv*vkc/fh2
cq2b = ehb2
endif

if (opt_sfc == 4) then
ehb2 = ch2 * wspd1i ! need conductance,z0h from sfcdif4
Expand Down
24 changes: 22 additions & 2 deletions physics/module_sf_noahmplsm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -4289,13 +4289,19 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , &
! qfx = (qsfc-qair)*rhoair*caw !*cpair/gammag

! 2m temperature over vegetation ( corrected for low cq2v values )
if (opt_sfc == 1 .or. opt_sfc == 2 .or. opt_sfc ==3 ) then
if (opt_sfc == 1 .or. opt_sfc == 2 ) then
! cah2 = fv*1./vkc*log((2.+z0h)/z0h)
cah2 = fv*vkc/log((2.+z0h)/z0h)
cah2 = fv*vkc/(log((2.+z0h)/z0h)-fh2)
cq2v = cah2
endif

! opt_sfc 3: fh2 is the stability
if (opt_sfc ==3) then
cah2 = fv*vkc/fh2
cq2v = cah2
endif

if (opt_sfc == 4 ) then
rahc2 = max(1.,1./(ch2v*wspdv))
rawc2 = rahc2
Expand Down Expand Up @@ -4742,7 +4748,7 @@ subroutine bare_flux (parameters,nsnow ,nsoil ,isnow ,dt ,sag , &
!jref:start; errors in original equation corrected.
! 2m air temperature

if(opt_sfc == 1 .or. opt_sfc ==2 .or. opt_sfc == 3) then
if(opt_sfc == 1 .or. opt_sfc ==2 ) then
ehb2 = fv*vkc/log((2.+z0h)/z0h)
ehb2 = fv*vkc/(log((2.+z0h)/z0h)-fh2)
cq2b = ehb2
Expand All @@ -4756,6 +4762,20 @@ subroutine bare_flux (parameters,nsnow ,nsoil ,isnow ,dt ,sag , &
if (parameters%urban_flag) q2b = qsfc
end if

! opt_sfc 3: fh2 is the stability
if(opt_sfc == 3 ) then
ehb2 = fv*vkc/fh2
cq2b = ehb2
if (ehb2.lt.1.e-5 ) then
t2mb = tgb
q2b = qsfc
else
t2mb = tgb - shb/(rhoair*cpair) * 1./ehb2
q2b = qsfc - evb/(lathea*rhoair)*(1./cq2b + rsurf)
endif
if (parameters%urban_flag) q2b = qsfc
end if

if(opt_sfc == 4) then ! consistent with veg

rahb2 = max(1.,1./(ch2b*wspdb))
Expand Down
16 changes: 8 additions & 8 deletions physics/sfc_diag_post.F90
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ subroutine sfc_diag_post_run (im, lsm, lsm_noahmp, dry, lssav, dtf, con_eps, con
errmsg = ''
errflg = 0

! if (lsm == lsm_noahmp) then
! do i=1,im
! if(dry(i)) then
! t2m(i) = t2mmp(i)
! q2m(i) = q2mp(i)
! endif
! enddo
! endif
if (lsm == lsm_noahmp) then
do i=1,im
if(dry(i)) then
t2m(i) = t2mmp(i)
q2m(i) = q2mp(i)
endif
enddo
endif

if (lssav) then
do i=1,im
Expand Down