Skip to content

Commit

Permalink
Merge pull request NOAA-GSL#18 from barlage/sfcdif3_subroutine
Browse files Browse the repository at this point in the history
Some groundwater mods from NCAR repo
  • Loading branch information
HelinWei-NOAA authored Mar 8, 2022
2 parents 41cf4ec + ebb4fa1 commit b43c030
Showing 1 changed file with 43 additions and 37 deletions.
80 changes: 43 additions & 37 deletions physics/module_sf_noahmplsm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1952,26 +1952,21 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in
chv2 = 0.
rb = 0.

!
cdmnv = 0.
ezpdv = 0.

cdmng = 0.
ezpdg = 0.

cdmn = 0.
ezpd = 0.

gsigma = 0.

z0hwrf = 0.
csigmaf1 = 0.
csigmaf0 = 0.
csigmafveg= 0.
kbsigmafveg = 0.
aone = 0.
coeffa = 0.
coeffb = 0.
cdmnv = 0.0
ezpdv = 0.0
cdmng = 0.0
ezpdg = 0.0
cdmn = 0.0
ezpd = 0.0
gsigma = 0.0
z0hwrf = 0.0
csigmaf1 = 0.0
csigmaf0 = 0.0
csigmafveg= 0.0
kbsigmafveg = 0.0
aone = 0.0
coeffa = 0.0
coeffb = 0.0

!

Expand Down Expand Up @@ -2190,9 +2185,11 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in
qc ,qsfc ,psfc , & !in
q2v ,chv2, chleaf, chuc) !inout

cdmnv = 0.4*0.4/log((zlvl-zpd)/z0m)**2
aone = 2.6*(10.0*parameters%hvt/(zlvl-zpd))**0.355
ezpdv = zpd*fveg !for the grid
! new coupling code

cdmnv = 0.4*0.4/log((zlvl-zpd)/z0m)**2
aone = 2.6*(10.0*parameters%hvt/(zlvl-zpd))**0.355
ezpdv = zpd*fveg !for the grid

!jref:end
#ifdef CCPP
Expand Down Expand Up @@ -2221,18 +2218,20 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in
qc ,qsfc ,psfc , & !in
sfcprs ,q2b, chb2) !in

cdmng = 0.4*0.4/log((zlvl-zpdg)/z0mg)**2
ezpdg = zpdg
! new coupling code

cdmng = 0.4*0.4/log((zlvl-zpdg)/z0mg)**2
ezpdg = zpdg
!
! vegetation is optional; use the larger one
!
if (ezpdv .ge. ezpdg ) then
ezpd = ezpdv
elseif (ezpdv .gt. 0.0 .and. ezpdv .lt. ezpdg) then
ezpd = (1.0 -fveg)*ezpdg
else
ezpd = ezpdg
endif
if (ezpdv .ge. ezpdg ) then
ezpd = ezpdv
elseif (ezpdv .gt. 0.0 .and. ezpdv .lt. ezpdg) then
ezpd = (1.0 -fveg)*ezpdg
else
ezpd = ezpdg
endif

!jref:end
#ifdef CCPP
Expand Down Expand Up @@ -2260,6 +2259,8 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in
q1 = fveg * (eah*0.622/(sfcprs - 0.378*eah)) + (1.0 - fveg)*qsfc
q2e = fveg * q2v + (1.0 - fveg) * q2b

! new coupling code

if (opt_trs == 1) then
z0wrf = fveg * z0m + (1.0 - fveg) * z0mg
z0hwrf = z0wrf
Expand Down Expand Up @@ -7620,8 +7621,10 @@ subroutine soilwater (parameters,nsoil ,nsnow ,dt ,zsoil ,dzsnso , & !in
if ( parameters%urban_flag ) fcr(1)= 0.95

if(opt_run == 1) then
fff = 6.0
fsat = parameters%fsatmx*exp(-0.5*fff*(zwt-2.0))
! fff = 6.0
fff = parameters%bexp(1) / 3.0 ! calibratable, c.he changed based on gy niu's update
! fsat = parameters%fsatmx*exp(-0.5*fff*(zwt-2.0))
fsat = parameters%fsatmx*exp(-0.5*fff*zwt) ! c.he changed based on gy niu's update
if(qinsur > 0.) then
runsrf = qinsur * ( (1.0-fcr(1))*fsat + fcr(1) )
pddum = qinsur - runsrf ! m/s
Expand Down Expand Up @@ -8336,8 +8339,9 @@ subroutine groundwater(parameters,nsnow ,nsoil ,dt ,sice ,zsoil , & !in
real (kind=kind_phys) :: watmin!minimum soil vol soil moisture [m3/m3]
real (kind=kind_phys) :: xs !excessive water above saturation [mm]
real (kind=kind_phys), parameter :: rous = 0.2 !specific yield [-]
real (kind=kind_phys), parameter :: cmic = 0.20 !microprore content (0.0-1.0)
! real (kind=kind_phys), parameter :: cmic = 0.20 !microprore content (0.0-1.0)
!0.0-close to free drainage
real (kind=kind_phys), parameter :: cmic = 0.80 ! calibratable, c.he changed based on gy niu's update
! -------------------------------------------------------------
qdis = 0.0
qin = 0.0
Expand Down Expand Up @@ -8379,8 +8383,10 @@ subroutine groundwater(parameters,nsnow ,nsoil ,dt ,sice ,zsoil , & !in

! groundwater discharge [mm/s]

fff = 6.0
rsbmx = 5.0
! fff = 6.0
! rsbmx = 5.0
fff = parameters%bexp(iwt) / 3.0 ! calibratable, c.he changed based on gy niu's update
rsbmx = hk(iwt) * 1.0e3 * exp(3.0) ! mm/s, calibratable, c.he changed based on gy niu's update

qdis = (1.0-fcrmax)*rsbmx*exp(-parameters%timean)*exp(-fff*(zwt-2.0))

Expand Down

0 comments on commit b43c030

Please sign in to comment.