Skip to content

Commit 9d45cd1

Browse files
Merge pull request NCAR#25 from HelinWei-NOAA/fix_tq2m_diagnoahmp
using NoahMP tiled tq2m with the bug fix
2 parents 18d3fda + 9a66a9e commit 9d45cd1

File tree

3 files changed

+35
-10
lines changed

3 files changed

+35
-10
lines changed

physics/module_sf_noahmp_glacier.f90

+5
Original file line numberDiff line numberDiff line change
@@ -1464,6 +1464,11 @@ subroutine glacier_flux (nsoil ,nsnow ,emg ,isnow ,df ,dzsnso
14641464
! 2m air temperature
14651465
ehb2 = fv*vkc/(log((2.+z0h)/z0h)-fh2)
14661466
cq2b = ehb2
1467+
! for opt_sfc 3
1468+
if (opt_sfc ==3) then
1469+
ehb2 = fv*vkc/fh2
1470+
cq2b = ehb2
1471+
endif
14671472

14681473
if (opt_sfc == 4) then
14691474
ehb2 = ch2 * wspd1i ! need conductance,z0h from sfcdif4

physics/module_sf_noahmplsm.f90

+22-2
Original file line numberDiff line numberDiff line change
@@ -4289,13 +4289,19 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , &
42894289
! qfx = (qsfc-qair)*rhoair*caw !*cpair/gammag
42904290

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

4299+
! opt_sfc 3: fh2 is the stability
4300+
if (opt_sfc ==3) then
4301+
cah2 = fv*vkc/fh2
4302+
cq2v = cah2
4303+
endif
4304+
42994305
if (opt_sfc == 4 ) then
43004306
rahc2 = max(1.,1./(ch2v*wspdv))
43014307
rawc2 = rahc2
@@ -4742,7 +4748,7 @@ subroutine bare_flux (parameters,nsnow ,nsoil ,isnow ,dt ,sag , &
47424748
!jref:start; errors in original equation corrected.
47434749
! 2m air temperature
47444750

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

4765+
! opt_sfc 3: fh2 is the stability
4766+
if(opt_sfc == 3 ) then
4767+
ehb2 = fv*vkc/fh2
4768+
cq2b = ehb2
4769+
if (ehb2.lt.1.e-5 ) then
4770+
t2mb = tgb
4771+
q2b = qsfc
4772+
else
4773+
t2mb = tgb - shb/(rhoair*cpair) * 1./ehb2
4774+
q2b = qsfc - evb/(lathea*rhoair)*(1./cq2b + rsurf)
4775+
endif
4776+
if (parameters%urban_flag) q2b = qsfc
4777+
end if
4778+
47594779
if(opt_sfc == 4) then ! consistent with veg
47604780

47614781
rahb2 = max(1.,1./(ch2b*wspdb))

physics/sfc_diag_post.F90

+8-8
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ subroutine sfc_diag_post_run (im, lsm, lsm_noahmp, dry, lssav, dtf, con_eps, con
4040
errmsg = ''
4141
errflg = 0
4242

43-
! if (lsm == lsm_noahmp) then
44-
! do i=1,im
45-
! if(dry(i)) then
46-
! t2m(i) = t2mmp(i)
47-
! q2m(i) = q2mp(i)
48-
! endif
49-
! enddo
50-
! endif
43+
if (lsm == lsm_noahmp) then
44+
do i=1,im
45+
if(dry(i)) then
46+
t2m(i) = t2mmp(i)
47+
q2m(i) = q2mp(i)
48+
endif
49+
enddo
50+
endif
5151

5252
if (lssav) then
5353
do i=1,im

0 commit comments

Comments
 (0)