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

Develop #16

Merged
merged 5 commits into from
Jul 25, 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
6 changes: 3 additions & 3 deletions canopy_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ program canopy_driver
real :: href !Reference Height above canopy @ 10 m (m)
real :: flameh !Flame Height (m)
logical :: ifcanwind !logical canopy wind/WAF option (default = .FALSE.)
logical :: fixpai !logical to used fixed PAI on vegtypes (default = .TRUE.)
integer :: pai_opt !integer for PAI values used or calculated (default = 0)

! !....this block gives assumed constant parameters for in-canopy conditions (read from user namelist)
real :: z0ghcm ! ratio of ground roughness length to canopy top height
Expand Down Expand Up @@ -110,7 +110,7 @@ program canopy_driver
!-------------------------------------------------------------------------------

call canopy_readnml(nlat,nlon,canlays,canres,href,z0ghcm,lamdars, &
flameh, ifcanwind, fixpai)
flameh, ifcanwind, pai_opt)
if (ifcanwind) then
write(*,*) 'Canopy wind/WAF option selected'
else
Expand Down Expand Up @@ -168,7 +168,7 @@ program canopy_driver
! ... call canopy parameters to get canopy, fire info, and shape distribution parameters

call canopy_parm(vtyperef, hcm, ffracref, lairef, &
fixpai, firetype, cdrag, &
pai_opt, firetype, cdrag, &
pai, zcanmax, sigmau, sigma1)

! ... initialize canopy model and integrate to get fractional plant area distribution functions
Expand Down
31 changes: 23 additions & 8 deletions canopy_parm_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module canopy_parm_mod

!:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
SUBROUTINE CANOPY_PARM( VTYPE, FCH, FFRAC, LAI, &
FIXPAI, FIRETYPE, CDRAG, &
PAI_OPT, FIRETYPE, CDRAG, &
PAI, ZCANMAX, SIGMAU, SIGMA1 )

!-----------------------------------------------------------------------
Expand Down Expand Up @@ -36,7 +36,7 @@ SUBROUTINE CANOPY_PARM( VTYPE, FCH, FFRAC, LAI, &
REAL(RK), INTENT( IN ) :: FCH ! Grid cell canopy height (m)
REAL(RK), INTENT( IN ) :: FFRAC ! Grid cell forest fraction
REAL(RK), INTENT( IN ) :: LAI ! Grid cell leaf area index
LOGICAL, INTENT( IN ) :: FIXPAI ! Logical to used fixed PAI on vegtypes (default = .TRUE.)
INTEGER, INTENT( IN ) :: PAI_OPT ! integer for PAI values used or calculated (default = 0)


INTEGER, INTENT( OUT ) :: FIRETYPE ! 1 = Above Canopy Fire; 0 = Below Canopy Fire; -1 No Canopy
Expand Down Expand Up @@ -67,10 +67,15 @@ SUBROUTINE CANOPY_PARM( VTYPE, FCH, FFRAC, LAI, &
!--> Use average Massman Aspen+Spruce+Pine Forest
FIRETYPE=0
CDRAG=(0.20_rk + 0.25_rk + 0.20_rk + 0.20_rk + 0.20_rk)/5.0_rk
if (FIXPAI) then
if (PAI_OPT .eq. 0) then !Katul et al. 2004 vegtype
PAI=(5.73_rk + 3.28_rk + 2.41_rk + 2.14_rk + 3.78_rk)/5.0_rk
else if (PAI_OPT .eq. 1) then !Massman PAI calculation (Eq. 19)
PAI=CalcPAI(FCH,FFRAC)
else if (PAI_OPT .eq. 2) then !need PAI function of model LAI
PAI=LAI
else
PAI=CalcPAI(FCH,FFRAC) !Massman PAI calculation (Eq. 19)
write(*,*) 'Wrong PAI_OPT choice in namelist...exiting'
call exit(2)
end if
ZCANMAX=(0.60_rk + 0.36_rk + 0.60_rk + 0.58_rk + 0.60_rk)/5.0_rk
SIGMAU=(0.38_rk + 0.60_rk + 0.30_rk + 0.20_rk + 0.10_rk)/5.0_rk
Expand All @@ -81,10 +86,15 @@ SUBROUTINE CANOPY_PARM( VTYPE, FCH, FFRAC, LAI, &
!--> Use Massman Hardwood Forest
FIRETYPE=0
CDRAG=0.15_rk
if (FIXPAI) then
if (PAI_OPT .eq. 0) then !Katul et al. 2004 vegtype
PAI=4.93_rk
else if (PAI_OPT .eq. 1) then !Massman PAI calculation (Eq. 19)
PAI=CalcPAI(FCH,FFRAC)
else if (PAI_OPT .eq. 2) then !need PAI function of model LAI
PAI=LAI
else
PAI=CalcPAI(FCH,FFRAC) !Massman PAI calculation (Eq. 19)
write(*,*) 'Wrong PAI_OPT choice in namelist...exiting'
call exit(2)
end if
ZCANMAX=0.84_rk
SIGMAU=0.13_rk
Expand All @@ -95,10 +105,15 @@ SUBROUTINE CANOPY_PARM( VTYPE, FCH, FFRAC, LAI, &
!--> Average of Massman Corn + Rice )
FIRETYPE=1
CDRAG=(0.30_rk + 0.30_rk)/2.0_rk
if (FIXPAI) then
if (PAI_OPT .eq. 0) then !Katul et al. 2004 vegtype
PAI=(2.94_rk + 3.10_rk)/2.0_rk
else if (PAI_OPT .eq. 1) then !Massman PAI calculation (Eq. 19)
PAI=CalcPAI(FCH,FFRAC)
else if (PAI_OPT .eq. 2) then !need PAI function of model LAI
PAI=LAI
else
PAI=CalcPAI(FCH,FFRAC) !Massman PAI calculation (Eq. 19)
write(*,*) 'Wrong PAI_OPT choice in namelist...exiting'
call exit(2)
end if
ZCANMAX=(0.94_rk + 0.62_rk)/2.0_rk
SIGMAU=(0.03_rk + 0.50_rk)/2.0_rk
Expand Down
12 changes: 6 additions & 6 deletions canopy_readnml.F90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

SUBROUTINE canopy_readnml (nlat,nlon,canlays,canres,href,z0ghcm,lamdars, &
flameh,ifcanwind,fixpai)
flameh,ifcanwind,pai_opt)

!-------------------------------------------------------------------------------
! Name: Read Canopy Namelist
Expand All @@ -13,17 +13,17 @@ SUBROUTINE canopy_readnml (nlat,nlon,canlays,canres,href,z0ghcm,lamdars, &

IMPLICIT NONE

INTEGER, INTENT(OUT) :: nlat,nlon,canlays
INTEGER, INTENT(OUT) :: nlat,nlon,canlays,pai_opt
REAL, INTENT(OUT) :: canres,href,z0ghcm,lamdars,flameh
LOGICAL, INTENT(OUT) :: ifcanwind,fixpai
LOGICAL, INTENT(OUT) :: ifcanwind
INTEGER :: istat
INTEGER :: n
CHARACTER(LEN=*), PARAMETER :: pname = 'CANOPY_READNML'

NAMELIST /filenames/ file_prof, file_vars

NAMELIST /userdefs/ nlat, nlon, canlays, canres, href, z0ghcm, lamdars, &
flameh, ifcanwind, fixpai
flameh, ifcanwind, pai_opt

!-------------------------------------------------------------------------------
! Error, warning, and informational messages.
Expand Down Expand Up @@ -106,8 +106,8 @@ SUBROUTINE canopy_readnml (nlat,nlon,canlays,canres,href,z0ghcm,lamdars, &
!-------------------------------------------------------------------------------

!-------------------------------------------------------------------------------
! Set default logical for using fixed PAI values on vegtypes (default = .TRUE.)
fixpai = .TRUE.
! Set default integer for PAI set values or calculation (default = 0)
pai_opt = 0
!-------------------------------------------------------------------------------

!-------------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions namelist.canopy
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
canlays = 100 !integer number of canopy layers (must match input_profile)
canres = 0.5 !real value of canopy vertical resolution (m) (must match input_profile)
href = 10.0 !real value of reference height above canopy (m)
z0ghcm = 0.0025 !ratio of ground roughness length to canopy top height
lamdars = 1.25 !Influence function associated with roughness sublayer
z0ghcm = 0.0025 !ratio of ground roughness length to canopy top height (Massman et al., 2017)
lamdars = 1.25 !Influence function associated with roughness sublayer (Massman et al., 2017)
flameh = 2.0 !real value of flame height (m)
ifcanwind = .TRUE. !logical canopy wind/WAF option (default = .FALSE.)
fixpai = .TRUE. !logical to select fixed PAI for vegtypes (default = .TRUE.)
pai_opt = 0 !integer (0=PAI fixed from Katul et al. 2004 veg types-->default; 1=PAI Massman et al. 2017 Eq. 19 calc; 2=PAI from model LAI)
/