Skip to content

Commit

Permalink
Initial commit of canopy resistane (rca) in Noah-MP for AQM.
Browse files Browse the repository at this point in the history
  • Loading branch information
drnimbusrain committed May 2, 2024
1 parent 1c2a898 commit 25330ed
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 9 deletions.
25 changes: 20 additions & 5 deletions physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ subroutine noahmp_sflx (parameters, &
ghb , irg , irc , irb , tr , evc , & ! out :
chleaf , chuc , chv2 , chb2 , fpice , pahv , &
pahg , pahb , pah , esnow , canhs , laisun , &
laisha , rb , qsfcveg , qsfcbare &
laisha , rb , qsfcveg , qsfcbare, rca &
#ifdef CCPP
,errmsg, errflg)
#else
Expand Down Expand Up @@ -602,6 +602,7 @@ subroutine noahmp_sflx (parameters, &
real (kind=kind_phys) , intent(out) :: t2mb !< 2-m air temperature over bare ground part [k]
real (kind=kind_phys), intent(out) :: rssun !< sunlit leaf stomatal resistance (s/m)
real (kind=kind_phys), intent(out) :: rssha !< shaded leaf stomatal resistance (s/m)
real (kind=kind_phys), intent(out) :: rca !total canopy/stomatal resistance (s/m)
real (kind=kind_phys), intent(out) :: bgap
real (kind=kind_phys), intent(out) :: wgap
real (kind=kind_phys), dimension(1:2) , intent(out) :: albd !< albedo (direct)
Expand Down Expand Up @@ -854,7 +855,7 @@ subroutine noahmp_sflx (parameters, &
fsrg ,rssun ,rssha ,albd ,albi ,albsnd,albsni, bgap ,wgap, tgv,tgb,&
q1 ,q2v ,q2b ,q2e ,chv ,chb , & !out
emissi ,pah ,canhs, &
shg,shc,shb,evg,evb,ghv,ghb,irg,irc,irb,tr,evc,chleaf,chuc,chv2,chb2 ) !out
shg,shc,shb,evg,evb,ghv,ghb,irg,irc,irb,tr,evc,chleaf,chuc,chv2,chb2,rca ) !out

qsfcveg = eah*ep_2/(sfcprs + epsm1*eah)
qsfcbare = qsfc
Expand Down Expand Up @@ -1697,7 +1698,7 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in
t2mv ,t2mb ,fsrv , &
fsrg ,rssun ,rssha ,albd ,albi,albsnd ,albsni,bgap ,wgap,tgv,tgb,&
q1 ,q2v ,q2b ,q2e ,chv ,chb, emissi,pah,canhs,&
shg,shc,shb,evg,evb,ghv,ghb,irg,irc,irb,tr,evc,chleaf,chuc,chv2,chb2 ) !out
shg,shc,shb,evg,evb,ghv,ghb,irg,irc,irb,tr,evc,chleaf,chuc,chv2,chb2,rca ) !out
!jref:end

! --------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -1846,6 +1847,8 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in
real (kind=kind_phys) , intent(out) :: fsrg !< ground reflected solar radiation (w/m2)
real (kind=kind_phys), intent(out) :: rssun !< sunlit leaf stomatal resistance (s/m)
real (kind=kind_phys), intent(out) :: rssha !< shaded leaf stomatal resistance (s/m)
real (kind=kind_phys), intent(out) :: rca !total canopy/stomatal resistance (s/m)

!jref:end - out for debug

!jref:start; output
Expand Down Expand Up @@ -2263,7 +2266,8 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in
csigmaf1, & !out
!jref:start
qc ,qsfc ,psfc , & !in
q2v ,chv2, chleaf, chuc) !inout
q2v ,chv2, chleaf, chuc, & !inout
rca) !out

! new coupling code

Expand Down Expand Up @@ -3712,7 +3716,8 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , &
t2mv ,psnsun ,psnsha ,canhs , & !out
csigmaf1, & !out
qc ,qsfc ,psfc , & !in
q2v ,cah2 ,chleaf ,chuc ) !inout
q2v ,cah2 ,chleaf ,chuc, & !inout
rca) !out

! --------------------------------------------------------------------------------------------------
! use newton-raphson iteration to solve for vegetation (tv) and
Expand Down Expand Up @@ -3862,6 +3867,7 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , &

real (kind=kind_phys), intent(out) :: rssun !sunlit leaf stomatal resistance (s/m)
real (kind=kind_phys), intent(out) :: rssha !shaded leaf stomatal resistance (s/m)
real (kind=kind_phys), intent(out) :: rca !total canopy/stomatal resistance (s/m)

real (kind=kind_phys) :: mol !monin-obukhov length (m)
real (kind=kind_phys) :: dtv !change in tv, last iteration (k)
Expand Down Expand Up @@ -4203,6 +4209,15 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , &
end if
end if

! total stomatal/canopy resistance Based on Bonan et al. (2011) conductance (1/Rs) equation
if(rssun .le. 0.0 .or. rssha .le. 0.0 .or. &
laisune .eq. 0.0 .or. laishae .eq. 0.0) then
rca = 0.0
else
rca = ((1.0/(rssun+rb)*laisune) + ((1.0/(rssha+rb))*laishae))
rca = 1.0/rca !resistance
end if

! prepare for sensible heat flux above veg.

cah = 1./rahc
Expand Down
12 changes: 8 additions & 4 deletions physics/SFC_Models/Land/Noahmp/noahmpdrv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ subroutine noahmpdrv_run &
sncovr1, qsurf, gflux, drain, evap, hflx, ep, runoff, &
cmm, chh, evbs, evcw, sbsno, pah, ecan, etran, edir, snowc,&
stm, snohf,smcwlt2, smcref2, wet1, t2mmp, q2mp,zvfun, &
ztmax, errmsg, errflg, &
ztmax, rca, errmsg, errflg, &
canopy_heat_storage_ccpp, &
rainfall_ccpp, &
sw_absorbed_total_ccpp, &
Expand Down Expand Up @@ -400,6 +400,8 @@ subroutine noahmpdrv_run &
real(kind=kind_phys), dimension(:) , intent(out) :: q2mp ! combined q2m from tiles
real(kind=kind_phys), dimension(:) , intent(out) :: zvfun !
real(kind=kind_phys), dimension(:) , intent(out) :: ztmax ! thermal roughness length
real(kind=kind_phys), dimension(:) , intent(out) :: rca ! total canopy/stomatal resistance (s/m)

character(len=*) , intent(out) :: errmsg
integer , intent(out) :: errflg

Expand Down Expand Up @@ -623,6 +625,8 @@ subroutine noahmpdrv_run &
real (kind=kind_phys) :: canopy_heat_storage ! out | within-canopy heat [W/m2]
real (kind=kind_phys) :: spec_humid_sfc_veg ! out | surface specific humidty over vegetation [kg/kg]
real (kind=kind_phys) :: spec_humid_sfc_bare ! out | surface specific humidty over bare soil [kg/kg]

real (kind=kind_phys) :: canopy_resistance ! out | total canopy/stomatal resistance (s/m)

real (kind=kind_phys) :: ustarx ! inout |surface friction velocity
real (kind=kind_phys) :: prslkix ! in exner function
Expand Down Expand Up @@ -1015,10 +1019,10 @@ subroutine noahmpdrv_run &
precip_adv_heat_total ,snow_sublimation ,canopy_heat_storage , &
lai_sunlit ,lai_shaded ,leaf_air_resistance , &
#ifdef CCPP
spec_humid_sfc_veg ,spec_humid_sfc_bare , &
spec_humid_sfc_veg ,spec_humid_sfc_bare ,canopy_resistance , &
errmsg ,errflg )
#else
spec_humid_sfc_veg ,spec_humid_sfc_bare )
spec_humid_sfc_veg ,spec_humid_sfc_bare ,canopy_resistance )
#endif

#ifdef CCPP
Expand Down Expand Up @@ -1056,7 +1060,7 @@ subroutine noahmpdrv_run &
chxy (i) = ch_noahmp
zorl (i) = z0_total * 100.0 ! convert to cm
ztmax (i) = z0h_total

rca (i) = canopy_resistance
smc (i,:) = soil_moisture_vol
slc (i,:) = soil_liquid_vol
snowxy (i) = float(snow_levels)
Expand Down
8 changes: 8 additions & 0 deletions physics/SFC_Models/Land/Noahmp/noahmpdrv.meta
Original file line number Diff line number Diff line change
Expand Up @@ -1360,6 +1360,14 @@
type = real
kind = kind_phys
intent = out
[rca]
standard_name = aerodynamic_resistance_in_canopy
long_name = canopy resistance
units = s m-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = out
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down

0 comments on commit 25330ed

Please sign in to comment.