Skip to content

Commit

Permalink
Merge branch 'develop' into feature/pavd
Browse files Browse the repository at this point in the history
  • Loading branch information
drnimbusrain authored Oct 9, 2023
2 parents b20f913 + 26fa597 commit c2bd964
Show file tree
Hide file tree
Showing 8 changed files with 372 additions and 24 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

[![License](https://img.shields.io/github/license/noaa-oar-arl/canopy-app.svg)](https://github.com/noaa-oar-arl/canopy-app/blob/main/LICENSE)
[![CI status](https://github.com/noaa-oar-arl/canopy-app/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/noaa-oar-arl/canopy-app/actions/workflows/ci.yml)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8403649.svg)](https://doi.org/10.5281/zenodo.8403649)

Repository for low-level, stand-alone/column canopy parameterizations for testing and application to gridded atmospheric composition/air quality models.

Expand Down Expand Up @@ -211,7 +212,8 @@ You can also [generate global inputs using Python (see python/global_data_proces
| `lambdars` | Value representing influence of RSL effects (with `rsl_opt=0`) (Massman et al., 2017) |
| `dx_opt` | `0`: Calculation of dx resolution/distance from lon; `1`: user-set dx grid resolution |
| `dx_set` | user-set real value of grid resolution (m) only if `dx_opt=1` |
| `flameh_opt` | `0`: Calculation of flame height from FRP (Byram, 1959); `1`: user-set flameh; `2`: FRP calculation where available (active fires), elsewhere user-set `flameh`; `3`: FlameH override, i.e., only uses fraction of canopy height (`flameh_set` must be <=1.0) as a surrogate for `flameh`; `4`: FRP calculation where available (active fires) and FlameH override elsewhere (same as option 3); `5`: FRP/intensity dependent (i.e., sub-canopy vs. crown fires) calculation where available (active fires) and FlameH override elsewhere (same as option 3). If option 5 is used and crowning is calculated, then the total flame height (i.e., top of canopy=FCH) is used instead of 1/2 flame height. |
| `flameh_opt` | `0`: Calculation of vegtype dependent flame height from FRP (i.e., fire intensity); Note: this uses the one of two FRP calculation methods based on `flameh_cal` below; `1`: user-set flameh; `2`: FRP calculation where available (active fires), elsewhere user-set `flameh`; `3`: FlameH override, i.e., only uses fraction of canopy height (`flameh_set` must be <=1.0) as a surrogate for `flameh`; `4`: FRP calculation where available (active fires) and FlameH override elsewhere (same as option 3); `5`: FRP/intensity dependent (i.e., sub-canopy vs. crown fires) calculation where available (active fires) and FlameH override elsewhere (same as option 3). If option 5 is used and crowning is calculated, then the total flame height (i.e., top of canopy=FCH) is used instead of 1/2 flame height. |
| `flameh_cal` | `0`: Calculates the vegtype dependent flame height from FRP, based on Table 1 of Alexander and Cruz (2012) and assuming that flame height = flame length (overestimates flame height in high winds and/or slope conditions). `1`: Calculates the vegtype dependent flame height from FRP based on Table 2 and Equation 14 of Alexander and Cruz (2012). These relate flame height directly to crown scorch height, which is derived from FRP. This method assumes that the ambient temperature is in the experimental ranges from Table 3 of Alexander and Cruz (2012), and that the lethal temperature for burning foliage is 60.0 C. |
| `flameh_set` | user-set real value of flame height (m) if `flameh_opt=1` or `2`, or `flameh` = fraction of canopy height (<=1.0), i.e., `flameh` override, if `flameh_opt=3`, `4`, or `5` |
| `frp_fac` | user-set real value of tuning factor applied to FRP in calculation of flame height (default: 1.0). Used only if `flameh_opt=0`, `2`, `4`, or `5`. |
| `pai_opt` | integer to choose option in PAI calculation used in certain model processes, e.g., ifcanwind (`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+WAI; `3`: user-set PAI value) |
Expand Down
1 change: 1 addition & 0 deletions input/namelist.canopy
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
dx_opt = 0
dx_set = 12000.0
flameh_opt = 2
flameh_cal = 0
flameh_set = 1.0
frp_fac = 1.0
pai_opt = 0
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ OBJS :=\
canopy_rad_mod.o \
canopy_tleaf_mod.o \
canopy_wind_mod.o \
canopy_waf_mod.o \
canopy_fire_mod.o \
canopy_eddy_mod.o \
canopy_bioparm_mod.o \
canopy_bioemi_mod.o \
Expand Down
8 changes: 5 additions & 3 deletions src/canopy_calcs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SUBROUTINE canopy_calcs
use canopy_rad_mod !main canopy radiation sunlit/shaded routines
use canopy_tleaf_mod !main canopy leaf temperature sunlit/shaded routines
use canopy_wind_mod !main canopy components
use canopy_waf_mod
use canopy_fire_mod
use canopy_phot_mod
use canopy_eddy_mod
use canopy_bioemi_mod
Expand Down Expand Up @@ -195,7 +195,8 @@ SUBROUTINE canopy_calcs

! ... determine midflamepoint and flame height from user or FRP calculation
call canopy_flameh(flameh_opt, flameh_set, dx_2d(i,j), modres, &
frpref, frp_fac, hcmref, midflamepoint, flameh_2d(i,j))
frpref, frp_fac, hcmref, lu_opt, vtyperef, flameh_cal, &
midflamepoint, flameh_2d(i,j))
if (firetype .eq. 0) then !forest/sub-canopy firetype
if (flameh_2d(i,j) .gt. 0.0) then !flameh must be > 0
if (flameh_2d(i,j) .le. hcmref) then !only calculate when flameh <= FCH
Expand Down Expand Up @@ -507,7 +508,8 @@ SUBROUTINE canopy_calcs

! ... determine midflamepoint and flame height from user or FRP calculation
call canopy_flameh(flameh_opt, flameh_set, dx(loc), modres, &
frpref, frp_fac, hcmref, midflamepoint, flameh(loc))
frpref, frp_fac, hcmref, lu_opt, vtyperef, flameh_cal, &
midflamepoint, flameh(loc))
if (firetype .eq. 0) then !forest/sub-canopy firetype
if (flameh(loc) .gt. 0.0) then !flameh must be > 0
if (flameh(loc) .le. hcmref) then !only calculate when flameh <= FCH
Expand Down
1 change: 1 addition & 0 deletions src/canopy_canopts_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ MODULE canopy_canopts_mod
integer :: lu_opt !integer for LU type from model mapped to Massman et al. (default = 0/VIIRS)
integer :: z0_opt !integer for setting first estimate of z0 (default = 0 for Z0_MOD)
integer :: flameh_opt !Integer for flameh values used or calculated (default = 0)
integer :: flameh_cal !Integer for FRP to flame height relationships used (default = 0)
real(rk) :: flameh_set !User Set Flame Height (m)
real(rk) :: frp_fac !FRP tuning factor for flame height calculation (default = 1.0)
integer :: dx_opt !Integer for dx resolution values used or calculated (default = 0)
Expand Down
18 changes: 11 additions & 7 deletions src/canopy_waf_mod.F90 → src/canopy_fire_mod.F90
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
module canopy_waf_mod
module canopy_fire_mod

implicit none

contains

!:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
SUBROUTINE CANOPY_FLAMEH( FLAMEH_OPT, FLAMEH_SET, DX, MODRES, &
FRP_IN, FRP_FAC, FCH, MIDFLAMEPOINT, FLAMEH )
FRP_IN, FRP_FAC, FCH, LU_OPT, VTYPE, FLAMEH_CAL, &
MIDFLAMEPOINT, FLAMEH )

!-----------------------------------------------------------------------

Expand Down Expand Up @@ -34,6 +35,9 @@ SUBROUTINE CANOPY_FLAMEH( FLAMEH_OPT, FLAMEH_SET, DX, MODRES, &
REAL(RK), INTENT( IN ) :: FRP_IN ! Model input FRP (MW/grid cell area)
REAL(RK), INTENT( IN ) :: FRP_FAC ! FRP tuning factor for flame height calculation
REAL(RK), INTENT( IN ) :: FCH ! Grid cell canopy height (m)
INTEGER, INTENT( IN ) :: LU_OPT ! Supported land use classifications
INTEGER, INTENT( IN ) :: VTYPE ! Dominant vegetation type
INTEGER, INTENT( IN ) :: FLAMEH_CAL ! Option of vegtype dependent FRP to Flame Height relationships used
INTEGER, INTENT( OUT ) :: MIDFLAMEPOINT ! Indice of the mid-flame point
REAL(RK), INTENT( OUT ) :: FLAMEH ! Flame Height (m)

Expand All @@ -50,13 +54,13 @@ SUBROUTINE CANOPY_FLAMEH( FLAMEH_OPT, FLAMEH_SET, DX, MODRES, &
FLAMEH_SET, ' from namelist'
FLAMEH = FLAMEH_SET
else !calculate flameh
FLAMEH = CalcFlameH(frp,DX)
FLAMEH = CalcFlameH(frp,DX,LU_OPT,VTYPE,FLAMEH_CAL)
end if
else if (FLAMEH_OPT .eq. 1) then !user set value
FLAMEH = FLAMEH_SET
else if (FLAMEH_OPT .eq. 2) then !both FRP calc and user set
if (frp .gt. 0.0) then
FLAMEH = CalcFlameH(frp,DX)
FLAMEH = CalcFlameH(frp,DX,LU_OPT,VTYPE,FLAMEH_CAL)
else
FLAMEH = FLAMEH_SET
end if
Expand All @@ -69,7 +73,7 @@ SUBROUTINE CANOPY_FLAMEH( FLAMEH_OPT, FLAMEH_SET, DX, MODRES, &
end if
else if (FLAMEH_OPT .eq. 4) then !uses FRP and overide elsewhere
if (frp .gt. 0.0) then
FLAMEH = CalcFlameH(frp,DX)
FLAMEH = CalcFlameH(frp,DX,LU_OPT,VTYPE,FLAMEH_CAL)
else
if (FLAMEH_SET .le. 1.0) then
FLAMEH = FCH * FLAMEH_SET !not real flame height but uses WAF at this fractional FCH
Expand All @@ -83,7 +87,7 @@ SUBROUTINE CANOPY_FLAMEH( FLAMEH_OPT, FLAMEH_SET, DX, MODRES, &
if ( ((frp*1000.0_rk)/DX) .ge. 1700.0_rk ) then !Crown fire likely (Andrews et al., 2011).
FLAMEH = FCH !https://doi.org/10.2737/RMRS-GTR-253
else
FLAMEH = CalcFlameH(frp,DX)
FLAMEH = CalcFlameH(frp,DX,LU_OPT,VTYPE,FLAMEH_CAL)
end if
else
if (FLAMEH_SET .le. 1.0) then
Expand Down Expand Up @@ -175,4 +179,4 @@ SUBROUTINE CANOPY_WAF( HCM, LAMBDARS, HREF, FLAMEH, FIRETYPE, &

END SUBROUTINE CANOPY_WAF

end module canopy_waf_mod
end module canopy_fire_mod
10 changes: 8 additions & 2 deletions src/canopy_readnml.F90
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ SUBROUTINE canopy_readnml
NAMELIST /filenames/ file_vars, file_out

NAMELIST /userdefs/ infmt_opt, time_start, time_end, time_intvl, ntime, &
nlat, nlon, modlays, modres, href_opt,var3d_opt, var3d_set, pavd_opt, pavd_set, &
href_set, z0ghc, lambdars, flameh_opt, flameh_set, frp_fac, ifcanwind, &
nlat, nlon, modlays, modres, href_opt, href_set, z0ghc, lambdars, &
var3d_opt, var3d_set, pavd_opt, pavd_set, &
flameh_opt, flameh_cal, flameh_set, frp_fac, ifcanwind, &
ifcanwaf, ifcaneddy, ifcanphot, ifcanbio, pai_opt, pai_set, lu_opt, z0_opt, &
dx_opt, dx_set, lai_thresh, frt_thresh, fch_thresh, rsl_opt, bio_cce, &
biovert_opt, ssg_opt, ssg_set, crop_opt, crop_set, co2_opt, co2_set
Expand Down Expand Up @@ -141,6 +142,11 @@ SUBROUTINE canopy_readnml
flameh_opt = 0
!-------------------------------------------------------------------------------

!-------------------------------------------------------------------------------
! Set default integer for FRP to flame height relationships used (default = 0)
flameh_cal = 0
!-------------------------------------------------------------------------------

!-------------------------------------------------------------------------------
! Set default real value for flame height (m) (Default = 2.0 m)
flameh_set = 2.0_rk
Expand Down
Loading

0 comments on commit c2bd964

Please sign in to comment.