From 7193bc611992ab328923b1d953881d95f70ec045 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Wed, 4 Sep 2019 16:06:17 -0600 Subject: [PATCH 01/93] Passive Crown Fire development Add EQ to evaluate potential for crown fire Add EQ for passive crown fire igntion Set fraction of crown burnt based on this conditional Add crown fire threshold, crown fire flag, and crown fire PFT param --- fire/SFMainMod.F90 | 50 +++++++++++++++++++++--- fire/SFParamsMod.F90 | 9 +++++ main/EDPftvarcon.F90 | 14 ++++++- main/EDTypesMod.F90 | 1 + parameter_files/fates_params_default.cdl | 14 ++++++- 5 files changed, 78 insertions(+), 10 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index e7ce073c14..888cf52a8d 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -902,11 +902,17 @@ subroutine crown_damage ( currentSite ) !returns the updated currentCohort%fraction_crown_burned for each tree cohort within each patch. !currentCohort%fraction_crown_burned is the proportion of crown affected by fire + + !SF_val_crown_ignition_energy (kJ/kg) for crown foliage with 100% moisture (dry mass) + use SFParamsMod, only : SF_val_crown_ignition_energy !kJ/kg + type(ed_site_type), intent(in), target :: currentSite type(ed_patch_type) , pointer :: currentPatch type(ed_cohort_type), pointer :: currentCohort + real(r8) height_cbb ! lower crown base height (m) or clear branch bole height (m) + currentPatch => currentSite%oldest_patch do while(associated(currentPatch)) @@ -916,21 +922,53 @@ subroutine crown_damage ( currentSite ) do while(associated(currentCohort)) currentCohort%fraction_crown_burned = 0.0_r8 + currentCohort%crown_FI = 0.0_r8 !critical fire intensity for passive crown fire + currentCohort%crown_fire = 0 ! binary flag for passvie crown fire igntion + if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then !trees only + + ! Calculate clear branch bole height at base of crown + ! inst%crown = crown_depth_frac (PFT) + height_cbb = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) + + ! Evaluate for passive crown fire ignition + if (EDPftvarcon_inst%crown_fire(currentCohort%pft) == 1) then + + ! Crown fuel ignition potential, EQ 8 Bessie and Johnson 1995 + currentCohort%crown_FI = (0.01 * height_cbb * SF_val_crown_ignition_energy) + + if (currentCohort%crown_FI >= crown_fire_threshold) then ! 200 kW/m = threshold for crown fire potential + + ! Initiation of passive crown fire, EQ 9 Bessie and Johnson 1995 + currentCohort%passive_crown_fire = currentPatch%FI/currentCohort%crown_FI + if (currentCohort%passive_crown_fire > 1.0_r8) then + currentCohort%crown_fire = 1 ! passive crown fire ignited + currentCohort%fraction_crown_burned = 1.0_r8 + else ! evaluate crown damage based on scorch height + currentCohort%fraction_crown_burned = 0.0_r8 + endif ! passive crown fire + else + currentCohort%crown_fire = 0 ! no crown fire today + currentCohort%fraction_crown_burned = 0.0_r8 + endif ! crown fire intensity + else + currentCohort%crown_fire = 0 ! not crown fire plant + currentCohort%fraction_crown_burned = 0.0_r8 + endif + ! Flames lower than bottom of canopy. - ! c%hite is height of cohort - if (currentPatch%SH < (currentCohort%hite-currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft))) then + ! c%hite is height of cohort + if (currentPatch%SH < (currentCohort%hite- height_cbb)) .and. currentCohort%crown_fire = 0 then currentCohort%fraction_crown_burned = 0.0_r8 else ! Flames part of way up canopy. ! Equation 17 in Thonicke et al. 2010. ! flames over bottom of canopy but not over top. if ((currentCohort%hite > 0.0_r8).and.(currentPatch%SH >= & - (currentCohort%hite-currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft)))) then + (currentCohort%hite - height_cbb))) .and. currentCohort%crown_fire = 0 then - currentCohort%fraction_crown_burned = (currentPatch%SH-currentCohort%hite*(1.0_r8- & - EDPftvarcon_inst%crown(currentCohort%pft)))/(currentCohort%hite* & - EDPftvarcon_inst%crown(currentCohort%pft)) + currentCohort%fraction_crown_burned = (currentPatch%SH-currentCohort%hite*(1.0_r8- & + EDPftvarcon_inst%crown(currentCohort%pft)))/(height_cbb) else ! Flames over top of canopy. diff --git a/fire/SFParamsMod.F90 b/fire/SFParamsMod.F90 index 1c9f278c1e..dddef4d927 100644 --- a/fire/SFParamsMod.F90 +++ b/fire/SFParamsMod.F90 @@ -23,6 +23,7 @@ module SFParamsMod real(r8),protected, public :: SF_val_fdi_alpha real(r8),protected, public :: SF_val_miner_total real(r8),protected, public :: SF_val_fuel_energy + real(r8),protected, public :: SF_val_crown_ignition_energy real(r8),protected, public :: SF_val_part_dens real(r8),protected, public :: SF_val_miner_damp real(r8),protected, public :: SF_val_max_durat @@ -44,6 +45,7 @@ module SFParamsMod character(len=param_string_length),parameter :: SF_name_fdi_alpha = "fates_fire_fdi_alpha" character(len=param_string_length),parameter :: SF_name_miner_total = "fates_fire_miner_total" character(len=param_string_length),parameter :: SF_name_fuel_energy = "fates_fire_fuel_energy" + character(len=param_string_length),parameter :: SF_name_crown_ignition_energy = "fates_fire_crown_ignition_energy" character(len=param_string_length),parameter :: SF_name_part_dens = "fates_fire_part_dens" character(len=param_string_length),parameter :: SF_name_miner_damp = "fates_fire_miner_damp" character(len=param_string_length),parameter :: SF_name_max_durat = "fates_fire_max_durat" @@ -137,6 +139,7 @@ subroutine SpitFireParamsInit() SF_val_fdi_alpha = nan SF_val_miner_total = nan SF_val_fuel_energy = nan + SF_val_crown_ignition_energy = nan SF_val_part_dens = nan SF_val_miner_damp = nan SF_val_max_durat = nan @@ -215,6 +218,9 @@ subroutine SpitFireRegisterScalars(fates_params) call fates_params%RegisterParameter(name=SF_name_fuel_energy, dimension_shape=dimension_shape_scalar, & dimension_names=dim_names_scalar) + call fates_params%RegisterParameter(name=SF_name_crown_ignition_energy, dimension_shape=dimension_shape_scalar, & + dimension_names=dim_names_scalar) + call fates_params%RegisterParameter(name=SF_name_part_dens, dimension_shape=dimension_shape_scalar, & dimension_names=dim_names_scalar) @@ -256,6 +262,9 @@ subroutine SpitFireReceiveScalars(fates_params) call fates_params%RetreiveParameter(name=SF_name_fuel_energy, & data=SF_val_fuel_energy) + call fates_params%RetreiveParameter(name=SF_name_crown_ignition_energy, & + data=SF_val_crown_ignition_energy) + call fates_params%RetreiveParameter(name=SF_name_part_dens, & data=SF_val_part_dens) diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index 0e4a9f7720..fe06fc91a9 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -48,9 +48,10 @@ module EDPftvarcon real(r8), allocatable :: crown(:) ! fraction of the height of the plant ! that is occupied by crown. For fire model. real(r8), allocatable :: bark_scaler(:) ! scaler from dbh to bark thickness. For fire model. - real(r8), allocatable :: crown_kill(:) ! scaler on fire death. For fire model. + real(r8), allocatable :: crown_kill(:) ! resistance to fire. (1 = none) For fire model. + real(r8), allocatable :: crown_fire(:) ! Does plant have passive crown fire? (1=yes, 0=no) real(r8), allocatable :: initd(:) ! initial seedling density - real(r8), allocatable :: seed_suppl(:) ! seeds that come from outside the gridbox. + real(r8), allocatable :: seed_suppl(:) ! seeds that come from outside the gridbox. real(r8), allocatable :: BB_slope(:) ! ball berry slope parameter real(r8), allocatable :: seed_alloc_mature(:) ! fraction of carbon balance allocated to @@ -381,6 +382,10 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) + name = 'fates_fire_crown_fire' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + name = 'fates_recruit_initd' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -813,6 +818,10 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%crown_kill) + name = 'fates_fire_crown_fire' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%crown_fire) + name = 'fates_recruit_initd' call fates_params%RetreiveParameterAllocate(name=name, & data=this%initd) @@ -1722,6 +1731,7 @@ subroutine FatesReportPFTParams(is_master) write(fates_log(),fmt0) 'crown = ',EDPftvarcon_inst%crown write(fates_log(),fmt0) 'bark_scaler = ',EDPftvarcon_inst%bark_scaler write(fates_log(),fmt0) 'crown_kill = ',EDPftvarcon_inst%crown_kill + write(fates_log(),fmt0) 'crown_fire = ',EDPftvarcon_inst%crown_fire write(fates_log(),fmt0) 'initd = ',EDPftvarcon_inst%initd write(fates_log(),fmt0) 'seed_suppl = ',EDPftvarcon_inst%seed_suppl write(fates_log(),fmt0) 'BB_slope = ',EDPftvarcon_inst%BB_slope diff --git a/main/EDTypesMod.F90 b/main/EDTypesMod.F90 index 1850ea9ce9..4dfcede3d2 100644 --- a/main/EDTypesMod.F90 +++ b/main/EDTypesMod.F90 @@ -146,6 +146,7 @@ module EDTypesMod integer, parameter, public :: lg_sf = 6 ! array index of live grass pool for spitfire real(r8), parameter, public :: fire_threshold = 50.0_r8 ! threshold for fires that spread or go out. KWm-2 (Pyne 1986) + real(r8), parameter, public :: crown_fire_threshold = 200.0_r8 ! threshold for passive crown fire ignition. KWm-2 (Bessie & Johnson 1995) ! PATCH FUSION real(r8), parameter, public :: force_patchfuse_min_biomass = 0.005_r8 ! min biomass (kg / m2 patch area) below which to force-fuse patches diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 49b7662508..fa276bf42b 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -122,7 +122,7 @@ variables: fates_displar:long_name = "Ratio of displacement height to canopy top height" ; double fates_fire_alpha_SH(fates_pft) ; fates_fire_alpha_SH:units = "NA" ; - fates_fire_alpha_SH:long_name = "spitfire parameter, alpha scorch height, Equation 16 Thonicke et al 2010" ; + fates_fire_alpha_SH:long_name = "spitfire parameter, alpha scorch height, EQ 16 Thonicke et al 2010" ; double fates_fire_bark_scaler(fates_pft) ; fates_fire_bark_scaler:units = "fraction" ; fates_fire_bark_scaler:long_name = "the thickness of a cohorts bark as a fraction of its dbh" ; @@ -131,7 +131,10 @@ variables: fates_fire_crown_depth_frac:long_name = "the depth of a cohorts crown as a fraction of its height" ; double fates_fire_crown_kill(fates_pft) ; fates_fire_crown_kill:units = "NA" ; - fates_fire_crown_kill:long_name = "fire parameter, see equation 22 in Thonicke et al 2010" ; + fates_fire_crown_kill:long_name = "resistance to fire (1 = none), EQ 22 in Thonicke et al 2010" ; + double fates_fire_crown_fire(fates_pft) ; + fates_fire_crown_fire:units = "logical flag" ; + fates_fire_crown_fire:long_name = "Binary flag for passive crown fire"; double fates_fr_fcel(fates_pft) ; fates_fr_fcel:units = "fraction" ; fates_fr_fcel:long_name = "Fine root litter cellulose fraction" ; @@ -492,6 +495,9 @@ variables: double fates_fire_fuel_energy ; fates_fire_fuel_energy:units = "kJ/kg" ; fates_fire_fuel_energy:long_name = "spitfire parameter, heat content of fuel" ; + double fates_fire_crown_ignition_energy ; + fates_fire_crown_ignition_energy:units = "kJ/kg" ; + fates_fire_crown_ignition_energy:long_name = "spitfire parameter, heat of crown foliage ignition" ; double fates_fire_max_durat ; fates_fire_max_durat:units = "minutes" ; fates_fire_max_durat:long_name = "spitfire parameter, fire maximum duration, Equation 14 Thonicke et al 2010" ; @@ -718,6 +724,8 @@ data: fates_fire_crown_kill = 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775 ; +fates_fire_passive_crown_fire = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; + fates_fr_fcel = 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 ; fates_fr_flab = 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, @@ -1116,6 +1124,8 @@ data: fates_fire_fuel_energy = 18000 ; + fates_fire_crown_ignition_energy = 3060 ; + fates_fire_max_durat = 240 ; fates_fire_miner_damp = 0.41739 ; From bad24e413d8bd119bbab669d407b72d4270025fc Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Wed, 4 Sep 2019 16:31:22 -0600 Subject: [PATCH 02/93] Correct EQ for crown_FI --- fire/SFMainMod.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 888cf52a8d..11dfe6246f 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -923,7 +923,7 @@ subroutine crown_damage ( currentSite ) do while(associated(currentCohort)) currentCohort%fraction_crown_burned = 0.0_r8 currentCohort%crown_FI = 0.0_r8 !critical fire intensity for passive crown fire - currentCohort%crown_fire = 0 ! binary flag for passvie crown fire igntion + currentCohort%crown_fire = 0 !flag for passvie crown fire ignition if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then !trees only @@ -935,7 +935,7 @@ subroutine crown_damage ( currentSite ) if (EDPftvarcon_inst%crown_fire(currentCohort%pft) == 1) then ! Crown fuel ignition potential, EQ 8 Bessie and Johnson 1995 - currentCohort%crown_FI = (0.01 * height_cbb * SF_val_crown_ignition_energy) + currentCohort%crown_FI = (0.01 * height_cbb * SF_val_crown_ignition_energy)**1.5 if (currentCohort%crown_FI >= crown_fire_threshold) then ! 200 kW/m = threshold for crown fire potential From 093db93ff2026722d9dfc7ef450602de1b4afeb4 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Thu, 5 Sep 2019 10:39:39 -0600 Subject: [PATCH 03/93] Update and correct variable names for passive crown fire --- fire/SFMainMod.F90 | 6 +++--- main/EDPftvarcon.F90 | 10 +++++----- parameter_files/fates_params_default.cdl | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 11dfe6246f..bc85d80b91 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -940,8 +940,8 @@ subroutine crown_damage ( currentSite ) if (currentCohort%crown_FI >= crown_fire_threshold) then ! 200 kW/m = threshold for crown fire potential ! Initiation of passive crown fire, EQ 9 Bessie and Johnson 1995 - currentCohort%passive_crown_fire = currentPatch%FI/currentCohort%crown_FI - if (currentCohort%passive_crown_fire > 1.0_r8) then + currentCohort%ignite_crown = currentPatch%FI/currentCohort%crown_FI + if (currentCohort%ignite_crown > 1.0_r8) then currentCohort%crown_fire = 1 ! passive crown fire ignited currentCohort%fraction_crown_burned = 1.0_r8 else ! evaluate crown damage based on scorch height @@ -1069,7 +1069,7 @@ subroutine post_fire_mortality ( currentSite ) currentCohort%crownfire_mort = 0.0_r8 if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then ! Equation 22 in Thonicke et al. 2010. - currentCohort%crownfire_mort = EDPftvarcon_inst%crown_kill(currentCohort%pft)*currentCohort%fraction_crown_burned**3.0_r8 + currentCohort%crownfire_mort = EDPftvarcon_inst%crown_resist(currentCohort%pft)*currentCohort%fraction_crown_burned**3.0_r8 ! Equation 18 in Thonicke et al. 2010. currentCohort%fire_mort = max(0._r8,min(1.0_r8,currentCohort%crownfire_mort+currentCohort%cambial_mort- & (currentCohort%crownfire_mort*currentCohort%cambial_mort))) !joint prob. diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index fe06fc91a9..7fbda29121 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -48,7 +48,7 @@ module EDPftvarcon real(r8), allocatable :: crown(:) ! fraction of the height of the plant ! that is occupied by crown. For fire model. real(r8), allocatable :: bark_scaler(:) ! scaler from dbh to bark thickness. For fire model. - real(r8), allocatable :: crown_kill(:) ! resistance to fire. (1 = none) For fire model. + real(r8), allocatable :: crown_resist(:) ! resistance to fire. (1 = none) For fire model. real(r8), allocatable :: crown_fire(:) ! Does plant have passive crown fire? (1=yes, 0=no) real(r8), allocatable :: initd(:) ! initial seedling density real(r8), allocatable :: seed_suppl(:) ! seeds that come from outside the gridbox. @@ -378,7 +378,7 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_fire_crown_kill' + name = 'fates_fire_crown_resist' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -814,9 +814,9 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%bark_scaler) - name = 'fates_fire_crown_kill' + name = 'fates_fire_crown_resist' call fates_params%RetreiveParameterAllocate(name=name, & - data=this%crown_kill) + data=this%crown_resist) name = 'fates_fire_crown_fire' call fates_params%RetreiveParameterAllocate(name=name, & @@ -1730,7 +1730,7 @@ subroutine FatesReportPFTParams(is_master) write(fates_log(),fmt0) 'leaf_stor_priority = ',EDPftvarcon_inst%leaf_stor_priority write(fates_log(),fmt0) 'crown = ',EDPftvarcon_inst%crown write(fates_log(),fmt0) 'bark_scaler = ',EDPftvarcon_inst%bark_scaler - write(fates_log(),fmt0) 'crown_kill = ',EDPftvarcon_inst%crown_kill + write(fates_log(),fmt0) 'crown_resist = ',EDPftvarcon_inst%crown_resist write(fates_log(),fmt0) 'crown_fire = ',EDPftvarcon_inst%crown_fire write(fates_log(),fmt0) 'initd = ',EDPftvarcon_inst%initd write(fates_log(),fmt0) 'seed_suppl = ',EDPftvarcon_inst%seed_suppl diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index fa276bf42b..d98fc2e1ea 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -129,9 +129,9 @@ variables: double fates_fire_crown_depth_frac(fates_pft) ; fates_fire_crown_depth_frac:units = "fraction" ; fates_fire_crown_depth_frac:long_name = "the depth of a cohorts crown as a fraction of its height" ; - double fates_fire_crown_kill(fates_pft) ; - fates_fire_crown_kill:units = "NA" ; - fates_fire_crown_kill:long_name = "resistance to fire (1 = none), EQ 22 in Thonicke et al 2010" ; + double fates_fire_crown_resist(fates_pft) ; + fates_fire_crown_resist:units = "NA" ; + fates_fire_crown_resist:long_name = "resistance to fire (1 = none), EQ 22 in Thonicke et al 2010" ; double fates_fire_crown_fire(fates_pft) ; fates_fire_crown_fire:units = "logical flag" ; fates_fire_crown_fire:long_name = "Binary flag for passive crown fire"; @@ -721,10 +721,10 @@ data: fates_fire_crown_depth_frac = 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.95, 0.95, 0.95, 1, 1, 1 ; - fates_fire_crown_kill = 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, + fates_fire_crown_resist = 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775 ; -fates_fire_passive_crown_fire = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; +fates_fire_crown_fire = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; fates_fr_fcel = 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 ; From f3077dfda1ceba060cb8493bf868835d8bfe7cd9 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Thu, 5 Sep 2019 14:28:34 -0600 Subject: [PATCH 04/93] Update name for crown_fire flag --- fire/SFMainMod.F90 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index bc85d80b91..f8f90402a9 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -923,7 +923,7 @@ subroutine crown_damage ( currentSite ) do while(associated(currentCohort)) currentCohort%fraction_crown_burned = 0.0_r8 currentCohort%crown_FI = 0.0_r8 !critical fire intensity for passive crown fire - currentCohort%crown_fire = 0 !flag for passvie crown fire ignition + currentCohort%crown_fire_flg = 0 !flag for passvie crown fire ignition if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then !trees only @@ -942,30 +942,30 @@ subroutine crown_damage ( currentSite ) ! Initiation of passive crown fire, EQ 9 Bessie and Johnson 1995 currentCohort%ignite_crown = currentPatch%FI/currentCohort%crown_FI if (currentCohort%ignite_crown > 1.0_r8) then - currentCohort%crown_fire = 1 ! passive crown fire ignited + currentCohort%crown_fire_flg = 1 ! passive crown fire ignited currentCohort%fraction_crown_burned = 1.0_r8 else ! evaluate crown damage based on scorch height currentCohort%fraction_crown_burned = 0.0_r8 endif ! passive crown fire else - currentCohort%crown_fire = 0 ! no crown fire today + currentCohort%crown_fire_flg = 0 ! no crown fire today currentCohort%fraction_crown_burned = 0.0_r8 endif ! crown fire intensity else - currentCohort%crown_fire = 0 ! not crown fire plant + currentCohort%crown_fire_flg = 0 ! not crown fire plant currentCohort%fraction_crown_burned = 0.0_r8 endif ! Flames lower than bottom of canopy. ! c%hite is height of cohort - if (currentPatch%SH < (currentCohort%hite- height_cbb)) .and. currentCohort%crown_fire = 0 then + if (currentPatch%SH < (currentCohort%hite- height_cbb)) .and. currentCohort%crown_fire_flg = 0 then currentCohort%fraction_crown_burned = 0.0_r8 else ! Flames part of way up canopy. ! Equation 17 in Thonicke et al. 2010. ! flames over bottom of canopy but not over top. if ((currentCohort%hite > 0.0_r8).and.(currentPatch%SH >= & - (currentCohort%hite - height_cbb))) .and. currentCohort%crown_fire = 0 then + (currentCohort%hite - height_cbb))) .and. currentCohort%crown_fire_flg = 0 then currentCohort%fraction_crown_burned = (currentPatch%SH-currentCohort%hite*(1.0_r8- & EDPftvarcon_inst%crown(currentCohort%pft)))/(height_cbb) From f28f546ca29580555042788841589a4a1d10c447 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Thu, 5 Sep 2019 14:47:53 -0600 Subject: [PATCH 05/93] Remove redundant details within evaluation for crown fire ignition --- fire/SFMainMod.F90 | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index f8f90402a9..17c0aae191 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -939,22 +939,18 @@ subroutine crown_damage ( currentSite ) if (currentCohort%crown_FI >= crown_fire_threshold) then ! 200 kW/m = threshold for crown fire potential - ! Initiation of passive crown fire, EQ 9 Bessie and Johnson 1995 + ! Initiation of passive crown fire, EQ 9 Bessie and Johnson 1995 currentCohort%ignite_crown = currentPatch%FI/currentCohort%crown_FI + if (currentCohort%ignite_crown > 1.0_r8) then currentCohort%crown_fire_flg = 1 ! passive crown fire ignited currentCohort%fraction_crown_burned = 1.0_r8 - else ! evaluate crown damage based on scorch height - currentCohort%fraction_crown_burned = 0.0_r8 - endif ! passive crown fire - else - currentCohort%crown_fire_flg = 0 ! no crown fire today - currentCohort%fraction_crown_burned = 0.0_r8 + ! else ! evaluate crown damage based on scorch height + endif ! ignite passive crown fire + ! else no crown fire today endif ! crown fire intensity - else - currentCohort%crown_fire_flg = 0 ! not crown fire plant - currentCohort%fraction_crown_burned = 0.0_r8 - endif + ! else ! not crown fire plant + endif ! evaluate passive crown fire ! Flames lower than bottom of canopy. ! c%hite is height of cohort From 79a8f5eb9e948c9553652eee3fd01bed65499f1e Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Thu, 5 Sep 2019 16:11:39 -0600 Subject: [PATCH 06/93] Add q_dry as available to entire fire module --- fire/SFMainMod.F90 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 17c0aae191..60ffde1a51 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -60,6 +60,8 @@ module SFMainMod integer :: write_SF = 0 ! for debugging logical :: debug = .false. ! for debugging + + real(r8),parameter :: q_dry = 581.0_r8 !heat of pre-ignition of dry fuels (kJ/kg) ! ============================================================================ ! ============================================================================ @@ -167,7 +169,7 @@ subroutine charecteristics_of_fuel ( currentSite ) type(ed_patch_type), pointer :: currentPatch type(ed_cohort_type), pointer :: currentCohort - type(litter_type), pointer :: litt_c + type(litter_type), pointer :: litt_c real(r8) timeav_swc real(r8) alpha_FMC(nfsc) ! Relative fuel moisture adjusted per drying ratio @@ -483,7 +485,7 @@ subroutine rate_of_spread ( currentSite ) ! Equation A4 in Thonicke et al. 2010 ! conversion of Rohtermal (1972) equation 12 in BTU/lb to current kJ/kg ! q_ig in kJ/kg - q_ig = 581.0_r8 +2594.0_r8 * currentPatch%fuel_eff_moist + q_ig = q_dry + 2594.0_r8 * currentPatch%fuel_eff_moist ! ---effective heating number--- ! Equation A3 in Thonicke et al. 2010. From ae0a5e7196fa9219b37712c140c55fa7a0c2d51b Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Thu, 5 Sep 2019 16:39:57 -0600 Subject: [PATCH 07/93] Change name for passive_crown fire intensity --- fire/SFMainMod.F90 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 60ffde1a51..ef26fd81e1 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -924,7 +924,7 @@ subroutine crown_damage ( currentSite ) do while(associated(currentCohort)) currentCohort%fraction_crown_burned = 0.0_r8 - currentCohort%crown_FI = 0.0_r8 !critical fire intensity for passive crown fire + currentCohort%passive_crown_FI = 0.0_r8 !critical fire intensity for passive crown fire currentCohort%crown_fire_flg = 0 !flag for passvie crown fire ignition if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then !trees only @@ -937,12 +937,12 @@ subroutine crown_damage ( currentSite ) if (EDPftvarcon_inst%crown_fire(currentCohort%pft) == 1) then ! Crown fuel ignition potential, EQ 8 Bessie and Johnson 1995 - currentCohort%crown_FI = (0.01 * height_cbb * SF_val_crown_ignition_energy)**1.5 + currentCohort%passive_crown_FI = (0.01 * height_cbb * SF_val_crown_ignition_energy)**1.5 - if (currentCohort%crown_FI >= crown_fire_threshold) then ! 200 kW/m = threshold for crown fire potential + if (currentCohort%passive_crown_FI >= crown_fire_threshold) then ! 200 kW/m = threshold for crown fire potential - ! Initiation of passive crown fire, EQ 9 Bessie and Johnson 1995 - currentCohort%ignite_crown = currentPatch%FI/currentCohort%crown_FI + ! Initiation of passive crown fire, EQ 14 Bessie and Johnson 1995 + currentCohort%ignite_crown = currentPatch%FI/currentCohort%passive_crown_FI if (currentCohort%ignite_crown > 1.0_r8) then currentCohort%crown_fire_flg = 1 ! passive crown fire ignited From cafdac5295dff07a545fa0326971450b73cade60 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Thu, 5 Sep 2019 18:32:01 -0600 Subject: [PATCH 08/93] Revert q_dry to be local within fire ROS subroutine --- fire/SFMainMod.F90 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index ef26fd81e1..81d285472e 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -60,8 +60,6 @@ module SFMainMod integer :: write_SF = 0 ! for debugging logical :: debug = .false. ! for debugging - - real(r8),parameter :: q_dry = 581.0_r8 !heat of pre-ignition of dry fuels (kJ/kg) ! ============================================================================ ! ============================================================================ @@ -443,7 +441,8 @@ subroutine rate_of_spread ( currentSite ) real(r8) a_beta ! dummy variable for product of a* beta_ratio for react_v_opt equation real(r8) a,b,c,e ! function of fuel sav - logical,parameter :: debug_windspeed = .false. !for debugging + logical,parameter :: debug_windspeed = .false. !for debugging + real(r8),parameter :: q_dry = 581.0_r8 !heat of pre-ignition of dry fuels (kJ/kg) currentPatch=>currentSite%oldest_patch; From f908f8e38fa26742f42b05adbeac02c36d2aaa8a Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Fri, 6 Sep 2019 18:09:32 -0600 Subject: [PATCH 09/93] Introducing active crown fire equations Following @jkshuman's introduction of the Bessie and Johnson (1995) formulation for determining the presence of passive crown fire (https://github.com/NGEET/fates/pull/572), I now add the same paper's formulation for determining the presence of active crown fire. The corresponding issue is https://github.com/NGEET/fates/issues/573 --- fire/SFMainMod.F90 | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 81d285472e..e6bc70ea06 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -30,7 +30,6 @@ module SFMainMod use EDtypesMod , only : TR_SF use FatesLitterMod , only : litter_type - use PRTGenericMod, only : leaf_organ use PRTGenericMod, only : carbon12_element use PRTGenericMod, only : all_carbon_elements use PRTGenericMod, only : leaf_organ @@ -913,6 +912,11 @@ subroutine crown_damage ( currentSite ) type(ed_cohort_type), pointer :: currentCohort real(r8) height_cbb ! lower crown base height (m) or clear branch bole height (m) + real(r8) :: crown_depth ! [m] + real(r8) :: leaf_c ! leaf carbon [kg] + real(r8) :: crown_fuel_bulkd ! leaf biomass per unit area divided by canopy depth [kg/m3] Van Wagner used this method according to Scott (2006) p. 12 + real(r8), parameter :: low_heat_of_combustion = 12700.0_r8 ! [kJ/kg] + real(r8), parameter :: critical_mass_flow_rate = 0.05_r8 ! [kg/m2/s] value for conifer forests; if available for other vegetation, move to the params file? currentPatch => currentSite%oldest_patch @@ -930,22 +934,38 @@ subroutine crown_damage ( currentSite ) ! Calculate clear branch bole height at base of crown ! inst%crown = crown_depth_frac (PFT) - height_cbb = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) + crown_depth = currentCohort%hite * EDPftvarcon_inst%crown(currentCohort%pft) + height_cbb = currentCohort%hite - crown_depth ! Evaluate for passive crown fire ignition if (EDPftvarcon_inst%crown_fire(currentCohort%pft) == 1) then ! Crown fuel ignition potential, EQ 8 Bessie and Johnson 1995 currentCohort%passive_crown_FI = (0.01 * height_cbb * SF_val_crown_ignition_energy)**1.5 + ! Critical intensity for active crowning (kW/m) + ! EQ 12 Bessie and Johnson 1995 + ! Dividing fuels by 0.45 to get biomass but note that the + ! 0.45 cancels out and could be removed. Also dividing + ! critical_mass_flow_rate by 3.34, an empirical constant + ! in Bessie & Johnson 1995 + leaf_c = currentCohort%prt%GetState(leaf_organ, all_carbon_elements) + crown_fuel_bulkd = leaf_c / (0.45_r8 * crown_depth) + currentCohort%active_crown_FI = critical_mass_flow_rate * low_heat_of_combustion * currentPatch%sum_fuel / (0.45_r8 * 3.34_r8 * crown_fuel_bulkd) if (currentCohort%passive_crown_FI >= crown_fire_threshold) then ! 200 kW/m = threshold for crown fire potential ! Initiation of passive crown fire, EQ 14 Bessie and Johnson 1995 currentCohort%ignite_crown = currentPatch%FI/currentCohort%passive_crown_FI - if (currentCohort%ignite_crown > 1.0_r8) then + if (currentCohort%ignite_crown >= 1.0_r8) then currentCohort%crown_fire_flg = 1 ! passive crown fire ignited currentCohort%fraction_crown_burned = 1.0_r8 + ! Initiation of active crown fire, EQ 14b Bessie and Johnson 1995 + currentCohort%ignite_active_crown = currentPatch%FI/currentCohort%active_crown_FI + if (currentCohort%ignite_active_crown >= 1.0_r8) then + ! In code design phase; see + ! https://github.com/NGEET/fates/issues/573 + endif ! ignite active crown fire ! else ! evaluate crown damage based on scorch height endif ! ignite passive crown fire ! else no crown fire today @@ -955,17 +975,16 @@ subroutine crown_damage ( currentSite ) ! Flames lower than bottom of canopy. ! c%hite is height of cohort - if (currentPatch%SH < (currentCohort%hite- height_cbb)) .and. currentCohort%crown_fire_flg = 0 then + if (currentPatch%SH < height_cbb .and. currentCohort%crown_fire_flg = 0) then currentCohort%fraction_crown_burned = 0.0_r8 else ! Flames part of way up canopy. ! Equation 17 in Thonicke et al. 2010. ! flames over bottom of canopy but not over top. - if ((currentCohort%hite > 0.0_r8).and.(currentPatch%SH >= & - (currentCohort%hite - height_cbb))) .and. currentCohort%crown_fire_flg = 0 then + if (currentCohort%hite > 0.0_r8 .and. currentPatch%SH >= & + height_cbb .and. currentCohort%crown_fire_flg = 0) then - currentCohort%fraction_crown_burned = (currentPatch%SH-currentCohort%hite*(1.0_r8- & - EDPftvarcon_inst%crown(currentCohort%pft)))/(height_cbb) + currentCohort%fraction_crown_burned = (currentPatch%SH - height_cbb) / crown_depth else ! Flames over top of canopy. From 555838103d385cd5884ce27937a9c38d86682b70 Mon Sep 17 00:00:00 2001 From: jkshuman Date: Mon, 9 Sep 2019 10:12:24 -0600 Subject: [PATCH 10/93] Update fire/SFMainMod.F90 Co-Authored-By: Samuel Levis --- fire/SFMainMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 81d285472e..d27dfcb6ad 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -943,7 +943,7 @@ subroutine crown_damage ( currentSite ) ! Initiation of passive crown fire, EQ 14 Bessie and Johnson 1995 currentCohort%ignite_crown = currentPatch%FI/currentCohort%passive_crown_FI - if (currentCohort%ignite_crown > 1.0_r8) then + if (currentCohort%ignite_crown >= 1.0_r8) then currentCohort%crown_fire_flg = 1 ! passive crown fire ignited currentCohort%fraction_crown_burned = 1.0_r8 ! else ! evaluate crown damage based on scorch height From 1d2367137d742de35f415f2c8fae89ed96041d34 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Mon, 9 Sep 2019 14:54:37 -0600 Subject: [PATCH 11/93] Clean up calculation of fraction crown burnt --- fire/SFMainMod.F90 | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index d27dfcb6ad..5c2a7ba11f 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -928,9 +928,10 @@ subroutine crown_damage ( currentSite ) if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then !trees only - ! Calculate clear branch bole height at base of crown + ! height_cbb = clear branch bole height at base of crown (m) ! inst%crown = crown_depth_frac (PFT) - height_cbb = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) + height_cbb = currentCohort%hite * (1.0_r8 - EDPftvarcon_inst%crown(currentCohort%pft) + crown_depth = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) ! Evaluate for passive crown fire ignition if (EDPftvarcon_inst%crown_fire(currentCohort%pft) == 1) then @@ -954,18 +955,18 @@ subroutine crown_damage ( currentSite ) endif ! evaluate passive crown fire ! Flames lower than bottom of canopy. - ! c%hite is height of cohort - if (currentPatch%SH < (currentCohort%hite- height_cbb)) .and. currentCohort%crown_fire_flg = 0 then + ! cohort%hite is height of cohort + if (currentPatch%SH <= height_cbb .and. currentCohort%crown_fire_flg = 0) then currentCohort%fraction_crown_burned = 0.0_r8 else ! Flames part of way up canopy. ! Equation 17 in Thonicke et al. 2010. ! flames over bottom of canopy but not over top. - if ((currentCohort%hite > 0.0_r8).and.(currentPatch%SH >= & - (currentCohort%hite - height_cbb))) .and. currentCohort%crown_fire_flg = 0 then + if ((currentCohort%hite > 0.0_r8).and.(currentPatch%SH > height_cbb) & + .and. (currentPatch%SH <= currentCohort%hite) & + .and. currentCohort%crown_fire_flg = 0 then - currentCohort%fraction_crown_burned = (currentPatch%SH-currentCohort%hite*(1.0_r8- & - EDPftvarcon_inst%crown(currentCohort%pft)))/(height_cbb) + currentCohort%fraction_crown_burned = (currentPatch%SH - height_cbb)/crown_depth else ! Flames over top of canopy. From 764d6c46d7cae23883a2c0c1aca0f57cd5476bb9 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Mon, 9 Sep 2019 17:04:32 -0600 Subject: [PATCH 12/93] Re-order for clearer calculation of clear branch bole height --- fire/SFMainMod.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 5c2a7ba11f..e542e72d7b 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -930,8 +930,9 @@ subroutine crown_damage ( currentSite ) ! height_cbb = clear branch bole height at base of crown (m) ! inst%crown = crown_depth_frac (PFT) - height_cbb = currentCohort%hite * (1.0_r8 - EDPftvarcon_inst%crown(currentCohort%pft) crown_depth = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) + height_cbb = currentCohort%hite - crown_depth + ! Evaluate for passive crown fire ignition if (EDPftvarcon_inst%crown_fire(currentCohort%pft) == 1) then From a1ebec924c92c749cc145d698786deccf635d932 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Tue, 10 Sep 2019 09:46:51 -0600 Subject: [PATCH 13/93] Clean up else statements for scorch height fraction crown burnt --- fire/SFMainMod.F90 | 46 ++++++++++++++++++++-------------------------- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index e542e72d7b..51dccdd464 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -114,7 +114,7 @@ subroutine fire_danger_index ( currentSite, bc_in) !***************************************************************** ! currentSite%acc_NI is the accumulated Nesterov fire danger index - use SFParamsMod, only : SF_val_fdi_a, SF_val_fdi_b + use SFParamsMod, only : SF_val_fdi_a, SF_val_fdi_b use FatesConstantsMod , only : tfrz => t_water_freeze_k_1atm use FatesConstantsMod , only : sec_per_day @@ -574,8 +574,8 @@ subroutine ground_fuel_consumption ( currentSite ) !returns the the hypothetic fuel consumed by the fire use SFParamsMod, only : SF_val_miner_total, SF_val_min_moisture, & - SF_val_mid_moisture, SF_val_low_moisture_Coeff, SF_val_low_moisture_Slope, & - SF_val_mid_moisture_Coeff, SF_val_mid_moisture_Slope + SF_val_mid_moisture, SF_val_low_moisture_Coeff, SF_val_low_moisture_Slope, & + SF_val_mid_moisture_Coeff, SF_val_mid_moisture_Slope type(ed_site_type) , intent(in), target :: currentSite type(ed_patch_type), pointer :: currentPatch @@ -664,8 +664,8 @@ subroutine fire_intensity ( currentSite ) !currentPatch%TFC_ROS total fuel consumed by flaming front (kgC/m2) use FatesInterfaceMod, only : hlm_use_spitfire - use SFParamsMod, only : SF_val_fdi_alpha,SF_val_fuel_energy, & - SF_val_max_durat, SF_val_durat_slope + use SFParamsMod, only : SF_val_fdi_alpha,SF_val_fuel_energy, & + SF_val_max_durat, SF_val_durat_slope type(ed_site_type), intent(inout), target :: currentSite @@ -828,7 +828,7 @@ subroutine crown_scorching ( currentSite ) type(ed_site_type), intent(in), target :: currentSite - type(ed_patch_type), pointer :: currentPatch + type(ed_patch_type), pointer :: currentPatch type(ed_cohort_type), pointer :: currentCohort real(r8) :: f_ag_bmass ! fraction of tree cohort's above-ground biomass as a proportion of total patch ag tree biomass @@ -902,7 +902,6 @@ subroutine crown_damage ( currentSite ) !returns the updated currentCohort%fraction_crown_burned for each tree cohort within each patch. !currentCohort%fraction_crown_burned is the proportion of crown affected by fire - !SF_val_crown_ignition_energy (kJ/kg) for crown foliage with 100% moisture (dry mass) use SFParamsMod, only : SF_val_crown_ignition_energy !kJ/kg @@ -912,7 +911,9 @@ subroutine crown_damage ( currentSite ) type(ed_patch_type) , pointer :: currentPatch type(ed_cohort_type), pointer :: currentCohort - real(r8) height_cbb ! lower crown base height (m) or clear branch bole height (m) + real(r8) crown_depth ! depth of crown (m) + real(r8) height_cbb ! clear branch bole height or crown base height (m) + currentPatch => currentSite%oldest_patch @@ -955,26 +956,19 @@ subroutine crown_damage ( currentSite ) ! else ! not crown fire plant endif ! evaluate passive crown fire - ! Flames lower than bottom of canopy. - ! cohort%hite is height of cohort + ! Flames lower than bottom of canopy. + ! height_cbb is clear branch bole height or height of bottom of canopy if (currentPatch%SH <= height_cbb .and. currentCohort%crown_fire_flg = 0) then currentCohort%fraction_crown_burned = 0.0_r8 - else - ! Flames part of way up canopy. - ! Equation 17 in Thonicke et al. 2010. - ! flames over bottom of canopy but not over top. - if ((currentCohort%hite > 0.0_r8).and.(currentPatch%SH > height_cbb) & - .and. (currentPatch%SH <= currentCohort%hite) & - .and. currentCohort%crown_fire_flg = 0 then - - currentCohort%fraction_crown_burned = (currentPatch%SH - height_cbb)/crown_depth - - else - ! Flames over top of canopy. - currentCohort%fraction_crown_burned = 1.0_r8 - endif - endif + ! Flames part way into canopy + ! Equation 17 in Thonicke et al. 2010 + elseif ((currentCohort%hite > 0.0_r8).and.(currentPatch%SH > height_cbb) & + .and. currentCohort%crown_fire_flg = 0 then + + currentCohort%fraction_crown_burned = max(0.0_r8, & + min(1.0_r8, (currentPatch%SH - height_cbb)/crown_depth)) + endif !SH frac crown burnt calculation ! Check for strange values. currentCohort%fraction_crown_burned = min(1.0_r8, max(0.0_r8,currentCohort%fraction_crown_burned)) endif !trees only @@ -1070,7 +1064,7 @@ subroutine post_fire_mortality ( currentSite ) ! Equation 22 in Thonicke et al. 2010. currentCohort%crownfire_mort = EDPftvarcon_inst%crown_resist(currentCohort%pft)*currentCohort%fraction_crown_burned**3.0_r8 ! Equation 18 in Thonicke et al. 2010. - currentCohort%fire_mort = max(0._r8,min(1.0_r8,currentCohort%crownfire_mort+currentCohort%cambial_mort- & + currentCohort%fire_mort = max(0.0_r8,min(1.0_r8,currentCohort%crownfire_mort+currentCohort%cambial_mort- & (currentCohort%crownfire_mort*currentCohort%cambial_mort))) !joint prob. else currentCohort%fire_mort = 0.0_r8 !Set to zero. Grass mode of death is removal of leaves. From a0e59a297f746d3733eceedd029d085147d9372c Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Tue, 10 Sep 2019 10:46:45 -0600 Subject: [PATCH 14/93] Add Cohort variables for crown damage to CohortDynamics --- biogeochem/EDCohortDynamicsMod.F90 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/biogeochem/EDCohortDynamicsMod.F90 b/biogeochem/EDCohortDynamicsMod.F90 index 943c5abf37..79d2171fcc 100644 --- a/biogeochem/EDCohortDynamicsMod.F90 +++ b/biogeochem/EDCohortDynamicsMod.F90 @@ -535,6 +535,8 @@ subroutine nan_cohort(cc_p) ! FIRE currentCohort%fraction_crown_burned = nan ! proportion of crown affected by fire + currentCohort%passive_crown_FI = nan ! critical fire intensity for passive crown fire + currentCohort%crown_fire_flg = nan ! flag for passive crown fire ignition currentCohort%cambial_mort = nan ! probability that trees dies due to cambial char P&R (1986) currentCohort%crownfire_mort = nan ! probability of tree post-fire mortality due to crown scorch currentCohort%fire_mort = nan ! post-fire mortality from cambial and crown damage assuming two are independent From 1365bf4ec754272a241ac1a3cb2194d31c074663 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Tue, 10 Sep 2019 10:59:29 -0600 Subject: [PATCH 15/93] Define variable name for crown fire damage --- biogeochem/EDCohortDynamicsMod.F90 | 1 + fire/SFMainMod.F90 | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/biogeochem/EDCohortDynamicsMod.F90 b/biogeochem/EDCohortDynamicsMod.F90 index 79d2171fcc..455633592e 100644 --- a/biogeochem/EDCohortDynamicsMod.F90 +++ b/biogeochem/EDCohortDynamicsMod.F90 @@ -537,6 +537,7 @@ subroutine nan_cohort(cc_p) currentCohort%fraction_crown_burned = nan ! proportion of crown affected by fire currentCohort%passive_crown_FI = nan ! critical fire intensity for passive crown fire currentCohort%crown_fire_flg = nan ! flag for passive crown fire ignition + currentCohort%ignite_crown = nan ! ratio to determine passive crown fire ignition, EQ14 Bessie&Johnson 1995 currentCohort%cambial_mort = nan ! probability that trees dies due to cambial char P&R (1986) currentCohort%crownfire_mort = nan ! probability of tree post-fire mortality due to crown scorch currentCohort%fire_mort = nan ! post-fire mortality from cambial and crown damage assuming two are independent diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 51dccdd464..2ded57639a 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -912,7 +912,9 @@ subroutine crown_damage ( currentSite ) type(ed_cohort_type), pointer :: currentCohort real(r8) crown_depth ! depth of crown (m) - real(r8) height_cbb ! clear branch bole height or crown base height (m) + real(r8) height_cbb ! clear branch bole height or crown base height (m) + + real(r8), parameter :: crown_fire_threshold = 200.0_r8 ! threshold for crown fire potential (kW/m) currentPatch => currentSite%oldest_patch @@ -926,6 +928,7 @@ subroutine crown_damage ( currentSite ) currentCohort%fraction_crown_burned = 0.0_r8 currentCohort%passive_crown_FI = 0.0_r8 !critical fire intensity for passive crown fire currentCohort%crown_fire_flg = 0 !flag for passvie crown fire ignition + currentCohort%ignite_crown = 0.0_r8 !ratio of ignition of passive crown fire,EQ 14 Bessie & Johnson 1995 if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then !trees only @@ -939,7 +942,7 @@ subroutine crown_damage ( currentSite ) if (EDPftvarcon_inst%crown_fire(currentCohort%pft) == 1) then ! Crown fuel ignition potential, EQ 8 Bessie and Johnson 1995 - currentCohort%passive_crown_FI = (0.01 * height_cbb * SF_val_crown_ignition_energy)**1.5 + currentCohort%passive_crown_FI = (0.01_r8 * height_cbb * SF_val_crown_ignition_energy)**1.5_r8 if (currentCohort%passive_crown_FI >= crown_fire_threshold) then ! 200 kW/m = threshold for crown fire potential @@ -958,13 +961,13 @@ subroutine crown_damage ( currentSite ) ! Flames lower than bottom of canopy. ! height_cbb is clear branch bole height or height of bottom of canopy - if (currentPatch%SH <= height_cbb .and. currentCohort%crown_fire_flg = 0) then + if (currentPatch%SH <= height_cbb .and. currentCohort%crown_fire_flg = 0) then & currentCohort%fraction_crown_burned = 0.0_r8 ! Flames part way into canopy ! Equation 17 in Thonicke et al. 2010 elseif ((currentCohort%hite > 0.0_r8).and.(currentPatch%SH > height_cbb) & - .and. currentCohort%crown_fire_flg = 0 then + .and. currentCohort%crown_fire_flg = 0 then & currentCohort%fraction_crown_burned = max(0.0_r8, & min(1.0_r8, (currentPatch%SH - height_cbb)/crown_depth)) From 45377c91dfd681f0ab6ec91024120e0f7e79f9bd Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Tue, 10 Sep 2019 11:21:30 -0600 Subject: [PATCH 16/93] Zero new cohort values for crown damage --- biogeochem/EDCohortDynamicsMod.F90 | 5 ++++- fire/SFMainMod.F90 | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/biogeochem/EDCohortDynamicsMod.F90 b/biogeochem/EDCohortDynamicsMod.F90 index 455633592e..c43c8f3871 100644 --- a/biogeochem/EDCohortDynamicsMod.F90 +++ b/biogeochem/EDCohortDynamicsMod.F90 @@ -582,7 +582,10 @@ subroutine zero_cohort(cc_p) currentcohort%year_net_uptake(:) = 999._r8 ! this needs to be 999, or trimming of new cohorts will break. currentcohort%ts_net_uptake(:) = 0._r8 - currentcohort%fraction_crown_burned = 0._r8 + currentcohort%fraction_crown_burned = 0._r8 + currentCohort%passive_crown_FI = 0._r8 + currentCohort%crown_fire_flg = 0 + currentCohort%ignite_crown = 0.0_r8 currentCohort%size_class = 1 currentCohort%seed_prod = 0._r8 currentCohort%size_class_lasttimestep = 0 diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 2ded57639a..c23d7373d1 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -961,13 +961,13 @@ subroutine crown_damage ( currentSite ) ! Flames lower than bottom of canopy. ! height_cbb is clear branch bole height or height of bottom of canopy - if (currentPatch%SH <= height_cbb .and. currentCohort%crown_fire_flg = 0) then & + if (currentPatch%SH <= height_cbb .and. currentCohort%crown_fire_flg == 0) then & currentCohort%fraction_crown_burned = 0.0_r8 ! Flames part way into canopy ! Equation 17 in Thonicke et al. 2010 elseif ((currentCohort%hite > 0.0_r8).and.(currentPatch%SH > height_cbb) & - .and. currentCohort%crown_fire_flg = 0 then & + .and. currentCohort%crown_fire_flg == 0 then & currentCohort%fraction_crown_burned = max(0.0_r8, & min(1.0_r8, (currentPatch%SH - height_cbb)/crown_depth)) From 73c876294e1e72f03a79f2ba006bc75ea2a8dd7c Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Tue, 10 Sep 2019 11:32:01 -0600 Subject: [PATCH 17/93] Add missing parentheses crown damage conditional --- fire/SFMainMod.F90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index c23d7373d1..57896f2fd4 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -961,16 +961,16 @@ subroutine crown_damage ( currentSite ) ! Flames lower than bottom of canopy. ! height_cbb is clear branch bole height or height of bottom of canopy - if (currentPatch%SH <= height_cbb .and. currentCohort%crown_fire_flg == 0) then & + if (currentPatch%SH <= height_cbb) .and. (currentCohort%crown_fire_flg == 0) then & currentCohort%fraction_crown_burned = 0.0_r8 ! Flames part way into canopy ! Equation 17 in Thonicke et al. 2010 elseif ((currentCohort%hite > 0.0_r8).and.(currentPatch%SH > height_cbb) & - .and. currentCohort%crown_fire_flg == 0 then & + .and. (currentCohort%crown_fire_flg == 0) then & currentCohort%fraction_crown_burned = max(0.0_r8, & - min(1.0_r8, (currentPatch%SH - height_cbb)/crown_depth)) + min(1.0_r8, ((currentPatch%SH - height_cbb)/crown_depth))) endif !SH frac crown burnt calculation ! Check for strange values. currentCohort%fraction_crown_burned = min(1.0_r8, max(0.0_r8,currentCohort%fraction_crown_burned)) From c288d76d7724235bd87c95a47d63692b82580c0a Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Tue, 10 Sep 2019 12:31:06 -0600 Subject: [PATCH 18/93] Clean up crown damage subroutine --- fire/SFMainMod.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 57896f2fd4..f86486de05 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -961,13 +961,13 @@ subroutine crown_damage ( currentSite ) ! Flames lower than bottom of canopy. ! height_cbb is clear branch bole height or height of bottom of canopy - if (currentPatch%SH <= height_cbb) .and. (currentCohort%crown_fire_flg == 0) then & + if ((currentPatch%SH <= height_cbb) .and. (currentCohort%crown_fire_flg == 0)) then & currentCohort%fraction_crown_burned = 0.0_r8 ! Flames part way into canopy ! Equation 17 in Thonicke et al. 2010 elseif ((currentCohort%hite > 0.0_r8).and.(currentPatch%SH > height_cbb) & - .and. (currentCohort%crown_fire_flg == 0) then & + .and. (currentCohort%crown_fire_flg == 0)) then & currentCohort%fraction_crown_burned = max(0.0_r8, & min(1.0_r8, ((currentPatch%SH - height_cbb)/crown_depth))) From 0fc0c147080b0e958d4e9113a86bdb9327844bed Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Tue, 10 Sep 2019 12:42:31 -0600 Subject: [PATCH 19/93] Remove unnecssary line character crown damage routine --- fire/SFMainMod.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index f86486de05..f559213ec4 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -961,13 +961,13 @@ subroutine crown_damage ( currentSite ) ! Flames lower than bottom of canopy. ! height_cbb is clear branch bole height or height of bottom of canopy - if ((currentPatch%SH <= height_cbb) .and. (currentCohort%crown_fire_flg == 0)) then & + if ((currentPatch%SH <= height_cbb) .and. (currentCohort%crown_fire_flg == 0)) then currentCohort%fraction_crown_burned = 0.0_r8 ! Flames part way into canopy ! Equation 17 in Thonicke et al. 2010 elseif ((currentCohort%hite > 0.0_r8).and.(currentPatch%SH > height_cbb) & - .and. (currentCohort%crown_fire_flg == 0)) then & + .and. (currentCohort%crown_fire_flg == 0)) then currentCohort%fraction_crown_burned = max(0.0_r8, & min(1.0_r8, ((currentPatch%SH - height_cbb)/crown_depth))) From fa1973fafb9ec0d57e1151cd5e23f10c0f185d1b Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Tue, 10 Sep 2019 13:38:24 -0600 Subject: [PATCH 20/93] Define new crown damage variables in EDTypes --- main/EDTypesMod.F90 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main/EDTypesMod.F90 b/main/EDTypesMod.F90 index 4dfcede3d2..ba5455c9e8 100644 --- a/main/EDTypesMod.F90 +++ b/main/EDTypesMod.F90 @@ -344,6 +344,9 @@ module EDTypesMod ! FIRE real(r8) :: fraction_crown_burned ! proportion of crown affected by fire:- + real(r8) :: passive_crown_FI ! critical fire intensity for passive crown fire + real(r8) :: crown_fire_flg ! flag for passive crown fire ignition + real(r8) :: ignite_crown ! ratio to determine passive crown fire ignition real(r8) :: cambial_mort ! probability that trees dies due to cambial char ! (conditional on the tree being subjected to the fire) real(r8) :: crownfire_mort ! probability of tree post-fire mortality @@ -1012,6 +1015,9 @@ subroutine dump_cohort(ccohort) write(fates_log(),*) 'co%ddbhdt = ', ccohort%ddbhdt write(fates_log(),*) 'co%dbdeaddt = ', ccohort%dbdeaddt write(fates_log(),*) 'co%fraction_crown_burned = ', ccohort%fraction_crown_burned + write(fates_log(),*) 'co%passive_crown_FI = ', ccohort%passive_crown_FI + write(fates_log(),*) 'co%crown_fire_flg = ', ccohort%crown_fire_flg + write(fates_log(),*) 'co%ignite_crown = ', ccohort%ignite_crown write(fates_log(),*) 'co%fire_mort = ', ccohort%fire_mort write(fates_log(),*) 'co%crownfire_mort = ', ccohort%crownfire_mort write(fates_log(),*) 'co%cambial_mort = ', ccohort%cambial_mort From ee2e576daa0a7408f45e7459f9ca24af4396ef9b Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Tue, 10 Sep 2019 13:41:42 -0600 Subject: [PATCH 21/93] Update to only "nan" crown damage variables in EDCohortDynamics --- biogeochem/EDCohortDynamicsMod.F90 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/biogeochem/EDCohortDynamicsMod.F90 b/biogeochem/EDCohortDynamicsMod.F90 index c43c8f3871..f780b46207 100644 --- a/biogeochem/EDCohortDynamicsMod.F90 +++ b/biogeochem/EDCohortDynamicsMod.F90 @@ -582,11 +582,7 @@ subroutine zero_cohort(cc_p) currentcohort%year_net_uptake(:) = 999._r8 ! this needs to be 999, or trimming of new cohorts will break. currentcohort%ts_net_uptake(:) = 0._r8 - currentcohort%fraction_crown_burned = 0._r8 - currentCohort%passive_crown_FI = 0._r8 - currentCohort%crown_fire_flg = 0 - currentCohort%ignite_crown = 0.0_r8 - currentCohort%size_class = 1 + currentCohort%size_class = 1 currentCohort%seed_prod = 0._r8 currentCohort%size_class_lasttimestep = 0 currentcohort%npp_acc_hold = 0._r8 From 39a39f3e68db272c19f781ca094f52d5f0cff89c Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Tue, 10 Sep 2019 14:37:26 -0600 Subject: [PATCH 22/93] Remove extra parentheses crown damage --- fire/SFMainMod.F90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index f559213ec4..abfe894400 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -961,13 +961,13 @@ subroutine crown_damage ( currentSite ) ! Flames lower than bottom of canopy. ! height_cbb is clear branch bole height or height of bottom of canopy - if ((currentPatch%SH <= height_cbb) .and. (currentCohort%crown_fire_flg == 0)) then + if (currentPatch%SH <= height_cbb .and. currentCohort%crown_fire_flg == 0) then currentCohort%fraction_crown_burned = 0.0_r8 ! Flames part way into canopy ! Equation 17 in Thonicke et al. 2010 - elseif ((currentCohort%hite > 0.0_r8).and.(currentPatch%SH > height_cbb) & - .and. (currentCohort%crown_fire_flg == 0)) then + elseif (currentCohort%hite > 0.0_r8 .and. currentPatch%SH > height_cbb & + .and. currentCohort%crown_fire_flg == 0) then currentCohort%fraction_crown_burned = max(0.0_r8, & min(1.0_r8, ((currentPatch%SH - height_cbb)/crown_depth))) From 703d87f4fbf903bc916466040f037fcc3cbc785b Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Tue, 10 Sep 2019 15:36:38 -0600 Subject: [PATCH 23/93] Add crown_fire_threshold read from EDTypes --- fire/SFMainMod.F90 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index abfe894400..fe53e2e99b 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -22,6 +22,7 @@ module SFMainMod use EDtypesMod , only : AREA use EDtypesMod , only : DL_SF use EDtypesMod , only : FIRE_THRESHOLD + use EDtypesMod , only : crown_fire_threshold use EDTypesMod , only : TW_SF use EDtypesMod , only : LB_SF use EDtypesMod , only : LG_SF @@ -914,9 +915,6 @@ subroutine crown_damage ( currentSite ) real(r8) crown_depth ! depth of crown (m) real(r8) height_cbb ! clear branch bole height or crown base height (m) - real(r8), parameter :: crown_fire_threshold = 200.0_r8 ! threshold for crown fire potential (kW/m) - - currentPatch => currentSite%oldest_patch do while(associated(currentPatch)) From 7e691e01ef05fb99b19c2c3947584fd68fd8c108 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Tue, 10 Sep 2019 16:04:47 -0600 Subject: [PATCH 24/93] Update crown damage for clarity with surface fires --- fire/SFMainMod.F90 | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index fe53e2e99b..edede03bd6 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -957,18 +957,14 @@ subroutine crown_damage ( currentSite ) ! else ! not crown fire plant endif ! evaluate passive crown fire - ! Flames lower than bottom of canopy. + ! For surface fires, are flames in the canopy? ! height_cbb is clear branch bole height or height of bottom of canopy - if (currentPatch%SH <= height_cbb .and. currentCohort%crown_fire_flg == 0) then - currentCohort%fraction_crown_burned = 0.0_r8 - - ! Flames part way into canopy ! Equation 17 in Thonicke et al. 2010 - elseif (currentCohort%hite > 0.0_r8 .and. currentPatch%SH > height_cbb & + if (currentCohort%hite > 0.0_r8 .and. currentPatch%SH > height_cbb & .and. currentCohort%crown_fire_flg == 0) then currentCohort%fraction_crown_burned = max(0.0_r8, & - min(1.0_r8, ((currentPatch%SH - height_cbb)/crown_depth))) + min(1.0_r8, ((currentPatch%SH - height_cbb)/crown_depth))) endif !SH frac crown burnt calculation ! Check for strange values. currentCohort%fraction_crown_burned = min(1.0_r8, max(0.0_r8,currentCohort%fraction_crown_burned)) From 52b073460b5168e540f583e97755dc814233f1f6 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Wed, 11 Sep 2019 11:41:56 -0600 Subject: [PATCH 25/93] Update crown damage variables to be local to subroutine --- biogeochem/EDCohortDynamicsMod.F90 | 2 -- fire/SFMainMod.F90 | 25 ++++++++++++++----------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/biogeochem/EDCohortDynamicsMod.F90 b/biogeochem/EDCohortDynamicsMod.F90 index f780b46207..3b70366793 100644 --- a/biogeochem/EDCohortDynamicsMod.F90 +++ b/biogeochem/EDCohortDynamicsMod.F90 @@ -535,9 +535,7 @@ subroutine nan_cohort(cc_p) ! FIRE currentCohort%fraction_crown_burned = nan ! proportion of crown affected by fire - currentCohort%passive_crown_FI = nan ! critical fire intensity for passive crown fire currentCohort%crown_fire_flg = nan ! flag for passive crown fire ignition - currentCohort%ignite_crown = nan ! ratio to determine passive crown fire ignition, EQ14 Bessie&Johnson 1995 currentCohort%cambial_mort = nan ! probability that trees dies due to cambial char P&R (1986) currentCohort%crownfire_mort = nan ! probability of tree post-fire mortality due to crown scorch currentCohort%fire_mort = nan ! post-fire mortality from cambial and crown damage assuming two are independent diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index edede03bd6..e78b496e9c 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -912,8 +912,10 @@ subroutine crown_damage ( currentSite ) type(ed_patch_type) , pointer :: currentPatch type(ed_cohort_type), pointer :: currentCohort - real(r8) crown_depth ! depth of crown (m) - real(r8) height_cbb ! clear branch bole height or crown base height (m) + real(r8) crown_depth ! depth of crown (m) + real(r8) height_cbb ! clear branch bole height or crown base height (m) + real(r8) passive_crown_FI ! critical fire intensity for passive crown fire ignition (kW/m) + real(r8) ignite_crown ! ratio for ignition of passive crown fire,EQ 14 Bessie & Johnson 1995 currentPatch => currentSite%oldest_patch @@ -924,30 +926,31 @@ subroutine crown_damage ( currentSite ) do while(associated(currentCohort)) currentCohort%fraction_crown_burned = 0.0_r8 - currentCohort%passive_crown_FI = 0.0_r8 !critical fire intensity for passive crown fire - currentCohort%crown_fire_flg = 0 !flag for passvie crown fire ignition - currentCohort%ignite_crown = 0.0_r8 !ratio of ignition of passive crown fire,EQ 14 Bessie & Johnson 1995 + if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then !trees only ! height_cbb = clear branch bole height at base of crown (m) ! inst%crown = crown_depth_frac (PFT) - crown_depth = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) - height_cbb = currentCohort%hite - crown_depth + crown_depth = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) + height_cbb = currentCohort%hite - crown_depth + passive_crown_FI = 0.0_r8 !critical fire intensity for passive crown fire + ignite_crown = 0.0_r8 !ratio for ignition of passive crown fire,EQ 14 Bessie & Johnson 1995 + currentCohort%crown_fire_flg = 0 !flag for passvie crown fire ignition ! Evaluate for passive crown fire ignition if (EDPftvarcon_inst%crown_fire(currentCohort%pft) == 1) then ! Crown fuel ignition potential, EQ 8 Bessie and Johnson 1995 - currentCohort%passive_crown_FI = (0.01_r8 * height_cbb * SF_val_crown_ignition_energy)**1.5_r8 + passive_crown_FI = (0.01_r8 * height_cbb * SF_val_crown_ignition_energy)**1.5_r8 - if (currentCohort%passive_crown_FI >= crown_fire_threshold) then ! 200 kW/m = threshold for crown fire potential + if (passive_crown_FI >= crown_fire_threshold) then ! 200 kW/m = threshold for crown fire potential ! Initiation of passive crown fire, EQ 14 Bessie and Johnson 1995 - currentCohort%ignite_crown = currentPatch%FI/currentCohort%passive_crown_FI + ignite_crown = currentPatch%FI/passive_crown_FI - if (currentCohort%ignite_crown >= 1.0_r8) then + if (ignite_crown >= 1.0_r8) then currentCohort%crown_fire_flg = 1 ! passive crown fire ignited currentCohort%fraction_crown_burned = 1.0_r8 ! else ! evaluate crown damage based on scorch height From cce9213a7f0795d555adae3895d0f0a683f6c723 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Wed, 11 Sep 2019 12:11:45 -0600 Subject: [PATCH 26/93] Remove local crown damage variables from EDTypes --- main/EDTypesMod.F90 | 2 -- 1 file changed, 2 deletions(-) diff --git a/main/EDTypesMod.F90 b/main/EDTypesMod.F90 index ba5455c9e8..ab54367fc4 100644 --- a/main/EDTypesMod.F90 +++ b/main/EDTypesMod.F90 @@ -344,9 +344,7 @@ module EDTypesMod ! FIRE real(r8) :: fraction_crown_burned ! proportion of crown affected by fire:- - real(r8) :: passive_crown_FI ! critical fire intensity for passive crown fire real(r8) :: crown_fire_flg ! flag for passive crown fire ignition - real(r8) :: ignite_crown ! ratio to determine passive crown fire ignition real(r8) :: cambial_mort ! probability that trees dies due to cambial char ! (conditional on the tree being subjected to the fire) real(r8) :: crownfire_mort ! probability of tree post-fire mortality From eb6e6d153eabd068e056c710937ab97d61790fc1 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Wed, 11 Sep 2019 12:20:12 -0600 Subject: [PATCH 27/93] Remove local crown damage variables from EDTypes, another location --- main/EDTypesMod.F90 | 2 -- 1 file changed, 2 deletions(-) diff --git a/main/EDTypesMod.F90 b/main/EDTypesMod.F90 index ab54367fc4..2c25d6eeda 100644 --- a/main/EDTypesMod.F90 +++ b/main/EDTypesMod.F90 @@ -1013,9 +1013,7 @@ subroutine dump_cohort(ccohort) write(fates_log(),*) 'co%ddbhdt = ', ccohort%ddbhdt write(fates_log(),*) 'co%dbdeaddt = ', ccohort%dbdeaddt write(fates_log(),*) 'co%fraction_crown_burned = ', ccohort%fraction_crown_burned - write(fates_log(),*) 'co%passive_crown_FI = ', ccohort%passive_crown_FI write(fates_log(),*) 'co%crown_fire_flg = ', ccohort%crown_fire_flg - write(fates_log(),*) 'co%ignite_crown = ', ccohort%ignite_crown write(fates_log(),*) 'co%fire_mort = ', ccohort%fire_mort write(fates_log(),*) 'co%crownfire_mort = ', ccohort%crownfire_mort write(fates_log(),*) 'co%cambial_mort = ', ccohort%cambial_mort From dc1ba209135c54f18b99921f8ca73a77962aa9c9 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Thu, 12 Sep 2019 09:04:55 -0600 Subject: [PATCH 28/93] Zero cambial_mort inside cambial_damage_kill not zero_cohort --- biogeochem/EDCohortDynamicsMod.F90 | 2 -- fire/SFMainMod.F90 | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/biogeochem/EDCohortDynamicsMod.F90 b/biogeochem/EDCohortDynamicsMod.F90 index 3b70366793..4d7bba06bb 100644 --- a/biogeochem/EDCohortDynamicsMod.F90 +++ b/biogeochem/EDCohortDynamicsMod.F90 @@ -595,8 +595,6 @@ subroutine zero_cohort(cc_p) currentCohort%leaf_cost = 0._r8 currentcohort%excl_weight = 0._r8 currentcohort%prom_weight = 0._r8 - currentcohort%crownfire_mort = 0._r8 - currentcohort%cambial_mort = 0._r8 currentCohort%c13disc_clm = 0._r8 currentCohort%c13disc_acc = 0._r8 diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index e78b496e9c..6c2a29c8a1 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -1007,7 +1007,8 @@ subroutine cambial_damage_kill ( currentSite ) if (currentPatch%fire == 1) then currentCohort => currentPatch%tallest; - do while(associated(currentCohort)) + do while(associated(currentCohort)) + currentCohort%cambial_mort = 0.0_r8 if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then !trees only ! Equation 21 in Thonicke et al 2010 bt = EDPftvarcon_inst%bark_scaler(currentCohort%pft)*currentCohort%dbh ! bark thickness. @@ -1019,8 +1020,6 @@ subroutine cambial_damage_kill ( currentSite ) else if ((currentPatch%tau_l/tau_c) > 0.22_r8) then currentCohort%cambial_mort = (0.563_r8*(currentPatch%tau_l/tau_c)) - 0.125_r8 - else - currentCohort%cambial_mort = 0.0_r8 endif endif endif !trees From e11602f9d5ef7c184851f9dd1ffcd8962752b7ed Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Thu, 12 Sep 2019 15:48:22 -0600 Subject: [PATCH 29/93] Update drying_ratio value in params file --- parameter_files/fates_params_default.cdl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index d98fc2e1ea..8abab650ae 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -1112,7 +1112,7 @@ fates_fire_crown_fire = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; fates_cwd_flig = 0.24 ; - fates_fire_drying_ratio = 13000 ; + fates_fire_drying_ratio = 66000 ; fates_fire_durat_slope = -11.06 ; From f00187fce498a30bc926093ac10591f97c351aa5 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Mon, 16 Sep 2019 15:18:03 -0600 Subject: [PATCH 30/93] One-line correction in active crown-fire code Also made two crown-related history varialbes active --- fire/SFMainMod.F90 | 2 +- main/FatesHistoryInterfaceMod.F90 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 0ff296b541..dbb522821f 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -971,7 +971,7 @@ subroutine crown_damage ( currentSite ) currentCohort%crown_fire_flg = 1 ! passive crown fire ignited currentCohort%fraction_crown_burned = 1.0_r8 ! Initiation of active crown fire, EQ 14b Bessie and Johnson 1995 - ignite_active_crown = currentPatch%FI/currentCohort%active_crown_FI + ignite_active_crown = currentPatch%FI/active_crown_FI if (ignite_active_crown >= 1.0_r8) then ! In code design phase; see ! https://github.com/NGEET/fates/issues/573 diff --git a/main/FatesHistoryInterfaceMod.F90 b/main/FatesHistoryInterfaceMod.F90 index 82c3d38995..43b3d61a7d 100644 --- a/main/FatesHistoryInterfaceMod.F90 +++ b/main/FatesHistoryInterfaceMod.F90 @@ -4540,12 +4540,12 @@ subroutine define_history_vars(this, initialize_variables) upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_m5_si_scpf ) call this%set_history_var(vname='CROWNFIREMORT_SCPF', units = 'N/ha/yr', & - long='crown fire mortality by pft/size',use_default='inactive', & + long='crown fire mortality by pft/size',use_default='active', & avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_crownfiremort_si_scpf ) call this%set_history_var(vname='CAMBIALFIREMORT_SCPF', units = 'N/ha/yr', & - long='cambial fire mortality by pft/size',use_default='inactive', & + long='cambial fire mortality by pft/size',use_default='active', & avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_cambialfiremort_si_scpf ) From 5587782b138f48b350413fad8946bae47c9ba333 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Wed, 25 Sep 2019 16:46:58 -0600 Subject: [PATCH 31/93] Update crown_ignite_energy to PFT level --- fire/SFMainMod.F90 | 6 +++--- fire/SFParamsMod.F90 | 9 --------- main/EDPftvarcon.F90 | 10 ++++++++++ parameter_files/fates_params_default.cdl | 12 ++++++------ 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 90dffb71a4..6d367c1937 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -890,8 +890,7 @@ subroutine crown_damage ( currentSite ) !returns the updated currentCohort%fraction_crown_burned for each tree cohort within each patch. !currentCohort%fraction_crown_burned is the proportion of crown affected by fire - !SF_val_crown_ignition_energy (kJ/kg) for crown foliage with 100% moisture (dry mass) - use SFParamsMod, only : SF_val_crown_ignition_energy !kJ/kg + type(ed_site_type), intent(in), target :: currentSite @@ -929,7 +928,8 @@ subroutine crown_damage ( currentSite ) if (EDPftvarcon_inst%crown_fire(currentCohort%pft) == 1) then ! Crown fuel ignition potential, EQ 8 Bessie and Johnson 1995 - passive_crown_FI = (0.01_r8 * height_cbb * SF_val_crown_ignition_energy)**1.5_r8 + ! Note: future crown_ignition_energy to be calculated based on foliar moisture content from FATES-Hydro + passive_crown_FI = (0.01_r8 * height_cbb *EDPftvarcon_inst%crown_ignite_energy(currentCohort%pft)**1.5_r8 if (passive_crown_FI >= crown_fire_threshold) then ! 200 kW/m = threshold for crown fire potential diff --git a/fire/SFParamsMod.F90 b/fire/SFParamsMod.F90 index dddef4d927..1c9f278c1e 100644 --- a/fire/SFParamsMod.F90 +++ b/fire/SFParamsMod.F90 @@ -23,7 +23,6 @@ module SFParamsMod real(r8),protected, public :: SF_val_fdi_alpha real(r8),protected, public :: SF_val_miner_total real(r8),protected, public :: SF_val_fuel_energy - real(r8),protected, public :: SF_val_crown_ignition_energy real(r8),protected, public :: SF_val_part_dens real(r8),protected, public :: SF_val_miner_damp real(r8),protected, public :: SF_val_max_durat @@ -45,7 +44,6 @@ module SFParamsMod character(len=param_string_length),parameter :: SF_name_fdi_alpha = "fates_fire_fdi_alpha" character(len=param_string_length),parameter :: SF_name_miner_total = "fates_fire_miner_total" character(len=param_string_length),parameter :: SF_name_fuel_energy = "fates_fire_fuel_energy" - character(len=param_string_length),parameter :: SF_name_crown_ignition_energy = "fates_fire_crown_ignition_energy" character(len=param_string_length),parameter :: SF_name_part_dens = "fates_fire_part_dens" character(len=param_string_length),parameter :: SF_name_miner_damp = "fates_fire_miner_damp" character(len=param_string_length),parameter :: SF_name_max_durat = "fates_fire_max_durat" @@ -139,7 +137,6 @@ subroutine SpitFireParamsInit() SF_val_fdi_alpha = nan SF_val_miner_total = nan SF_val_fuel_energy = nan - SF_val_crown_ignition_energy = nan SF_val_part_dens = nan SF_val_miner_damp = nan SF_val_max_durat = nan @@ -218,9 +215,6 @@ subroutine SpitFireRegisterScalars(fates_params) call fates_params%RegisterParameter(name=SF_name_fuel_energy, dimension_shape=dimension_shape_scalar, & dimension_names=dim_names_scalar) - call fates_params%RegisterParameter(name=SF_name_crown_ignition_energy, dimension_shape=dimension_shape_scalar, & - dimension_names=dim_names_scalar) - call fates_params%RegisterParameter(name=SF_name_part_dens, dimension_shape=dimension_shape_scalar, & dimension_names=dim_names_scalar) @@ -262,9 +256,6 @@ subroutine SpitFireReceiveScalars(fates_params) call fates_params%RetreiveParameter(name=SF_name_fuel_energy, & data=SF_val_fuel_energy) - call fates_params%RetreiveParameter(name=SF_name_crown_ignition_energy, & - data=SF_val_crown_ignition_energy) - call fates_params%RetreiveParameter(name=SF_name_part_dens, & data=SF_val_part_dens) diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index 7fbda29121..0fe6c4a97a 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -50,6 +50,7 @@ module EDPftvarcon real(r8), allocatable :: bark_scaler(:) ! scaler from dbh to bark thickness. For fire model. real(r8), allocatable :: crown_resist(:) ! resistance to fire. (1 = none) For fire model. real(r8), allocatable :: crown_fire(:) ! Does plant have passive crown fire? (1=yes, 0=no) + real(r8), allocatable :: crown_ignite_energy(:) ! heat of crown foliage ignition [kJ/kg] real(r8), allocatable :: initd(:) ! initial seedling density real(r8), allocatable :: seed_suppl(:) ! seeds that come from outside the gridbox. real(r8), allocatable :: BB_slope(:) ! ball berry slope parameter @@ -386,6 +387,10 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) + name = 'fates_fire_crown_ignition_energy' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + name = 'fates_recruit_initd' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -822,6 +827,10 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%crown_fire) + name = 'fates_fire_crown_ignition_energy' + call fates_params%RetreiveParameterAllocate(name=name, & + data=this%crown_ignition_energy) + name = 'fates_recruit_initd' call fates_params%RetreiveParameterAllocate(name=name, & data=this%initd) @@ -1732,6 +1741,7 @@ subroutine FatesReportPFTParams(is_master) write(fates_log(),fmt0) 'bark_scaler = ',EDPftvarcon_inst%bark_scaler write(fates_log(),fmt0) 'crown_resist = ',EDPftvarcon_inst%crown_resist write(fates_log(),fmt0) 'crown_fire = ',EDPftvarcon_inst%crown_fire + write(fates_log(),fmt0) 'crown_ignition_energy = ',EDPftvarcon_inst%crown_ignition_energy write(fates_log(),fmt0) 'initd = ',EDPftvarcon_inst%initd write(fates_log(),fmt0) 'seed_suppl = ',EDPftvarcon_inst%seed_suppl write(fates_log(),fmt0) 'BB_slope = ',EDPftvarcon_inst%BB_slope diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 179dc01b35..b32045b6e3 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -135,6 +135,9 @@ variables: double fates_fire_crown_fire(fates_pft) ; fates_fire_crown_fire:units = "logical flag" ; fates_fire_crown_fire:long_name = "Binary flag for passive crown fire"; + double fates_fire_crown_ignite_energy(fates_pft) ; + fates_fire_crown_ignite_energy:units = "kJ/kg" ; + fates_fire_crown_ignite_energy:long_name = "spitfire parameter, heat of crown foliage ignition" ; double fates_fr_fcel(fates_pft) ; fates_fr_fcel:units = "fraction" ; fates_fr_fcel:long_name = "Fine root litter cellulose fraction" ; @@ -495,9 +498,6 @@ variables: double fates_fire_fuel_energy ; fates_fire_fuel_energy:units = "kJ/kg" ; fates_fire_fuel_energy:long_name = "spitfire parameter, heat content of fuel" ; - double fates_fire_crown_ignition_energy ; - fates_fire_crown_ignition_energy:units = "kJ/kg" ; - fates_fire_crown_ignition_energy:long_name = "spitfire parameter, heat of crown foliage ignition" ; double fates_fire_max_durat ; fates_fire_max_durat:units = "minutes" ; fates_fire_max_durat:long_name = "spitfire parameter, fire maximum duration, Equation 14 Thonicke et al 2010" ; @@ -724,7 +724,9 @@ data: fates_fire_crown_resist = 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775 ; -fates_fire_crown_fire = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; + fates_fire_crown_fire = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; + + fates_fire_crown_ignite_energy = 3060, 3060, 3060, 3060, 3060, 3060, 3060, 3060, 3060, 3060, 3060, 3060 ; fates_fr_fcel = 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 ; @@ -1124,8 +1126,6 @@ fates_fire_crown_fire = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; fates_fire_fuel_energy = 18000 ; - fates_fire_crown_ignition_energy = 3060 ; - fates_fire_max_durat = 240 ; fates_fire_miner_damp = 0.41739 ; From 76ed1fade6e8d3b15bc62a9295218084fad2c95b Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Wed, 25 Sep 2019 17:00:14 -0600 Subject: [PATCH 32/93] Update crown_ignite name in EDPftvarcon --- main/EDPftvarcon.F90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index 0fe6c4a97a..38b35f996c 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -387,7 +387,7 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_fire_crown_ignition_energy' + name = 'fates_fire_crown_ignite_energy' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -827,9 +827,9 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%crown_fire) - name = 'fates_fire_crown_ignition_energy' + name = 'fates_fire_crown_ignite_energy' call fates_params%RetreiveParameterAllocate(name=name, & - data=this%crown_ignition_energy) + data=this%crown_ignite_energy) name = 'fates_recruit_initd' call fates_params%RetreiveParameterAllocate(name=name, & @@ -1741,7 +1741,7 @@ subroutine FatesReportPFTParams(is_master) write(fates_log(),fmt0) 'bark_scaler = ',EDPftvarcon_inst%bark_scaler write(fates_log(),fmt0) 'crown_resist = ',EDPftvarcon_inst%crown_resist write(fates_log(),fmt0) 'crown_fire = ',EDPftvarcon_inst%crown_fire - write(fates_log(),fmt0) 'crown_ignition_energy = ',EDPftvarcon_inst%crown_ignition_energy + write(fates_log(),fmt0) 'crown_ignite_energy = ',EDPftvarcon_inst%crown_ignite_energy write(fates_log(),fmt0) 'initd = ',EDPftvarcon_inst%initd write(fates_log(),fmt0) 'seed_suppl = ',EDPftvarcon_inst%seed_suppl write(fates_log(),fmt0) 'BB_slope = ',EDPftvarcon_inst%BB_slope From 2feddcb86e402519c4849108584e3220879fb9f4 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Wed, 25 Sep 2019 17:05:34 -0600 Subject: [PATCH 33/93] Add paran in SFMain --- fire/SFMainMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 6d367c1937..6050f0d062 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -929,7 +929,7 @@ subroutine crown_damage ( currentSite ) ! Crown fuel ignition potential, EQ 8 Bessie and Johnson 1995 ! Note: future crown_ignition_energy to be calculated based on foliar moisture content from FATES-Hydro - passive_crown_FI = (0.01_r8 * height_cbb *EDPftvarcon_inst%crown_ignite_energy(currentCohort%pft)**1.5_r8 + passive_crown_FI = (0.01_r8 * height_cbb *EDPftvarcon_inst%crown_ignite_energy(currentCohort%pft))**1.5_r8 if (passive_crown_FI >= crown_fire_threshold) then ! 200 kW/m = threshold for crown fire potential From 0aef4a978b022f3483e088081ba69e06ce610ee4 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Mon, 30 Sep 2019 10:44:29 -0600 Subject: [PATCH 34/93] Add comment with equation for crown_ignite_energy per VanWagner 1977 --- fire/SFMainMod.F90 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 6050f0d062..bb5c264e9a 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -927,8 +927,12 @@ subroutine crown_damage ( currentSite ) ! Evaluate for passive crown fire ignition if (EDPftvarcon_inst%crown_fire(currentCohort%pft) == 1) then + ! Note: crown_ignition_energy to be calculated based on foliar moisture content from FATES-Hydro + ! EQ 3 Van Wagner 1977 + ! crown ignite_energy (kJ/kg), m = foliar moisture content based on dry fuel (%) + ! crown_ignite_energy = 460 + 26 * m + ! Crown fuel ignition potential, EQ 8 Bessie and Johnson 1995 - ! Note: future crown_ignition_energy to be calculated based on foliar moisture content from FATES-Hydro passive_crown_FI = (0.01_r8 * height_cbb *EDPftvarcon_inst%crown_ignite_energy(currentCohort%pft))**1.5_r8 if (passive_crown_FI >= crown_fire_threshold) then ! 200 kW/m = threshold for crown fire potential From 8d582b74b760ff573e76d5fb07e94b99d48d95a8 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Mon, 30 Sep 2019 10:58:52 -0600 Subject: [PATCH 35/93] Add comment with details for empirical value C in passive_crown_FI --- fire/SFMainMod.F90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index bb5c264e9a..e49c68cacb 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -929,10 +929,12 @@ subroutine crown_damage ( currentSite ) ! Note: crown_ignition_energy to be calculated based on foliar moisture content from FATES-Hydro ! EQ 3 Van Wagner 1977 - ! crown ignite_energy (kJ/kg), m = foliar moisture content based on dry fuel (%) + ! h = crown_ignite_energy (kJ/kg), m = foliar moisture content based on dry fuel (%) ! crown_ignite_energy = 460 + 26 * m ! Crown fuel ignition potential, EQ 8 Bessie and Johnson 1995 + ! Van Wagner EQ4 FI = (Czh)**3/2 where z=crown base height,h=heat crown ignite energy, FI=fire intensity + ! 0.01 = C from Van Wagner 1977 EQ4 for crown of base height 6m, 100% FMC, and FI 2500kW/m passive_crown_FI = (0.01_r8 * height_cbb *EDPftvarcon_inst%crown_ignite_energy(currentCohort%pft))**1.5_r8 if (passive_crown_FI >= crown_fire_threshold) then ! 200 kW/m = threshold for crown fire potential From 29fd4ff373d3b3cf3a4bce53ba6b780be99b7096 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Mon, 30 Sep 2019 15:09:00 -0600 Subject: [PATCH 36/93] Update flag to logical, clean up conditional --- biogeochem/EDCohortDynamicsMod.F90 | 10 ++++----- fire/SFMainMod.F90 | 26 ++++++++++++------------ main/EDPftvarcon.F90 | 20 +++++++++--------- parameter_files/fates_params_default.cdl | 10 ++++----- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/biogeochem/EDCohortDynamicsMod.F90 b/biogeochem/EDCohortDynamicsMod.F90 index 4d7bba06bb..c129aace5d 100644 --- a/biogeochem/EDCohortDynamicsMod.F90 +++ b/biogeochem/EDCohortDynamicsMod.F90 @@ -534,11 +534,11 @@ subroutine nan_cohort(cc_p) currentCohort%ddbhdt = nan ! time derivative of dbh ! FIRE - currentCohort%fraction_crown_burned = nan ! proportion of crown affected by fire - currentCohort%crown_fire_flg = nan ! flag for passive crown fire ignition - currentCohort%cambial_mort = nan ! probability that trees dies due to cambial char P&R (1986) - currentCohort%crownfire_mort = nan ! probability of tree post-fire mortality due to crown scorch - currentCohort%fire_mort = nan ! post-fire mortality from cambial and crown damage assuming two are independent + currentCohort%fraction_crown_burned = nan ! proportion of crown affected by fire + currentCohort%passive_crown_fire_flg = nan ! flag for passive crown fire ignition + currentCohort%cambial_mort = nan ! probability that trees dies due to cambial char P&R (1986) + currentCohort%crownfire_mort = nan ! probability of tree post-fire mortality due to crown scorch + currentCohort%fire_mort = nan ! post-fire mortality from cambial and crown damage assuming two are independent end subroutine nan_cohort diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index e49c68cacb..a80d72542c 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -897,10 +897,11 @@ subroutine crown_damage ( currentSite ) type(ed_patch_type) , pointer :: currentPatch type(ed_cohort_type), pointer :: currentCohort - real(r8) crown_depth ! depth of crown (m) - real(r8) height_cbb ! clear branch bole height or crown base height (m) - real(r8) passive_crown_FI ! critical fire intensity for passive crown fire ignition (kW/m) - real(r8) ignite_crown ! ratio for ignition of passive crown fire,EQ 14 Bessie & Johnson 1995 + real(r8) :: crown_depth ! depth of crown (m) + real(r8) :: height_cbb ! clear branch bole height or crown base height (m) + real(r8) :: passive_crown_FI ! critical fire intensity for passive crown fire ignition (kW/m) + real(r8) :: ignite_crown ! ratio for ignition of passive crown fire,EQ 14 Bessie & Johnson 1995 + logical :: passive_crown_flg ! flag to check for passive crown fire ignition currentPatch => currentSite%oldest_patch @@ -917,11 +918,11 @@ subroutine crown_damage ( currentSite ) ! height_cbb = clear branch bole height at base of crown (m) ! inst%crown = crown_depth_frac (PFT) - crown_depth = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) - height_cbb = currentCohort%hite - crown_depth - passive_crown_FI = 0.0_r8 !critical fire intensity for passive crown fire - ignite_crown = 0.0_r8 !ratio for ignition of passive crown fire,EQ 14 Bessie & Johnson 1995 - currentCohort%crown_fire_flg = 0 !flag for passvie crown fire ignition + crown_depth = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) + height_cbb = currentCohort%hite - crown_depth + passive_crown_FI = 0.0_r8 + ignite_crown = 0.0_r8 + currentCohort%passive_crown_fire_flg = .false. ! Evaluate for passive crown fire ignition @@ -943,7 +944,7 @@ subroutine crown_damage ( currentSite ) ignite_crown = currentPatch%FI/passive_crown_FI if (ignite_crown >= 1.0_r8) then - currentCohort%crown_fire_flg = 1 ! passive crown fire ignited + currentCohort%passive_crown_fire_flg = .true. ! passive crown fire ignited currentCohort%fraction_crown_burned = 1.0_r8 ! else ! evaluate crown damage based on scorch height endif ! ignite passive crown fire @@ -956,10 +957,9 @@ subroutine crown_damage ( currentSite ) ! height_cbb is clear branch bole height or height of bottom of canopy ! Equation 17 in Thonicke et al. 2010 if (currentCohort%hite > 0.0_r8 .and. currentPatch%SH > height_cbb & - .and. currentCohort%crown_fire_flg == 0) then + .and. currentCohort%passive_crown_fire_flg = .true.) then - currentCohort%fraction_crown_burned = max(0.0_r8, & - min(1.0_r8, ((currentPatch%SH - height_cbb)/crown_depth))) + currentCohort%fraction_crown_burned = min(1.0_r8, ((currentPatch%SH - height_cbb)/crown_depth)) endif !SH frac crown burnt calculation ! Check for strange values. currentCohort%fraction_crown_burned = min(1.0_r8, max(0.0_r8,currentCohort%fraction_crown_burned)) diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index 38b35f996c..7d9aa3d900 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -48,8 +48,8 @@ module EDPftvarcon real(r8), allocatable :: crown(:) ! fraction of the height of the plant ! that is occupied by crown. For fire model. real(r8), allocatable :: bark_scaler(:) ! scaler from dbh to bark thickness. For fire model. - real(r8), allocatable :: crown_resist(:) ! resistance to fire. (1 = none) For fire model. - real(r8), allocatable :: crown_fire(:) ! Does plant have passive crown fire? (1=yes, 0=no) + real(r8), allocatable :: crown_kill(:) ! crown resistance to fire. (1 = none) For fire model. + real(r8), allocatable :: passive_crown_fire(:) ! Is plant susceptible to passive crown fire?(1=yes,0=no) real(r8), allocatable :: crown_ignite_energy(:) ! heat of crown foliage ignition [kJ/kg] real(r8), allocatable :: initd(:) ! initial seedling density real(r8), allocatable :: seed_suppl(:) ! seeds that come from outside the gridbox. @@ -379,11 +379,11 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_fire_crown_resist' + name = 'fates_fire_crown_kill' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_fire_crown_fire' + name = 'fates_fire_passive_crown_fire' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -819,13 +819,13 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%bark_scaler) - name = 'fates_fire_crown_resist' + name = 'fates_fire_crown_kill' call fates_params%RetreiveParameterAllocate(name=name, & - data=this%crown_resist) + data=this%crown_kill) - name = 'fates_fire_crown_fire' + name = 'fates_fire_passive_crown_fire' call fates_params%RetreiveParameterAllocate(name=name, & - data=this%crown_fire) + data=this%passive_crown_fire) name = 'fates_fire_crown_ignite_energy' call fates_params%RetreiveParameterAllocate(name=name, & @@ -1739,8 +1739,8 @@ subroutine FatesReportPFTParams(is_master) write(fates_log(),fmt0) 'leaf_stor_priority = ',EDPftvarcon_inst%leaf_stor_priority write(fates_log(),fmt0) 'crown = ',EDPftvarcon_inst%crown write(fates_log(),fmt0) 'bark_scaler = ',EDPftvarcon_inst%bark_scaler - write(fates_log(),fmt0) 'crown_resist = ',EDPftvarcon_inst%crown_resist - write(fates_log(),fmt0) 'crown_fire = ',EDPftvarcon_inst%crown_fire + write(fates_log(),fmt0) 'crown_kill = ',EDPftvarcon_inst%crown_kill + write(fates_log(),fmt0) 'passive_crown_fire = ',EDPftvarcon_inst%passive_crown_fire write(fates_log(),fmt0) 'crown_ignite_energy = ',EDPftvarcon_inst%crown_ignite_energy write(fates_log(),fmt0) 'initd = ',EDPftvarcon_inst%initd write(fates_log(),fmt0) 'seed_suppl = ',EDPftvarcon_inst%seed_suppl diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index b32045b6e3..e6d56f9f07 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -129,9 +129,9 @@ variables: double fates_fire_crown_depth_frac(fates_pft) ; fates_fire_crown_depth_frac:units = "fraction" ; fates_fire_crown_depth_frac:long_name = "the depth of a cohorts crown as a fraction of its height" ; - double fates_fire_crown_resist(fates_pft) ; - fates_fire_crown_resist:units = "NA" ; - fates_fire_crown_resist:long_name = "resistance to fire (1 = none), EQ 22 in Thonicke et al 2010" ; + double fates_fire_crown_kill(fates_pft) ; + fates_fire_crown_kill:units = "NA" ; + fates_fire_crown_kill:long_name = "crown resistance to fire (1 = none), EQ 22 in Thonicke et al 2010" ; double fates_fire_crown_fire(fates_pft) ; fates_fire_crown_fire:units = "logical flag" ; fates_fire_crown_fire:long_name = "Binary flag for passive crown fire"; @@ -721,10 +721,10 @@ data: fates_fire_crown_depth_frac = 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.95, 0.95, 0.95, 1, 1, 1 ; - fates_fire_crown_resist = 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, + fates_fire_crown_kill = 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775 ; - fates_fire_crown_fire = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; + fates_fire_passive_crown_fire = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; fates_fire_crown_ignite_energy = 3060, 3060, 3060, 3060, 3060, 3060, 3060, 3060, 3060, 3060, 3060, 3060 ; From cb67c913c637f004259f6e31eaf6368b6b3a9d60 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Mon, 30 Sep 2019 18:25:05 -0600 Subject: [PATCH 37/93] Revert passive crown fire flag to binary --- biogeochem/EDCohortDynamicsMod.F90 | 2 +- fire/SFMainMod.F90 | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/biogeochem/EDCohortDynamicsMod.F90 b/biogeochem/EDCohortDynamicsMod.F90 index c129aace5d..88a0f02eb7 100644 --- a/biogeochem/EDCohortDynamicsMod.F90 +++ b/biogeochem/EDCohortDynamicsMod.F90 @@ -535,7 +535,7 @@ subroutine nan_cohort(cc_p) ! FIRE currentCohort%fraction_crown_burned = nan ! proportion of crown affected by fire - currentCohort%passive_crown_fire_flg = nan ! flag for passive crown fire ignition + currentCohort%passive_crown_fire_flg = nan ! flag to indicate passive crown fire ignition currentCohort%cambial_mort = nan ! probability that trees dies due to cambial char P&R (1986) currentCohort%crownfire_mort = nan ! probability of tree post-fire mortality due to crown scorch currentCohort%fire_mort = nan ! post-fire mortality from cambial and crown damage assuming two are independent diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index a80d72542c..1067aafb2d 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -901,7 +901,6 @@ subroutine crown_damage ( currentSite ) real(r8) :: height_cbb ! clear branch bole height or crown base height (m) real(r8) :: passive_crown_FI ! critical fire intensity for passive crown fire ignition (kW/m) real(r8) :: ignite_crown ! ratio for ignition of passive crown fire,EQ 14 Bessie & Johnson 1995 - logical :: passive_crown_flg ! flag to check for passive crown fire ignition currentPatch => currentSite%oldest_patch @@ -918,11 +917,11 @@ subroutine crown_damage ( currentSite ) ! height_cbb = clear branch bole height at base of crown (m) ! inst%crown = crown_depth_frac (PFT) - crown_depth = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) - height_cbb = currentCohort%hite - crown_depth - passive_crown_FI = 0.0_r8 - ignite_crown = 0.0_r8 - currentCohort%passive_crown_fire_flg = .false. + crown_depth = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) + height_cbb = currentCohort%hite - crown_depth + passive_crown_FI = 0.0_r8 + ignite_crown = 0.0_r8 + currentCohort%passive_crown_fire_flg = 0 ! Evaluate for passive crown fire ignition @@ -944,7 +943,7 @@ subroutine crown_damage ( currentSite ) ignite_crown = currentPatch%FI/passive_crown_FI if (ignite_crown >= 1.0_r8) then - currentCohort%passive_crown_fire_flg = .true. ! passive crown fire ignited + currentCohort%passive_crown_fire_flg = 1 ! passive crown fire ignited currentCohort%fraction_crown_burned = 1.0_r8 ! else ! evaluate crown damage based on scorch height endif ! ignite passive crown fire @@ -957,7 +956,7 @@ subroutine crown_damage ( currentSite ) ! height_cbb is clear branch bole height or height of bottom of canopy ! Equation 17 in Thonicke et al. 2010 if (currentCohort%hite > 0.0_r8 .and. currentPatch%SH > height_cbb & - .and. currentCohort%passive_crown_fire_flg = .true.) then + .and. currentCohort%passive_crown_fire_flg == 0) then currentCohort%fraction_crown_burned = min(1.0_r8, ((currentPatch%SH - height_cbb)/crown_depth)) endif !SH frac crown burnt calculation From 5b843566b287893697e1fd99949a2f2e331dfa84 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Tue, 1 Oct 2019 14:43:36 -0600 Subject: [PATCH 38/93] Update variable names in EDTypes --- fire/SFMainMod.F90 | 2 +- main/EDTypesMod.F90 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 1067aafb2d..6e87575051 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -1052,7 +1052,7 @@ subroutine post_fire_mortality ( currentSite ) currentCohort%crownfire_mort = 0.0_r8 if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then ! Equation 22 in Thonicke et al. 2010. - currentCohort%crownfire_mort = EDPftvarcon_inst%crown_resist(currentCohort%pft)*currentCohort%fraction_crown_burned**3.0_r8 + currentCohort%crownfire_mort = EDPftvarcon_inst%crown_kill(currentCohort%pft)*currentCohort%fraction_crown_burned**3.0_r8 ! Equation 18 in Thonicke et al. 2010. currentCohort%fire_mort = max(0.0_r8,min(1.0_r8,currentCohort%crownfire_mort+currentCohort%cambial_mort- & (currentCohort%crownfire_mort*currentCohort%cambial_mort))) !joint prob. diff --git a/main/EDTypesMod.F90 b/main/EDTypesMod.F90 index 0594906bfe..70110951c2 100644 --- a/main/EDTypesMod.F90 +++ b/main/EDTypesMod.F90 @@ -1011,7 +1011,7 @@ subroutine dump_cohort(ccohort) write(fates_log(),*) 'co%ddbhdt = ', ccohort%ddbhdt write(fates_log(),*) 'co%dbdeaddt = ', ccohort%dbdeaddt write(fates_log(),*) 'co%fraction_crown_burned = ', ccohort%fraction_crown_burned - write(fates_log(),*) 'co%crown_fire_flg = ', ccohort%crown_fire_flg + write(fates_log(),*) 'co%passive_crown_fire_flg = ', ccohort%passive_crown_fire_flg write(fates_log(),*) 'co%fire_mort = ', ccohort%fire_mort write(fates_log(),*) 'co%crownfire_mort = ', ccohort%crownfire_mort write(fates_log(),*) 'co%cambial_mort = ', ccohort%cambial_mort From 188e6838bb3fb295fa31b4b596eb738c491c0053 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Tue, 1 Oct 2019 14:51:52 -0600 Subject: [PATCH 39/93] Update passive_crown_fire in EDTypes --- main/EDTypesMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/EDTypesMod.F90 b/main/EDTypesMod.F90 index 70110951c2..131931b5c2 100644 --- a/main/EDTypesMod.F90 +++ b/main/EDTypesMod.F90 @@ -344,7 +344,7 @@ module EDTypesMod ! FIRE real(r8) :: fraction_crown_burned ! proportion of crown affected by fire:- - real(r8) :: crown_fire_flg ! flag for passive crown fire ignition + real(r8) :: passive_crown_fire_flg ! flag for passive crown fire ignition (1=ignition) real(r8) :: cambial_mort ! probability that trees dies due to cambial char ! (conditional on the tree being subjected to the fire) real(r8) :: crownfire_mort ! probability of tree post-fire mortality From 4f017a2785beea12fd233a478d2febb6ffc6518e Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Tue, 1 Oct 2019 15:05:31 -0600 Subject: [PATCH 40/93] Update variable name and comments crown_fire flag --- main/EDPftvarcon.F90 | 10 +++++----- parameter_files/fates_params_default.cdl | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index 7d9aa3d900..359c66f5ce 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -49,7 +49,7 @@ module EDPftvarcon ! that is occupied by crown. For fire model. real(r8), allocatable :: bark_scaler(:) ! scaler from dbh to bark thickness. For fire model. real(r8), allocatable :: crown_kill(:) ! crown resistance to fire. (1 = none) For fire model. - real(r8), allocatable :: passive_crown_fire(:) ! Is plant susceptible to passive crown fire?(1=yes,0=no) + real(r8), allocatable :: crown_fire(:) ! Is plant susceptible to passive crown fire?(1=yes,0=no) real(r8), allocatable :: crown_ignite_energy(:) ! heat of crown foliage ignition [kJ/kg] real(r8), allocatable :: initd(:) ! initial seedling density real(r8), allocatable :: seed_suppl(:) ! seeds that come from outside the gridbox. @@ -383,7 +383,7 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_fire_passive_crown_fire' + name = 'fates_fire_crown_fire' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -823,9 +823,9 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%crown_kill) - name = 'fates_fire_passive_crown_fire' + name = 'fates_fire_crown_fire' call fates_params%RetreiveParameterAllocate(name=name, & - data=this%passive_crown_fire) + data=this%crown_fire) name = 'fates_fire_crown_ignite_energy' call fates_params%RetreiveParameterAllocate(name=name, & @@ -1740,7 +1740,7 @@ subroutine FatesReportPFTParams(is_master) write(fates_log(),fmt0) 'crown = ',EDPftvarcon_inst%crown write(fates_log(),fmt0) 'bark_scaler = ',EDPftvarcon_inst%bark_scaler write(fates_log(),fmt0) 'crown_kill = ',EDPftvarcon_inst%crown_kill - write(fates_log(),fmt0) 'passive_crown_fire = ',EDPftvarcon_inst%passive_crown_fire + write(fates_log(),fmt0) 'crown_fire = ',EDPftvarcon_inst%crown_fire write(fates_log(),fmt0) 'crown_ignite_energy = ',EDPftvarcon_inst%crown_ignite_energy write(fates_log(),fmt0) 'initd = ',EDPftvarcon_inst%initd write(fates_log(),fmt0) 'seed_suppl = ',EDPftvarcon_inst%seed_suppl diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index e6d56f9f07..7789cd2986 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -133,8 +133,8 @@ variables: fates_fire_crown_kill:units = "NA" ; fates_fire_crown_kill:long_name = "crown resistance to fire (1 = none), EQ 22 in Thonicke et al 2010" ; double fates_fire_crown_fire(fates_pft) ; - fates_fire_crown_fire:units = "logical flag" ; - fates_fire_crown_fire:long_name = "Binary flag for passive crown fire"; + fates_fire_crown_fire:units = "binary flag" ; + fates_fire_crown_fire:long_name = "binary flag for plants susceptible to passive crown fire (1=yes)"; double fates_fire_crown_ignite_energy(fates_pft) ; fates_fire_crown_ignite_energy:units = "kJ/kg" ; fates_fire_crown_ignite_energy:long_name = "spitfire parameter, heat of crown foliage ignition" ; From 3e0d8f7e5061621f43e79acae0fdbf3c4232af44 Mon Sep 17 00:00:00 2001 From: jkshuman Date: Thu, 3 Oct 2019 16:58:05 -0600 Subject: [PATCH 41/93] Update fire/SFMainMod.F90 Co-Authored-By: Samuel Levis --- fire/SFMainMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 6e87575051..16addd4c69 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -937,7 +937,7 @@ subroutine crown_damage ( currentSite ) ! 0.01 = C from Van Wagner 1977 EQ4 for crown of base height 6m, 100% FMC, and FI 2500kW/m passive_crown_FI = (0.01_r8 * height_cbb *EDPftvarcon_inst%crown_ignite_energy(currentCohort%pft))**1.5_r8 - if (passive_crown_FI >= crown_fire_threshold) then ! 200 kW/m = threshold for crown fire potential + if (currentPatch%FI >= crown_fire_threshold) then ! 200 kW/m = threshold for crown fire potential ! Initiation of passive crown fire, EQ 14 Bessie and Johnson 1995 ignite_crown = currentPatch%FI/passive_crown_FI From ce4933abefbb28d9fe3f22a7f5c05f08a71bc5c6 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Fri, 4 Oct 2019 11:55:43 -0600 Subject: [PATCH 42/93] Use crown_fire param as real to scale effects of passive crown fires This pft-dependent parameter is set in the fates params file. Use it instead of setting fraction_crown_burned = 1 for all passive crown fires. --- fire/SFMainMod.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index d7bb4de86c..f5dd21ec9d 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -933,7 +933,7 @@ subroutine crown_damage ( currentSite ) ! Evaluate for passive crown fire ignition - if (EDPftvarcon_inst%crown_fire(currentCohort%pft) == 1) then + if (EDPftvarcon_inst%crown_fire(currentCohort%pft) > 0.001_r8) then ! Note: crown_ignition_energy to be calculated based on foliar moisture content from FATES-Hydro ! EQ 3 Van Wagner 1977 @@ -961,7 +961,7 @@ subroutine crown_damage ( currentSite ) if (ignite_crown >= 1.0_r8) then currentCohort%passive_crown_fire_flg = 1 ! passive crown fire ignited - currentCohort%fraction_crown_burned = 1.0_r8 + currentCohort%fraction_crown_burned = EDPftvarcon_inst%crown_fire(currentCohort%pft) ! Initiation of active crown fire, EQ 14b Bessie and Johnson 1995 ignite_active_crown = currentPatch%FI/active_crown_FI if (ignite_active_crown >= 1.0_r8) then From aeefb59cbbab848cf5ccde95fd1f992b7a8dcacf Mon Sep 17 00:00:00 2001 From: jkshuman Date: Fri, 4 Oct 2019 12:10:02 -0600 Subject: [PATCH 43/93] Update fire/SFMainMod.F90 Co-Authored-By: Samuel Levis --- fire/SFMainMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 16addd4c69..18e293a840 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -925,7 +925,7 @@ subroutine crown_damage ( currentSite ) ! Evaluate for passive crown fire ignition - if (EDPftvarcon_inst%crown_fire(currentCohort%pft) == 1) then + if (EDPftvarcon_inst%crown_fire(currentCohort%pft) > 0.0_r8) then ! Note: crown_ignition_energy to be calculated based on foliar moisture content from FATES-Hydro ! EQ 3 Van Wagner 1977 From 5a6fcc00239f65d39b3d40d5ff292696dab4fd9f Mon Sep 17 00:00:00 2001 From: jkshuman Date: Fri, 4 Oct 2019 12:13:49 -0600 Subject: [PATCH 44/93] Update fire/SFMainMod.F90 Co-Authored-By: Samuel Levis --- fire/SFMainMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 18e293a840..3e9001dc9e 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -944,7 +944,7 @@ subroutine crown_damage ( currentSite ) if (ignite_crown >= 1.0_r8) then currentCohort%passive_crown_fire_flg = 1 ! passive crown fire ignited - currentCohort%fraction_crown_burned = 1.0_r8 + currentCohort%fraction_crown_burned = EDPftvarcon_inst%crown_fire(currentCohort%pft) ! else ! evaluate crown damage based on scorch height endif ! ignite passive crown fire ! else no crown fire today From 9997422e49770535425a756fca9003ae1858265b Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Fri, 4 Oct 2019 13:03:18 -0600 Subject: [PATCH 45/93] Add comment about passive crown fire survival --- fire/SFMainMod.F90 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 3e9001dc9e..2120b4d8ab 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -944,6 +944,9 @@ subroutine crown_damage ( currentSite ) if (ignite_crown >= 1.0_r8) then currentCohort%passive_crown_fire_flg = 1 ! passive crown fire ignited + ! "...in passive crown fires and high intensity surface fires trees can survive. Jack, red + ! and white pine survive...scars used in dating fires" + ! Johnson, E.A. 1992 Fire and Veg Dynamics: North American boreal forest. Cambridge Press currentCohort%fraction_crown_burned = EDPftvarcon_inst%crown_fire(currentCohort%pft) ! else ! evaluate crown damage based on scorch height endif ! ignite passive crown fire From 012e363d35184b4ef723d0cb7c9d07a54296da01 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Mon, 7 Oct 2019 13:41:17 -0600 Subject: [PATCH 46/93] Revert zero variables to again occur in EDCohortDynamics --- biogeochem/EDCohortDynamicsMod.F90 | 2 ++ fire/SFMainMod.F90 | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/biogeochem/EDCohortDynamicsMod.F90 b/biogeochem/EDCohortDynamicsMod.F90 index 88a0f02eb7..9efacbf416 100644 --- a/biogeochem/EDCohortDynamicsMod.F90 +++ b/biogeochem/EDCohortDynamicsMod.F90 @@ -595,6 +595,8 @@ subroutine zero_cohort(cc_p) currentCohort%leaf_cost = 0._r8 currentcohort%excl_weight = 0._r8 currentcohort%prom_weight = 0._r8 + currentcohort%crownfire_mort = 0._r8 + currentcohort%cambial_mort = 0._r8 currentCohort%c13disc_clm = 0._r8 currentCohort%c13disc_acc = 0._r8 diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 2120b4d8ab..a47e93f903 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -1002,7 +1002,7 @@ subroutine cambial_damage_kill ( currentSite ) if (currentPatch%fire == 1) then currentCohort => currentPatch%tallest; do while(associated(currentCohort)) - currentCohort%cambial_mort = 0.0_r8 + !currentCohort%cambial_mort = 0.0_r8 !testing this removal if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then !trees only ! Equation 21 in Thonicke et al 2010 bt = EDPftvarcon_inst%bark_scaler(currentCohort%pft)*currentCohort%dbh ! bark thickness. @@ -1014,6 +1014,8 @@ subroutine cambial_damage_kill ( currentSite ) else if ((currentPatch%tau_l/tau_c) > 0.22_r8) then currentCohort%cambial_mort = (0.563_r8*(currentPatch%tau_l/tau_c)) - 0.125_r8 + else + currentCohort%cambial_mort = 0.0_r8 endif endif endif !trees From d377f27fe28187386a42c2ce6dec19bb597e6154 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 8 Oct 2019 17:51:03 -0600 Subject: [PATCH 47/93] Correction that fixes problem of no fire after year 1 The two new flags identifying when passive and active crown fires occur needed to be integers for the if statements to work correctly. To facilitate my debugging, I reverted some aesthetic code mods to look more like @jkshuman's read_lightning_pr561 branch (https://github.com/jkshuman/fates/tree/read_lightning_pr561) so as to minimize unnecessary diffs when typing "git diff read_lightning_pr561". These mods will likely make it back into this branch (active_crown_fire) with later updates. --- biogeochem/EDCohortDynamicsMod.F90 | 14 ++++++------ fire/SFMainMod.F90 | 34 ++++++++++++++---------------- main/EDTypesMod.F90 | 4 ++-- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/biogeochem/EDCohortDynamicsMod.F90 b/biogeochem/EDCohortDynamicsMod.F90 index 9efacbf416..3d8e6ddf9b 100644 --- a/biogeochem/EDCohortDynamicsMod.F90 +++ b/biogeochem/EDCohortDynamicsMod.F90 @@ -534,11 +534,12 @@ subroutine nan_cohort(cc_p) currentCohort%ddbhdt = nan ! time derivative of dbh ! FIRE - currentCohort%fraction_crown_burned = nan ! proportion of crown affected by fire - currentCohort%passive_crown_fire_flg = nan ! flag to indicate passive crown fire ignition - currentCohort%cambial_mort = nan ! probability that trees dies due to cambial char P&R (1986) - currentCohort%crownfire_mort = nan ! probability of tree post-fire mortality due to crown scorch - currentCohort%fire_mort = nan ! post-fire mortality from cambial and crown damage assuming two are independent + currentCohort%fraction_crown_burned = nan ! proportion of crown affected by fire + currentCohort%passive_crown_fire_flg = 9999 ! flag to indicate passive crown fire ignition + currentCohort%active_crown_fire_flg = 9999 ! flag to indicate active crown fire ignition + currentCohort%cambial_mort = nan ! probability that trees dies due to cambial char P&R (1986) + currentCohort%crownfire_mort = nan ! probability of tree post-fire mortality due to crown scorch + currentCohort%fire_mort = nan ! post-fire mortality from cambial and crown damage assuming two are independent end subroutine nan_cohort @@ -580,7 +581,8 @@ subroutine zero_cohort(cc_p) currentcohort%year_net_uptake(:) = 999._r8 ! this needs to be 999, or trimming of new cohorts will break. currentcohort%ts_net_uptake(:) = 0._r8 - currentCohort%size_class = 1 + currentcohort%fraction_crown_burned = 0._r8 + currentCohort%size_class = 1 currentCohort%seed_prod = 0._r8 currentCohort%size_class_lasttimestep = 0 currentcohort%npp_acc_hold = 0._r8 diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 5a77c59d8e..2f2bc718c0 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -113,7 +113,7 @@ subroutine fire_danger_index ( currentSite, bc_in) !***************************************************************** ! currentSite%acc_NI is the accumulated Nesterov fire danger index - use SFParamsMod, only : SF_val_fdi_a, SF_val_fdi_b + use SFParamsMod, only : SF_val_fdi_a, SF_val_fdi_b use FatesConstantsMod , only : tfrz => t_water_freeze_k_1atm use FatesConstantsMod , only : sec_per_day @@ -166,7 +166,7 @@ subroutine charecteristics_of_fuel ( currentSite ) type(ed_patch_type), pointer :: currentPatch type(ed_cohort_type), pointer :: currentCohort - type(litter_type), pointer :: litt_c + type(litter_type), pointer :: litt_c real(r8) alpha_FMC(nfsc) ! Relative fuel moisture adjusted per drying ratio real(r8) fuel_moisture(nfsc) ! Scaled moisture content of small litter fuels. @@ -438,8 +438,8 @@ subroutine rate_of_spread ( currentSite ) real(r8) a_beta ! dummy variable for product of a* beta_ratio for react_v_opt equation real(r8) a,b,c,e ! function of fuel sav - logical,parameter :: debug_windspeed = .false. !for debugging - real(r8),parameter :: q_dry = 581.0_r8 !heat of pre-ignition of dry fuels (kJ/kg) + logical,parameter :: debug_windspeed = .false. !for debugging + real(r8),parameter :: q_dry = 581.0_r8 !heat of pre-ignition of dry fuels (kJ/kg) currentPatch=>currentSite%oldest_patch; @@ -572,8 +572,8 @@ subroutine ground_fuel_consumption ( currentSite ) !returns the the hypothetic fuel consumed by the fire use SFParamsMod, only : SF_val_miner_total, SF_val_min_moisture, & - SF_val_mid_moisture, SF_val_low_moisture_Coeff, SF_val_low_moisture_Slope, & - SF_val_mid_moisture_Coeff, SF_val_mid_moisture_Slope + SF_val_mid_moisture, SF_val_low_moisture_Coeff, SF_val_low_moisture_Slope, & + SF_val_mid_moisture_Coeff, SF_val_mid_moisture_Slope type(ed_site_type) , intent(in), target :: currentSite type(ed_patch_type), pointer :: currentPatch @@ -662,8 +662,8 @@ subroutine fire_intensity ( currentSite ) !currentPatch%TFC_ROS total fuel consumed by flaming front (kgC/m2) use FatesInterfaceMod, only : hlm_use_spitfire - use SFParamsMod, only : SF_val_fdi_alpha,SF_val_fuel_energy, & - SF_val_max_durat, SF_val_durat_slope + use SFParamsMod, only : SF_val_fdi_alpha,SF_val_fuel_energy, & + SF_val_max_durat, SF_val_durat_slope type(ed_site_type), intent(inout), target :: currentSite @@ -687,11 +687,11 @@ subroutine fire_intensity ( currentSite ) !'decide_fire' subroutine shortened and put in here... if (currentPatch%FI >= fire_threshold) then ! 50kW/m is the threshold for a self-sustaining fire currentPatch%fire = 1 ! Fire... :D - + ! Equation 7 from Venevsky et al GCB 2002 (modification of equation 8 in Thonicke et al. 2010) ! FDI 0.1 = low, 0.3 moderate, 0.75 high, and 1 = extreme ignition potential for alpha 0.000337 currentSite%FDI = 1.0_r8 - exp(-SF_val_fdi_alpha*currentSite%acc_NI) - + ! Equation 14 in Thonicke et al. 2010 ! fire duration in minutes @@ -705,7 +705,7 @@ subroutine fire_intensity ( currentSite ) !currentPatch%FD = 60.0_r8 * 24.0_r8 !no minutes in a day else currentPatch%fire = 0 ! No fire... :-/ - currentPatch%FD = 0.0_r8 + currentPatch%FD = 0.0_r8 endif ! FIX(SPM,032414) needs a refactor ! FIX(RF,032414) : should happen outside of SF loop - doing all spitfire code is inefficient otherwise. @@ -736,7 +736,6 @@ subroutine area_burnt ( currentSite ) real(r8) AB !daily area burnt in m2 per km2 real(r8) size_of_fire !in m2 real(r8),parameter :: km2_to_m2 = 1000000.0_r8 !area conversion for square km to square m - integer g, p ! ---initialize site parameters to zero--- currentSite%frac_burnt = 0.0_r8 @@ -775,7 +774,7 @@ subroutine area_burnt ( currentSite ) ! --- calculate area burnt--- if(lb > 0.0_r8) then - + ! Equation 1 in Thonicke et al. 2010 ! To Do: Connect here with the Li & Levis GDP fire suppression algorithm. ! Equation 16 in arora and boer model JGR 2005 @@ -814,7 +813,7 @@ subroutine crown_scorching ( currentSite ) type(ed_site_type), intent(in), target :: currentSite - type(ed_patch_type), pointer :: currentPatch + type(ed_patch_type), pointer :: currentPatch type(ed_cohort_type), pointer :: currentCohort real(r8) :: f_ag_bmass ! fraction of tree cohort's above-ground biomass as a proportion of total patch ag tree biomass @@ -888,7 +887,7 @@ subroutine crown_damage ( currentSite ) !returns the updated currentCohort%fraction_crown_burned for each tree cohort within each patch. !currentCohort%fraction_crown_burned is the proportion of crown affected by fire - + type(ed_site_type), intent(in), target :: currentSite @@ -917,7 +916,6 @@ subroutine crown_damage ( currentSite ) do while(associated(currentCohort)) currentCohort%fraction_crown_burned = 0.0_r8 - if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then !trees only ! height_cbb = clear branch bole height at base of crown (m) @@ -1027,7 +1025,7 @@ subroutine cambial_damage_kill ( currentSite ) if (currentPatch%fire == 1) then currentCohort => currentPatch%tallest; do while(associated(currentCohort)) - !currentCohort%cambial_mort = 0.0_r8 !testing this removal + currentCohort%cambial_mort = 0.0_r8 if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then !trees only ! Equation 21 in Thonicke et al 2010 bt = EDPftvarcon_inst%bark_scaler(currentCohort%pft)*currentCohort%dbh ! bark thickness. @@ -1084,7 +1082,7 @@ subroutine post_fire_mortality ( currentSite ) ! Equation 22 in Thonicke et al. 2010. currentCohort%crownfire_mort = EDPftvarcon_inst%crown_kill(currentCohort%pft)*currentCohort%fraction_crown_burned**3.0_r8 ! Equation 18 in Thonicke et al. 2010. - currentCohort%fire_mort = max(0.0_r8,min(1.0_r8,currentCohort%crownfire_mort+currentCohort%cambial_mort- & + currentCohort%fire_mort = max(0._r8,min(1.0_r8,currentCohort%crownfire_mort+currentCohort%cambial_mort- & (currentCohort%crownfire_mort*currentCohort%cambial_mort))) !joint prob. else currentCohort%fire_mort = 0.0_r8 !Set to zero. Grass mode of death is removal of leaves. diff --git a/main/EDTypesMod.F90 b/main/EDTypesMod.F90 index a4084e70da..d35db2a910 100644 --- a/main/EDTypesMod.F90 +++ b/main/EDTypesMod.F90 @@ -344,8 +344,8 @@ module EDTypesMod ! FIRE real(r8) :: fraction_crown_burned ! proportion of crown affected by fire:- - real(r8) :: active_crown_fire_flg ! flag for active crown fire ignition - real(r8) :: passive_crown_fire_flg ! flag for passive crown fire ignition (1=ignition) + integer :: active_crown_fire_flg ! flag for active crown fire ignition + integer :: passive_crown_fire_flg ! flag for passive crown fire ignition (1=ignition) real(r8) :: cambial_mort ! probability that trees dies due to cambial char ! (conditional on the tree being subjected to the fire) real(r8) :: crownfire_mort ! probability of tree post-fire mortality From 402dfd00d96b76448bec4313b4156525bc14da9f Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Wed, 9 Oct 2019 15:33:17 -0600 Subject: [PATCH 48/93] Correct crown_fuel_bulkd formula to include n and c_area I.e. currentCohort%n and currentCohort%c_area. Also 1) Moving active crown fire calculations inside the if statement that confirms ignition of a passive crown fire to increase code efficiency 2) Introducing diagnostic write statements to investigate crown fire behavior; remove in a later commit. --- fire/SFMainMod.F90 | 57 ++++++++++++++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 20 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 2f2bc718c0..a77a84d001 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -942,15 +942,6 @@ subroutine crown_damage ( currentSite ) ! Van Wagner EQ4 FI = (Czh)**3/2 where z=crown base height,h=heat crown ignite energy, FI=fire intensity ! 0.01 = C from Van Wagner 1977 EQ4 for crown of base height 6m, 100% FMC, and FI 2500kW/m passive_crown_FI = (0.01_r8 * height_cbb *EDPftvarcon_inst%crown_ignite_energy(currentCohort%pft))**1.5_r8 - ! Critical intensity for active crowning (kW/m) - ! EQ 12 Bessie and Johnson 1995 - ! Dividing fuels by 0.45 to get biomass but note that the - ! 0.45 cancels out and could be removed. Also dividing - ! critical_mass_flow_rate by 3.34, an empirical constant - ! in Bessie & Johnson 1995 - leaf_c = currentCohort%prt%GetState(leaf_organ, all_carbon_elements) - crown_fuel_bulkd = leaf_c / (0.45_r8 * crown_depth) - active_crown_FI = critical_mass_flow_rate * low_heat_of_combustion * currentPatch%sum_fuel / (0.45_r8 * 3.34_r8 * crown_fuel_bulkd) if (currentPatch%FI >= crown_fire_threshold) then ! 200 kW/m = threshold for crown fire potential @@ -959,23 +950,49 @@ subroutine crown_damage ( currentSite ) if (ignite_crown >= 1.0_r8) then currentCohort%passive_crown_fire_flg = 1 ! passive crown fire ignited - ! "...in passive crown fires and high intensity surface fires trees can survive. Jack, red - ! and white pine survive...scars used in dating fires" + write(fates_log(),*) 'SF currentCohort%passive_crown_fire_flg = ', currentCohort%passive_crown_fire_flg ! slevis diag + ! "...in passive crown fires and high intensity surface + ! fires trees can survive. Jack, red + ! and white pine survive...scars used in dating fires" ! Johnson, E.A. 1992 Fire and Veg Dynamics: North American boreal forest. Cambridge Press currentCohort%fraction_crown_burned = EDPftvarcon_inst%crown_fire(currentCohort%pft) - ! Initiation of active crown fire, EQ 14b Bessie and Johnson 1995 - ignite_active_crown = currentPatch%FI/active_crown_FI + + ! Critical intensity for active crowning (kW/m) + ! EQ 12 Bessie and Johnson 1995 + ! Fuels / 0.45 to get biomass but note that the 0.45 + ! cancels out and could be removed. Also dividing + ! critical_mass_flow_rate by 3.34, an empirical + ! constant in Bessie & Johnson 1995 + leaf_c = currentCohort%prt%GetState(leaf_organ, all_carbon_elements) + crown_fuel_bulkd = currentCohort%n * leaf_c / & + (0.45_r8 * currentCohort%c_area * crown_depth) + active_crown_FI = critical_mass_flow_rate * & + low_heat_of_combustion * currentPatch%sum_fuel / & + (0.45_r8 * 3.34_r8 * crown_fuel_bulkd) + + ! Initiate active crown fire? + ! EQ 14b Bessie & Johnson 1995 + ignite_active_crown = currentPatch%FI / active_crown_FI + if (ignite_active_crown >= 1.0_r8) then - ! In code design phase; see - ! https://github.com/NGEET/fates/issues/573 currentCohort%active_crown_fire_flg = 1 ! active crown fire ignited + write(fates_log(),*) 'SF currentCohort%active_crown_fire_flg = ', currentCohort%active_crown_fire_flg ! slevis diag + currentCohort%fraction_crown_burned = 1.0_r8 + ! TODO Additional effects of active crown fire. + ! Currently in code design phase; see + ! https://github.com/NGEET/fates/issues/573 + else + write(fates_log(),*) 'SF currentPatch%FI < active_crown_FI = ', currentPatch%FI, active_crown_FI ! slevis diag endif ! ignite active crown fire - ! else ! evaluate crown damage based on scorch height + else ! crown damage based on scorch height done below + write(fates_log(),*) 'SF currentPatch%FI < passive_crown_FI = ', currentPatch%FI, passive_crown_FI ! slevis diag endif ! ignite passive crown fire - ! else no crown fire today - endif ! crown fire intensity - ! else ! not crown fire plant - endif ! evaluate passive crown fire + else ! crown fire not possible + write(fates_log(),*) 'SF currentPatch%FI < crown_fire_threshold = ', currentPatch%FI, crown_fire_threshold ! slevis diag + endif ! fire intensity vs. crown fire threshold + else ! not a crown-fire pft + write(fates_log(),*) 'SF Not a crown-fire pft' ! slevis diag + endif ! crown-fire pft ! For surface fires, are flames in the canopy? ! height_cbb is clear branch bole height or height of bottom of canopy From b762dadebdcbf119c1b4762c1e71136d31f7e2d8 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Fri, 11 Oct 2019 12:53:23 -0600 Subject: [PATCH 49/93] This is only a test --- fire/SFMainMod.F90 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index a77a84d001..a3359f649f 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -950,7 +950,7 @@ subroutine crown_damage ( currentSite ) if (ignite_crown >= 1.0_r8) then currentCohort%passive_crown_fire_flg = 1 ! passive crown fire ignited - write(fates_log(),*) 'SF currentCohort%passive_crown_fire_flg = ', currentCohort%passive_crown_fire_flg ! slevis diag + write(fates_log(),*) 'SF currentCohort%passive_crown_fire_flg, height_cbb = ', currentCohort%passive_crown_fire_flg, height_cbb ! slevis diag ! "...in passive crown fires and high intensity surface ! fires trees can survive. Jack, red ! and white pine survive...scars used in dating fires" @@ -976,16 +976,16 @@ subroutine crown_damage ( currentSite ) if (ignite_active_crown >= 1.0_r8) then currentCohort%active_crown_fire_flg = 1 ! active crown fire ignited - write(fates_log(),*) 'SF currentCohort%active_crown_fire_flg = ', currentCohort%active_crown_fire_flg ! slevis diag + write(fates_log(),*) 'SF currentCohort%active_crown_fire_flg, crown_fuel_bulkd = ', currentCohort%active_crown_fire_flg, crown_fuel_bulkd ! slevis diag currentCohort%fraction_crown_burned = 1.0_r8 ! TODO Additional effects of active crown fire. ! Currently in code design phase; see ! https://github.com/NGEET/fates/issues/573 else - write(fates_log(),*) 'SF currentPatch%FI < active_crown_FI = ', currentPatch%FI, active_crown_FI ! slevis diag + write(fates_log(),*) 'SF currentPatch%FI < active_crown_FI, crown_fuel_bulkd = ', currentPatch%FI, active_crown_FI, crown_fuel_bulkd ! slevis diag endif ! ignite active crown fire else ! crown damage based on scorch height done below - write(fates_log(),*) 'SF currentPatch%FI < passive_crown_FI = ', currentPatch%FI, passive_crown_FI ! slevis diag + write(fates_log(),*) 'SF currentPatch%FI < passive_crown_FI, height_cbb = ', currentPatch%FI, passive_crown_FI, height_cbb ! slevis diag endif ! ignite passive crown fire else ! crown fire not possible write(fates_log(),*) 'SF currentPatch%FI < crown_fire_threshold = ', currentPatch%FI, crown_fire_threshold ! slevis diag @@ -1002,9 +1002,11 @@ subroutine crown_damage ( currentSite ) .and. currentCohort%active_crown_fire_flg == 0) then currentCohort%fraction_crown_burned = min(1.0_r8, ((currentPatch%SH - height_cbb)/crown_depth)) + write(fates_log(),*) 'SF Cohort%fraction_crown_burned, Patch%SH, Cohort%hite, height_cbb, crown_depth =', currentCohort%fraction_crown_burned, currentPatch%SH, currentCohort%hite, height_cbb, crown_depth ! slevis diag endif !SH frac crown burnt calculation ! Check for strange values. currentCohort%fraction_crown_burned = min(1.0_r8, max(0.0_r8,currentCohort%fraction_crown_burned)) + write(fates_log(),*) 'SF currentCohort%fraction_crown_burned =', currentCohort%fraction_crown_burned ! slevis diag endif !trees only !shrink canopy to account for burnt section. !currentCohort%canopy_trim = min(currentCohort%canopy_trim,(1.0_r8-currentCohort%fraction_crown_burned)) From 9a3fac02cf5ce34f726025c8b27f976672d38e29 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Fri, 25 Oct 2019 16:52:32 -0600 Subject: [PATCH 50/93] Effect of active crown fire on the Rate of Spread Previous commits computed the occurrence of active crown fire and set currentCohort%fraction_crown_burned = 1.0_r8 Here I begin to introduce the effects of active crown fire on the size and intensity of the fire as discussed with @jkshuman in #573. First step in this is the effect of active crown fire on the Rate of Spread. I have confirmed that, with the code changes this far, history varialbes FIRE_ROS, SUM_FUEL, fire_fuel_bulkd have changed, while fire size and intensity have not changed. This is what I expected. --- fire/SFMainMod.F90 | 86 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 67 insertions(+), 19 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index a3359f649f..33c769f29e 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -47,7 +47,7 @@ module SFMainMod public :: fire_model public :: fire_danger_index - public :: charecteristics_of_fuel + public :: characteristics_of_fuel public :: rate_of_spread public :: ground_fuel_consumption public :: fire_intensity @@ -79,6 +79,9 @@ subroutine fire_model( currentSite, bc_in) type (ed_patch_type), pointer :: currentPatch + real(r8) :: MEF(nfsc) ! Moisture extinction factor of fuels + real(r8) :: fuel_moisture(nfsc) ! Scaled moisture content of small litter fuels + !zero fire things currentPatch => currentSite%youngest_patch do while(associated(currentPatch)) @@ -94,13 +97,15 @@ subroutine fire_model( currentSite, bc_in) if( hlm_use_spitfire == itrue )then call fire_danger_index(currentSite, bc_in) call wind_effect(currentSite, bc_in) - call charecteristics_of_fuel(currentSite) - call rate_of_spread(currentSite) + call characteristics_of_fuel(currentSite, MEF, fuel_moisture) + call rate_of_spread(currentSite, MEF, fuel_moisture) call ground_fuel_consumption(currentSite) call fire_intensity(currentSite) call area_burnt(currentSite) call crown_scorching(currentSite) call crown_damage(currentSite) + call rate_of_spread(currentSite, MEF, fuel_moisture) + ! TODO Recalculate area_burnt, FI for altered Scorch Height (SH) call cambial_damage_kill(currentSite) call post_fire_mortality(currentSite) end if @@ -157,7 +162,7 @@ end subroutine fire_danger_index !***************************************************************** - subroutine charecteristics_of_fuel ( currentSite ) + subroutine characteristics_of_fuel ( currentSite, MEF, fuel_moisture ) !***************************************************************** use SFParamsMod, only : SF_val_drying_ratio, SF_val_SAV, SF_val_FBD @@ -168,9 +173,12 @@ subroutine charecteristics_of_fuel ( currentSite ) type(ed_cohort_type), pointer :: currentCohort type(litter_type), pointer :: litt_c + ! ARGUMENTS + real(r8), intent(out) :: MEF(nfsc) ! Moisture extinction factor of fuels integer n + real(r8), intent(out) :: fuel_moisture(nfsc) ! Scaled moisture content of small litter fuels + + ! LOCAL VARIABLES real(r8) alpha_FMC(nfsc) ! Relative fuel moisture adjusted per drying ratio - real(r8) fuel_moisture(nfsc) ! Scaled moisture content of small litter fuels. - real(r8) MEF(nfsc) ! Moisture extinction factor of fuels integer n fuel_moisture(:) = 0.0_r8 @@ -322,7 +330,7 @@ subroutine charecteristics_of_fuel ( currentSite ) enddo !end patch loop - end subroutine charecteristics_of_fuel + end subroutine characteristics_of_fuel !***************************************************************** @@ -330,7 +338,7 @@ subroutine wind_effect ( currentSite, bc_in) !*****************************************************************. ! Routine called daily from within ED within a site loop. - ! Calculates the effective windspeed based on vegetation charecteristics. + ! Calculates the effective windspeed based on vegetation characteristics. ! currentSite%wind is daily wind converted to m/min for Spitfire units use FatesConstantsMod, only : sec_per_min @@ -411,13 +419,15 @@ subroutine wind_effect ( currentSite, bc_in) end subroutine wind_effect !***************************************************************** - subroutine rate_of_spread ( currentSite ) + subroutine rate_of_spread ( currentSite, MEF, fuel_moisture ) !*****************************************************************. !Routine called daily from within ED within a site loop. !Returns the updated currentPatch%ROS_front value for each patch. use SFParamsMod, only : SF_val_miner_total, & SF_val_part_dens, & + SF_val_SAV, & + SF_val_drying_ratio, & SF_val_miner_damp, & SF_val_fuel_energy @@ -426,7 +436,19 @@ subroutine rate_of_spread ( currentSite ) type(ed_site_type), intent(in), target :: currentSite type(ed_patch_type), pointer :: currentPatch + type(ed_cohort_type), pointer :: currentCohort + type(litter_type), pointer :: litt_c + + ! ARGUMENTS + real(r8), intent(in) :: MEF(nfsc) ! Moisture extinction factor of fuels + real(r8), intent(in) :: fuel_moisture(nfsc) ! Scaled moisture content of small litter fuels + ! LOCAL VARIABLES + real(r8) :: sum_fuel ! value saved for comparison + real(r8) :: leaf_c ! leaf carbon [kg] + real(r8) :: alpha_live_fuel ! ratio of mass fine live fuel to mass total fine fuel (1-hour fuels Rothermal 1972) + real(r8) :: fuel_eff_moist_dead + real(r8) :: fuel_mef_fine ! Rothermal fire spread model parameters. real(r8) beta,beta_op ! weighted average of packing ratio (unitless) real(r8) ir ! reaction intensity (kJ/m2/min) @@ -442,6 +464,7 @@ subroutine rate_of_spread ( currentSite ) real(r8),parameter :: q_dry = 581.0_r8 !heat of pre-ignition of dry fuels (kJ/kg) currentPatch=>currentSite%oldest_patch; + litt_c => currentPatch%litter(element_pos(carbon12_element)) do while(associated(currentPatch)) @@ -454,6 +477,36 @@ subroutine rate_of_spread ( currentSite ) ! remove mineral content from net fuel load per Thonicke 2010 for ir calculation currentPatch%sum_fuel = currentPatch%sum_fuel * (1.0_r8 - SF_val_miner_total) !net of minerals + ! --------------------------------------------------- + ! Active crown fire effects: https://github.com/NGEET/fates/issues/573 + ! Update some characteristics of fuel + sum_fuel = currentPatch%sum_fuel ! save for comparison later + if (currentPatch%fire == 1) then + currentCohort=>currentPatch%tallest + do while(associated(currentCohort)) + if (currentCohort%active_crown_fire_flg == 1) then + ! Add the leaf carbon from each cohort to currentPatch%sum_fuel + leaf_c = currentCohort%prt%GetState(leaf_organ, all_carbon_elements) + currentPatch%sum_fuel = currentPatch%sum_fuel + leaf_c + end if + currentCohort => currentCohort%shorter; + enddo !end cohort loop + + ! if sum_fuel was indeed updated for a case of active crown fire, go + ! on to update currentPatch%fuel_mef and currentPatch%fuel_eff_moist + if (currentPatch%sum_fuel > sum_fuel) then + alpha_live_fuel = (currentPatch%livegrass + leaf_c) / & + (currentPatch%livegrass + leaf_c + sum(litt_c%leaf_fines(:)) + litt_c%ag_cwd(tw_sf)) + fuel_eff_moist_dead = sum(currentPatch%fuel_frac(tw_sf:dl_sf) * fuel_moisture(tw_sf:dl_sf)) + fuel_mef_fine = currentPatch%fuel_frac(tw_sf) * MEF(tw_sf) + & + currentPatch%fuel_frac(dl_sf) * MEF(dl_sf) + & + currentPatch%fuel_frac(lg_sf) * MEF(lg_sf) + currentPatch%fuel_mef = max((2.9_r8 * ((1.0_r8 - alpha_live_fuel) / alpha_live_fuel) * (1.0_r8 - fuel_eff_moist_dead) - 0.226_r8), fuel_mef_fine) + currentPatch%fuel_eff_moist = exp(-1.0_r8 * currentSite%acc_NI * SF_val_SAV(lg_sf) / SF_val_drying_ratio) + end if + end if + ! --------------------------------------------------- + ! ----start spreading--- if ( hlm_masterproc == itrue .and.debug) write(fates_log(),*) & @@ -888,15 +941,12 @@ subroutine crown_damage ( currentSite ) !returns the updated currentCohort%fraction_crown_burned for each tree cohort within each patch. !currentCohort%fraction_crown_burned is the proportion of crown affected by fire - - type(ed_site_type), intent(in), target :: currentSite type(ed_patch_type) , pointer :: currentPatch type(ed_cohort_type), pointer :: currentCohort real(r8) :: leaf_c ! leaf carbon [kg] - real(r8) :: crown_fuel_bulkd ! leaf biomass per unit area divided by canopy depth [kg/m3] Van Wagner used this method according to Scott (2006) p. 12 real(r8), parameter :: low_heat_of_combustion = 12700.0_r8 ! [kJ/kg] real(r8), parameter :: critical_mass_flow_rate = 0.05_r8 ! [kg/m2/s] value for conifer forests; if available for other vegetation, move to the params file? real(r8) active_crown_FI ! critical fire intensity for active crown fire ignition (kW/m) @@ -964,11 +1014,11 @@ subroutine crown_damage ( currentSite ) ! critical_mass_flow_rate by 3.34, an empirical ! constant in Bessie & Johnson 1995 leaf_c = currentCohort%prt%GetState(leaf_organ, all_carbon_elements) - crown_fuel_bulkd = currentCohort%n * leaf_c / & + currentPatch%fuel_bulkd = currentCohort%n * leaf_c / & (0.45_r8 * currentCohort%c_area * crown_depth) active_crown_FI = critical_mass_flow_rate * & low_heat_of_combustion * currentPatch%sum_fuel / & - (0.45_r8 * 3.34_r8 * crown_fuel_bulkd) + (0.45_r8 * 3.34_r8 * currentPatch%fuel_bulkd) ! Initiate active crown fire? ! EQ 14b Bessie & Johnson 1995 @@ -976,13 +1026,10 @@ subroutine crown_damage ( currentSite ) if (ignite_active_crown >= 1.0_r8) then currentCohort%active_crown_fire_flg = 1 ! active crown fire ignited - write(fates_log(),*) 'SF currentCohort%active_crown_fire_flg, crown_fuel_bulkd = ', currentCohort%active_crown_fire_flg, crown_fuel_bulkd ! slevis diag + write(fates_log(),*) 'SF currentCohort%active_crown_fire_flg, currentPatch%fuel_bulkd = ', currentCohort%active_crown_fire_flg, currentPatch%fuel_bulkd ! slevis diag currentCohort%fraction_crown_burned = 1.0_r8 - ! TODO Additional effects of active crown fire. - ! Currently in code design phase; see - ! https://github.com/NGEET/fates/issues/573 else - write(fates_log(),*) 'SF currentPatch%FI < active_crown_FI, crown_fuel_bulkd = ', currentPatch%FI, active_crown_FI, crown_fuel_bulkd ! slevis diag + write(fates_log(),*) 'SF currentPatch%FI < active_crown_FI, currentPatch%fuel_bulkd = ', currentPatch%FI, active_crown_FI, currentPatch%fuel_bulkd ! slevis diag endif ! ignite active crown fire else ! crown damage based on scorch height done below write(fates_log(),*) 'SF currentPatch%FI < passive_crown_FI, height_cbb = ', currentPatch%FI, passive_crown_FI, height_cbb ! slevis diag @@ -1014,6 +1061,7 @@ subroutine crown_damage ( currentSite ) currentCohort => currentCohort%shorter; enddo !end cohort loop + endif !fire? currentPatch => currentPatch%younger; From 6ed93b8f58342e9f539fbd177a06610088422cbd Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Fri, 25 Oct 2019 18:43:24 -0600 Subject: [PATCH 51/93] Small corrections to previous commit 1) Moved calculation of currentPatch%sum_fuel out of subr. rate_of_spread and into subr. characteristics_of_fuel because rate_of_spread is called twice now, yet currentPatch%sum_fuel should not be updated a second time. 2) Set currentCohort%active_crown_fire_flg back to 0 after the second call to rate_of_spread because we want it equal to 0 when we make the next timestep's first call to rate_of_spread. --- fire/SFMainMod.F90 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 33c769f29e..2561c2180f 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -166,6 +166,7 @@ subroutine characteristics_of_fuel ( currentSite, MEF, fuel_moisture ) !***************************************************************** use SFParamsMod, only : SF_val_drying_ratio, SF_val_SAV, SF_val_FBD + use SFParamsMod, only : SF_val_miner_total type(ed_site_type), intent(in), target :: currentSite @@ -326,6 +327,11 @@ subroutine characteristics_of_fuel ( currentSite, MEF, fuel_moisture ) if ( hlm_masterproc == itrue ) write(fates_log(),*) 'problem with spitfire fuel averaging' endif + ! remove mineral content from net fuel load per Thonicke 2010 + ! for ir calculation in subr. rate_of_spread + ! slevis moved here because rate_of_spread is now called twice/timestep + currentPatch%sum_fuel = currentPatch%sum_fuel * (1.0_r8 - SF_val_miner_total) !net of minerals + currentPatch => currentPatch%younger enddo !end patch loop @@ -424,8 +430,7 @@ subroutine rate_of_spread ( currentSite, MEF, fuel_moisture ) !Routine called daily from within ED within a site loop. !Returns the updated currentPatch%ROS_front value for each patch. - use SFParamsMod, only : SF_val_miner_total, & - SF_val_part_dens, & + use SFParamsMod, only : SF_val_part_dens, & SF_val_SAV, & SF_val_drying_ratio, & SF_val_miner_damp, & @@ -474,9 +479,6 @@ subroutine rate_of_spread ( currentSite, MEF, fuel_moisture ) moist_damp = 0.0_r8; ir = 0.0_r8; a_beta = 0.0_r8; currentPatch%ROS_front = 0.0_r8 - ! remove mineral content from net fuel load per Thonicke 2010 for ir calculation - currentPatch%sum_fuel = currentPatch%sum_fuel * (1.0_r8 - SF_val_miner_total) !net of minerals - ! --------------------------------------------------- ! Active crown fire effects: https://github.com/NGEET/fates/issues/573 ! Update some characteristics of fuel @@ -488,6 +490,7 @@ subroutine rate_of_spread ( currentSite, MEF, fuel_moisture ) ! Add the leaf carbon from each cohort to currentPatch%sum_fuel leaf_c = currentCohort%prt%GetState(leaf_organ, all_carbon_elements) currentPatch%sum_fuel = currentPatch%sum_fuel + leaf_c + currentCohort%active_crown_fire_flg = 0 ! reset for next tstep end if currentCohort => currentCohort%shorter; enddo !end cohort loop From b084604cf82433a235cb46d639d8dfd6de1e20e5 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Sun, 27 Oct 2019 16:47:01 -0600 Subject: [PATCH 52/93] Completing the addition of active crown fire effects In the most recent commits I added a second call to rate_of_spread. After that call I now also call the following subroutines a second time: - fire_intensity - area_burnt - crown_scorching - crown_damage --- fire/SFMainMod.F90 | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 2561c2180f..8c35e05f09 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -104,8 +104,13 @@ subroutine fire_model( currentSite, bc_in) call area_burnt(currentSite) call crown_scorching(currentSite) call crown_damage(currentSite) + ! Begin: Repeat calls to calculate effects of active crown fire call rate_of_spread(currentSite, MEF, fuel_moisture) - ! TODO Recalculate area_burnt, FI for altered Scorch Height (SH) + call fire_intensity(currentSite) + call area_burnt(currentSite) + call crown_scorching(currentSite) + call crown_damage(currentSite) + ! End: Repeat calls to calculate effects of active crown fire call cambial_damage_kill(currentSite) call post_fire_mortality(currentSite) end if @@ -201,6 +206,11 @@ subroutine characteristics_of_fuel ( currentSite, MEF, fuel_moisture ) currentCohort%n/currentPatch%area endif + + ! slevis: A bit random to place this here, but it works. + ! Resetting this flag before the first call of rate_of_spread. + currentCohort%active_crown_fire_flg = 0 + currentCohort => currentCohort%shorter enddo @@ -482,6 +492,8 @@ subroutine rate_of_spread ( currentSite, MEF, fuel_moisture ) ! --------------------------------------------------- ! Active crown fire effects: https://github.com/NGEET/fates/issues/573 ! Update some characteristics of fuel + ! TODO Would it make sense to move this section of code to subr. + ! characteristics_of_fuel? sum_fuel = currentPatch%sum_fuel ! save for comparison later if (currentPatch%fire == 1) then currentCohort=>currentPatch%tallest @@ -490,7 +502,6 @@ subroutine rate_of_spread ( currentSite, MEF, fuel_moisture ) ! Add the leaf carbon from each cohort to currentPatch%sum_fuel leaf_c = currentCohort%prt%GetState(leaf_organ, all_carbon_elements) currentPatch%sum_fuel = currentPatch%sum_fuel + leaf_c - currentCohort%active_crown_fire_flg = 0 ! reset for next tstep end if currentCohort => currentCohort%shorter; enddo !end cohort loop From f4d99f848fd67936525d67bc708cdea4c6cc8517 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Sun, 27 Oct 2019 17:13:04 -0600 Subject: [PATCH 53/93] Improvement in code organization In the last commit I initialized currentCohort%active_crown_fire_flg in an awkward location. I have moved to subr. fire_model where other variables are initialized. --- fire/SFMainMod.F90 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 8c35e05f09..142dabe808 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -87,6 +87,11 @@ subroutine fire_model( currentSite, bc_in) do while(associated(currentPatch)) currentPatch%frac_burnt = 0.0_r8 currentPatch%fire = 0 + currentCohort => currentPatch%tallest + do while(associated(currentCohort)) + currentCohort%active_crown_fire_flg = 0 + currentCohort => currentCohort%shorter + enddo currentPatch => currentPatch%older enddo @@ -206,11 +211,6 @@ subroutine characteristics_of_fuel ( currentSite, MEF, fuel_moisture ) currentCohort%n/currentPatch%area endif - - ! slevis: A bit random to place this here, but it works. - ! Resetting this flag before the first call of rate_of_spread. - currentCohort%active_crown_fire_flg = 0 - currentCohort => currentCohort%shorter enddo From e6fff146d9f17191a432d462012c81553e8b5b30 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Sun, 27 Oct 2019 22:42:59 -0600 Subject: [PATCH 54/93] Added missing pointer --- fire/SFMainMod.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 142dabe808..71beb214b4 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -78,6 +78,7 @@ subroutine fire_model( currentSite, bc_in) type (ed_patch_type), pointer :: currentPatch + type(ed_cohort_type), pointer :: currentCohort real(r8) :: MEF(nfsc) ! Moisture extinction factor of fuels real(r8) :: fuel_moisture(nfsc) ! Scaled moisture content of small litter fuels From b715f76236a289149a83967505ac6559ad6e0b24 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Thu, 21 Nov 2019 14:22:12 -0700 Subject: [PATCH 55/93] Add calculation for canopy base height for crown fire --- fire/SFMainMod.F90 | 94 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 85 insertions(+), 9 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index a47e93f903..e1e7869985 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -891,6 +891,7 @@ subroutine crown_damage ( currentSite ) !currentCohort%fraction_crown_burned is the proportion of crown affected by fire + use SFParamsMod, only : SF_VAL_CWD_FRAC type(ed_site_type), intent(in), target :: currentSite @@ -900,15 +901,95 @@ subroutine crown_damage ( currentSite ) real(r8) :: crown_depth ! depth of crown (m) real(r8) :: height_cbb ! clear branch bole height or crown base height (m) real(r8) :: passive_crown_FI ! critical fire intensity for passive crown fire ignition (kW/m) - real(r8) :: ignite_crown ! ratio for ignition of passive crown fire,EQ 14 Bessie & Johnson 1995 - + real(r8) :: ignite_passive_crown ! ratio for ignition of passive crown fire,EQ 14 Bessie & Johnson 1995 + real(r8) :: tree_sap_struct_biomass ! above-ground tree struct and sap biomass in current cohort. kgC/m2 + real(r8) :: leaf_c ! leaf carbon (kg) + real(r8) :: twig_sapw_c ! above-ground twig sap biomass in current cohort. kgC/m2 + real(r8) :: twig_struct_c ! above-ground twig struct biomass in current cohort. kgC/m2 + real(r8) :: crown_fuel_biomass ! biomass of 1 hr fuels (leaves,twigs) in current Patch. kgC/m2 + real(r8) :: crown_fuel_density ! density of crown fuel in current Patch. kgC/m3 + real(r8) :: crown_density_per_m ! density crown fuel per 1m section. + real(r8) :: crown_density ! density crown fuel to find min height for passive crown fire + + real(r8),parameter :: min_passive_crown_fuel = 0.11_r8 !minimum crown fuel density to ignite passive crown fire + currentPatch => currentSite%oldest_patch - do while(associated(currentPatch)) + do while(associated(currentPatch)) + + passive_crown_FI = 0.0_r8 + ignite_passive_crown = 0.0_r8 + tree_sap_struct_biomass = 0.0_r8 + leaf_c = 0.0_r8 ! zero here or in cohort loop? + twig_sapw_c = 0.0_r8 + twig_struct_c = 0.0_r8 + canopy_fuel_biomass = 0.0_r8 + canopy_fuel_density = 0.0_r8 + canopy_density_per_m = 0.0_r8 + if (currentPatch%fire == 1) then + canopy_fuel_density = 0.0_r8 + canopy_fuel_biomass = 0.0_r8 + min_height_fuel = 0.0_r8 + max_height_fuel = 0.0_r8 + currentCohort=>currentPatch%tallest + do while(associated(currentCohort)) + + ! Calculate crown 1hr fuel biomass (leaf, twig sapwood, twig structural biomass) + if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then !trees only + + crown_depth = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) + height_cbb = currentCohort%hite - crown_depth + + if (height_cbb < min_height) then + min_height = height_cbb + endif ! find min height for canopy fuels + + if (currentCohort%hite > max_height) then + max_height = currentCohort%hite + endif ! find max height for canopy fuels + + leaf_c = currentCohort%prt%GetState(leaf_organ, all_carbon_elements) + sapw_c = currentCohort%prt%GetState(sapw_organ, all_carbon_elements) + struct_c = currentCohort%prt%GetState(struct_organ, all_carbon_elements) + + tree_sap_struct_biomass = currentCohort%n * & + (EDPftvarcon_inst%allom_agb_frac(currentCohort%pft)*(sapw_c + struct_c)) + + twig_sapw_c = tree_sap_struct_biomass * SF_VAL_CWD_frac(1) ! find sapw_c for twigs + twig_struct_c = tree_sap_struct_biomass * SF_VAL_CWD_frac(1) ! find struct_c for twigs + + canopy_fuel_biomass = canopy_fuel_biomass = & + (currentCohort%n * leaf_c) + twig_sapw_c + twig_struct_c ! canopy fuel biomass. Patch + + endif !trees only + + currentCohort => currentCohort%shorter; + + enddo !end cohort loop + canopy_fuel_density = canopy_fuel_biomass / currentPatch%area ! kgC/m3 in canopy for patch + + canopy_depth = max_height_fuel - min_height_fuel ! depth across patch + + canopy_density_per_m = canopy_fuel_density / canopy_depth ! density per 1m section of canopy + + ! find height where canopy fuel density in 1 m section is >= to 0.11 kg/m3 + ! loop from min_height to max_height + ! canopy_density = 0.0_r8 + ! canopy_denisty = canopy_density + canopy_density_per_m + ! if canopy_density >= min_passive_crown_fuel + ! then height_base_canopy = this height + ! replace height_cbb with height_base_canopy in EQ passive_crown_FI + ! this prevents small trees without much fuel from starting crown fires in patch + + + + + currentCohort=>currentPatch%tallest + do while(associated(currentCohort)) currentCohort%fraction_crown_burned = 0.0_r8 @@ -919,13 +1000,8 @@ subroutine crown_damage ( currentSite ) ! inst%crown = crown_depth_frac (PFT) crown_depth = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) height_cbb = currentCohort%hite - crown_depth - passive_crown_FI = 0.0_r8 - ignite_crown = 0.0_r8 - currentCohort%passive_crown_fire_flg = 0 - - ! Evaluate for passive crown fire ignition - if (EDPftvarcon_inst%crown_fire(currentCohort%pft) > 0.0_r8) then + currentCohort%passive_crown_fire_flg = 0 ! Note: crown_ignition_energy to be calculated based on foliar moisture content from FATES-Hydro ! EQ 3 Van Wagner 1977 From 380666ce8463b334b7dad980853aed142a6e0f12 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Fri, 22 Nov 2019 11:38:52 -0700 Subject: [PATCH 56/93] Update canopy_base_height to patch level for crown fire --- fire/SFMainMod.F90 | 75 ++++++++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index e1e7869985..6794d167b8 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -911,7 +911,8 @@ subroutine crown_damage ( currentSite ) real(r8) :: crown_density_per_m ! density crown fuel per 1m section. real(r8) :: crown_density ! density crown fuel to find min height for passive crown fire - real(r8),parameter :: min_passive_crown_fuel = 0.11_r8 !minimum crown fuel density to ignite passive crown fire + real(r8),parameter :: min_density_crown_fuel = 0.11_r8 !min crown fuel density to ignite passive crown fire + real(r8),parameter :: crown_ignite_energy = 3060_r8 ! crown ignition energy currentPatch => currentSite%oldest_patch @@ -931,61 +932,71 @@ subroutine crown_damage ( currentSite ) canopy_fuel_density = 0.0_r8 canopy_fuel_biomass = 0.0_r8 - min_height_fuel = 0.0_r8 max_height_fuel = 0.0_r8 currentCohort=>currentPatch%tallest do while(associated(currentCohort)) - ! Calculate crown 1hr fuel biomass (leaf, twig sapwood, twig structural biomass) + ! Calculate crown 1hr fuel biomass (leaf, twig sapwood, twig structural biomass) if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then !trees only - crown_depth = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) - height_cbb = currentCohort%hite - crown_depth - - if (height_cbb < min_height) then - min_height = height_cbb - endif ! find min height for canopy fuels + crown_depth = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) + height_cbb = currentCohort%hite - crown_depth if (currentCohort%hite > max_height) then - max_height = currentCohort%hite + max_height = currentCohort%hite !max height on Patch endif ! find max height for canopy fuels leaf_c = currentCohort%prt%GetState(leaf_organ, all_carbon_elements) sapw_c = currentCohort%prt%GetState(sapw_organ, all_carbon_elements) struct_c = currentCohort%prt%GetState(struct_organ, all_carbon_elements) - tree_sap_struct_biomass = currentCohort%n * & + tree_sap_struct_c = currentCohort%n * & (EDPftvarcon_inst%allom_agb_frac(currentCohort%pft)*(sapw_c + struct_c)) - twig_sapw_c = tree_sap_struct_biomass * SF_VAL_CWD_frac(1) ! find sapw_c for twigs - twig_struct_c = tree_sap_struct_biomass * SF_VAL_CWD_frac(1) ! find struct_c for twigs + twig_sapw_struct_c = tree_sap_struct_c * SF_VAL_CWD_frac(1) ! only 1hr fuel + + canopy_fuel_c = (currentCohort%n * leaf_c) + twig_sapw_struct_c ! canopy fuel kg C. Patch - canopy_fuel_biomass = canopy_fuel_biomass = & - (currentCohort%n * leaf_c) + twig_sapw_c + twig_struct_c ! canopy fuel biomass. Patch + canopy_fuel_biomass = canopy_fuel_c / 0.45_r8 ! canopy fuel biomass + + canopy_fuel_per_m = canopy_fuel_biomass / crown_depth ! biomass per m + + do ih = int(height_cbb), int(currentCohort%hite) + biom_matrix(ih) = biom_matrix(ih) + canopy_fuel_per_m + end do endif !trees only currentCohort => currentCohort%shorter; - enddo !end cohort loop + enddo !end cohort loop - canopy_fuel_density = canopy_fuel_biomass / currentPatch%area ! kgC/m3 in canopy for patch + canopy_fuel_density = canopy_fuel_biomass / (currentPatch%area * canopy_depth) ! kgbiomass/m3 - canopy_depth = max_height_fuel - min_height_fuel ! depth across patch + biom_matrix(:) = biom_matrix(:) / currentPatch%area !kg biomass/m3 - canopy_density_per_m = canopy_fuel_density / canopy_depth ! density per 1m section of canopy + do ih=1,70 !loop from 1m up to 70m to find section where density = 0.11kg/m3 + if (biom_matrix(ih) > min_density_crown_fuel) then + height_base_canopy = float(ih) + exit + end if + end do - ! find height where canopy fuel density in 1 m section is >= to 0.11 kg/m3 - ! loop from min_height to max_height - ! canopy_density = 0.0_r8 - ! canopy_denisty = canopy_density + canopy_density_per_m - ! if canopy_density >= min_passive_crown_fuel - ! then height_base_canopy = this height - ! replace height_cbb with height_base_canopy in EQ passive_crown_FI - ! this prevents small trees without much fuel from starting crown fires in patch + !canopy_bulk_denisty (kg/m3) for Patch + canopy_bulk_denisty = sum(biom_matrix) / (max_height - height_base_canopy) + ! Note: crown_ignition_energy to be calculated based on PFT foliar moisture content from FATES-Hydro + ! Use EDPftvarcon_inst%crown_ignite_energy(currentCohort%pft) and complete as weighted average + ! in place of crown_ignite_energy parameter + ! EQ 3 Van Wagner 1977 + ! h = crown_ignite_energy (kJ/kg), m = foliar moisture content based on dry fuel (%) + ! crown_ignite_energy = 460 + 26 * m + ! Crown fuel ignition potential, EQ 8 Bessie and Johnson 1995 + ! Van Wagner EQ4 FI = (Czh)**3/2 where z=crown base height,h=heat crown ignite energy, FI=fire intensity + ! 0.01 = C from Van Wagner 1977 EQ4 for crown of base height 6m, 100% FMC, and FI 2500kW/m + passive_crown_FI = (0.01_r8 * height_base_canopy * crown_ignite_energy**1.5_r8 currentCohort=>currentPatch%tallest @@ -1003,15 +1014,7 @@ subroutine crown_damage ( currentSite ) currentCohort%passive_crown_fire_flg = 0 - ! Note: crown_ignition_energy to be calculated based on foliar moisture content from FATES-Hydro - ! EQ 3 Van Wagner 1977 - ! h = crown_ignite_energy (kJ/kg), m = foliar moisture content based on dry fuel (%) - ! crown_ignite_energy = 460 + 26 * m - - ! Crown fuel ignition potential, EQ 8 Bessie and Johnson 1995 - ! Van Wagner EQ4 FI = (Czh)**3/2 where z=crown base height,h=heat crown ignite energy, FI=fire intensity - ! 0.01 = C from Van Wagner 1977 EQ4 for crown of base height 6m, 100% FMC, and FI 2500kW/m - passive_crown_FI = (0.01_r8 * height_cbb *EDPftvarcon_inst%crown_ignite_energy(currentCohort%pft))**1.5_r8 + if (currentPatch%FI >= crown_fire_threshold) then ! 200 kW/m = threshold for crown fire potential From 299cbf550f3063216cf626f5d3fdb43f5f1f419c Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Sat, 23 Nov 2019 16:22:33 -0700 Subject: [PATCH 57/93] Clean up crown damage SFMain --- fire/SFMainMod.F90 | 79 +++++++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 39 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 6794d167b8..46bf20ec2d 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -909,10 +909,14 @@ subroutine crown_damage ( currentSite ) real(r8) :: crown_fuel_biomass ! biomass of 1 hr fuels (leaves,twigs) in current Patch. kgC/m2 real(r8) :: crown_fuel_density ! density of crown fuel in current Patch. kgC/m3 real(r8) :: crown_density_per_m ! density crown fuel per 1m section. - real(r8) :: crown_density ! density crown fuel to find min height for passive crown fire + real(r8) :: crown_density ! density crown fuel to find min height for passive crown fire + + real, dimension(70):: biom_matrix ! matrix to track biomass from bottom to 70m - real(r8),parameter :: min_density_crown_fuel = 0.11_r8 !min crown fuel density to ignite passive crown fire - real(r8),parameter :: crown_ignite_energy = 3060_r8 ! crown ignition energy + real(r8),parameter :: min_density_canopy_fuel = 0.011_r8 !min canopy fuel density (kg/m3) sufficient to + !propogate fire vertically through canopy + !Scott and Reinhardt 2001 RMRS-RP-29 + real(r8),parameter :: crown_ignite_energy = 3060_r8 !crown ignition energy (kJ/kg) Van Wagner 1977 currentPatch => currentSite%oldest_patch @@ -924,16 +928,14 @@ subroutine crown_damage ( currentSite ) leaf_c = 0.0_r8 ! zero here or in cohort loop? twig_sapw_c = 0.0_r8 twig_struct_c = 0.0_r8 - canopy_fuel_biomass = 0.0_r8 - canopy_fuel_density = 0.0_r8 - canopy_density_per_m = 0.0_r8 + canopy_fuel_biomass = 0.0_r8 + canopy_fuel_density = 0.0_r8 + canopy_density_per_m = 0.0_r8 + biom_matrix = 0.0_r8 + max_height_fuel = 0.0_r8 if (currentPatch%fire == 1) then - canopy_fuel_density = 0.0_r8 - canopy_fuel_biomass = 0.0_r8 - max_height_fuel = 0.0_r8 - currentCohort=>currentPatch%tallest do while(associated(currentCohort)) @@ -954,11 +956,11 @@ subroutine crown_damage ( currentSite ) tree_sap_struct_c = currentCohort%n * & (EDPftvarcon_inst%allom_agb_frac(currentCohort%pft)*(sapw_c + struct_c)) - twig_sapw_struct_c = tree_sap_struct_c * SF_VAL_CWD_frac(1) ! only 1hr fuel + twig_sapw_struct_c = tree_sap_struct_c * SF_VAL_CWD_frac(1) !only 1hr fuel - canopy_fuel_c = (currentCohort%n * leaf_c) + twig_sapw_struct_c ! canopy fuel kg C. Patch + canopy_fuel_c = (currentCohort%n * leaf_c) + twig_sapw_struct_c !canopy fuel (kgC) Patch - canopy_fuel_biomass = canopy_fuel_c / 0.45_r8 ! canopy fuel biomass + canopy_fuel_biomass = canopy_fuel_c / 0.45_r8 ! canopy fuel (kg biomass) canopy_fuel_per_m = canopy_fuel_biomass / crown_depth ! biomass per m @@ -972,11 +974,11 @@ subroutine crown_damage ( currentSite ) enddo !end cohort loop - canopy_fuel_density = canopy_fuel_biomass / (currentPatch%area * canopy_depth) ! kgbiomass/m3 + canopy_fuel_density = canopy_fuel_biomass / (currentPatch%area * canopy_depth) !kg biomass/m3 biom_matrix(:) = biom_matrix(:) / currentPatch%area !kg biomass/m3 - do ih=1,70 !loop from 1m up to 70m to find section where density = 0.11kg/m3 + do ih=1,70 !loop from 1m to 70m to find bin with density = 0.011 kg/m3 if (biom_matrix(ih) > min_density_crown_fuel) then height_base_canopy = float(ih) exit @@ -987,60 +989,59 @@ subroutine crown_damage ( currentSite ) canopy_bulk_denisty = sum(biom_matrix) / (max_height - height_base_canopy) ! Note: crown_ignition_energy to be calculated based on PFT foliar moisture content from FATES-Hydro - ! Use EDPftvarcon_inst%crown_ignite_energy(currentCohort%pft) and complete as weighted average + ! Use EDPftvarcon_inst%crown_ignite_energy(currentCohort%pft) and compute weighted average ! in place of crown_ignite_energy parameter + ! EQ 3 Van Wagner 1977 ! h = crown_ignite_energy (kJ/kg), m = foliar moisture content based on dry fuel (%) ! crown_ignite_energy = 460 + 26 * m - ! Crown fuel ignition potential, EQ 8 Bessie and Johnson 1995 - ! Van Wagner EQ4 FI = (Czh)**3/2 where z=crown base height,h=heat crown ignite energy, FI=fire intensity - ! 0.01 = C from Van Wagner 1977 EQ4 for crown of base height 6m, 100% FMC, and FI 2500kW/m - passive_crown_FI = (0.01_r8 * height_base_canopy * crown_ignite_energy**1.5_r8 + ! Crown fuel ignition potential, EQ 8 Bessie and Johnson 1995, EQ 4 Van Wagner 1977 + ! FI = (Czh)**3/2 where z=canopy base height,h=heat crown ignite energy, FI=fire intensity + ! 0.01 = C from Van Wagner 1977 EQ4 for canopy base height 6m, 100% FMC, and FI 2500kW/m + passive_crown_FI = (0.01_r8 * height_base_canopy * crown_ignite_energy)**1.5_r8 currentCohort=>currentPatch%tallest do while(associated(currentCohort)) currentCohort%fraction_crown_burned = 0.0_r8 - if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then !trees only - ! height_cbb = clear branch bole height at base of crown (m) + ! height_cbb = clear branch bole height at base of crown (m) ! inst%crown = crown_depth_frac (PFT) - crown_depth = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) - height_cbb = currentCohort%hite - crown_depth + crown_depth = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) + height_cbb = currentCohort%hite - crown_depth currentCohort%passive_crown_fire_flg = 0 - - - + if (currentPatch%FI >= crown_fire_threshold) then ! 200 kW/m = threshold for crown fire potential ! Initiation of passive crown fire, EQ 14 Bessie and Johnson 1995 - ignite_crown = currentPatch%FI/passive_crown_FI + ignite_passive_crown = currentPatch%FI/passive_crown_FI - if (ignite_crown >= 1.0_r8) then - currentCohort%passive_crown_fire_flg = 1 ! passive crown fire ignited - ! "...in passive crown fires and high intensity surface fires trees can survive. Jack, red - ! and white pine survive...scars used in dating fires" - ! Johnson, E.A. 1992 Fire and Veg Dynamics: North American boreal forest. Cambridge Press - currentCohort%fraction_crown_burned = EDPftvarcon_inst%crown_fire(currentCohort%pft) + if (ignite_passive_crown >= 1.0_r8) then + currentCohort%passive_crown_fire_flg = 1 !passive canopy fuels ignited for vertical spread + + !evaluate active crown fire conditions + ! else ! evaluate crown damage based on scorch height - endif ! ignite passive crown fire + endif ! ignite crown fire ! else no crown fire today endif ! crown fire intensity ! else ! not crown fire plant endif ! evaluate passive crown fire ! For surface fires, are flames in the canopy? - ! height_cbb is clear branch bole height or height of bottom of canopy + ! height_cbb is clear branch bole height or height of bottom of canopy + ! Equation 17 in Thonicke et al. 2010 - if (currentCohort%hite > 0.0_r8 .and. currentPatch%SH > height_cbb & - .and. currentCohort%passive_crown_fire_flg == 0) then + if (currentCohort%hite > 0.0_r8 .and. currentPatch%SH > height_cbb) + + !add active flag !.and. currentCohort%active_crown_fire_flg == 0) then - currentCohort%fraction_crown_burned = min(1.0_r8, ((currentPatch%SH - height_cbb)/crown_depth)) + currentCohort%fraction_crown_burned = min(1.0_r8, ((currentPatch%SH - height_cbb)/crown_depth)) endif !SH frac crown burnt calculation ! Check for strange values. currentCohort%fraction_crown_burned = min(1.0_r8, max(0.0_r8,currentCohort%fraction_crown_burned)) From f2442792fea4ea9fce47443e2c1a09f862fee9a3 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Sat, 23 Nov 2019 17:51:20 -0700 Subject: [PATCH 58/93] Update passive fire fuels in crown damage --- fire/SFMainMod.F90 | 66 ++++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 46bf20ec2d..192a40db05 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -900,16 +900,20 @@ subroutine crown_damage ( currentSite ) real(r8) :: crown_depth ! depth of crown (m) real(r8) :: height_cbb ! clear branch bole height or crown base height (m) - real(r8) :: passive_crown_FI ! critical fire intensity for passive crown fire ignition (kW/m) - real(r8) :: ignite_passive_crown ! ratio for ignition of passive crown fire,EQ 14 Bessie & Johnson 1995 - real(r8) :: tree_sap_struct_biomass ! above-ground tree struct and sap biomass in current cohort. kgC/m2 - real(r8) :: leaf_c ! leaf carbon (kg) - real(r8) :: twig_sapw_c ! above-ground twig sap biomass in current cohort. kgC/m2 - real(r8) :: twig_struct_c ! above-ground twig struct biomass in current cohort. kgC/m2 - real(r8) :: crown_fuel_biomass ! biomass of 1 hr fuels (leaves,twigs) in current Patch. kgC/m2 - real(r8) :: crown_fuel_density ! density of crown fuel in current Patch. kgC/m3 - real(r8) :: crown_density_per_m ! density crown fuel per 1m section. - real(r8) :: crown_density ! density crown fuel to find min height for passive crown fire + real(r8) :: max_height ! max cohort on patch (m) + real(r8) :: passive_crown_FI ! fire intensity for ignition from passive canopy fuel (kW/m), EQ 8 + real(r8) :: ignite_passive_crown ! ratio for ignition from passive canopy fuel,EQ 14 Bessie & Johnson 1995 + real(r8) :: tree_sapw_struct_c ! above-ground tree struct and sap biomass in cohort (kgC) + real(r8) :: leaf_c ! leaf carbon (kgC) + real(r8) :: sapw_c ! sapwood carbon (kgC) + real(r8) :: struct_c ! structure carbon (kgC) + real(r8) :: twig_sapw_struct_c ! above-ground twig sap and struct in cohort (kgC) + real(r8) :: crown_fuel_c ! biomass of 1 hr fuels (leaves,twigs) in cohort (kg C) + real(r8) :: crown_fuel_biomass ! biomass of crown fuel in cohort (kg biomass) + real(r8) :: crown_fuel_per_m ! crown fuel per 1m section in cohort + real(r8) :: canopy_bulk_density ! density of canopy fuel on patch + real(r8) :: height_base_canopy ! lowest height of fuels to carry fire in crown + integer :: ih ! counter real, dimension(70):: biom_matrix ! matrix to track biomass from bottom to 70m @@ -917,6 +921,7 @@ subroutine crown_damage ( currentSite ) !propogate fire vertically through canopy !Scott and Reinhardt 2001 RMRS-RP-29 real(r8),parameter :: crown_ignite_energy = 3060_r8 !crown ignition energy (kJ/kg) Van Wagner 1977 + currentPatch => currentSite%oldest_patch @@ -924,15 +929,18 @@ subroutine crown_damage ( currentSite ) passive_crown_FI = 0.0_r8 ignite_passive_crown = 0.0_r8 - tree_sap_struct_biomass = 0.0_r8 + tree_sapw_struct_c = 0.0_r8 leaf_c = 0.0_r8 ! zero here or in cohort loop? - twig_sapw_c = 0.0_r8 - twig_struct_c = 0.0_r8 - canopy_fuel_biomass = 0.0_r8 - canopy_fuel_density = 0.0_r8 - canopy_density_per_m = 0.0_r8 + sapw_c = 0.0_r8 + struct_c = 0.0_r8 + twig_sapw_struct_c = 0.0_r8 + crown_fuel_c = 0.0_r8 + crown_fuel_biomass = 0.0_r8 + crown_fuel_per_m = 0.0_r8 biom_matrix = 0.0_r8 - max_height_fuel = 0.0_r8 + canopy_bulk_density = 0.0_r8 + max_height = 0.0_r8 + height_base_canopy = 0.0_r8 if (currentPatch%fire == 1) then @@ -953,19 +961,19 @@ subroutine crown_damage ( currentSite ) sapw_c = currentCohort%prt%GetState(sapw_organ, all_carbon_elements) struct_c = currentCohort%prt%GetState(struct_organ, all_carbon_elements) - tree_sap_struct_c = currentCohort%n * & + tree_sapw_struct_c = currentCohort%n * & (EDPftvarcon_inst%allom_agb_frac(currentCohort%pft)*(sapw_c + struct_c)) - twig_sapw_struct_c = tree_sap_struct_c * SF_VAL_CWD_frac(1) !only 1hr fuel + twig_sapw_struct_c = tree_sapw_struct_c * SF_VAL_CWD_frac(1) !only 1hr fuel - canopy_fuel_c = (currentCohort%n * leaf_c) + twig_sapw_struct_c !canopy fuel (kgC) Patch + crown_fuel_c = (currentCohort%n * leaf_c) + twig_sapw_struct_c !crown fuel (kgC) - canopy_fuel_biomass = canopy_fuel_c / 0.45_r8 ! canopy fuel (kg biomass) + crown_fuel_biomass = crown_fuel_c / 0.45_r8 ! crown fuel (kg biomass) - canopy_fuel_per_m = canopy_fuel_biomass / crown_depth ! biomass per m + crown_fuel_per_m = crown_fuel_biomass / crown_depth ! kg biomass per m do ih = int(height_cbb), int(currentCohort%hite) - biom_matrix(ih) = biom_matrix(ih) + canopy_fuel_per_m + biom_matrix(ih) = biom_matrix(ih) + crown_fuel_per_m end do endif !trees only @@ -974,19 +982,17 @@ subroutine crown_damage ( currentSite ) enddo !end cohort loop - canopy_fuel_density = canopy_fuel_biomass / (currentPatch%area * canopy_depth) !kg biomass/m3 - biom_matrix(:) = biom_matrix(:) / currentPatch%area !kg biomass/m3 do ih=1,70 !loop from 1m to 70m to find bin with density = 0.011 kg/m3 - if (biom_matrix(ih) > min_density_crown_fuel) then + if (biom_matrix(ih) > min_density_canopy_fuel) then height_base_canopy = float(ih) exit end if end do !canopy_bulk_denisty (kg/m3) for Patch - canopy_bulk_denisty = sum(biom_matrix) / (max_height - height_base_canopy) + canopy_bulk_density = sum(biom_matrix) / (max_height - height_base_canopy) ! Note: crown_ignition_energy to be calculated based on PFT foliar moisture content from FATES-Hydro ! Use EDPftvarcon_inst%crown_ignite_energy(currentCohort%pft) and compute weighted average @@ -997,7 +1003,7 @@ subroutine crown_damage ( currentSite ) ! crown_ignite_energy = 460 + 26 * m ! Crown fuel ignition potential, EQ 8 Bessie and Johnson 1995, EQ 4 Van Wagner 1977 - ! FI = (Czh)**3/2 where z=canopy base height,h=heat crown ignite energy, FI=fire intensity + ! FI = (Czh)**3/2 where z=canopy base height,h=heat of crown ignite energy, FI=fire intensity ! 0.01 = C from Van Wagner 1977 EQ4 for canopy base height 6m, 100% FMC, and FI 2500kW/m passive_crown_FI = (0.01_r8 * height_base_canopy * crown_ignite_energy)**1.5_r8 @@ -1030,14 +1036,12 @@ subroutine crown_damage ( currentSite ) endif ! ignite crown fire ! else no crown fire today endif ! crown fire intensity - ! else ! not crown fire plant - endif ! evaluate passive crown fire ! For surface fires, are flames in the canopy? ! height_cbb is clear branch bole height or height of bottom of canopy ! Equation 17 in Thonicke et al. 2010 - if (currentCohort%hite > 0.0_r8 .and. currentPatch%SH > height_cbb) + if (currentCohort%hite > 0.0_r8 .and. currentPatch%SH > height_cbb) then !add active flag !.and. currentCohort%active_crown_fire_flg == 0) then From ea6ecd974a42dacd3903707f0f86b1b55975531a Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Mon, 25 Nov 2019 14:47:38 -0700 Subject: [PATCH 59/93] Update fire parameter names foliar_moisture, crown_fire_flag --- fire/SFMainMod.F90 | 5 ++--- main/EDPftvarcon.F90 | 12 ++++++------ parameter_files/fates_params_default.cdl | 16 ++++++++-------- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 50d6669612..644efde37a 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -971,7 +971,7 @@ subroutine crown_damage ( currentSite ) canopy_bulk_density = sum(biom_matrix) / (max_height - height_base_canopy) ! Note: crown_ignition_energy to be calculated based on PFT foliar moisture content from FATES-Hydro - ! Use EDPftvarcon_inst%crown_ignite_energy(currentCohort%pft) and compute weighted average + ! Use EDPftvarcon_inst%foliar_moisture(currentCohort%pft) and compute weighted PFT average ! in place of crown_ignite_energy parameter ! EQ 3 Van Wagner 1977 @@ -996,7 +996,7 @@ subroutine crown_damage ( currentSite ) crown_depth = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) height_cbb = currentCohort%hite - crown_depth - currentCohort%passive_crown_fire_flg = 0 ! does tand have canopy fuels for active crown fire? + currentCohort%passive_crown_fire_flg = 0 !does patch have canopy fuels for active crown fire? if (currentPatch%FI >= crown_fire_threshold) then ! 200 kW/m = threshold for crown fire potential @@ -1008,7 +1008,6 @@ subroutine crown_damage ( currentSite ) !evaluate active crown fire conditions - ! else ! evaluate crown damage based on scorch height endif ! ignite crown fire ! else no crown fire today endif ! crown fire intensity diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index 359c66f5ce..36143624f4 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -49,8 +49,8 @@ module EDPftvarcon ! that is occupied by crown. For fire model. real(r8), allocatable :: bark_scaler(:) ! scaler from dbh to bark thickness. For fire model. real(r8), allocatable :: crown_kill(:) ! crown resistance to fire. (1 = none) For fire model. - real(r8), allocatable :: crown_fire(:) ! Is plant susceptible to passive crown fire?(1=yes,0=no) - real(r8), allocatable :: crown_ignite_energy(:) ! heat of crown foliage ignition [kJ/kg] + real(r8), allocatable :: active_crown_fire(:) ! Is plant susceptible to active crown fire?(1=yes,0=no) + real(r8), allocatable :: foliar_moisture(:) ! foliar moisture content from dry fuel [%] real(r8), allocatable :: initd(:) ! initial seedling density real(r8), allocatable :: seed_suppl(:) ! seeds that come from outside the gridbox. real(r8), allocatable :: BB_slope(:) ! ball berry slope parameter @@ -383,11 +383,11 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_fire_crown_fire' + name = 'fates_fire_active_crown_fire' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_fire_crown_ignite_energy' + name = 'fates_fire_foliar_moisture' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -823,11 +823,11 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%crown_kill) - name = 'fates_fire_crown_fire' + name = 'fates_fire_active_crown_fire' call fates_params%RetreiveParameterAllocate(name=name, & data=this%crown_fire) - name = 'fates_fire_crown_ignite_energy' + name = 'fates_fire_foliar_moisture' call fates_params%RetreiveParameterAllocate(name=name, & data=this%crown_ignite_energy) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 7789cd2986..c29c3c60dd 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -132,12 +132,12 @@ variables: double fates_fire_crown_kill(fates_pft) ; fates_fire_crown_kill:units = "NA" ; fates_fire_crown_kill:long_name = "crown resistance to fire (1 = none), EQ 22 in Thonicke et al 2010" ; - double fates_fire_crown_fire(fates_pft) ; - fates_fire_crown_fire:units = "binary flag" ; - fates_fire_crown_fire:long_name = "binary flag for plants susceptible to passive crown fire (1=yes)"; - double fates_fire_crown_ignite_energy(fates_pft) ; - fates_fire_crown_ignite_energy:units = "kJ/kg" ; - fates_fire_crown_ignite_energy:long_name = "spitfire parameter, heat of crown foliage ignition" ; + double fates_fire_active_crown_fire(fates_pft) ; + fates_fire_active_crown_fire:units = "logical flag" ; + fates_fire_active_crown_fire:long_name = "Binary flag for active crown fire (1=yes)"; + double fates_fire_foliar_moisture(fates_pft) ; + fates_fire_foliar_moisture:units = "%" ; + fates_fire_foliar_moisture:long_name = "spitfire parameter, foliar moisture content based on dry fuel (%)" ; double fates_fr_fcel(fates_pft) ; fates_fr_fcel:units = "fraction" ; fates_fr_fcel:long_name = "Fine root litter cellulose fraction" ; @@ -724,9 +724,9 @@ data: fates_fire_crown_kill = 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775, 0.775 ; - fates_fire_passive_crown_fire = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; + fates_fire_active_crown_fire = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; - fates_fire_crown_ignite_energy = 3060, 3060, 3060, 3060, 3060, 3060, 3060, 3060, 3060, 3060, 3060, 3060 ; + fates_fire_foliar_moisture = 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 ; fates_fr_fcel = 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 ; From 8b9565e65945d989b294902a5825c1dec0159831 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Mon, 25 Nov 2019 14:56:42 -0700 Subject: [PATCH 60/93] Update var namaes for crown fire and foliar moisture --- main/EDPftvarcon.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index 36143624f4..0425338043 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -825,11 +825,11 @@ subroutine Receive_PFT(this, fates_params) name = 'fates_fire_active_crown_fire' call fates_params%RetreiveParameterAllocate(name=name, & - data=this%crown_fire) + data=this%active_crown_fire) name = 'fates_fire_foliar_moisture' call fates_params%RetreiveParameterAllocate(name=name, & - data=this%crown_ignite_energy) + data=this%foliar_moisture) name = 'fates_recruit_initd' call fates_params%RetreiveParameterAllocate(name=name, & From 23ccb3f4a7b4c48115b238b9792ad5374edccc77 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Mon, 25 Nov 2019 15:04:17 -0700 Subject: [PATCH 61/93] SH as cohort level in crown damage/SFMain --- fire/SFMainMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 644efde37a..410c62bb22 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -1021,7 +1021,7 @@ subroutine crown_damage ( currentSite ) !add active flag !.and. currentCohort%active_crown_fire_flg == 0) then - currentCohort%fraction_crown_burned = min(1.0_r8, ((currentPatch%SH - height_cbb)/crown_depth)) + currentCohort%fraction_crown_burned = min(1.0_r8, ((currentCohort%SH - height_cbb)/crown_depth)) endif !SH frac crown burnt calculation ! Check for strange values. currentCohort%fraction_crown_burned = min(1.0_r8, max(0.0_r8,currentCohort%fraction_crown_burned)) From 339aca2172839cc3aed5427db8af6982e8170d9a Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Tue, 26 Nov 2019 12:13:08 -0700 Subject: [PATCH 62/93] Clean up patch level crown fire calculations --- biogeochem/EDCohortDynamicsMod.F90 | 1 - fire/SFMainMod.F90 | 85 +++++++++++++----------- main/EDPftvarcon.F90 | 14 +--- parameter_files/fates_params_default.cdl | 9 +-- 4 files changed, 49 insertions(+), 60 deletions(-) diff --git a/biogeochem/EDCohortDynamicsMod.F90 b/biogeochem/EDCohortDynamicsMod.F90 index 4cecf9879c..a12406c907 100644 --- a/biogeochem/EDCohortDynamicsMod.F90 +++ b/biogeochem/EDCohortDynamicsMod.F90 @@ -535,7 +535,6 @@ subroutine nan_cohort(cc_p) ! FIRE - currentCohort%passive_crown_fire_flg = nan ! flag to indicate passive crown fire ignition currentCohort%sh = nan ! scorch height affecting crown (m) currentCohort%fraction_crown_burned = nan ! proportion of crown affected by fire currentCohort%cambial_mort = nan ! probability that trees dies due to cambial char P&R (1986) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 410c62bb22..17401a0f85 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -841,7 +841,7 @@ subroutine crown_scorching ( currentSite ) currentCohort%SH = 0.0_r8 if (tree_ag_biomass > 0.0_r8) then - !Equation 16 in Thonicke et al. 2010 !Van Wagner 1973 EQ8 !2/3 Byram (1959) + !Equation 16 in Thonicke et al. 2010 !Van Wagner 1973 EQ8 based on 2/3 Byram (1959) currentCohort%SH = EDPftvarcon_inst%fire_alpha_SH(currentCohort%pft) * (currentPatch%FI**0.667_r8) if(write_SF == itrue)then @@ -889,39 +889,44 @@ subroutine crown_damage ( currentSite ) real(r8) :: crown_fuel_per_m ! crown fuel per 1m section in cohort real(r8) :: canopy_bulk_density ! density of canopy fuel on patch real(r8) :: height_base_canopy ! lowest height of fuels to carry fire in crown - integer :: ih ! counter + integer :: ih ! counter + integer :: passive_canopy_fuel_flg ! flag if canopy fuel true for vertical spread real, dimension(70):: biom_matrix ! matrix to track biomass from bottom to 70m real(r8),parameter :: min_density_canopy_fuel = 0.011_r8 !min canopy fuel density (kg/m3) sufficient to !propogate fire vertically through canopy !Scott and Reinhardt 2001 RMRS-RP-29 + real(r8),parameter :: crown_ignite_energy = 3060_r8 !crown ignition energy (kJ/kg) Van Wagner 1977 currentPatch => currentSite%oldest_patch do while(associated(currentPatch)) - + + !zero Patch level variables passive_crown_FI = 0.0_r8 - ignite_passive_crown = 0.0_r8 - tree_sapw_struct_c = 0.0_r8 - leaf_c = 0.0_r8 ! zero here or in cohort loop? - sapw_c = 0.0_r8 - struct_c = 0.0_r8 - twig_sapw_struct_c = 0.0_r8 - crown_fuel_c = 0.0_r8 - crown_fuel_biomass = 0.0_r8 - crown_fuel_per_m = 0.0_r8 + ignite_passive_crown = 0.0_r8 biom_matrix = 0.0_r8 canopy_bulk_density = 0.0_r8 max_height = 0.0_r8 height_base_canopy = 0.0_r8 - + if (currentPatch%fire == 1) then currentCohort=>currentPatch%tallest - do while(associated(currentCohort)) + do while(associated(currentCohort)) + + !zero cohort level variables + tree_sapw_struct_c = 0.0_r8 + leaf_c = 0.0_r8 + sapw_c = 0.0_r8 + struct_c = 0.0_r8 + twig_sapw_struct_c = 0.0_r8 + crown_fuel_c = 0.0_r8 + crown_fuel_biomass = 0.0_r8 + crown_fuel_per_m = 0.0_r8 ! Calculate crown 1hr fuel biomass (leaf, twig sapwood, twig structural biomass) if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then !trees only @@ -929,9 +934,10 @@ subroutine crown_damage ( currentSite ) crown_depth = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) height_cbb = currentCohort%hite - crown_depth + !find patch max height for stand canopy fuel if (currentCohort%hite > max_height) then - max_height = currentCohort%hite !max height on Patch - endif ! find max height for canopy fuels + max_height = currentCohort%hite + endif leaf_c = currentCohort%prt%GetState(leaf_organ, all_carbon_elements) sapw_c = currentCohort%prt%GetState(sapw_organ, all_carbon_elements) @@ -944,10 +950,12 @@ subroutine crown_damage ( currentSite ) crown_fuel_c = (currentCohort%n * leaf_c) + twig_sapw_struct_c !crown fuel (kgC) - crown_fuel_biomass = crown_fuel_c / 0.45_r8 ! crown fuel (kg biomass) + crown_fuel_biomass = crown_fuel_c / 0.45_r8 ! crown fuel (kg biomass) - crown_fuel_per_m = crown_fuel_biomass / crown_depth ! kg biomass per m + crown_fuel_per_m = crown_fuel_biomass / crown_depth ! kg biomass per m + !sort crown fuel into bins from bottom to top of crown + !accumulate across cohorts to find density within canopy 1m sections do ih = int(height_cbb), int(currentCohort%hite) biom_matrix(ih) = biom_matrix(ih) + crown_fuel_per_m end do @@ -960,7 +968,9 @@ subroutine crown_damage ( currentSite ) biom_matrix(:) = biom_matrix(:) / currentPatch%area !kg biomass/m3 - do ih=1,70 !loop from 1m to 70m to find bin with density = 0.011 kg/m3 + !loop from 1m to 70m to find bin with total density = 0.011 kg/m3 + !min canopy fuel density to propogate fire vertically in canopy across patch + do ih=1,70 if (biom_matrix(ih) > min_density_canopy_fuel) then height_base_canopy = float(ih) exit @@ -971,7 +981,8 @@ subroutine crown_damage ( currentSite ) canopy_bulk_density = sum(biom_matrix) / (max_height - height_base_canopy) ! Note: crown_ignition_energy to be calculated based on PFT foliar moisture content from FATES-Hydro - ! Use EDPftvarcon_inst%foliar_moisture(currentCohort%pft) and compute weighted PFT average + ! or create foliar_moisture based on BTRAN + ! Use foliar_moisture(currentCohort%pft) and compute weighted PFT average with EQ3 Van Wagner 1977 ! in place of crown_ignite_energy parameter ! EQ 3 Van Wagner 1977 @@ -982,7 +993,18 @@ subroutine crown_damage ( currentSite ) ! FI = (Czh)**3/2 where z=canopy base height,h=heat of crown ignite energy, FI=fire intensity ! 0.01 = C from Van Wagner 1977 EQ4 for canopy base height 6m, 100% FMC, and FI 2500kW/m passive_crown_FI = (0.01_r8 * height_base_canopy * crown_ignite_energy)**1.5_r8 + + passive_canopy_fuel_flg = 0 !does patch have canopy fuels for vertical spread? + + ! Initiation of passive crown fire, EQ 14a Bessie and Johnson 1995 + ! Are the canopy fuels in the stand large enough to support vertical spread of fire? + ignite_passive_crown = currentPatch%FI/passive_crown_FI + + if (ignite_passive_crown >= 1.0_r8) then + passive_canopy_fuel_flg = 1 !enough passive canopy fuels for vertical spread + endif + !evaluate active crown fire conditions currentCohort=>currentPatch%tallest @@ -996,32 +1018,15 @@ subroutine crown_damage ( currentSite ) crown_depth = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) height_cbb = currentCohort%hite - crown_depth - currentCohort%passive_crown_fire_flg = 0 !does patch have canopy fuels for active crown fire? - - if (currentPatch%FI >= crown_fire_threshold) then ! 200 kW/m = threshold for crown fire potential - - ! Initiation of passive crown fire, EQ 14 Bessie and Johnson 1995 - ignite_passive_crown = currentPatch%FI/passive_crown_FI - - if (ignite_passive_crown >= 1.0_r8) then - currentCohort%passive_crown_fire_flg = 1 !passive canopy fuels ignited for vertical spread - - !evaluate active crown fire conditions - - endif ! ignite crown fire - ! else no crown fire today - endif ! crown fire intensity - - ! For surface fires, are flames in the canopy? - ! height_cbb is clear branch bole height or height of bottom of canopy ! Equation 17 in Thonicke et al. 2010 ! flames over bottom of canopy, and potentially over top of canopy if (currentCohort%hite > 0.0_r8 .and. currentCohort%SH >= height_cbb) then - - !add active flag !.and. currentCohort%active_crown_fire_flg == 0) then + !add active flag !.and. currentCohort%active_crown_fire_flg == 0) then currentCohort%fraction_crown_burned = min(1.0_r8, ((currentCohort%SH - height_cbb)/crown_depth)) + !add active flag !.and. currentCohort%active_crown_fire_flg == 1) then + !currentCohort%fraction_crown_burned = 1.0_r8 !1 for active fire = true endif !SH frac crown burnt calculation ! Check for strange values. currentCohort%fraction_crown_burned = min(1.0_r8, max(0.0_r8,currentCohort%fraction_crown_burned)) diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index 0425338043..807747a252 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -49,8 +49,7 @@ module EDPftvarcon ! that is occupied by crown. For fire model. real(r8), allocatable :: bark_scaler(:) ! scaler from dbh to bark thickness. For fire model. real(r8), allocatable :: crown_kill(:) ! crown resistance to fire. (1 = none) For fire model. - real(r8), allocatable :: active_crown_fire(:) ! Is plant susceptible to active crown fire?(1=yes,0=no) - real(r8), allocatable :: foliar_moisture(:) ! foliar moisture content from dry fuel [%] + real(r8), allocatable :: active_crown_fire(:) ! Is plant susceptible to active crown fire? real(r8), allocatable :: initd(:) ! initial seedling density real(r8), allocatable :: seed_suppl(:) ! seeds that come from outside the gridbox. real(r8), allocatable :: BB_slope(:) ! ball berry slope parameter @@ -387,10 +386,6 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_fire_foliar_moisture' - call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & - dimension_names=dim_names, lower_bounds=dim_lower_bound) - name = 'fates_recruit_initd' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -827,10 +822,6 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetreiveParameterAllocate(name=name, & data=this%active_crown_fire) - name = 'fates_fire_foliar_moisture' - call fates_params%RetreiveParameterAllocate(name=name, & - data=this%foliar_moisture) - name = 'fates_recruit_initd' call fates_params%RetreiveParameterAllocate(name=name, & data=this%initd) @@ -1740,8 +1731,7 @@ subroutine FatesReportPFTParams(is_master) write(fates_log(),fmt0) 'crown = ',EDPftvarcon_inst%crown write(fates_log(),fmt0) 'bark_scaler = ',EDPftvarcon_inst%bark_scaler write(fates_log(),fmt0) 'crown_kill = ',EDPftvarcon_inst%crown_kill - write(fates_log(),fmt0) 'crown_fire = ',EDPftvarcon_inst%crown_fire - write(fates_log(),fmt0) 'crown_ignite_energy = ',EDPftvarcon_inst%crown_ignite_energy + write(fates_log(),fmt0) 'active_crown_fire = ',EDPftvarcon_inst%active_crown_fire write(fates_log(),fmt0) 'initd = ',EDPftvarcon_inst%initd write(fates_log(),fmt0) 'seed_suppl = ',EDPftvarcon_inst%seed_suppl write(fates_log(),fmt0) 'BB_slope = ',EDPftvarcon_inst%BB_slope diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index c29c3c60dd..87e1659863 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -133,11 +133,8 @@ variables: fates_fire_crown_kill:units = "NA" ; fates_fire_crown_kill:long_name = "crown resistance to fire (1 = none), EQ 22 in Thonicke et al 2010" ; double fates_fire_active_crown_fire(fates_pft) ; - fates_fire_active_crown_fire:units = "logical flag" ; - fates_fire_active_crown_fire:long_name = "Binary flag for active crown fire (1=yes)"; - double fates_fire_foliar_moisture(fates_pft) ; - fates_fire_foliar_moisture:units = "%" ; - fates_fire_foliar_moisture:long_name = "spitfire parameter, foliar moisture content based on dry fuel (%)" ; + fates_fire_active_crown_fire:units = "fraction" ; + fates_fire_active_crown_fire:long_name = "resistance to active crown fire (1=none)"; double fates_fr_fcel(fates_pft) ; fates_fr_fcel:units = "fraction" ; fates_fr_fcel:long_name = "Fine root litter cellulose fraction" ; @@ -726,8 +723,6 @@ data: fates_fire_active_crown_fire = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; - fates_fire_foliar_moisture = 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 ; - fates_fr_fcel = 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 ; fates_fr_flab = 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, From d1b85f9ce821b33c59eb6ff2700882f7118512d1 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 26 Nov 2019 20:36:35 -0700 Subject: [PATCH 63/93] Revisions from code review --- fire/SFMainMod.F90 | 25 ++++++++++++++----------- main/FatesHistoryInterfaceMod.F90 | 4 ++-- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 71beb214b4..8a53b149ce 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -176,8 +176,8 @@ end subroutine fire_danger_index subroutine characteristics_of_fuel ( currentSite, MEF, fuel_moisture ) !***************************************************************** - use SFParamsMod, only : SF_val_drying_ratio, SF_val_SAV, SF_val_FBD - use SFParamsMod, only : SF_val_miner_total + use SFParamsMod, only: SF_val_drying_ratio, SF_val_SAV, SF_val_FBD, & + SF_val_miner_total type(ed_site_type), intent(in), target :: currentSite @@ -964,12 +964,12 @@ subroutine crown_damage ( currentSite ) real(r8) :: leaf_c ! leaf carbon [kg] real(r8), parameter :: low_heat_of_combustion = 12700.0_r8 ! [kJ/kg] real(r8), parameter :: critical_mass_flow_rate = 0.05_r8 ! [kg/m2/s] value for conifer forests; if available for other vegetation, move to the params file? - real(r8) active_crown_FI ! critical fire intensity for active crown fire ignition (kW/m) - real(r8) ignite_active_crown ! ratio for ignition of active crown fire,EQ 14b Bessie & Johnson 1995 + real(r8) :: active_crown_FI ! critical fire intensity for active crown fire ignition (kW/m) + real(r8) :: ignite_active_crown ! ratio for ignition of active crown fire,EQ 14b Bessie & Johnson 1995 real(r8) :: crown_depth ! depth of crown (m) real(r8) :: height_cbb ! clear branch bole height or crown base height (m) real(r8) :: passive_crown_FI ! critical fire intensity for passive crown fire ignition (kW/m) - real(r8) :: ignite_crown ! ratio for ignition of passive crown fire,EQ 14 Bessie & Johnson 1995 + real(r8) :: ignite_passive_crown ! ratio for ignition of passive crown fire,EQ 14 Bessie & Johnson 1995 currentPatch => currentSite%oldest_patch @@ -985,17 +985,20 @@ subroutine crown_damage ( currentSite ) ! height_cbb = clear branch bole height at base of crown (m) ! inst%crown = crown_depth_frac (PFT) - active_crown_FI = 0.0_r8 !critical fire intensity for active crown fire - ignite_active_crown = 0.0_r8 !ratio for ignition of active crown fire,EQ 14b Bessie & Johnson 1995 - currentCohort%active_crown_fire_flg = 0 !flag for active crown fire ignition + active_crown_FI = 0.0_r8 !critical fire intensity for active crown fire + ignite_active_crown = 0.0_r8 !ratio for ignition of active crown fire,EQ 14b Bessie & Johnson 1995 + currentCohort%active_crown_fire_flg = 0 !flag for active crown fire ignition crown_depth = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) height_cbb = currentCohort%hite - crown_depth passive_crown_FI = 0.0_r8 - ignite_crown = 0.0_r8 + ignite_passive_crown = 0.0_r8 currentCohort%passive_crown_fire_flg = 0 ! Evaluate for passive crown fire ignition + ! If crown_fire > 0, then pft succeptible to crown fire. + ! slevis: Do not want a number so close to zero that it is + ! meaningles, so using 1e-3 for the threshold. if (EDPftvarcon_inst%crown_fire(currentCohort%pft) > 0.001_r8) then ! Note: crown_ignition_energy to be calculated based on foliar moisture content from FATES-Hydro @@ -1011,9 +1014,9 @@ subroutine crown_damage ( currentSite ) if (currentPatch%FI >= crown_fire_threshold) then ! 200 kW/m = threshold for crown fire potential ! Initiation of passive crown fire, EQ 14 Bessie and Johnson 1995 - ignite_crown = currentPatch%FI/passive_crown_FI + ignite_passive_crown = currentPatch%FI / passive_crown_FI - if (ignite_crown >= 1.0_r8) then + if (ignite_passive_crown >= 1.0_r8) then currentCohort%passive_crown_fire_flg = 1 ! passive crown fire ignited write(fates_log(),*) 'SF currentCohort%passive_crown_fire_flg, height_cbb = ', currentCohort%passive_crown_fire_flg, height_cbb ! slevis diag ! "...in passive crown fires and high intensity surface diff --git a/main/FatesHistoryInterfaceMod.F90 b/main/FatesHistoryInterfaceMod.F90 index 44767ed085..566a8cd4f7 100644 --- a/main/FatesHistoryInterfaceMod.F90 +++ b/main/FatesHistoryInterfaceMod.F90 @@ -4539,8 +4539,8 @@ subroutine define_history_vars(this, initialize_variables) avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_m5_si_scpf ) - call this%set_history_var(vname='CROWNFIREMORT_SCPF', units = 'N/ha/yr', & - long='crown fire mortality by pft/size',use_default='active', & + call this%set_history_var(vname='CROWNSCORCHMORT_SCPF', units = 'N/ha/yr', & + long='crown scorch mortality by pft/size',use_default='active', & avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_crownfiremort_si_scpf ) From c9e5cbca8554e97f8b1eefc8e18adcf815cda2ce Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Wed, 27 Nov 2019 15:12:11 -0700 Subject: [PATCH 64/93] Corrections needed to build and start a run --- biogeochem/EDPatchDynamicsMod.F90 | 3 +-- fire/SFMainMod.F90 | 8 +------- main/EDTypesMod.F90 | 6 ++---- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/biogeochem/EDPatchDynamicsMod.F90 b/biogeochem/EDPatchDynamicsMod.F90 index 958a7ff9fd..2edf4f3fd2 100644 --- a/biogeochem/EDPatchDynamicsMod.F90 +++ b/biogeochem/EDPatchDynamicsMod.F90 @@ -1978,8 +1978,7 @@ subroutine zero_patch(cp_p) currentPatch%fi = 0._r8 ! average fire intensity of flaming front during day. ! backward ros plays no role. kj/m/s or kw/m. currentPatch%fire = 999 ! sr decide_fire.1=fire hot enough to proceed. 0=stop everything- no fires today - currentPatch%active_crown_fire_flg = 9999 ! flag to indicate active crown -fire ignition + currentPatch%active_crown_fire_flg = 9999 ! flag to indicate active crown fire ignition currentPatch%fd = 0.0_r8 ! fire duration (mins) currentPatch%ros_back = 0.0_r8 ! backward ros (m/min) currentPatch%frac_burnt = 0.0_r8 ! fraction burnt daily diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 2bf9b7f767..eb94e6129d 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -77,7 +77,6 @@ subroutine fire_model( currentSite, bc_in) type (ed_patch_type), pointer :: currentPatch - type(ed_cohort_type), pointer :: currentCohort real(r8) :: MEF(nfsc) ! Moisture extinction factor of fuels real(r8) :: fuel_moisture(nfsc) ! Scaled moisture content of small litter fuels @@ -87,11 +86,7 @@ subroutine fire_model( currentSite, bc_in) do while(associated(currentPatch)) currentPatch%frac_burnt = 0.0_r8 currentPatch%fire = 0 - currentCohort => currentPatch%tallest - do while(associated(currentCohort)) - currentCohort%active_crown_fire_flg = 0 - currentCohort => currentCohort%shorter - enddo + currentPatch%active_crown_fire_flg = 0 currentPatch => currentPatch%older enddo @@ -1101,7 +1096,6 @@ subroutine crown_damage ( currentSite ) ! height_cbb = clear branch bole height at base of crown (m) ! inst%crown = crown_depth_frac (PFT) -======= crown_depth = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) height_cbb = currentCohort%hite - crown_depth diff --git a/main/EDTypesMod.F90 b/main/EDTypesMod.F90 index 7562475654..b453420b7d 100644 --- a/main/EDTypesMod.F90 +++ b/main/EDTypesMod.F90 @@ -346,8 +346,6 @@ module EDTypesMod ! FIRE real(r8) :: sh ! scorch height: m real(r8) :: fraction_crown_burned ! proportion of crown affected by fire:- - integer :: active_crown_fire_flg ! flag for active crown fire ignition - integer :: passive_crown_fire_flg ! flag for passive crown fire ignition (1=ignition) real(r8) :: cambial_mort ! probability that trees dies due to cambial char ! (conditional on the tree being subjected to the fire) real(r8) :: crownfire_mort ! probability of tree post-fire mortality @@ -529,6 +527,7 @@ module EDTypesMod real(r8) :: frac_burnt ! fraction burnt: frac gridcell/day real(r8) :: tfc_ros ! total fuel consumed - no trunks. KgC/m2/day real(r8) :: burnt_frac_litter(nfsc) ! fraction of each litter pool burned:- + integer :: active_crown_fire_flg ! flag for active crown fire ignition ! PLANT HYDRAULICS (not currently used in hydraulics RGK 03-2018) @@ -934,6 +933,7 @@ subroutine dump_patch(cpatch) write(fates_log(),*) 'pa%c_stomata = ',cpatch%c_stomata write(fates_log(),*) 'pa%c_lblayer = ',cpatch%c_lblayer write(fates_log(),*) 'pa%disturbance_rate = ',cpatch%disturbance_rate + write(fates_log(),*) 'pa%active_crown_fire_flg = ', cpatch%active_crown_fire_flg write(fates_log(),*) '----------------------------------------' do el = 1,num_elements write(fates_log(),*) 'element id: ',element_list(el) @@ -1014,8 +1014,6 @@ subroutine dump_cohort(ccohort) write(fates_log(),*) 'co%ddbhdt = ', ccohort%ddbhdt write(fates_log(),*) 'co%dbdeaddt = ', ccohort%dbdeaddt write(fates_log(),*) 'co%fraction_crown_burned = ', ccohort%fraction_crown_burned - write(fates_log(),*) 'co%active_crown_fire_flg = ', ccohort%active_crown_fire_flg - write(fates_log(),*) 'co%passive_crown_fire_flg = ', ccohort%passive_crown_fire_flg write(fates_log(),*) 'co%fire_mort = ', ccohort%fire_mort write(fates_log(),*) 'co%crownfire_mort = ', ccohort%crownfire_mort write(fates_log(),*) 'co%cambial_mort = ', ccohort%cambial_mort From e66d24fe7c64981d808389472ac3bbefc3b3479e Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Mon, 2 Dec 2019 11:12:56 -0700 Subject: [PATCH 65/93] Minor cleanup --- fire/SFMainMod.F90 | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index eb94e6129d..28cb052415 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -745,7 +745,8 @@ subroutine area_burnt_intensity ( currentSite ) real(r8) size_of_fire !in m2 real(r8),parameter :: km2_to_m2 = 1000000.0_r8 !area conversion for square km to square m - real(r8),parameter :: CG_strikes = 0.20_r8 !cloud to ground lightning strikes +! real(r8),parameter :: CG_strikes = 0.20_r8 !cloud to ground lightning strikes + real(r8),parameter :: CG_strikes = 1.00_r8 !cloud to ground lightning strikes !Latham and Williams (2001) ! ---initialize site parameters to zero--- @@ -941,8 +942,8 @@ subroutine crown_damage ( currentSite ) real(r8) :: crown_depth ! depth of crown (m) real(r8) :: height_cbb ! clear branch bole height or crown base height (m) real(r8) :: max_height ! max cohort on patch (m) - real(r8) :: passive_crown_FI ! fire intensity for ignition from passive canopy fuel (kW/m), EQ 8 - real(r8) :: ignite_passive_crown ! ratio for ignition from passive canopy fuel,EQ 14 Bessie & Johnson 1995 +! real(r8) :: passive_crown_FI ! fire intensity for ignition from passive canopy fuel (kW/m), EQ 8 +! real(r8) :: ignite_passive_crown ! ratio for ignition from passive canopy fuel,EQ 14 Bessie & Johnson 1995 real(r8) :: tree_sapw_struct_c ! above-ground tree struct and sap biomass in cohort (kgC) real(r8) :: leaf_c ! leaf carbon (kgC) real(r8) :: sapw_c ! sapwood carbon (kgC) @@ -970,8 +971,8 @@ subroutine crown_damage ( currentSite ) do while(associated(currentPatch)) !zero Patch level variables - passive_crown_FI = 0.0_r8 - ignite_passive_crown = 0.0_r8 +! passive_crown_FI = 0.0_r8 +! ignite_passive_crown = 0.0_r8 biom_matrix = 0.0_r8 canopy_bulk_density = 0.0_r8 max_height = 0.0_r8 @@ -1056,23 +1057,22 @@ subroutine crown_damage ( currentSite ) ! Crown fuel ignition potential, EQ 8 Bessie and Johnson 1995, EQ 4 Van Wagner 1977 ! FI = (Czh)**3/2 where z=canopy base height,h=heat of crown ignite energy, FI=fire intensity ! 0.01 = C from Van Wagner 1977 EQ4 for canopy base height 6m, 100% FMC, and FI 2500kW/m - passive_crown_FI = (0.01_r8 * height_base_canopy * crown_ignite_energy)**1.5_r8 +! passive_crown_FI = (0.01_r8 * height_base_canopy * crown_ignite_energy)**1.5_r8 - passive_canopy_fuel_flg = 0 !does patch have canopy fuels for vertical spread? +! passive_canopy_fuel_flg = 0 !does patch have canopy fuels for vertical spread? ! Initiation of passive crown fire, EQ 14a Bessie and Johnson 1995 ! Are the canopy fuels in the stand large enough to support vertical spread of fire? - ignite_passive_crown = currentPatch%FI/passive_crown_FI +! ignite_passive_crown = currentPatch%FI/passive_crown_FI - if (ignite_passive_crown >= 1.0_r8) then - passive_canopy_fuel_flg = 1 !enough passive canopy fuels for vertical spread - endif +! if (ignite_passive_crown >= 1.0_r8) then +! passive_canopy_fuel_flg = 1 !enough passive canopy fuels for vertical spread +! endif !evaluate active crown fire conditions ! Critical intensity for active crowning (kW/m) ! EQ 12 Bessie and Johnson 1995 - ! Fuels / 0.45 to get biomass but note that the 0.45 - ! cancels out and could be removed. Also dividing + ! Fuels / 0.45 to get biomass. Also dividing ! critical_mass_flow_rate by 3.34, an empirical ! constant in Bessie & Johnson 1995 active_crown_FI = critical_mass_flow_rate * & @@ -1083,7 +1083,6 @@ subroutine crown_damage ( currentSite ) ! EQ 14b Bessie & Johnson 1995 ignite_active_crown = currentPatch%FI / active_crown_FI - currentPatch%active_crown_fire_flg = 0 !flag for active crown fire ignition if (ignite_active_crown >= 1.0_r8) then currentPatch%active_crown_fire_flg = 1 ! active crown fire ignited end if @@ -1111,7 +1110,6 @@ subroutine crown_damage ( currentSite ) endif !SH frac crown burnt calculation ! Check for strange values. currentCohort%fraction_crown_burned = min(1.0_r8, max(0.0_r8,currentCohort%fraction_crown_burned)) - write(fates_log(),*) 'SF currentCohort%fraction_crown_burned =', currentCohort%fraction_crown_burned ! slevis diag endif !trees only !shrink canopy to account for burnt section. !currentCohort%canopy_trim = min(currentCohort%canopy_trim,(1.0_r8-currentCohort%fraction_crown_burned)) From 3512d1e7e5f22e315c8b7487763f5bc37ca695ad Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 3 Dec 2019 12:27:10 -0700 Subject: [PATCH 66/93] Adding my lightning mods to this branch --- fire/SFMainMod.F90 | 383 ++++++++++++++++++++++++++++++++++++- main/FatesInterfaceMod.F90 | 2 + 2 files changed, 379 insertions(+), 6 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 28cb052415..97172ada76 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -41,6 +41,16 @@ module SFMainMod use PRTGenericMod, only : struct_organ use PRTGenericMod, only : SetState + use spmdMod, only : masterproc, mpicom, comp_id + use shr_kind_mod, only : CL => shr_kind_CL + use shr_strdata_mod, only : shr_strdata_type, shr_strdata_create + use shr_strdata_mod, only : shr_strdata_advance, shr_strdata_print + use shr_log_mod, only : errmsg => shr_log_errMsg + use abortutils, only : endrun + use clm_varctl, only : iulog + use fileutils, only : getavu, relavu + use decompMod, only : bounds_type, gsmap_lnd_gdc2glo + use domainMod, only : ldomain implicit none private @@ -57,6 +67,33 @@ module SFMainMod public :: cambial_damage_kill public :: post_fire_mortality + public :: FATESFireInit ! Initialize fire-related inputs + public :: FATESFireInterp ! Interpolate fire-related inputs + + type, public :: sfmain_type + + real(r8), public, pointer :: lnfm24(:) ! Daily avg lightning by grid cell (#/km2/hr) + + contains + + procedure, public :: InitAccBuffer ! Initialize accumulation processes + procedure, public :: InitAccVars ! Initialize accumulation variables + procedure, public :: UpdateAccVars ! Update/extract accumulations vars + + end type sfmain_type + + ! !PRIVATE MEMBER FUNCTIONS: + private :: lnfm_init ! position datasets for Lightning + private :: lnfm_interp ! interpolates between two years of Lightning file data + + real(r8), pointer :: forc_lnfm(:) ! Lightning frequency from file (#/km2/hr) + + type(shr_strdata_type) :: sdat_lnfm ! Lightning input data stream + + character(len=CL) :: stream_fldFileName_lightng ! lightning stream filename to read + character(len=*), parameter, private :: sourcefile = & + __FILE__ + integer :: write_SF = 0 ! for debugging logical :: debug = .false. ! for debugging @@ -65,6 +102,328 @@ module SFMainMod contains + subroutine InitAccBuffer (this, bounds) + ! + ! !DESCRIPTION: + ! Initialize accumulation buffer for all required module accumulated fields + ! This routine set defaults values that are then overwritten by the + ! restart file for restart or branch runs + ! + ! !USES + use clm_varcon, only : spval + use accumulMod, only : init_accum_field + ! + ! !ARGUMENTS: + class(sfmain_type) :: this + type(bounds_type), intent(in) :: bounds + + ! !LOCAL VARIABLES: + integer :: begg, endg + integer :: ier + !--------------------------------------------------------------------- + + begg = bounds%begg; endg = bounds%endg + + allocate(this%lnfm24(begg:endg), stat=ier) + if (ier/=0) then + call endrun(msg="allocation error for lnfm24"//& + errMsg(sourcefile, __LINE__)) + endif + this%lnfm24(:) = spval + call init_accum_field (name='lnfm24', units='strikes/km2/hr', & + desc='24hr average of lightning strikes', accum_type='runmean', & + accum_period=-1, subgrid_type='gridcell', numlev=1, init_value=0._r8) + + end subroutine InitAccBuffer + + !----------------------------------------------------------------------- + subroutine InitAccVars(this, bounds) + ! + ! !DESCRIPTION: + ! Initialize module variables that are associated with + ! time accumulated fields. This routine is called for both an initial run + ! and a restart run (and must therefore must be called after the restart + ! file is read in and the accumulation buffer is obtained) + ! + ! !USES + use accumulMod , only : extract_accum_field + use clm_time_manager , only : get_nstep + ! + ! !ARGUMENTS: + class(sfmain_type) :: this + type(bounds_type), intent(in) :: bounds + ! + ! !LOCAL VARIABLES: + integer :: begg, endg + integer :: nstep + integer :: ier + real(r8), pointer :: rbufslg(:) ! temporary + !--------------------------------------------------------------------- + + begg = bounds%begg; endg = bounds%endg + + ! Allocate needed dynamic memory for single level patch field + allocate(rbufslg(begg:endg), stat=ier) + if (ier/=0) then + call endrun(msg="allocation error for rbufslg"//& + errMsg(sourcefile, __LINE__)) + endif + + ! Determine time step + nstep = get_nstep() + + call extract_accum_field ('lnfm24', rbufslg, nstep) + this%lnfm24(begg:endg) = rbufslg(begg:endg) + + deallocate(rbufslg) + + end subroutine InitAccVars + + !----------------------------------------------------------------------- + subroutine UpdateAccVars (this, bounds) + ! + ! USES + use clm_time_manager, only : get_nstep + use accumulMod , only : update_accum_field, extract_accum_field + use abortutils , only : endrun + ! + ! !ARGUMENTS: + class(sfmain_type) :: this + type(bounds_type), intent(in) :: bounds + ! + ! !LOCAL VARIABLES: + integer :: dtime ! timestep size [seconds] + integer :: nstep ! timestep number + integer :: ier ! error status + integer :: begg, endg + real(r8), pointer :: rbufslg(:) ! temporary single level - gridcell level + !--------------------------------------------------------------------- + + begg = bounds%begg; endg = bounds%endg + + nstep = get_nstep() + + ! Allocate needed dynamic memory for single level gridcell field + + allocate(rbufslg(begg:endg), stat=ier) + if (ier/=0) then + write(iulog,*)'UpdateAccVars allocation error for rbuf1dg' + call endrun(msg=errMsg(sourcefile, __LINE__)) + endif + + ! Accumulate and extract lnfm24 + rbufslg(begg:endg) = forc_lnfm(begg:endg) + call update_accum_field ('lnfm24', rbufslg, nstep) + call extract_accum_field ('lnfm24', this%lnfm24, nstep) + + deallocate(rbufslg) + + end subroutine UpdateAccVars + + !----------------------------------------------------------------------- + subroutine FATESFireInit(bounds, NLFilename) + + ! !DESCRIPTION: + ! Initialize FATES Fire module + ! !USES: + use FatesInterfaceMod, only : hlm_use_spitfire + use shr_infnan_mod , only : nan => shr_infnan_nan, assignment(=) + ! + ! !ARGUMENTS: + type(bounds_type), intent(in) :: bounds + character(len=*), intent(in) :: NLFilename + + ! !LOCAL VARIABLES: + integer :: begg, endg + !----------------------------------------------------------------------- + + begg = bounds%begg; endg = bounds%endg + + ! Allocate lightning forcing data + allocate( forc_lnfm(begg:endg) ) + forc_lnfm(begg:) = nan + + if( hlm_use_spitfire == itrue )then + call lnfm_init(bounds, NLFilename) + call lnfm_interp(bounds) + end if + + end subroutine FATESFireInit + + !***************************************************************** + subroutine FATESFireInterp(bounds) + + ! !DESCRIPTION: + ! Interpolate FATES Fire datasets + ! !USES: + use FatesInterfaceMod, only : hlm_use_spitfire + ! + ! !ARGUMENTS: + type(bounds_type), intent(in) :: bounds + !----------------------------------------------------------------------- + + if( hlm_use_spitfire == itrue )then + call lnfm_interp(bounds) + end if + + end subroutine FATESFireInterp + + !----------------------------------------------------------------------- + subroutine lnfm_init( bounds, NLFilename ) + ! + ! !DESCRIPTION: + ! + ! Initialize data stream information for Lightning. + ! + ! !USES: + use clm_varctl , only : inst_name + use clm_time_manager , only : get_calendar + use ncdio_pio , only : pio_subsystem + use shr_pio_mod , only : shr_pio_getiotype + use clm_nlUtilsMod , only : find_nlgroup_name + use ndepStreamMod , only : clm_domain_mct + use histFileMod , only : hist_addfld1d + use shr_mpi_mod, only : shr_mpi_bcast + use mct_mod, only: mct_ggrid + ! + ! !ARGUMENTS: + implicit none + type(bounds_type), intent(in) :: bounds + character(len=*), intent(in) :: NLFilename + ! + ! !LOCAL VARIABLES: + integer :: stream_year_first_lightng ! first year in Lightning stream to use + integer :: stream_year_last_lightng ! last year in Lightning stream to use + integer :: model_year_align_lightng ! align stream_year_first_lnfm with + integer :: nu_nml ! unit for namelist file + integer :: nml_error ! namelist i/o error flag + type(mct_ggrid) :: dom_clm ! domain information + character(len=CL) :: lightngmapalgo = 'bilinear'! Mapping alogrithm + character(*), parameter :: subName = "('lnfmdyn_init')" + character(*), parameter :: F00 = "('(lnfmdyn_init) ',4a)" + !----------------------------------------------------------------------- + + namelist /light_streams/ & + stream_year_first_lightng, & + stream_year_last_lightng, & + model_year_align_lightng, & + lightngmapalgo, & + stream_fldFileName_lightng + + ! Default values for namelist + stream_year_first_lightng = 1 ! first year in stream to use + stream_year_last_lightng = 1 ! last year in stream to use + model_year_align_lightng = 1 ! align stream_year_first_lnfm with this model year + stream_fldFileName_lightng = ' ' + + ! Read light_streams namelist + if (masterproc) then + nu_nml = getavu() + open( nu_nml, file=trim(NLFilename), status='old', iostat=nml_error ) + call find_nlgroup_name(nu_nml, 'light_streams', status=nml_error) + if (nml_error == 0) then + read(nu_nml, nml=light_streams,iostat=nml_error) + if (nml_error /= 0) then + call endrun(msg='ERROR reading light_streams namelist'//errmsg(sourcefile, __LINE__)) + end if + end if + close(nu_nml) + call relavu( nu_nml ) + endif + + call shr_mpi_bcast(stream_year_first_lightng, mpicom) + call shr_mpi_bcast(stream_year_last_lightng, mpicom) + call shr_mpi_bcast(model_year_align_lightng, mpicom) + call shr_mpi_bcast(stream_fldFileName_lightng, mpicom) + + if (masterproc) then + write(iulog,*) ' ' + write(iulog,*) 'light_stream settings:' + write(iulog,*) ' stream_year_first_lightng = ',stream_year_first_lightng + write(iulog,*) ' stream_year_last_lightng = ',stream_year_last_lightng + write(iulog,*) ' model_year_align_lightng = ',model_year_align_lightng + write(iulog,*) ' stream_fldFileName_lightng = ',stream_fldFileName_lightng + write(iulog,*) ' ' + endif + + if (index(stream_fldFileName_lightng, 'nofile') == 0) then + call clm_domain_mct (bounds, dom_clm) + + call shr_strdata_create(sdat_lnfm,name="clmlnfm", & + pio_subsystem=pio_subsystem, & + pio_iotype=shr_pio_getiotype(inst_name), & + mpicom=mpicom, compid=comp_id, & + gsmap=gsmap_lnd_gdc2glo, ggrid=dom_clm, & + nxg=ldomain%ni, nyg=ldomain%nj, & + yearFirst=stream_year_first_lightng, & + yearLast=stream_year_last_lightng, & + yearAlign=model_year_align_lightng, & + offset=0, & + domFilePath='', & + domFileName=trim(stream_fldFileName_lightng), & + domTvarName='time', & + domXvarName='lon' , & + domYvarName='lat' , & + domAreaName='area', & + domMaskName='mask', & + filePath='', & + filename=(/trim(stream_fldFileName_lightng)/),& + fldListFile='lnfm', & + fldListModel='lnfm', & + fillalgo='none', & + mapalgo=lightngmapalgo, & + calendar=get_calendar(), & + taxmode='cycle' ) + + if (masterproc) then + call shr_strdata_print(sdat_lnfm,'Lightning data') + endif + + ! Add history fields + call hist_addfld1d (fname='LNFM', units='counts/km^2/hr', & + avgflag='A', long_name='Lightning frequency', & + ptr_lnd=forc_lnfm, default='inactive') + + end if + + end subroutine lnfm_init + + !----------------------------------------------------------------------- + subroutine lnfm_interp( bounds ) + ! + ! !DESCRIPTION: + ! Interpolate data stream information for Lightning. + ! + ! !USES: + use clm_time_manager, only : get_curr_date + ! + ! !ARGUMENTS: + type(bounds_type), intent(in) :: bounds + ! + ! !LOCAL VARIABLES: + integer :: g, ig + integer :: year ! year (0, ...) for nstep+1 + integer :: mon ! month (1, ..., 12) for nstep+1 + integer :: day ! day of month (1, ..., 31) for nstep+1 + integer :: sec ! seconds into current date for nstep+1 + integer :: mcdate ! Current model date (yyyymmdd) + !----------------------------------------------------------------------- + + call get_curr_date(year, mon, day, sec) + mcdate = year*10000 + mon*100 + day + + if (index(stream_fldFileName_lightng, 'nofile') == 0) then + call shr_strdata_advance(sdat_lnfm, mcdate, sec, mpicom, 'lnfmdyn') + + ig = 0 + do g = bounds%begg,bounds%endg + ig = ig+1 + forc_lnfm(g) = sdat_lnfm%avs(1)%rAttr(1,ig) + end do + end if + + end subroutine lnfm_interp + ! ============================================================================ ! Area of site burned by fire ! ============================================================================ @@ -100,12 +459,12 @@ subroutine fire_model( currentSite, bc_in) call characteristics_of_fuel(currentSite, MEF, fuel_moisture) call rate_of_spread(currentSite, MEF, fuel_moisture) call ground_fuel_consumption(currentSite) - call area_burnt_intensity(currentSite) + call area_burnt_intensity(currentSite, bc_in) call crown_scorching(currentSite) call crown_damage(currentSite) ! Begin: Repeat calls to calculate effects of active crown fire ! call rate_of_spread(currentSite, MEF, fuel_moisture) -! call area_burnt_intensity(currentSite) +! call area_burnt_intensity(currentSite, bc_in) ! call crown_scorching(currentSite) ! call crown_damage(currentSite) ! End: Repeat calls to calculate effects of active crown fire @@ -716,7 +1075,7 @@ end subroutine ground_fuel_consumption !***************************************************************** - subroutine area_burnt_intensity ( currentSite ) + subroutine area_burnt_intensity ( currentSite, bc_in ) !***************************************************************** !returns the updated currentPatch%FI value for each patch. @@ -735,6 +1094,7 @@ subroutine area_burnt_intensity ( currentSite ) type(ed_site_type), intent(inout), target :: currentSite type(ed_patch_type), pointer :: currentPatch + type(bc_in_type), intent(in) :: bc_in real(r8) ROS !m/s real(r8) W !kgBiomass/m2 @@ -755,10 +1115,20 @@ subroutine area_burnt_intensity ( currentSite ) ! Equation 7 from Venevsky et al GCB 2002 (modification of equation 8 in Thonicke et al. 2010) ! FDI 0.1 = low, 0.3 moderate, 0.75 high, and 1 = extreme ignition potential for alpha 0.000337 - currentSite%FDI = 1.0_r8 - exp(-SF_val_fdi_alpha*currentSite%acc_NI) + if (index(stream_fldFileName_lightng, 'ignition') > 0) then + currentSite%FDI = 1.0_r8 ! READING "SUCCESSFUL IGNITION" DATA + else + currentSite%FDI = 1.0_r8 - exp(-SF_val_fdi_alpha*currentSite%acc_NI) + end if !NF = number of lighting strikes per day per km2 scaled by cloud to ground strikes - currentSite%NF = ED_val_nignitions * years_per_day * CG_strikes + ! ED_val_nignitions is from the params file + ! lightning is the daily avg from a lightning dataset + if (index(stream_fldFileName_lightng, 'nofile') > 0) then + currentSite%NF = ED_val_nignitions * years_per_day * CG_strikes + else + currentSite%NF = bc_in%lightning24 * 24._r8 * CG_strikes ! #/km2/hr to #/km2/day + end if ! If there are 15 lightning strikes per year, per km2. (approx from NASA product for S.A.) ! then there are 15 * 1/365 strikes/km2 each day @@ -1083,7 +1453,8 @@ subroutine crown_damage ( currentSite ) ! EQ 14b Bessie & Johnson 1995 ignite_active_crown = currentPatch%FI / active_crown_FI - if (ignite_active_crown >= 1.0_r8) then + if (ignite_active_crown >= 1.0_r8 .and. & + EDPftvarcon_inst%active_crown_fire(currentCohort%pft) > 0.0_r8) then currentPatch%active_crown_fire_flg = 1 ! active crown fire ignited end if diff --git a/main/FatesInterfaceMod.F90 b/main/FatesInterfaceMod.F90 index 0254c89123..d022e32864 100644 --- a/main/FatesInterfaceMod.F90 +++ b/main/FatesInterfaceMod.F90 @@ -319,6 +319,7 @@ module FatesInterfaceMod ! TO-DO: Get some consensus on the correct vegetation temperature used for phenology. ! It is possible that the bare-ground value is where the average is being stored. ! (RGK-01-2017) + real(r8) :: lightning24 real(r8) :: t_veg24_si ! Patch 24 hour vegetation temperature [K] @@ -880,6 +881,7 @@ subroutine zero_bcs(this,s) ! Input boundaries + this%bc_in(s)%lightning24 = 0.0_r8 this%bc_in(s)%t_veg24_si = 0.0_r8 this%bc_in(s)%t_veg24_pa(:) = 0.0_r8 this%bc_in(s)%precip24_pa(:) = 0.0_r8 From 58ea52ed6b4e1b8d48ae54864fc9c7c2e07dd90d Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 31 Mar 2022 17:53:02 -0600 Subject: [PATCH 67/93] Resolve conflicts in EDPatchDynamicsMod.F90 This and next few commits resolve conflicts missed by git and caught by github --- biogeochem/EDPatchDynamicsMod.F90 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/biogeochem/EDPatchDynamicsMod.F90 b/biogeochem/EDPatchDynamicsMod.F90 index d058e4130c..8abc922cd6 100644 --- a/biogeochem/EDPatchDynamicsMod.F90 +++ b/biogeochem/EDPatchDynamicsMod.F90 @@ -2000,11 +2000,11 @@ subroutine zero_patch(cp_p) ! backward ros plays no role. kj/m/s or kw/m. currentPatch%fire = 999 ! sr decide_fire.1=fire hot enough to proceed. 0=stop everything- no fires today currentPatch%active_crown_fire_flg = 9999 ! flag to indicate active crown fire ignition - currentPatch%fd = 0.0_r8 ! fire duration (mins) - currentPatch%ros_back = 0.0_r8 ! backward ros (m/min) - currentPatch%scorch_ht(:) = 0.0_r8 ! scorch height of flames on a given PFT - currentPatch%frac_burnt = 0.0_r8 ! fraction burnt daily - currentPatch%burnt_frac_litter(:) = 0.0_r8 + currentPatch%fd = nan ! fire duration (mins) + currentPatch%ros_back = nan ! backward ros (m/min) + currentPatch%scorch_ht(:) = nan ! scorch height of flames on a given PFT + currentPatch%frac_burnt = nan ! fraction burnt daily + currentPatch%burnt_frac_litter(:) = nan currentPatch%btran_ft(:) = 0.0_r8 currentPatch%canopy_layer_tlai(:) = 0.0_r8 From f401107c8fd51bb571e12b55116978c71e5b1cb2 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 31 Mar 2022 18:07:06 -0600 Subject: [PATCH 68/93] Resolve conflicts in EDTypesMod.F90 and fates_params_default.cdl --- main/EDTypesMod.F90 | 6 +++--- parameter_files/fates_params_default.cdl | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/main/EDTypesMod.F90 b/main/EDTypesMod.F90 index 2e70c09b45..85bc125a7c 100644 --- a/main/EDTypesMod.F90 +++ b/main/EDTypesMod.F90 @@ -532,9 +532,9 @@ module EDTypesMod ! FIRE EFFECTS real(r8) :: scorch_ht(maxpft) ! scorch height: m - real(r8) :: frac_burnt ! fraction burnt: frac gridcell/day - real(r8) :: tfc_ros ! total fuel consumed - no trunks. KgC/m2/day - real(r8) :: burnt_frac_litter(nfsc) ! fraction of each litter pool burned:- + real(r8) :: frac_burnt ! fraction burnt: frac patch/day + real(r8) :: tfc_ros ! total intensity-relevant fuel consumed - no trunks. KgC/m2 of burned ground/day + real(r8) :: burnt_frac_litter(nfsc) ! fraction of each litter pool burned, conditional on it being burned integer :: active_crown_fire_flg ! flag for active crown fire ignition diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 9f1e136d6e..b174be08d4 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -165,8 +165,8 @@ variables: fates_eca_vmax_ptase:units = "gP/m2/s" ; fates_eca_vmax_ptase:long_name = "maximum production rate for biochemical P (per m2) (ECA)" ; double fates_fire_alpha_SH(fates_pft) ; - fates_fire_alpha_SH:units = "NA" ; - fates_fire_alpha_SH:long_name = "spitfire parameter, alpha scorch height, EQ 16 Thonicke et al 2010" ; + fates_fire_alpha_SH:units = "m / (kw/m)**(2/3)" ; + fates_fire_alpha_SH:long_name = "spitfire parameter, alpha scorch height, Equation 16 Thonicke et al 2010" ; double fates_fire_bark_scaler(fates_pft) ; fates_fire_bark_scaler:units = "fraction" ; fates_fire_bark_scaler:long_name = "the thickness of a cohorts bark as a fraction of its dbh" ; From d4f8a0373bcd335f3db8eb1a4c65e60fec993fa2 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 31 Mar 2022 18:23:22 -0600 Subject: [PATCH 69/93] Resolve another conflict in EDTypesMod.F90 --- main/EDTypesMod.F90 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/EDTypesMod.F90 b/main/EDTypesMod.F90 index 85bc125a7c..06e7e6eb81 100644 --- a/main/EDTypesMod.F90 +++ b/main/EDTypesMod.F90 @@ -940,6 +940,8 @@ subroutine dump_patch(cpatch) write(fates_log(),*) 'pa%c_stomata = ',cpatch%c_stomata write(fates_log(),*) 'pa%c_lblayer = ',cpatch%c_lblayer write(fates_log(),*) 'pa%disturbance_rate = ',cpatch%disturbance_rate + write(fates_log(),*) 'pa%disturbance_rates = ',cpatch%disturbance_rates(:) + write(fates_log(),*) 'pa%anthro_disturbance_label = ', cpatch%anthro_disturbance_label write(fates_log(),*) 'pa%active_crown_fire_flg = ', cpatch%active_crown_fire_flg write(fates_log(),*) '----------------------------------------' do el = 1,num_elements From fe2816208d62b085032ddbe2288c5b43ed8623f1 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 31 Mar 2022 19:15:15 -0600 Subject: [PATCH 70/93] Resolve conflicts in SFMainMod.F90 --- fire/SFMainMod.F90 | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index af2069f17d..04fe9dd21b 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -40,6 +40,7 @@ module SFMainMod use PRTGenericMod, only : struct_organ use PRTGenericMod, only : SetState use FatesInterfaceTypesMod , only : numpft + use FatesAllometryMod, only : CrownDepth implicit none private @@ -199,7 +200,7 @@ subroutine characteristics_of_fuel ( currentSite, MEF, fuel_moisture ) currentPatch%livegrass = 0.0_r8 currentCohort => currentPatch%tallest do while(associated(currentCohort)) - if(EDPftvarcon_inst%woody(currentCohort%pft) == 0)then + if( int(prt_params%woody(currentCohort%pft)) == ifalse)then currentPatch%livegrass = currentPatch%livegrass + & currentCohort%prt%GetState(leaf_organ, all_carbon_elements) * & @@ -389,7 +390,7 @@ subroutine wind_effect ( currentSite, bc_in) do while(associated(currentCohort)) if (debug) write(fates_log(),*) 'SF currentCohort%c_area ',currentCohort%c_area - if(EDPftvarcon_inst%woody(currentCohort%pft) == 1)then + if( int(prt_params%woody(currentCohort%pft)) == itrue)then currentPatch%total_tree_area = currentPatch%total_tree_area + currentCohort%c_area else total_grass_area = total_grass_area + currentCohort%c_area @@ -890,7 +891,7 @@ subroutine crown_scorching ( currentSite ) if (currentPatch%fire == 1) then currentCohort => currentPatch%tallest; do while(associated(currentCohort)) - if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then !trees only + if ( int(prt_params%woody(currentCohort%pft)) == itrue)then ! trees only leaf_c = currentCohort%prt%GetState(leaf_organ, all_carbon_elements) sapw_c = currentCohort%prt%GetState(sapw_organ, all_carbon_elements) @@ -905,7 +906,8 @@ subroutine crown_scorching ( currentSite ) enddo !end cohort loop do i_pft=1,numpft - if (tree_ag_biomass > 0.0_r8 .and. EDPftvarcon_inst%woody(i_pft) == 1) then + if (tree_ag_biomass > 0.0_r8 .and. int(prt_params%woody(i_pft)) == +itrue) then !Equation 16 in Thonicke et al. 2010 !Van Wagner 1973 EQ8 !2/3 Byram (1959) currentPatch%Scorch_ht(i_pft) = EDPftvarcon_inst%fire_alpha_SH(i_pft) * (currentPatch%FI**0.667_r8) @@ -994,10 +996,10 @@ subroutine crown_damage ( currentSite ) crown_fuel_per_m = 0.0_r8 ! Calculate crown 1hr fuel biomass (leaf, twig sapwood, twig structural biomass) - if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then !trees only + if ( int(prt_params%woody(currentCohort%pft)) == itrue) then !trees - crown_depth = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) - height_cbb = currentCohort%hite - crown_depth + call CrownDepth(currentCohort%hite,currentCohort%pft,crown_depth) + height_cbb = currentCohort%hite - crown_depth !find patch max height for stand canopy fuel if (currentCohort%hite > max_height) then @@ -1025,11 +1027,11 @@ subroutine crown_damage ( currentSite ) biom_matrix(ih) = biom_matrix(ih) + crown_fuel_per_m end do - endif !trees only + endif !trees only - currentCohort => currentCohort%shorter; + currentCohort => currentCohort%shorter; - enddo !end cohort loop + enddo !end cohort loop biom_matrix(:) = biom_matrix(:) / currentPatch%area !kg biomass/m3 @@ -1069,7 +1071,7 @@ subroutine crown_damage ( currentSite ) ! passive_canopy_fuel_flg = 1 !enough passive canopy fuels for vertical spread ! endif - !evaluate active crown fire conditions + !evaluate active crown fire conditions ! Critical intensity for active crowning (kW/m) ! EQ 12 Bessie and Johnson 1995 ! Fuels / 0.45 to get biomass. Also dividing @@ -1092,11 +1094,12 @@ subroutine crown_damage ( currentSite ) do while(associated(currentCohort)) currentCohort%fraction_crown_burned = 0.0_r8 - if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then !trees only +only + if ( int(prt_params%woody(currentCohort%pft)) == itrue) then !trees ! height_cbb = clear branch bole height at base of crown (m) ! inst%crown = crown_depth_frac (PFT) - crown_depth = currentCohort%hite*EDPftvarcon_inst%crown(currentCohort%pft) + call CrownDepth(currentCohort%hite,currentCohort%pft,crown_depth) height_cbb = currentCohort%hite - crown_depth ! Equation 17 in Thonicke et al. 2010 @@ -1153,7 +1156,7 @@ subroutine cambial_damage_kill ( currentSite ) currentCohort => currentPatch%tallest; do while(associated(currentCohort)) currentCohort%cambial_mort = 0.0_r8 - if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then !trees only + if ( int(prt_params%woody(currentCohort%pft)) == itrue) then !trees ! Equation 21 in Thonicke et al 2010 bt = EDPftvarcon_inst%bark_scaler(currentCohort%pft)*currentCohort%dbh ! bark thickness. ! Equation 20 in Thonicke et al. 2010. @@ -1205,7 +1208,7 @@ subroutine post_fire_mortality ( currentSite ) do while(associated(currentCohort)) currentCohort%fire_mort = 0.0_r8 currentCohort%crownfire_mort = 0.0_r8 - if (EDPftvarcon_inst%woody(currentCohort%pft) == 1) then + if ( int(prt_params%woody(currentCohort%pft)) == itrue) then !trees ! Equation 22 in Thonicke et al. 2010. currentCohort%crownfire_mort = EDPftvarcon_inst%crown_kill(currentCohort%pft)*currentCohort%fraction_crown_burned**3.0_r8 ! Equation 18 in Thonicke et al. 2010. From d2d1de3c0077d15038a17fa51ba678db41326615 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 31 Mar 2022 19:34:35 -0600 Subject: [PATCH 71/93] Resolve conflict in FatesHistoryInterfaceMod.F90 --- main/FatesHistoryInterfaceMod.F90 | 599 +++++++++++++++++------------- 1 file changed, 345 insertions(+), 254 deletions(-) diff --git a/main/FatesHistoryInterfaceMod.F90 b/main/FatesHistoryInterfaceMod.F90 index 0f1f9d884d..a809a0e221 100644 --- a/main/FatesHistoryInterfaceMod.F90 +++ b/main/FatesHistoryInterfaceMod.F90 @@ -4558,260 +4558,351 @@ subroutine define_history_vars(this, initialize_variables) ! (BECAUSE THEY TAKE UP SPACE!!! ! =================================================================================== - call this%set_history_var(vname='GPP_SCPF', units='kgC/m2/yr', & - long='gross primary production by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_gpp_si_scpf ) - - call this%set_history_var(vname='GPP_CANOPY_SCPF', units='kgC/m2/yr', & - long='gross primary production of canopy plants by pft/size ', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_gpp_canopy_si_scpf ) - - call this%set_history_var(vname='AR_CANOPY_SCPF', units='kgC/m2/yr', & - long='autotrophic respiration of canopy plants by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_ar_canopy_si_scpf ) - - call this%set_history_var(vname='GPP_UNDERSTORY_SCPF', units='kgC/m2/yr', & - long='gross primary production of understory plants by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_gpp_understory_si_scpf ) - - call this%set_history_var(vname='AR_UNDERSTORY_SCPF', units='kgC/m2/yr', & - long='autotrophic respiration of understory plants by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_ar_understory_si_scpf ) - - call this%set_history_var(vname='NPP_SCPF', units='kgC/m2/yr', & - long='total net primary production by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_npp_totl_si_scpf ) - - call this%set_history_var(vname='NPP_LEAF_SCPF', units='kgC/m2/yr', & - long='NPP flux into leaves by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_npp_leaf_si_scpf ) - - call this%set_history_var(vname='NPP_SEED_SCPF', units='kgC/m2/yr', & - long='NPP flux into seeds by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_npp_seed_si_scpf ) - - call this%set_history_var(vname='NPP_FNRT_SCPF', units='kgC/m2/yr', & - long='NPP flux into fine roots by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_npp_fnrt_si_scpf ) - - call this%set_history_var(vname='NPP_BGSW_SCPF', units='kgC/m2/yr', & - long='NPP flux into below-ground sapwood by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_npp_bgsw_si_scpf ) - - call this%set_history_var(vname='NPP_BGDW_SCPF', units='kgC/m2/yr', & - long='NPP flux into below-ground deadwood by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_npp_bgdw_si_scpf ) - - call this%set_history_var(vname='NPP_AGSW_SCPF', units='kgC/m2/yr', & - long='NPP flux into above-ground sapwood by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_npp_agsw_si_scpf ) - - call this%set_history_var(vname = 'NPP_AGDW_SCPF', units='kgC/m2/yr', & - long='NPP flux into above-ground deadwood by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_npp_agdw_si_scpf ) - - call this%set_history_var(vname = 'NPP_STOR_SCPF', units='kgC/m2/yr', & - long='NPP flux into storage by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_npp_stor_si_scpf ) - - call this%set_history_var(vname='DDBH_SCPF', units = 'cm/yr/ha', & - long='diameter growth increment by pft/size',use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_ddbh_si_scpf ) - - call this%set_history_var(vname='GROWTHFLUX_SCPF', units = 'n/yr/ha', & - long='flux of individuals into a given size class bin via growth and recruitment',use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_growthflux_si_scpf ) - - call this%set_history_var(vname='GROWTHFLUX_FUSION_SCPF', units = 'n/yr/ha', & - long='flux of individuals into a given size class bin via fusion',use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_growthflux_fusion_si_scpf ) - - call this%set_history_var(vname='DDBH_CANOPY_SCPF', units = 'cm/yr/ha', & - long='diameter growth increment by pft/size',use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_ddbh_canopy_si_scpf ) - - call this%set_history_var(vname='DDBH_UNDERSTORY_SCPF', units = 'cm/yr/ha', & - long='diameter growth increment by pft/size',use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_ddbh_understory_si_scpf ) - - call this%set_history_var(vname='BA_SCPF', units = 'm2/ha', & - long='basal area by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_ba_si_scpf ) - - call this%set_history_var(vname='AGB_SCPF', units = 'kgC/m2', & - long='Aboveground biomass by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_agb_si_scpf ) - - call this%set_history_var(vname='NPLANT_SCPF', units = 'N/ha', & - long='stem number density by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_nplant_si_scpf ) - - call this%set_history_var(vname='NPLANT_CAPF', units = 'N/ha', & - long='stem number density by pft/coage', use_default='inactive', & - avgflag='A', vtype=site_coage_pft_r8, hlms='CLM:ALM',flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_nplant_si_capf ) - - call this%set_history_var(vname='M1_SCPF', units = 'N/ha/yr', & - long='background mortality by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_m1_si_scpf ) - - call this%set_history_var(vname='M2_SCPF', units = 'N/ha/yr', & - long='hydraulic mortality by pft/size',use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_m2_si_scpf ) - - call this%set_history_var(vname='M3_SCPF', units = 'N/ha/yr', & - long='carbon starvation mortality by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_m3_si_scpf ) - - call this%set_history_var(vname='M4_SCPF', units = 'N/ha/yr', & - long='impact mortality by pft/size',use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_m4_si_scpf ) - - call this%set_history_var(vname='M5_SCPF', units = 'N/ha/yr', & - long='fire mortality by pft/size',use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_m5_si_scpf ) - - call this%set_history_var(vname='CROWNSCORCHMORT_SCPF', units = 'N/ha/yr', & - long='crown scorch mortality by pft/size',use_default='active', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_crownfiremort_si_scpf ) - - call this%set_history_var(vname='CAMBIALFIREMORT_SCPF', units = 'N/ha/yr', & - long='cambial fire mortality by pft/size',use_default='active', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_cambialfiremort_si_scpf ) - - call this%set_history_var(vname='M6_SCPF', units = 'N/ha/yr', & - long='termination mortality by pft/size',use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_m6_si_scpf ) - - call this%set_history_var(vname='M7_SCPF', units = 'N/ha/event', & - long='logging mortality by pft/size',use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_m7_si_scpf ) - - call this%set_history_var(vname='M8_SCPF', units = 'N/ha/yr', & - long='freezing mortality by pft/size',use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_m8_si_scpf ) - - call this%set_history_var(vname='M9_SCPF', units = 'N/ha/yr', & - long='senescence mortality by pft/size',use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_m9_si_scpf ) - - call this%set_history_var(vname='M10_SCPF', units = 'N/ha/yr', & - long='age senescence mortality by pft/size',use_default='inactive', & - avgflag='A', vtype =site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_m10_si_scpf ) - - call this%set_history_var(vname='M10_CAPF',units='N/ha/yr', & - long='age senescence mortality by pft/cohort age',use_default='inactive', & - avgflag='A', vtype =site_coage_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index =ih_m10_si_capf ) - - call this%set_history_var(vname='MORTALITY_CANOPY_SCPF', units = 'N/ha/yr', & - long='total mortality of canopy plants by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_mortality_canopy_si_scpf ) - - call this%set_history_var(vname='C13disc_SCPF', units = 'per mil', & - long='C13 discrimination by pft/size',use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_c13disc_si_scpf ) - - call this%set_history_var(vname='BSTOR_CANOPY_SCPF', units = 'kgC/ha', & - long='biomass carbon in storage pools of canopy plants by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_bstor_canopy_si_scpf ) - - call this%set_history_var(vname='BLEAF_CANOPY_SCPF', units = 'kgC/ha', & - long='biomass carbon in leaf of canopy plants by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_bleaf_canopy_si_scpf ) - - call this%set_history_var(vname='NPLANT_CANOPY_SCPF', units = 'N/ha', & - long='stem number of canopy plants density by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_nplant_canopy_si_scpf ) - - call this%set_history_var(vname='MORTALITY_UNDERSTORY_SCPF', units = 'N/ha/yr', & - long='total mortality of understory plants by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_mortality_understory_si_scpf ) - - call this%set_history_var(vname='BSTOR_UNDERSTORY_SCPF', units = 'kgC/ha', & - long='biomass carbon in storage pools of understory plants by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_bstor_understory_si_scpf ) - - call this%set_history_var(vname='BLEAF_UNDERSTORY_SCPF', units = 'kgC/ha', & - long='biomass carbon in leaf of understory plants by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_bleaf_understory_si_scpf ) - - call this%set_history_var(vname='NPLANT_UNDERSTORY_SCPF', units = 'N/ha', & - long='stem number of understory plants density by pft/size', use_default='inactive', & - avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_nplant_understory_si_scpf ) - - call this%set_history_var(vname='CWD_AG_CWDSC', units='gC/m^2', & - long='size-resolved AG CWD stocks', use_default='inactive', & - avgflag='A', vtype=site_cwdsc_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_cwd_ag_si_cwdsc ) - - call this%set_history_var(vname='CWD_BG_CWDSC', units='gC/m^2', & - long='size-resolved BG CWD stocks', use_default='inactive', & - avgflag='A', vtype=site_cwdsc_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_cwd_bg_si_cwdsc ) - - call this%set_history_var(vname='CWD_AG_IN_CWDSC', units='gC/m^2/y', & - long='size-resolved AG CWD input', use_default='inactive', & - avgflag='A', vtype=site_cwdsc_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_cwd_ag_in_si_cwdsc ) - - call this%set_history_var(vname='CWD_BG_IN_CWDSC', units='gC/m^2/y', & - long='size-resolved BG CWD input', use_default='inactive', & - avgflag='A', vtype=site_cwdsc_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_cwd_bg_in_si_cwdsc ) - - call this%set_history_var(vname='CWD_AG_OUT_CWDSC', units='gC/m^2/y', & - long='size-resolved AG CWD output', use_default='inactive', & - avgflag='A', vtype=site_cwdsc_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_cwd_ag_out_si_cwdsc ) - - call this%set_history_var(vname='CWD_BG_OUT_CWDSC', units='gC/m^2/y', & - long='size-resolved BG CWD output', use_default='inactive', & - avgflag='A', vtype=site_cwdsc_r8, hlms='CLM:ALM', flushval=0.0_r8, & - upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_cwd_bg_out_si_cwdsc ) + call this%set_history_var(vname='FATES_GPP_SZPF', units='kg m-2 s-1', & + long='gross primary production by pft/size in kg carbon per m2 per second', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_gpp_si_scpf) + + call this%set_history_var(vname='FATES_GPP_CANOPY_SZPF', & + units='kg m-2 s-1', & + long='gross primary production of canopy plants by pft/size in kg carbon per m2 per second', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_gpp_canopy_si_scpf) + + call this%set_history_var(vname='FATES_AUTORESP_CANOPY_SZPF', & + units='kg m-2 s-1', & + long='autotrophic respiration of canopy plants by pft/size in kg carbon per m2 per second', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_ar_canopy_si_scpf) + + call this%set_history_var(vname='FATES_GPP_USTORY_SZPF', & + units='kg m-2 s-1', & + long='gross primary production of understory plants by pft/size in kg carbon per m2 per second', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_gpp_understory_si_scpf) + + call this%set_history_var(vname='FATES_AUTORESP_USTORY_SZPF', & + units='kg m-2 s-1', & + long='autotrophic respiration of understory plants by pft/size in kg carbon per m2 per second', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_ar_understory_si_scpf) + + call this%set_history_var(vname='FATES_NPP_SZPF', units='kg m-2 s-1', & + long='total net primary production by pft/size in kg carbon per m2 per second', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_npp_totl_si_scpf) + + call this%set_history_var(vname='FATES_LEAF_ALLOC_SZPF', units='kg m-2 s-1', & + long='allocation to leaves by pft/size in kg carbon per m2 per second', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_npp_leaf_si_scpf) + + call this%set_history_var(vname='FATES_SEED_ALLOC_SZPF', units='kg m-2 s-1', & + long='allocation to seeds by pft/size in kg carbon per m2 per second', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_npp_seed_si_scpf) + + call this%set_history_var(vname='FATES_FROOT_ALLOC_SZPF', & + units='kg m-2 s-1', & + long='allocation to fine roots by pft/size in kg carbon per m2 per second', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_npp_fnrt_si_scpf) + + call this%set_history_var(vname='FATES_BGSAPWOOD_ALLOC_SZPF', & + units='kg m-2 s-1', & + long='allocation to below-ground sapwood by pft/size in kg carbon per m2 per second', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, initialize=initialize_variables, & + index = ih_npp_bgsw_si_scpf) + + call this%set_history_var(vname='FATES_BGSTRUCT_ALLOC_SZPF', units='kg m-2 +s-1', & + long='allocation to below-ground structural (deadwood) by pft/size in kg carbon per m2 per second', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, initialize=initialize_variables, & + index = ih_npp_bgdw_si_scpf) + + call this%set_history_var(vname='FATES_AGSAPWOOD_ALLOC_SZPF', & + units='kg m-2 s-1', & + long='allocation to above-ground sapwood by pft/size in kg carbon per m2 per second', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, initialize=initialize_variables, & + index = ih_npp_agsw_si_scpf) + + call this%set_history_var(vname = 'FATES_AGSTRUCT_ALLOC_SZPF', & + units='kg m-2 s-1', & + long='allocation to above-ground structural (deadwood) by pft/size in kg carbon per m2 per second', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, initialize=initialize_variables, & + index = ih_npp_agdw_si_scpf) + + call this%set_history_var(vname = 'FATES_STORE_ALLOC_SZPF', & + units='kg m-2 s-1', & + long='allocation to storage C by pft/size in kg carbon per m2 per second', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, initialize=initialize_variables, & + index = ih_npp_stor_si_scpf) + + call this%set_history_var(vname='FATES_DDBH_SZPF', units = 'm m-2 yr-1', & + long='diameter growth increment by pft/size', use_default='inactive', & + avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', & + upfreq=1, ivar=ivar, initialize=initialize_variables, & + index = ih_ddbh_si_scpf) + + call this%set_history_var(vname='FATES_GROWTHFLUX_SZPF', & + units = 'm-2 yr-1', & + long='flux of individuals into a given size class bin via growth and recruitment', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_growthflux_si_scpf) + + call this%set_history_var(vname='FATES_GROWTHFLUX_FUSION_SZPF', & + units = 'm-2 yr-1', & + long='flux of individuals into a given size class bin via fusion', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_growthflux_fusion_si_scpf) + + call this%set_history_var(vname='FATES_DDBH_CANOPY_SZPF', & + units = 'm m-2 yr-1', & + long='diameter growth increment by pft/size', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_ddbh_canopy_si_scpf) + + call this%set_history_var(vname='FATES_DDBH_USTORY_SZPF', & + units = 'm m-2 yr-1', & + long='diameter growth increment by pft/size', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_ddbh_understory_si_scpf) + + call this%set_history_var(vname='FATES_BASALAREA_SZPF', units = 'm2 m-2', & + long='basal area by pft/size', use_default='inactive', & + avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', upfreq=1, & + ivar=ivar, initialize=initialize_variables, index = ih_ba_si_scpf) + + call this%set_history_var(vname='FATES_VEGC_ABOVEGROUND_SZPF', & + units = 'kg m-2', & + long='aboveground biomass by pft/size in kg carbon per m2', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, initialize=initialize_variables, & + index = ih_agb_si_scpf) + + call this%set_history_var(vname='FATES_NPLANT_SZPF', units = 'm-2', & + long='stem number density by pft/size', use_default='inactive', & + avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', & + upfreq=1, ivar=ivar, initialize=initialize_variables, & + index = ih_nplant_si_scpf) + + call this%set_history_var(vname='FATES_NPLANT_ACPF', units = 'm-2', & + long='stem number density by pft and age class', & + use_default='inactive', avgflag='A', vtype=site_coage_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, initialize=initialize_variables, & + index = ih_nplant_si_capf) + + call this%set_history_var(vname='FATES_MORTALITY_BACKGROUND_SZPF', & + units = 'm-2 yr-1', & + long='background mortality by pft/size in number of plants per m2 per year', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_m1_si_scpf) + + call this%set_history_var(vname='FATES_MORTALITY_HYDRAULIC_SZPF', & + units = 'm-2 yr-1', & + long='hydraulic mortality by pft/size in number of plants per m2 per year', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_m2_si_scpf) + + call this%set_history_var(vname='FATES_MORTALITY_CSTARV_SZPF', & + units = 'm-2 yr-1', & + long='carbon starvation mortality by pft/size in number of plants per m2 per year', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_m3_si_scpf) + + call this%set_history_var(vname='FATES_MORTALITY_IMPACT_SZPF', & + units = 'm-2 yr-1', & + long='impact mortality by pft/size in number of plants per m2 per year', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_m4_si_scpf) + + call this%set_history_var(vname='FATES_MORTALITY_FIRE_SZPF', & + units = 'm-2 yr-1', & + long='fire mortality by pft/size in number of plants per m2 per year', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_m5_si_scpf) + + call this%set_history_var(vname='FATES_MORTALITY_CROWNSCORCH_SZPF', & + units = 'm-2 yr-1', & + long='fire mortality from crown scorch by pft/size in number of plants per m2 per year', & + use_default='active', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_crownfiremort_si_scpf) + + call this%set_history_var(vname='FATES_MORTALITY_CAMBIALBURN_SZPF', & + units = 'm-2 yr-1', & + long='fire mortality from cambial burn by pft/size in number of plants per m2 per year', & + use_default='active', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_cambialfiremort_si_scpf) + + call this%set_history_var(vname='FATES_MORTALITY_TERMINATION_SZPF', & + units = 'm-2 yr-1', & + long='termination mortality by pft/size in number pf plants per m2 per +year', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_m6_si_scpf) + + call this%set_history_var(vname='FATES_MORTALITY_LOGGING_SZPF', & + units = 'm-2 yr-1', & + long='logging mortality by pft/size in number of plants per m2 per ', & + use_default='inactive', & + avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', upfreq=1, & + ivar=ivar, initialize=initialize_variables, index = ih_m7_si_scpf) + + call this%set_history_var(vname='FATES_MORTALITY_FREEZING_SZPF', & + units = 'm-2 yr-1', & + long='freezing mortality by pft/size in number of plants per m2 per year', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_m8_si_scpf) + + call this%set_history_var(vname='FATES_MORTALITY_SENESCENCE_SZPF', & + units = 'm-2 yr-1', & + long='senescence mortality by pft/size in number of plants per m2 per year', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_m9_si_scpf) + + call this%set_history_var(vname='FATES_MORTALITY_AGESCEN_SZPF', & + units = 'm-2 yr-1', & + long='age senescence mortality by pft/size in number of plants per m2 per year', & + use_default='inactive', avgflag='A', vtype =site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, initialize=initialize_variables, & + index = ih_m10_si_scpf) + + call this%set_history_var(vname='FATES_MORTALITY_AGESCEN_ACPF', & + units='m-2 yr-1', & + long='age senescence mortality by pft/cohort age in number of plants per m2 per year', & + use_default='inactive', avgflag='A', vtype =site_coage_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, initialize=initialize_variables, & + index =ih_m10_si_capf) + + call this%set_history_var(vname='FATES_MORTALITY_CANOPY_SZPF', & + units = 'm-2 yr-1', & + long='total mortality of canopy plants by pft/size in number of plants per m2 per year', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_mortality_canopy_si_scpf) + + call this%set_history_var(vname='FATES_C13DISC_SZPF', units = 'per mil', & + long='C13 discrimination by pft/size',use_default='inactive', & + avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', & + upfreq=1, ivar=ivar, initialize=initialize_variables, & + index = ih_c13disc_si_scpf) + + call this%set_history_var(vname='FATES_STOREC_CANOPY_SZPF', units = 'kg m-2', & + long='biomass in storage pools of canopy plants by pft/size in kg carbon per m2', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_bstor_canopy_si_scpf) + + call this%set_history_var(vname='FATES_LEAFC_CANOPY_SZPF', & + units = 'kg m-2', & + long='biomass in leaves of canopy plants by pft/size in kg carbon per m2', & + use_default='inactive', & + avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', upfreq=1, & + ivar=ivar, initialize=initialize_variables, & + index = ih_bleaf_canopy_si_scpf) + + call this%set_history_var(vname='FATES_NPLANT_CANOPY_SZPF', units = 'm-2', & + long='number of canopy plants by size/pft per m2', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_nplant_canopy_si_scpf) + + call this%set_history_var(vname='FATES_MORTALITY_USTORY_SZPF', & + units = 'm-2 yr-1', & + long='total mortality of understory plants by pft/size in number of plants per m2 per year', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, & + index = ih_mortality_understory_si_scpf) + + call this%set_history_var(vname='FATES_STOREC_USTORY_SZPF', & + units = 'kg m-2', & + long='biomass in storage pools of understory plants by pft/size in kg carbon per m2', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_bstor_understory_si_scpf) + + call this%set_history_var(vname='FATES_LEAFC_USTORY_SZPF', & + units = 'kg m-2', & + long='biomass in leaves of understory plants by pft/size in kg carbon per m2', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_bleaf_understory_si_scpf) + + call this%set_history_var(vname='FATES_NPLANT_USTORY_SZPF', & + units = 'm-2', & + long='density of understory plants by pft/size in number of plants per m2', & + use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_nplant_understory_si_scpf) + + call this%set_history_var(vname='FATES_CWD_ABOVEGROUND_DC', units='kg m-2', & + long='debris class-level aboveground coarse woody debris stocks in kg carbon per m2', & + use_default='inactive', avgflag='A', vtype=site_cwdsc_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_cwd_ag_si_cwdsc) + + call this%set_history_var(vname='FATES_CWD_BELOWGROUND_DC', units='kg m-2', & + long='debris class-level belowground coarse woody debris stocks in kg carbon per m2', & + use_default='inactive', avgflag='A', vtype=site_cwdsc_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_cwd_bg_si_cwdsc) + + call this%set_history_var(vname='FATES_CWD_ABOVEGROUND_IN_DC', & + units='kg m-2 s-1', & + long='debris class-level aboveground coarse woody debris input in kg carbon per m2 per second', & + use_default='inactive', avgflag='A', vtype=site_cwdsc_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_cwd_ag_in_si_cwdsc) + + call this%set_history_var(vname='FATES_CWD_BELOWGROUND_IN_DC', & + units='kg m-2 s-1', & + long='debris class-level belowground coarse woody debris input in kg carbon per m2 per second', & + use_default='inactive', avgflag='A', vtype=site_cwdsc_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_cwd_bg_in_si_cwdsc) + + call this%set_history_var(vname='FATES_CWD_ABOVEGROUND_OUT_DC', & + units='kg m-2 s-1', & + long='debris class-level aboveground coarse woody debris output in kg carbon per m2 per second', & + use_default='inactive', avgflag='A', vtype=site_cwdsc_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_cwd_ag_out_si_cwdsc) + + call this%set_history_var(vname='FATES_CWD_BELOWGROUND_OUT_DC', & + units='kg m-2 s-1', & + long='debris class-level belowground coarse woody debris output in kg carbon per m2 per second', & + use_default='inactive', avgflag='A', vtype=site_cwdsc_r8, & + hlms='CLM:ALM', upfreq=1, ivar=ivar, & + initialize=initialize_variables, index = ih_cwd_bg_out_si_cwdsc) ! Size structured diagnostics that require rapid updates (upfreq=2) From 742d5cda4227eface008ff1ff2c8363b2da5307b Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Fri, 1 Apr 2022 09:45:33 -0600 Subject: [PATCH 72/93] Added a TODO comment and made a history field active Committing only to get ./manage_externals/checkout_externals to finish --- fire/SFMainMod.F90 | 2 +- main/FatesHistoryInterfaceMod.F90 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 0993329953..37efc1175a 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -730,7 +730,7 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) !currentPatch%ROS_front forward ROS (m/min) !currentPatch%TFC_ROS total fuel consumed by flaming front (kgC/m2 of burned area) - use FatesInterfaceTypesMod, only : hlm_spitfire_mode + use FatesInterfaceTypesMod, only : hlm_spitfire_mode ! TODO slevis: redundant? use EDParamsMod, only : ED_val_nignitions use EDParamsMod, only : cg_strikes ! fraction of cloud-to-ground ligtning strikes use FatesConstantsMod, only : years_per_day diff --git a/main/FatesHistoryInterfaceMod.F90 b/main/FatesHistoryInterfaceMod.F90 index 4f1f56850d..0c3137127d 100644 --- a/main/FatesHistoryInterfaceMod.F90 +++ b/main/FatesHistoryInterfaceMod.F90 @@ -5515,7 +5515,7 @@ subroutine define_history_vars(this, initialize_variables) call this%set_history_var(vname='FATES_SCORCH_HEIGHT_APPF',units = 'm', & long='SPITFIRE flame Scorch Height (calculated per PFT in each patch age bin)', & - use_default='inactive', avgflag='A', vtype=site_agepft_r8, & + use_default='active', avgflag='A', vtype=site_agepft_r8, & hlms='CLM:ALM', upfreq=1, ivar=ivar, & initialize=initialize_variables, index = ih_scorch_height_si_agepft) From 2a47137014d2221ef27d6ece184895adc229627d Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Mon, 11 Apr 2022 15:57:10 -0600 Subject: [PATCH 73/93] One-line fix: code builds now Using existing test: SMS_Lm12_D_Mmpi-serial.1x1_brazil.I2000Clm50FatesCruRsGs.izumi_intel.clm-FatesFireLightningPopDens --- fire/SFMainMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 37efc1175a..13112d6d46 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -1054,7 +1054,7 @@ subroutine crown_damage ( currentSite ) struct_c = currentCohort%prt%GetState(struct_organ, all_carbon_elements) tree_sapw_struct_c = currentCohort%n * & - (EDPftvarcon_inst%allom_agb_frac(currentCohort%pft)*(sapw_c + struct_c)) + (prt_params%allom_agb_frac(currentCohort%pft)*(sapw_c + struct_c)) twig_sapw_struct_c = tree_sapw_struct_c * SF_VAL_CWD_frac(1) !only 1hr fuel From 0a3668b4324c9a64b2b3acf7f209b3f8e00798bd Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Mon, 11 Apr 2022 16:45:33 -0600 Subject: [PATCH 74/93] Fix to fates_fire_active_crown_fire: Code runs now There were two copies of this parameter: a scalar and an array and the model was getting confused when trying to read them --- main/EDParamsMod.F90 | 12 ------------ parameter_files/fates_params_default.cdl | 5 ----- 2 files changed, 17 deletions(-) diff --git a/main/EDParamsMod.F90 b/main/EDParamsMod.F90 index 51926d275a..64dfab6c0f 100644 --- a/main/EDParamsMod.F90 +++ b/main/EDParamsMod.F90 @@ -61,10 +61,6 @@ module EDParamsMod real(r8),protected, public :: ED_val_patch_fusion_tol real(r8),protected, public :: ED_val_canopy_closure_thresh ! site-level canopy closure point where trees take on forest (narrow) versus savannah (wide) crown allometry integer,protected, public :: stomatal_model !switch for choosing between stomatal conductance models, 1 for Ball-Berry, 2 for Medlyn - - logical,protected, public :: active_crown_fire ! flag, 1=active crown fire 0=no active crown fire - character(len=param_string_length),parameter :: fates_name_active_crown_fire = "fates_fire_active_crown_fire" - real(r8), protected, public :: cg_strikes ! fraction of cloud to ground lightning strikes (0-1) character(len=param_string_length),parameter :: fates_name_cg_strikes="fates_fire_cg_strikes" @@ -452,9 +448,6 @@ subroutine FatesRegisterParams(fates_params) call fates_params%RegisterParameter(name=ED_name_history_height_bin_edges, dimension_shape=dimension_shape_1d, & dimension_names=dim_names_height) - call fates_params%RegisterParameter(name=fates_name_active_crown_fire, dimension_shape=dimension_shape_scalar, & - dimension_names=dim_names_scalar) - call fates_params%RegisterParameter(name=fates_name_cg_strikes, dimension_shape=dimension_shape_scalar, & dimension_names=dim_names_scalar) @@ -621,10 +614,6 @@ subroutine FatesReceiveParams(fates_params) call fates_params%RetreiveParameter(name=name_dev_arbitrary, & data=dev_arbitrary) - call fates_params%RetreiveParameter(name=fates_name_active_crown_fire, & - data=tmpreal) - active_crown_fire = (abs(tmpreal-1.0_r8) Date: Mon, 11 Apr 2022 16:50:45 -0600 Subject: [PATCH 75/93] Correcting active_crown_fire_flg in code that's commented out for now I found references to both currentCohort%active_crown_fire_flg and currentPatch%active_crown_fire_flg and I think the latter is correct and the former incorrect --- fire/SFMainMod.F90 | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 13112d6d46..6b0197dfcc 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -113,9 +113,9 @@ subroutine fire_model( currentSite, bc_in) call crown_scorching(currentSite) call crown_damage(currentSite) ! Begin: Repeat calls to calculate effects of active crown fire - ! TODO slevis: if sum(currentCohort%active_crown_fire_flag) > 0 - ! over all cohorts, then execute the repeat calls. Note that this - ! subroutine runs at the Site level. + ! TODO slevis: if (currentPatch%active_crown_fire_flg) > 0) + ! at any Patch at this Site, then execute the repeat calls. + ! NB. this subroutine runs at the Site level. ! call rate_of_spread(currentSite, MEF, fuel_moisture) ! call area_burnt_intensity(currentSite, bc_in) ! call crown_scorching(currentSite) @@ -498,14 +498,12 @@ subroutine rate_of_spread ( currentSite, MEF, fuel_moisture ) ! ! TODO Would it make sense to move this section of code to subr. ! ! characteristics_of_fuel? ! sum_fuel = currentPatch%sum_fuel ! save for comparison later -! if (currentPatch%fire == 1) then +! if (currentPatch%fire == 1 .and. currentPatch%active_crown_fire_flg == 1) then ! currentCohort=>currentPatch%tallest ! do while(associated(currentCohort)) -! if (currentCohort%active_crown_fire_flg == 1) then -! ! Add the leaf carbon from each cohort to currentPatch%sum_fuel -! leaf_c = currentCohort%prt%GetState(leaf_organ, all_carbon_elements) -! currentPatch%sum_fuel = currentPatch%sum_fuel + leaf_c -! end if +! ! Add the leaf carbon from each cohort to currentPatch%sum_fuel +! leaf_c = currentCohort%prt%GetState(leaf_organ, all_carbon_elements) +! currentPatch%sum_fuel = currentPatch%sum_fuel + leaf_c ! currentCohort => currentCohort%shorter; ! enddo !end cohort loop From 85f0dba3c8ffd9f2481ba7a0771deb23c3e38893 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Sat, 16 Apr 2022 19:24:31 -0600 Subject: [PATCH 76/93] Update active crown fire per Scott and Reinhardt 2001, Rothermel 1977 Calculate required intensity to scorch crown and canopy, then re-calculate rate of spread and fire intensity Fixes: 573 User interface changes?: No Code review: --- fire/SFMainMod.F90 | 786 ++++++++++++++++++++++++++++++--------------- 1 file changed, 520 insertions(+), 266 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 6b0197dfcc..30a3e9e644 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -54,10 +54,12 @@ module SFMainMod public :: fire_model public :: fire_danger_index public :: characteristics_of_fuel + public :: characteristics_of_crown public :: rate_of_spread public :: ground_fuel_consumption public :: wind_effect public :: area_burnt_intensity + public :: active_crown_fire public :: crown_scorching public :: crown_damage public :: cambial_damage_kill @@ -87,13 +89,19 @@ subroutine fire_model( currentSite, bc_in) type (ed_patch_type), pointer :: currentPatch - real(r8) :: MEF(nfsc) ! Moisture extinction factor of fuels - real(r8) :: fuel_moisture(nfsc) ! Scaled moisture content of small litter fuels + real(r8) :: canopy_fuel_load ! available canopy fuel load in patch (kg biomass) + real(r8) :: passive_crown_FI ! fire intensity for ignition of passive canopy fuel (kW/m) + real(r8) :: ROS_torch ! ROS for crown torch initation (m/min) + real(r8) :: lb !length to breadth ratio of fire ellipse (unitless) + real(r8) :: heat_per_area ! heat release per unit area (kJ/m2) for surface fuel + !zero fire things currentPatch => currentSite%youngest_patch do while(associated(currentPatch)) currentPatch%frac_burnt = 0.0_r8 + currentPatch%FI = 0.0_r8 + currentPatch%FD = 0.0_r8 currentPatch%fire = 0 currentPatch%active_crown_fire_flg = 0 currentPatch => currentPatch%older @@ -106,21 +114,14 @@ subroutine fire_model( currentSite, bc_in) if( hlm_spitfire_mode > hlm_sf_nofire_def )then call fire_danger_index(currentSite, bc_in) call wind_effect(currentSite, bc_in) - call characteristics_of_fuel(currentSite, MEF, fuel_moisture) - call rate_of_spread(currentSite, MEF, fuel_moisture) + call characteristics_of_fuel(currentSite) + call characteristics_of_crown(currentSite, canopy_fuel_load, passive_crown_FI) + call rate_of_spread(currentSite, passive_crown_FI, ROS_torch, heat_per_area) call ground_fuel_consumption(currentSite) - call area_burnt_intensity(currentSite, bc_in) + call area_burnt_intensity(currentSite, bc_in, lb) + call active_crown_fire (currentSite,passive_crown_FI,canopy_fuel_load,ROS_torch,heat_per_area,lb) call crown_scorching(currentSite) call crown_damage(currentSite) - ! Begin: Repeat calls to calculate effects of active crown fire - ! TODO slevis: if (currentPatch%active_crown_fire_flg) > 0) - ! at any Patch at this Site, then execute the repeat calls. - ! NB. this subroutine runs at the Site level. -! call rate_of_spread(currentSite, MEF, fuel_moisture) -! call area_burnt_intensity(currentSite, bc_in) -! call crown_scorching(currentSite) -! call crown_damage(currentSite) - ! End: Repeat calls to calculate effects of active crown fire call cambial_damage_kill(currentSite) call post_fire_mortality(currentSite) end if @@ -166,18 +167,18 @@ subroutine fire_danger_index ( currentSite, bc_in) else yipsolon = (SF_val_fdi_a* temp_in_C)/(SF_val_fdi_b+ temp_in_C)+log(max(1.0_r8,rh)/100.0_r8) dewpoint = (SF_val_fdi_b*yipsolon)/(SF_val_fdi_a-yipsolon) !Standard met. formula - d_NI = ( temp_in_C-dewpoint)* temp_in_C !follows Nesterov 1968. Equation 5. Thonicke et al. 2010. + d_NI = ( temp_in_C-dewpoint)* temp_in_C !follows Nesterov 1968. Eq 5, Thonicke et al. 2010. if (d_NI < 0.0_r8) then !Change in NI cannot be negative. d_NI = 0.0_r8 !check endif endif - currentSite%acc_NI = currentSite%acc_NI + d_NI !Accumulate Nesterov index over the fire season. + currentSite%acc_NI = currentSite%acc_NI + d_NI !Accumulate Nesterov index over fire season. end subroutine fire_danger_index !***************************************************************** - subroutine characteristics_of_fuel ( currentSite, MEF, fuel_moisture ) + subroutine characteristics_of_fuel ( currentSite) !***************************************************************** use SFParamsMod, only: SF_val_drying_ratio, SF_val_SAV, SF_val_FBD, & @@ -189,12 +190,9 @@ subroutine characteristics_of_fuel ( currentSite, MEF, fuel_moisture ) type(ed_cohort_type), pointer :: currentCohort type(litter_type), pointer :: litt_c - ! ARGUMENTS - real(r8), intent(out) :: MEF(nfsc) ! Moisture extinction factor of fuels integer n - real(r8), intent(out) :: fuel_moisture(nfsc) ! Scaled moisture content of small litter fuels - - ! LOCAL VARIABLES real(r8) alpha_FMC(nfsc) ! Relative fuel moisture adjusted per drying ratio + real(r8) fuel_moisture(nfsc) ! Scaled moisture content of small litter fuels + real(r8) MEF(nfsc) ! Moisture extinction factor of fuels, integer n fuel_moisture(:) = 0.0_r8 @@ -254,9 +252,9 @@ subroutine characteristics_of_fuel ( currentSite, MEF, fuel_moisture ) currentPatch%fuel_frac(lg_sf) = currentPatch%livegrass / currentPatch%sum_fuel ! MEF (moisure of extinction) depends on compactness of fuel, depth, particle size, wind, slope - ! Eqn here is eqn 27 from Peterson and Ryan (1986) "Modeling Postfire Conifer Mortality for Long-Range Planning" + ! Eq here is Eq 27 from Peterson and Ryan (1986) "Modeling Postfire Conifer Mortality for Long-Range Planning" ! but lots of other approaches in use out there... - ! MEF: pine needles=0.30 (text near EQ 28 Rothermal 1972) + ! MEF: pine needles=0.30 (text near Eq 28 Rothermal 1972) ! Table II-1 NFFL mixed fuels models from Rothermal 1983 Gen. Tech. Rep. INT-143 ! MEF: short grass=0.12,tall grass=0.25,chaparral=0.20,closed timber litter=0.30,hardwood litter=0.25 ! Thonicke 2010 SAV values propagated thru P&R86 eqn below gives MEF:tw=0.355, sb=0.44, lb=0.525, tr=0.63, dg=0.248, lg=0.248 @@ -350,6 +348,156 @@ subroutine characteristics_of_fuel ( currentSite, MEF, fuel_moisture ) end subroutine characteristics_of_fuel + !**************************************************************** + subroutine characteristics_of_crown ( currentSite, canopy_fuel_load, passive_crown_FI) + !****************************************************************. + + !returns the live crown fuel characteristics within each patch. + ! passive_crown_FI is minimum fire intensity to ignite canopy crown fuel + + use SFParamsMod, only : SF_VAL_CWD_FRAC + + type(ed_site_type), intent(in), target :: currentSite + + type(ed_patch_type) , pointer :: currentPatch + type(ed_cohort_type), pointer :: currentCohort + + ! ARGUMENTS + real(r8), intent(out) :: canopy_fuel_load ! available canopy fuel load in patch (kg biomass) + real(r8), intent(out) :: passive_crown_FI ! min fire intensity to ignite canopy fuel (kW/m) + + ! LOCAL + real(r8) :: crown_depth ! depth of crown (m) + real(r8) :: height_cbb ! clear branch bole height or crown base height (m) + real(r8) :: max_height ! max cohort on patch (m) + real(r8) :: crown_ignite_energy ! heat yield for crown (kJ/kg) + real(r8) :: tree_sapw_struct_c ! above-ground tree struct and sap biomass in cohort (kgC) + real(r8) :: leaf_c ! leaf carbon (kgC) + real(r8) :: sapw_c ! sapwood carbon (kgC) + real(r8) :: struct_c ! structure carbon (kgC) + real(r8) :: twig_sapw_struct_c ! above-ground twig sap and struct in cohort (kgC) + real(r8) :: crown_fuel_c ! biomass of 1 hr fuels (leaves,twigs) in cohort (kg C) + real(r8) :: crown_fuel_biomass ! biomass of crown fuel in cohort (kg biomass) + real(r8) :: crown_fuel_per_m ! crown fuel per 1m section in cohort + real(r8) :: height_base_canopy ! lowest height of fuels in patch to carry fire in crown + real(r8) :: canopy_bulk_density ! density of canopy fuel on patch + + integer :: ih ! counter + + real, dimension(70):: biom_matrix ! matrix to track biomass from bottom to 70m + real(r8),parameter :: min_density_canopy_fuel = 0.011_r8 !min canopy fuel density (kg/m3) sufficient to + !propogate fire vertically through canopy + !Scott and Reinhardt 2001 RMRS-RP-29 + real(r8),parameter :: foliar_moist_content = 1.0_r8 !foliar moisture content default 100% Scott & Reinhardt 2001 + + + !returns the live crown fuel characteristics within each patch. + ! passive_crown_FI is the required minimum fire intensity to ignite canopy crown fuel + + currentPatch => currentSite%oldest_patch + + !! check to see if active_crown_fire is enabled? + + do while(associated(currentPatch)) + !zero Patch level variables + height_base_canopy = 0.0_r8 + canopy_fuel_load = 0.0_r8 + passive_crown_FI = 0.0_r8 + + if (currentPatch%fire == 1) then + + currentCohort=>currentPatch%tallest + do while(associated(currentCohort)) + + !zero cohort level variables + tree_sapw_struct_c = 0.0_r8 + leaf_c = 0.0_r8 + sapw_c = 0.0_r8 + struct_c = 0.0_r8 + twig_sapw_struct_c = 0.0_r8 + crown_fuel_c = 0.0_r8 + crown_fuel_biomass = 0.0_r8 + crown_fuel_per_m = 0.0_r8 + + ! Calculate crown 1hr fuel biomass (leaf, twig sapwood, twig structural biomass) + if ( int(prt_params%woody(currentCohort%pft)) == itrue) then !trees + + call CrownDepth(currentCohort%hite,currentCohort%pft,crown_depth) + height_cbb = currentCohort%hite - crown_depth + + !find patch max height for stand canopy fuel + if (currentCohort%hite > max_height) then + max_height = currentCohort%hite + endif + + leaf_c = currentCohort%prt%GetState(leaf_organ, all_carbon_elements) + sapw_c = currentCohort%prt%GetState(sapw_organ, all_carbon_elements) + struct_c = currentCohort%prt%GetState(struct_organ, all_carbon_elements) + + tree_sapw_struct_c = currentCohort%n * & + (prt_params%allom_agb_frac(currentCohort%pft)*(sapw_c + struct_c)) + + twig_sapw_struct_c = tree_sapw_struct_c * SF_VAL_CWD_frac(1) !only 1hr fuel + + crown_fuel_c = (currentCohort%n * leaf_c) + twig_sapw_struct_c !crown fuel (kgC) + + crown_fuel_biomass = crown_fuel_c / 0.45_r8 ! crown fuel (kg biomass) + + crown_fuel_per_m = crown_fuel_biomass / crown_depth ! kg biomass per m + + !sort crown fuel into bins from bottom to top of crown + !accumulate across cohorts to find density within canopy 1m sections + do ih = int(height_cbb), int(currentCohort%hite) + biom_matrix(ih) = biom_matrix(ih) + crown_fuel_per_m + end do + + !accumulate available canopy fuel for patch (kg biomass) + ! use this in CFB (crown fraction burn) calculation and FI final + canopy_fuel_load = canopy_fuel_load + crown_fuel_biomass !canopy fuel in patch + + endif !trees only + + currentCohort => currentCohort%shorter; + + enddo !end cohort loop + + biom_matrix(:) = biom_matrix(:) / currentPatch%area !kg biomass/m3 + + !loop from 1m to 70m to find bin with total density = 0.011 kg/m3 + !min canopy fuel density to propogate fire vertically in canopy across patch + do ih=1,70 + if (biom_matrix(ih) > min_density_canopy_fuel) then + height_base_canopy = float(ih) + exit + end if + end do + + !canopy_bulk_denisty (kg/m3) for Patch + canopy_bulk_density = sum(biom_matrix) / (max_height - height_base_canopy) + + ! Note: crown_ignition_energy to be calculated based on PFT foliar moisture content from FATES-Hydro + ! or create foliar moisture % based on BTRAN + ! Use foliar_moisture(currentCohort%pft) and compute weighted PFT average with Eq 3 Van Wagner 1977 + ! in place of foliar_moist_content parameter + + ! Eq 3 Van Wagner 1977, Eq 11 Scott & Reinhardt 2001 + ! h = 460.0 + 25.9*m + ! h = crown_ignite_energy (kJ/kg), m = foliar moisture content based on dry fuel (%) + crown_ignite_energy = 460.0 + 25.9 * foliar_moist_content + + ! Crown fuel ignition potential (kW/m), Eq 4 Van Wagner 1977, Eq 11 Scott & Reinhardt 2001 + ! FI = (Czh)**3/2 where z=canopy base height,h=heat of crown ignite energy, FI=fire intensity + ! 0.01 = C, empirical constant Van Wagner 1977 Eq 4 for 6m canopy base height, 100% FMC, FI 2500kW/m + ! passive_crown_FI = min fire intensity to ignite canopy fuel (kW/m or kJ/m/s) + passive_crown_FI = (0.01_r8 * height_base_canopy * crown_ignite_energy)**1.5_r8 + + endif ! fire? + + currentPatch => currentPatch%younger; + + enddo !end patch loop + + end subroutine characteristics_of_crown !***************************************************************** subroutine wind_effect ( currentSite, bc_in) @@ -436,14 +584,13 @@ subroutine wind_effect ( currentSite, bc_in) end subroutine wind_effect - !***************************************************************** - subroutine rate_of_spread ( currentSite, MEF, fuel_moisture ) + !******************************************************************* + subroutine rate_of_spread ( currentSite, ROS_torch, passive_crown_FI, heat_per_area) !*****************************************************************. !Routine called daily from within ED within a site loop. !Returns the updated currentPatch%ROS_front value for each patch. - use SFParamsMod, only : SF_val_SAV, & - SF_val_drying_ratio, & + use SFParamsMod, only : SF_val_miner_total, & SF_val_part_dens, & SF_val_miner_damp, & SF_val_fuel_energy @@ -453,19 +600,14 @@ subroutine rate_of_spread ( currentSite, MEF, fuel_moisture ) type(ed_site_type), intent(in), target :: currentSite type(ed_patch_type), pointer :: currentPatch - type(ed_cohort_type), pointer :: currentCohort - type(litter_type), pointer :: litt_c ! ARGUMENTS - real(r8), intent(in) :: MEF(nfsc) ! Moisture extinction factor of fuels - real(r8), intent(in) :: fuel_moisture(nfsc) ! Scaled moisture content of small litter fuels + real(r8), intent(out) :: ROS_torch ! ROS for crown torch initation (m/min) + real(r8), intent(out) :: heat_per_area ! heat release per unit area (kJ/m2) for surface fuel + real(r8), intent(in) :: passive_crown_FI ! min fire intensity to ignite canopy fuel (kW/m or kJ/m/s) ! LOCAL VARIABLES - real(r8) :: sum_fuel ! value saved for comparison - real(r8) :: leaf_c ! leaf carbon [kg] - real(r8) :: alpha_live_fuel ! ratio of mass fine live fuel to mass total fine fuel (1-hour fuels Rothermal 1972) - real(r8) :: fuel_eff_moist_dead - real(r8) :: fuel_mef_fine + ! Rothermal fire spread model parameters. real(r8) beta,beta_op ! weighted average of packing ratio (unitless) real(r8) ir ! reaction intensity (kJ/m2/min) @@ -476,15 +618,17 @@ subroutine rate_of_spread ( currentSite, MEF, fuel_moisture ) real(r8) beta_ratio ! ratio of beta/beta_op real(r8) a_beta ! dummy variable for product of a* beta_ratio for react_v_opt equation real(r8) a,b,c,e ! function of fuel sav + real(r8) time_r ! residence time (min) - logical, parameter :: debug_windspeed = .false. !for debugging - real(r8),parameter :: q_dry = 581.0_r8 !heat of pre-ignition of dry fuels (kJ/kg) + real(r8),parameter :: q_dry = 581.0_r8 !heat of pre-ignition of dry fuels (kJ/kg) + real(r8),parameter :: wind_reduce = 0.2_r8 !wind reduction factor (%) currentPatch=>currentSite%oldest_patch; - litt_c => currentPatch%litter(element_pos(carbon12_element)) do while(associated(currentPatch)) + +!! clean up this initialise to zero section?? ! ---initialise parameters to zero.--- beta_ratio = 0.0_r8; q_ig = 0.0_r8; eps = 0.0_r8; a = 0.0_r8; b = 0.0_r8; c = 0.0_r8; e = 0.0_r8 @@ -492,36 +636,6 @@ subroutine rate_of_spread ( currentSite, MEF, fuel_moisture ) moist_damp = 0.0_r8; ir = 0.0_r8; a_beta = 0.0_r8; currentPatch%ROS_front = 0.0_r8 - ! --------------------------------------------------- -! ! Active crown fire effects: https://github.com/NGEET/fates/issues/573 -! ! Update some characteristics of fuel -! ! TODO Would it make sense to move this section of code to subr. -! ! characteristics_of_fuel? -! sum_fuel = currentPatch%sum_fuel ! save for comparison later -! if (currentPatch%fire == 1 .and. currentPatch%active_crown_fire_flg == 1) then -! currentCohort=>currentPatch%tallest -! do while(associated(currentCohort)) -! ! Add the leaf carbon from each cohort to currentPatch%sum_fuel -! leaf_c = currentCohort%prt%GetState(leaf_organ, all_carbon_elements) -! currentPatch%sum_fuel = currentPatch%sum_fuel + leaf_c -! currentCohort => currentCohort%shorter; -! enddo !end cohort loop - -! ! if sum_fuel was indeed updated for a case of active crown fire, go -! ! on to update currentPatch%fuel_mef and currentPatch%fuel_eff_moist -! if (currentPatch%sum_fuel > sum_fuel) then -! alpha_live_fuel = (currentPatch%livegrass + leaf_c) / & -! (currentPatch%livegrass + leaf_c + sum(litt_c%leaf_fines(:)) + litt_c%ag_cwd(tw_sf)) -! fuel_eff_moist_dead = sum(currentPatch%fuel_frac(tw_sf:dl_sf) * fuel_moisture(tw_sf:dl_sf)) -! fuel_mef_fine = currentPatch%fuel_frac(tw_sf) * MEF(tw_sf) + & -! currentPatch%fuel_frac(dl_sf) * MEF(dl_sf) + & -! currentPatch%fuel_frac(lg_sf) * MEF(lg_sf) -! currentPatch%fuel_mef = max((2.9_r8 * ((1.0_r8 - alpha_live_fuel) / alpha_live_fuel) * (1.0_r8 - fuel_eff_moist_dead) - 0.226_r8), fuel_mef_fine) -! currentPatch%fuel_eff_moist = exp(-1.0_r8 * currentSite%acc_NI * SF_val_SAV(lg_sf) / SF_val_drying_ratio) -! end if -! end if - ! --------------------------------------------------- - ! ----start spreading--- if ( hlm_masterproc == itrue .and.debug) write(fates_log(),*) & @@ -533,7 +647,7 @@ subroutine rate_of_spread ( currentSite, MEF, fuel_moisture ) ! fraction of fuel array volume occupied by fuel or compactness of fuel bed beta = currentPatch%fuel_bulkd / SF_val_part_dens - ! Equation A6 in Thonicke et al. 2010 + ! Eq A6 in Thonicke et al. 2010 ! packing ratio (unitless) beta_op = 0.200395_r8 *(currentPatch%fuel_sav**(-0.8189_r8)) @@ -546,20 +660,20 @@ subroutine rate_of_spread ( currentSite, MEF, fuel_moisture ) endif ! ---heat of pre-ignition--- - ! Equation A4 in Thonicke et al. 2010 - ! Rothermal EQ12= 250 Btu/lb + 1116 Btu/lb * fuel_eff_moist - ! conversion of Rothermal (1972) EQ12 in BTU/lb to current kJ/kg + ! Eq A4 in Thonicke et al. 2010, Eq 12 Rothermel 1972 + ! 50 Btu/lb + 1116 Btu/lb * fuel_eff_moist + ! conversion of Rothermel (1972) Eq 12 in BTU/lb to current kJ/kg ! q_ig in kJ/kg - q_ig = q_dry +2594.0_r8 * currentPatch%fuel_eff_moist + q_ig = q_dry + 2594.0_r8 * currentPatch%fuel_eff_moist ! ---effective heating number--- - ! Equation A3 in Thonicke et al. 2010. + ! Eq A3 in Thonicke et al. 2010. eps = exp(-4.528_r8 / currentPatch%fuel_sav) - ! Equation A7 in Thonicke et al. 2010 per eqn 49 from Rothermel 1972 + ! Eq A7 in Thonicke et al. 2010 per Eq 49 Rothermel 1972 b = 0.15988_r8 * (currentPatch%fuel_sav**0.54_r8) - ! Equation A8 in Thonicke et al. 2010 per eqn 48 from Rothermel 1972 + ! Eq A8 in Thonicke et al. 2010 per Eq 48 Rothermel 1972 c = 7.47_r8 * (exp(-0.8711_r8 * (currentPatch%fuel_sav**0.55_r8))) - ! Equation A9 in Thonicke et al. 2010. (appears to have typo, using coefficient eqn.50 Rothermel 1972) + ! Eq A9 in Thonicke et al. 2010. (has typo, using coefficient Eq 50 Rothermel 1972) e = 0.715_r8 * (exp(-0.01094_r8 * currentPatch%fuel_sav)) if (debug) then @@ -571,35 +685,35 @@ subroutine rate_of_spread ( currentSite, MEF, fuel_moisture ) if ( hlm_masterproc == itrue .and.debug) write(fates_log(),*) 'SF - e ',e endif - ! Equation A5 in Thonicke et al. 2010 + ! Eq A5 in Thonicke et al. 2010 ! phi_wind (unitless) ! convert current_wspeed (wind at elev relevant to fire) from m/min to ft/min for Rothermel ROS eqn phi_wind = c * ((3.281_r8*currentPatch%effect_wspeed)**b)*(beta_ratio**(-e)) ! ---propagating flux---- - ! Equation A2 in Thonicke et al.2010 and Eq. 42 Rothermal 1972 + ! Eq A2 in Thonicke et al.2010 and Eq 42 Rothermel 1972 ! xi (unitless) xi = (exp((0.792_r8 + 3.7597_r8 * (currentPatch%fuel_sav**0.5_r8)) * (beta+0.1_r8))) / & (192_r8+7.9095_r8 * currentPatch%fuel_sav) ! ---reaction intensity---- - ! Equation in table A1 Thonicke et al. 2010. + ! Eq in table A1 Thonicke et al. 2010. a = 8.9033_r8 * (currentPatch%fuel_sav**(-0.7913_r8)) a_beta = exp(a*(1.0_r8-beta_ratio)) !dummy variable for reaction_v_opt equation - ! Equation in table A1 Thonicke et al. 2010. + ! Eq in table A1 Thonicke et al. 2010. ! reaction_v_max and reaction_v_opt = reaction velocity in units of per min - ! reaction_v_max = Equation 36 in Rothermal 1972 and Fig 12 + ! reaction_v_max = Eq 36 in Rothermel 1972 and Fig 12 reaction_v_max = 1.0_r8 / (0.0591_r8 + 2.926_r8* (currentPatch%fuel_sav**(-1.5_r8))) - ! reaction_v_opt = Equation 38 in Rothermal 1972 and Fig 11 + ! reaction_v_opt = Eq 38 in Rothermel 1972 and Fig 11 reaction_v_opt = reaction_v_max*(beta_ratio**a)*a_beta ! mw_weight = relative fuel moisture/fuel moisture of extinction ! average values for litter pools (dead leaves, twigs, small and large branches) plus grass mw_weight = currentPatch%fuel_eff_moist/currentPatch%fuel_mef - ! Equation in table A1 Thonicke et al. 2010. + ! Eq in table A1 Thonicke et al. 2010. ! moist_damp is unitless moist_damp = max(0.0_r8,(1.0_r8 - (2.59_r8 * mw_weight) + (5.11_r8 * (mw_weight**2.0_r8)) - & (3.52_r8*(mw_weight**3.0_r8)))) @@ -610,15 +724,28 @@ subroutine rate_of_spread ( currentSite, MEF, fuel_moisture ) ! write(fates_log(),*) 'ir',gamma_aptr,moist_damp,SF_val_fuel_energy,SF_val_miner_damp + if (((currentPatch%fuel_bulkd) <= 0.0_r8).or.(eps <= 0.0_r8).or.(q_ig <= 0.0_r8)) then currentPatch%ROS_front = 0.0_r8 - else ! Equation 9. Thonicke et al. 2010. + ROS_torch = 0.0_r8 + else ! Eq 9. Thonicke et al. 2010. ! forward ROS in m/min currentPatch%ROS_front = (ir*xi*(1.0_r8+phi_wind)) / (currentPatch%fuel_bulkd*eps*q_ig) ! write(fates_log(),*) 'ROS',currentPatch%ROS_front,phi_wind,currentPatch%effect_wspeed ! write(fates_log(),*) 'ros calcs',currentPatch%fuel_bulkd,ir,xi,eps,q_ig + + ! calculate heat release per unit area (HPA)(kJ/m2), Eq 2 Scott & Reinhardt 2001 + ! and residence time (min), Eq 3 Scott & Reinhardt 2001 + time_r = 12.595 / currentPatch%fuel_sav + heat_per_area = ir * time_r + + ! calculate torching index based on wind speed and crown fuels + ! ROS for crown torch initation (m/min), Eq 18 Scott & Reinhardt 2001 + ROS_torch = (1.0 / 54.683 * wind_reduce)* & + ((((60.0*passive_crown_FI*currentPatch%fuel_bulkd*eps*q_ig)/heat_per_area*ir*xi)-1.0) & + / (c*beta_ratio)**-e)**1/b endif - ! Equation 10 in Thonicke et al. 2010 + ! Eq 10 in Thonicke et al. 2010 ! backward ROS from Can FBP System (1992) in m/min ! backward ROS wind not changed by vegetation currentPatch%ROS_back = currentPatch%ROS_front*exp(-0.012_r8*currentSite%wind) @@ -653,7 +780,7 @@ subroutine ground_fuel_consumption ( currentSite ) do while(associated(currentPatch)) currentPatch%burnt_frac_litter(:) = 1.0_r8 ! Calculate fraction of litter is burnt for all classes. - ! Equation B1 in Thonicke et al. 2010--- + ! Eq B1 in Thonicke et al. 2010--- do c = 1, nfsc !work out the burnt fraction for all pools, even if those pools dont exist. moist = currentPatch%litter_moisture(c) ! 1. Very dry litter @@ -717,7 +844,7 @@ end subroutine ground_fuel_consumption !***************************************************************** - subroutine area_burnt_intensity ( currentSite, bc_in ) + subroutine area_burnt_intensity ( currentSite, bc_in, lb) !***************************************************************** !returns the updated currentPatch%FI value for each patch. @@ -733,37 +860,41 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) use EDParamsMod, only : cg_strikes ! fraction of cloud-to-ground ligtning strikes use FatesConstantsMod, only : years_per_day use SFParamsMod, only : SF_val_fdi_alpha,SF_val_fuel_energy, & - SF_val_max_durat, SF_val_durat_slope, SF_val_fire_threshold + SF_val_max_durat, SF_val_durat_slope, SF_val_fire_threshold type(ed_site_type), intent(inout), target :: currentSite type(ed_patch_type), pointer :: currentPatch type(bc_in_type), intent(in) :: bc_in - real(r8) ROS !m/s - real(r8) W !kgBiomass/m2 - real(r8) :: tree_fraction_patch ! patch level. no units - real(r8) lb !length to breadth ratio of fire ellipse (unitless) - real(r8) df !distance fire has travelled forward in m - real(r8) db !distance fire has travelled backward in m - real(r8) AB !daily area burnt in m2 per km2 - - real(r8) size_of_fire !in m2 - real(r8) cloud_to_ground_strikes ! [fraction] depends on hlm_spitfire_mode - real(r8) anthro_ign_count ! anthropogenic ignition count/km2/day - integer :: iofp ! index of oldest fates patch + ! ARGUMENTS + real(r8), intent(out) :: lb !length to breadth ratio of fire ellipse (unitless) + + ! LOCAL VARIABLES + real(r8) ROS !rate of spread (m/s) + real(r8) W !available fuel (kgBiomass/m2) + real(r8) :: tree_fraction_patch !patch level. no units + real(r8) df !distance fire has travelled forward (m) + real(r8) db !distance fire has travelled backward (m) + real(r8) AB !daily area burnt (m2 per km2) + real(r8) size_of_fire !in m2 + real(r8) cloud_to_ground_strikes ! [fraction] depends on hlm_spitfire_mode + real(r8) anthro_ign_count ! anthropogenic ignition count/km2/day + integer :: iofp ! index of oldest fates patch real(r8), parameter :: pot_hmn_ign_counts_alpha = 0.0035_r8 ! Potential human ignition counts (alpha in Li et al. 2012) (#/person/month) - real(r8), parameter :: km2_to_m2 = 1000000.0_r8 !area conversion for square km to square m + real(r8), parameter :: km2_to_m2 = 1000000.0_r8 ! area conversion for square km to square m real(r8), parameter :: m_per_min__to__km_per_hour = 0.06_r8 ! convert wind speed from m/min to km/hr - real(r8), parameter :: forest_grassland_lengthtobreadth_threshold = 0.55_r8 ! tree canopy cover below which to use grassland length-to-breadth eqn + real(r8), parameter :: forest_grassland_lengthtobreadth_threshold = 0.55_r8 ! tree canopy cover below which to use + ! grassland length-to-breadth eqn + ! 0.55 = benchmark forest cover, Staver 2010 ! ---initialize site parameters to zero--- currentSite%NF_successful = 0._r8 - ! Equation 7 from Venevsky et al GCB 2002 (modification of equation 8 in Thonicke et al. 2010) + ! Eq 7 from Venevsky et al GCB 2002 (modification of Eqn 8, Thonicke et al. 2010) ! FDI 0.1 = low, 0.3 moderate, 0.75 high, and 1 = extreme ignition potential for alpha 0.000337 if (hlm_spitfire_mode == hlm_sf_successful_ignitions_def) then - currentSite%FDI = 1.0_r8 ! READING "SUCCESSFUL IGNITION" DATA - ! force ignition potential to be extreme + currentSite%FDI = 1.0_r8 ! READING "SUCCESSFUL IGNITION" DATA + ! force ignition potential to be extreme cloud_to_ground_strikes = 1.0_r8 ! cloud_to_ground = 1 = use 100% incoming observed ignitions else ! USING LIGHTNING DATA currentSite%FDI = 1.0_r8 - exp(-SF_val_fdi_alpha*currentSite%acc_NI) @@ -802,14 +933,14 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) if (currentSite%NF > 0.0_r8) then - ! Equation 14 in Thonicke et al. 2010 + ! Eq 14 in Thonicke et al. 2010 ! fire duration in minutes currentPatch%FD = (SF_val_max_durat+1.0_r8) / (1.0_r8 + SF_val_max_durat * & exp(SF_val_durat_slope*currentSite%FDI)) if(write_SF == itrue)then if ( hlm_masterproc == itrue ) write(fates_log(),*) 'fire duration minutes',currentPatch%fd endif - !equation 15 in Arora and Boer CTEM model.Average fire is 1 day long. + !Eq 15 in Arora and Boer CTEM model.Average fire is 1 day long. !currentPatch%FD = 60.0_r8 * 24.0_r8 !no minutes in a day tree_fraction_patch = 0.0_r8 @@ -825,12 +956,12 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) if ((currentPatch%effect_wspeed*m_per_min__to__km_per_hour) < 1._r8) then !16.67m/min = 1km/hr lb = 1.0_r8 else - if (tree_fraction_patch > forest_grassland_lengthtobreadth_threshold) then !benchmark forest cover, Staver 2010 - ! EQ 79 forest fuels (Canadian Forest Fire Behavior Prediction System Ont.Inf.Rep. ST-X-3, 1992) + if (tree_fraction_patch > forest_grassland_lengthtobreadth_threshold) then + ! Eq 79 forest fuels (Canadian Forest Fire Behavior Prediction System Ont.Inf.Rep. ST-X-3, 1992) lb = (1.0_r8 + (8.729_r8 * & ((1.0_r8 -(exp(-0.03_r8 * m_per_min__to__km_per_hour * currentPatch%effect_wspeed)))**2.155_r8))) - else ! EQ 80 grass fuels (CFFBPS Ont.Inf.Rep. ST-X-3, 1992, but with a correction from an errata published within - ! Information Report GLC-X-10 by Bottom et al., 2009 because there is a typo in CFFBPS Ont.Inf.Rep. ST-X-3, 1992) + else ! Eq 80 grass fuels (CFFBPS Ont.Inf.Rep. ST-X-3, 1992, with correction from errata published in + ! Inf.Rep. GLC-X-10 (Bottom et al., 2009) because of typo in CFFBPS Ont.Inf.Rep. ST-X-3, 1992) lb = (1.1_r8*((m_per_min__to__km_per_hour * currentPatch%effect_wspeed)**0.464_r8)) endif endif @@ -845,12 +976,12 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) ! --- calculate area burnt--- if(lb > 0.0_r8) then - ! Equation 1 in Thonicke et al. 2010 + ! Eq 1 in Thonicke et al. 2010 ! To Do: Connect here with the Li & Levis GDP fire suppression algorithm. - ! Equation 16 in arora and boer model JGR 2005 + ! Eq 16 in arora and boer model JGR 2005 ! AB = AB *3.0_r8 - !size of fire = equation 14 Arora and Boer JGR 2005 (area of an ellipse) + !size of fire = Eq 14 Arora and Boer JGR 2005 (area of an ellipse) size_of_fire = ((pi_const/(4.0_r8*lb))*((df+db)**2.0_r8)) ! AB = daily area burnt = size fires in m2 * num ignitions per day per km2 * prob ignition starts fire @@ -873,12 +1004,12 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) currentPatch%frac_burnt = 0._r8 endif ! lb - ROS = currentPatch%ROS_front / 60.0_r8 !m/min to m/sec - W = currentPatch%TFC_ROS / 0.45_r8 !kgC/m2 of burned area to kgbiomass/m2 of burned area + ROS = currentPatch%ROS_front / 60.0_r8 !m/min to m/sec for FI calculation + W = currentPatch%TFC_ROS / 0.45_r8 !kgC/m2 of burned area to kgbiomass/m2 of burned area - ! EQ 15 Thonicke et al 2010 - !units of fire intensity = (kJ/kg)*(kgBiomass/m2)*(m/min) - currentPatch%FI = SF_val_fuel_energy * W * ROS !kj/m/s, or kW/m + ! Eq 15 Thonicke et al 2010 + !units of fire intensity = (kJ/kg)*(kgBiomass/m2)*(m/sec) + currentPatch%FI = SF_val_fuel_energy * W * ROS !kj/m/s, or kW/m if(write_sf == itrue)then if( hlm_masterproc == itrue ) write(fates_log(),*) 'fire_intensity',currentPatch%fi,W,currentPatch%ROS_front @@ -905,6 +1036,270 @@ subroutine area_burnt_intensity ( currentSite, bc_in ) end subroutine area_burnt_intensity + !***************************************************************** + subroutine active_crown_fire ( currentSite, canopy_fuel_load, ROS_torch, & + lb, heat_per_area, passive_crown_FI) + !***************************************************************** + + !evaluates if there will be an active crown fire based on canopy fuel and rate of spread + !returns final rate of spread and fire intensity in patch with added fuel from active crown fire. + !currentCohort%fraction_crown_burned is the proportion of crown affected by fire + + use SFParamsMod, only : SF_val_miner_total, SF_val_part_dens, SF_val_miner_damp, & + SF_val_fuel_energy, SF_val_drying_ratio + + + type(ed_site_type), intent(in), target :: currentSite + + type(ed_patch_type) , pointer :: currentPatch + type(ed_cohort_type), pointer :: currentCohort + + ! ARGUMENTS + real(r8), intent(in) :: ROS_torch ! ROS for crown torch initation (m/min) + real(r8), intent(in) :: canopy_fuel_load ! available canopy fuel load in patch (kg biomass) + real(r8), intent(in) :: lb !length to breadth ratio of fire ellipse (unitless) + real(r8), intent(in) :: heat_per_area ! heat release per unit area (kJ/m2) for surface fuel + real(r8), intent(in) :: passive_crown_FI ! fire intensity for ignition of passive canopy fuel (kW/m) + + ! Active crown Rothermel fire spread model parameters using FM 10 + real(r8) beta,beta_op ! weighted average of packing ratio (unitless) + real(r8) ir ! reaction intensity (kJ/m2/min) + real(r8) xi,eps,phi_wind ! all are unitless + real(r8) q_ig ! heat of pre-ignition (kJ/kg) + real(r8) reaction_v_opt,reaction_v_max !reaction velocity (per min)!optimum and maximum + real(r8) moist_damp,mw_weight ! moisture dampening coefficient and ratio fuel moisture to extinction + real(r8) beta_ratio ! ratio of beta/beta_op + real(r8) a_beta ! dummy variable for product of a* beta_ratio for react_v_opt equation + real(r8) a,b,c,e ! function of fuel sav + real(r8) total_fuel ! total fuel (kg biomass/m2) + real(r8) net_fuel ! net fuel (kg biomass/m2) without minerals + real(r8) fuel_depth ! fuel depth (m) + real(r8) fuel_bd ! fuel bulk density (kg biomass/m3) + real(r8) fuel_sav ! fuels average sav + real(r8) fuel_eff_moist ! fuels effective moisture + real(r8) fuel_moist1hr ! moisture 1 hour fuels + real(r8) fuel_moist10hr ! moisture 10 hour fuels + real(r8) fuel_moist100hr ! moisture 100 hour fuels + real(r8) fuel_moistlive ! moisture live fuels + real(r8) SAV_1hr ! surface area to volume 1 hour fuels (twigs) + real(r8) SAV_10hr ! surface area to volume 10 hour fuels (small branches) + real(r8) SAV_100hr ! surface area to volume 100 hour fuels (large branches) + real(r8) SAV_live ! surface area to volume live fuels + real(r8) midflame_wind ! 40% of open wind speed, Scott & Reinhardt 2001 + real(r8) db ! distance fire has traveld backward (m) + real(r8) df ! distance fire has travelled forward (m) + real(r8) AB ! daily area burnt (m2 per km2) + real(r8) size_of_fire ! in m2 + real(r8) ROS_active ! actual rate of spread (m/min) using FM 10 fuels + real(r8) ROS_active_min ! minimum rate of spread to ignite active crown fire + real(r8) phi_wind_ROS_SA ! phi_wind for ROS_active_min, use to find open wind for ROS_SA + real(r8) wind_ROS_SA ! open windspeed for ROS surface fire where ROS_SA = ROS_active_min + real(r8) ROS_SA ! rate of spread for surface fire with wind_ROS_SA + real(r8) canopy_frac_burnt ! fraction of canopy fuels consumed (0, surface fire to 1,active crown fire) + real(r8) ROS_final ! final rate of spread for combined surface and canopy spread (m/min) + real(r8) FI_final ! final fireline intensity (kW/m or kJ/m/sec) with canopy consumption + + real(r8),parameter :: q_dry = 581.0_r8 !heat of pre-ignition of dry fuels (kJ/kg) + ! fuel loading, MEF, and depth from Anderson 1982 Aids to determining fuel models for fire behavior + ! SAV values from BEHAVE model Burgan & Rothermel 1984) + real(r8),parameter :: fuel_1hr = 3.01_r8 ! FM 10 1-hr fuel loading (US tons/acre) + real(r8),parameter :: fuel_10hr = 2.0_r8 ! FM 10 10-hr fuel loading (US tons/acre) + real(r8),parameter :: fuel_100hr = 5.01_r8 ! FM 10 100-hr fuel loading (US tons/acre) + real(r8),parameter :: fuel_live = 2.0_r8 ! FM 10 live fuel loading (US tons/acre) + real(r8),parameter :: fuel_mef = 0.25_r8 ! FM 10 moisture of extinction (volumetric) + real(r8),parameter :: fuel_depth_ft= 1.0_r8 ! FM 10 fuel depth (ft) + real(r8),parameter :: sav_1hr_ft = 2000.0_r8 ! FM 10 1-hr SAV (ft2/ft3) + real(r8),parameter :: sav_10hr_ft = 109.0_r8 ! FM 10 10-hr SAV (ft2/ft3) + real(r8),parameter :: sav_100hr_ft = 30.0_r8 ! FM 10 100-hr SAV (ft2/ft3) + real(r8),parameter :: sav_live_ft = 1650.0_r8 ! FM 10 live SAV (ft2/ft3) + real(r8),parameter :: tonnes_acre_to_kg_m2 = 0.2241701 ! convert tons/acre to kg/m2 + real(r8),parameter :: sqft_cubicft_to_sqm_cubicm = 0.03280844 !convert ft2/ft3 to m2/m3 + real(r8),parameter :: canopy_ignite_energy = 18000_r8 ! heat yield for canopy fuels (kJ/kg) + real(r8),parameter :: critical_mass_flow_rate = 0.05_r8 ! critical mass flow rate (kg/m2/sec)for crown fire + real(r8),parameter :: km2_to_m2 = 1000000.0_r8 ! area conversion for square km to square m + + integer :: passive_canopy_fuel_flg ! flag if canopy fuel true for vertical spread + + + currentPatch => currentSite%oldest_patch + + !! check to see if active_crown_fire is enabled + + do while(associated(currentPatch)) + + if (currentPatch%fire == 1) then + passive_canopy_fuel_flg = 0 !does patch have canopy fuels for vertical spread? + ROS_active = 0.0_r8 + + ! check initiation of passive crown fire + if (currentPatch%FI >= passive_crown_FI) then + passive_canopy_fuel_flg = 1 !enough passive canopy fuels for vertical spread + + ! Calculate rate of spread using FM 10 as in Rothermel 1977 + ! fuel characteristics + total_fuel = (fuel_1hr + fuel_10hr + fuel_100hr + fuel_live) * tonnes_acre_to_kg_m2 + + SAV_1hr = sav_1hr_ft * sqft_cubicft_to_sqm_cubicm + SAV_10hr = sav_10hr_ft * sqft_cubicft_to_sqm_cubicm + SAV_100hr = sav_100hr_ft * sqft_cubicft_to_sqm_cubicm + SAV_live = sav_live_ft * sqft_cubicft_to_sqm_cubicm + + fuel_moist1hr = exp(-1.0_r8 * ((SAV_1hr/SF_val_drying_ratio) * currentSite%acc_NI)) + fuel_moist10hr = exp(-1.0_r8 * ((SAV_10hr/SF_val_drying_ratio) * currentSite%acc_NI)) + fuel_moist100hr = exp(-1.0_r8 * ((SAV_100hr/SF_val_drying_ratio) * currentSite%acc_NI)) + fuel_moistlive = exp(-1.0_r8 * ((SAV_live/SF_val_drying_ratio) * currentSite%acc_NI)) + + fuel_depth = fuel_depth_ft *0.3048 !convert to meters + fuel_bd = total_fuel/fuel_depth + + fuel_sav = SAV_1hr *(fuel_1hr/total_fuel) + SAV_10hr*(fuel_10hr/total_fuel) + & + SAV_100hr*(fuel_100hr/total_fuel) + SAV_live*(fuel_live/total_fuel) + + fuel_eff_moist = fuel_moist1hr *(fuel_1hr/total_fuel) + fuel_moist10hr*(fuel_10hr/total_fuel) + & + fuel_moist100hr*(fuel_100hr/total_fuel) + fuel_moistlive*(fuel_live/total_fuel) + + ! remove mineral content from net fuel load + net_fuel = total_fuel * (1.0_r8 - SF_val_miner_total) !net of minerals + + ! ---start spreading--- + !beta = packing ratio (unitless) + beta = fuel_bd / SF_val_part_dens + beta_op = 0.200395_r8 *(fuel_sav**(-0.8189_r8)) + beta_ratio = beta/beta_op + + ! -- heat of pre-ignition -- + q_ig = q_dry + 2594.0 * fuel_eff_moist + + ! ---effective heating number--- + ! Eq A3 in Thonicke et al. 2010. + eps = exp(-4.528_r8 / fuel_sav) + ! Eq A7 in Thonicke et al. 2010 per Eq 49, Rothermel 1972 + b = 0.15988_r8 * (fuel_sav**0.54_r8) + ! Eq A8 in Thonicke et al. 2010 per Eq 48, Rothermel 1972 + c = 7.47_r8 * (exp(-0.8711_r8 * (fuel_sav**0.55_r8))) + ! Eq A9 in Thonicke et al. 2010. (typo in Eq A9, using coefficient Eq 50, Rothermel 1972) + e = 0.715_r8 * (exp(-0.01094_r8 * fuel_sav)) + + midflame_wind = currentSite%wind *0.40_r8 !Scott & Reinhardt 2001 40% open wind speed + + ! Eq A5 in Thonicke et al. 2010 + ! convert current_wspeed (wind at elev relevant to fire) from m/min to ft/min for Rothermel ROS eqn + phi_wind = c * ((3.281_r8*midflame_wind)**b)*(beta_ratio**(-e)) !unitless + + ! ---propagating flux = xi (unitless) + ! Eq A2 in Thonicke et al.2010 and Eq 42 Rothermel 1972 + xi = (exp((0.792_r8 + 3.7597_r8 * (fuel_sav**0.5_r8)) * (beta+0.1_r8))) / & + (192_r8+7.9095_r8 * fuel_sav) + + ! ---reaction intensity---- + ! Eq in table A1 Thonicke et al. 2010. + a = 8.9033_r8 * (fuel_sav**(-0.7913_r8)) + a_beta = exp(a*(1.0_r8-beta_ratio)) !dummy variable for reaction_v_opt equation + + ! Eq in table A1 Thonicke et al. 2010. + ! reaction_v_max and reaction_v_opt = reaction velocity in units of per min + ! reaction_v_max = Eq 36 in Rothermel 1972 and Fig 12 + reaction_v_max = 1.0_r8 / (0.0591_r8 + 2.926_r8* (fuel_sav**(-1.5_r8))) + ! reaction_v_opt = Eq 38 in Rothermel 1972 and Fig 11 + reaction_v_opt = reaction_v_max*(beta_ratio**a)*a_beta + + ! mw_weight = relative fuel moisture/fuel moisture of extinction + mw_weight = fuel_eff_moist/fuel_mef + + ! Eq in table A1 Thonicke et al. 2010. (unitless) + moist_damp = max(0.0_r8,(1.0_r8 - (2.59_r8 * mw_weight) + (5.11_r8 * (mw_weight**2.0_r8)) - & + (3.52_r8*(mw_weight**3.0_r8)))) + + ! ir = reaction intenisty in kJ/m2/min + ! sum_fuel as kgBiomass/m2 for ir calculation + ir = reaction_v_opt*(net_fuel)*SF_val_fuel_energy*moist_damp*SF_val_miner_damp + + ! actual ROS (m/min) for FM 10 fuels for open windspeed, Eq 8 Scott & Reinhardt 2001 + ROS_active = 3.34*((ir*xi*(1.0_r8+phi_wind)) / (fuel_bd * eps * q_ig)) + + ! critical min rate of spread (m/min) for active crowning + ROS_active_min = (critical_mass_flow_rate / fuel_bd) * 60.0 + + ! check threshold intensity and rate of spread + if (currentPatch%FI >= passive_crown_FI .and. ROS_active >= ROS_active_min) then + currentPatch%active_crown_fire_flg = 1 ! active crown fire ignited + !ROS_final = ROS_surface+CFB(ROS_active - ROS_surface), Eq 21 Scott & Reinhardt 2001 + !with active crown fire CFB (canopy fraction burned) = 100% + canopy_frac_burnt = 1.0_r8 + ROS_final = currentPatch%ROS_front + canopy_frac_burnt*(ROS_active-currentPatch%ROS_front) + + else + currentPatch%active_crown_fire_flg = 0 ! only passive crown fire with partial crown burnt + ! calculate canopy fraction burnt, Eq 28 Scott & Reinhardt App A + ! using wind at which ROS_active = ROS_active_min + ! solve for phi_wind associated with ROS_active_min + phi_wind_ROS_SA = ((ROS_active_min*fuel_bd*eps*q_ig)/(3.34*ir*xi))-1.0 + ! solve for open wind for that phi_wind + wind_ROS_SA = log(b)*(phi_wind_ROS_SA/(c*beta_ratio**(-e)))/log(b)*(3.28*0.4) + ! use this phi_wind for surface ROS + ROS_SA = (ir*xi*(1.0_r8+wind_ROS_SA)) / (fuel_bd*eps*q_ig) + + ! canopy fraction burnt, Eq 28 Scott & Reinhardt Appendix A + canopy_frac_burnt = (min(1.0_r8, ((currentPatch%ROS_front - ROS_active_min) & + /(ROS_SA - ROS_active_min)))) + !ROS_final = ROS_surface+CFB(ROS_active - ROS_surface), Eq 21 Scott & Reinhardt 2001 + ROS_final = currentPatch%ROS_front + canopy_frac_burnt*(ROS_active-currentPatch%ROS_front) + + endif !check intensity & ROS for active crown fire thresholds + + ! recalculate area burned with new ROS_front value from ROS_final + ! ---- re-calculate length of major axis for df using new ROS_front value from ROS final--- + db = currentPatch%ROS_back * currentPatch%FD !(m) + df = ROS_final * currentPatch%FD !(m) update with ROS final + + ! update ROS_front with ROS_final for output variable + currentPatch%ROS_front = ROS_final + + ! --- calculate updated area burnt using df from ROS final--- + if(lb > 0.0_r8) then + + ! Eq 1 in Thonicke et al. 2010 + ! To Do: Connect here with the Li & Levis GDP fire suppression algorithm. + ! Eq 16 in arora and boer model JGR 2005 + ! AB = AB *3.0_r8 + + !size of fire = Eq 14 Arora and Boer JGR 2005 (area of an ellipse) + size_of_fire = ((pi_const/(4.0_r8*lb))*((df+db)**2.0_r8)) + + ! AB = daily area burnt = size fires in m2 * num ignitions per day per km2 * prob ignition starts fire + ! AB = m2 per km2 per day + ! the denominator in the units of currentSite%NF is total gridcell area, but since we assume that ignitions + ! are equally probable across patches, currentSite%NF is equivalently per area of a given patch + ! thus AB has units of m2 burned area per km2 patch area per day + AB = size_of_fire * currentSite%NF * currentSite%FDI + + ! frac_burnt + ! just a unit conversion from AB, to become area burned per area patch per day, + ! or just the fraction of the patch burned on that day + currentPatch%frac_burnt = (min(0.99_r8, AB / km2_to_m2)) + + if(write_SF == itrue)then + if ( hlm_masterproc == itrue ) write(fates_log(),*) 'frac_burnt',currentPatch%frac_burnt + endif + + else + currentPatch%frac_burnt = 0.0_r8 + endif ! lb + + !final fireline intensity (kJ/m/sec or kW/m), Eq 22 Scott & Reinhardt 2001 + FI_final = ((heat_per_area + (canopy_fuel_load*canopy_ignite_energy*canopy_frac_burnt))& + *currentPatch%ROS_front)/60.0 + ! update patch FI to adjust according to potential canopy fuel consumed (passive and active) + currentPatch%FI = FI_final + + endif !check if passive crown fire? + endif !fire? + + currentPatch => currentPatch%younger; + + enddo !end patch loop + + end subroutine active_crown_fire !***************************************************************** @@ -968,6 +1363,7 @@ subroutine crown_scorching ( currentSite ) end subroutine crown_scorching + !***************************************************************** subroutine crown_damage ( currentSite ) !***************************************************************** @@ -975,162 +1371,21 @@ subroutine crown_damage ( currentSite ) !returns the updated currentCohort%fraction_crown_burned for each tree cohort within each patch. !currentCohort%fraction_crown_burned is the proportion of crown affected by fire - use SFParamsMod, only : SF_VAL_CWD_FRAC - type(ed_site_type), intent(in), target :: currentSite type(ed_patch_type) , pointer :: currentPatch type(ed_cohort_type), pointer :: currentCohort - real(r8), parameter :: low_heat_of_combustion = 12700.0_r8 ! [kJ/kg] - real(r8), parameter :: critical_mass_flow_rate = 0.05_r8 ! [kg/m2/s] value for conifer forests; if available for other vegetation, move to the params file? - real(r8) :: active_crown_FI ! critical fire intensity for active crown fire ignition (kW/m) - real(r8) :: ignite_active_crown ! ratio for ignition of active crown fire,EQ 14b Bessie & Johnson 1995 real(r8) :: crown_depth ! depth of crown (m) - real(r8) :: height_cbb ! clear branch bole height or crown base height (m) - real(r8) :: max_height ! max cohort on patch (m) -! real(r8) :: passive_crown_FI ! fire intensity for ignition from passive canopy fuel (kW/m), EQ 8 -! real(r8) :: ignite_passive_crown ! ratio for ignition from passive canopy fuel,EQ 14 Bessie & Johnson 1995 - real(r8) :: tree_sapw_struct_c ! above-ground tree struct and sap biomass in cohort (kgC) - real(r8) :: leaf_c ! leaf carbon (kgC) - real(r8) :: sapw_c ! sapwood carbon (kgC) - real(r8) :: struct_c ! structure carbon (kgC) - real(r8) :: twig_sapw_struct_c ! above-ground twig sap and struct in cohort (kgC) - real(r8) :: crown_fuel_c ! biomass of 1 hr fuels (leaves,twigs) in cohort (kg C) - real(r8) :: crown_fuel_biomass ! biomass of crown fuel in cohort (kg biomass) - real(r8) :: crown_fuel_per_m ! crown fuel per 1m section in cohort - real(r8) :: canopy_bulk_density ! density of canopy fuel on patch - real(r8) :: height_base_canopy ! lowest height of fuels to carry fire in crown - integer :: ih ! counter - integer :: passive_canopy_fuel_flg ! flag if canopy fuel true for vertical spread - - real, dimension(70):: biom_matrix ! matrix to track biomass from bottom to 70m - real(r8),parameter :: min_density_canopy_fuel = 0.011_r8 !min canopy fuel density (kg/m3) sufficient to - !propogate fire vertically through canopy - !Scott and Reinhardt 2001 RMRS-RP-29 - real(r8),parameter :: crown_ignite_energy = 3060_r8 !crown ignition energy (kJ/kg) Van Wagner 1977 + real(r8) :: height_cbb ! clear branch bole height or crown base height (m) for cohort currentPatch => currentSite%oldest_patch do while(associated(currentPatch)) !zero Patch level variables -! passive_crown_FI = 0.0_r8 -! ignite_passive_crown = 0.0_r8 - biom_matrix = 0.0_r8 - canopy_bulk_density = 0.0_r8 - max_height = 0.0_r8 - height_base_canopy = 0.0_r8 if (currentPatch%fire == 1) then - currentCohort=>currentPatch%tallest - do while(associated(currentCohort)) - - !zero cohort level variables - tree_sapw_struct_c = 0.0_r8 - leaf_c = 0.0_r8 - sapw_c = 0.0_r8 - struct_c = 0.0_r8 - twig_sapw_struct_c = 0.0_r8 - crown_fuel_c = 0.0_r8 - crown_fuel_biomass = 0.0_r8 - crown_fuel_per_m = 0.0_r8 - - ! Calculate crown 1hr fuel biomass (leaf, twig sapwood, twig structural biomass) - if ( int(prt_params%woody(currentCohort%pft)) == itrue) then !trees - - call CrownDepth(currentCohort%hite,currentCohort%pft,crown_depth) - height_cbb = currentCohort%hite - crown_depth - - !find patch max height for stand canopy fuel - if (currentCohort%hite > max_height) then - max_height = currentCohort%hite - endif - - leaf_c = currentCohort%prt%GetState(leaf_organ, all_carbon_elements) - sapw_c = currentCohort%prt%GetState(sapw_organ, all_carbon_elements) - struct_c = currentCohort%prt%GetState(struct_organ, all_carbon_elements) - - tree_sapw_struct_c = currentCohort%n * & - (prt_params%allom_agb_frac(currentCohort%pft)*(sapw_c + struct_c)) - - twig_sapw_struct_c = tree_sapw_struct_c * SF_VAL_CWD_frac(1) !only 1hr fuel - - crown_fuel_c = (currentCohort%n * leaf_c) + twig_sapw_struct_c !crown fuel (kgC) - - crown_fuel_biomass = crown_fuel_c / 0.45_r8 ! crown fuel (kg biomass) - - crown_fuel_per_m = crown_fuel_biomass / crown_depth ! kg biomass per m - - !sort crown fuel into bins from bottom to top of crown - !accumulate across cohorts to find density within canopy 1m sections - do ih = int(height_cbb), int(currentCohort%hite) - biom_matrix(ih) = biom_matrix(ih) + crown_fuel_per_m - end do - - endif !trees only - - currentCohort => currentCohort%shorter; - - enddo !end cohort loop - - biom_matrix(:) = biom_matrix(:) / currentPatch%area !kg biomass/m3 - - !loop from 1m to 70m to find bin with total density = 0.011 kg/m3 - !min canopy fuel density to propogate fire vertically in canopy across patch - do ih=1,70 - if (biom_matrix(ih) > min_density_canopy_fuel) then - height_base_canopy = float(ih) - exit - end if - end do - - !canopy_bulk_denisty (kg/m3) for Patch - canopy_bulk_density = sum(biom_matrix) / (max_height - height_base_canopy) - - ! Note: crown_ignition_energy to be calculated based on PFT foliar moisture content from FATES-Hydro - ! or create foliar_moisture based on BTRAN - ! Use foliar_moisture(currentCohort%pft) and compute weighted PFT average with EQ3 Van Wagner 1977 - ! in place of crown_ignite_energy parameter - - ! EQ 3 Van Wagner 1977 - ! h = crown_ignite_energy (kJ/kg), m = foliar moisture content based on dry fuel (%) - ! crown_ignite_energy = 460 + 26 * m - - ! Crown fuel ignition potential, EQ 8 Bessie and Johnson 1995, EQ 4 Van Wagner 1977 - ! FI = (Czh)**3/2 where z=canopy base height,h=heat of crown ignite energy, FI=fire intensity - ! 0.01 = C from Van Wagner 1977 EQ4 for canopy base height 6m, 100% FMC, and FI 2500kW/m -! passive_crown_FI = (0.01_r8 * height_base_canopy * crown_ignite_energy)**1.5_r8 - -! passive_canopy_fuel_flg = 0 !does patch have canopy fuels for vertical spread? - - ! Initiation of passive crown fire, EQ 14a Bessie and Johnson 1995 - ! Are the canopy fuels in the stand large enough to support vertical spread of fire? -! ignite_passive_crown = currentPatch%FI/passive_crown_FI - -! if (ignite_passive_crown >= 1.0_r8) then -! passive_canopy_fuel_flg = 1 !enough passive canopy fuels for vertical spread -! endif - - !evaluate active crown fire conditions - ! Critical intensity for active crowning (kW/m) - ! EQ 12 Bessie and Johnson 1995 - ! Fuels / 0.45 to get biomass. Also dividing - ! critical_mass_flow_rate by 3.34, an empirical - ! constant in Bessie & Johnson 1995 - active_crown_FI = critical_mass_flow_rate * & - low_heat_of_combustion * currentPatch%sum_fuel / & - (0.45_r8 * 3.34_r8 * canopy_bulk_density) - - ! Initiate active crown fire? - ! EQ 14b Bessie & Johnson 1995 - ignite_active_crown = currentPatch%FI / active_crown_FI - - if (ignite_active_crown >= 1.0_r8 .and. & - EDPftvarcon_inst%active_crown_fire(currentCohort%pft) > 0.0_r8) then - currentPatch%active_crown_fire_flg = 1 ! active crown fire ignited - end if - currentCohort=>currentPatch%tallest do while(associated(currentCohort)) @@ -1149,8 +1404,7 @@ subroutine crown_damage ( currentSite ) currentPatch%Scorch_ht(currentCohort%pft) >= height_cbb) then if (currentPatch%active_crown_fire_flg == 0) then currentCohort%fraction_crown_burned = min(1.0_r8, & - ((currentPatch%Scorch_ht(currentCohort%pft) - & - height_cbb) / crown_depth)) + ((currentPatch%Scorch_ht(currentCohort%pft) - height_cbb) / crown_depth)) else ! active crown fire occurring currentCohort%fraction_crown_burned = 1.0_r8 end if From a93375e6cf1f6e75e0572249292ac2998b888be4 Mon Sep 17 00:00:00 2001 From: Jacquelyn Shuman Date: Mon, 18 Apr 2022 12:35:30 -0600 Subject: [PATCH 77/93] Fix solve for phi wind in active fire Fix mistake in equation to solve for phi_wind as part of steps towards calculation of canopy fraction burnt. --- fire/SFMainMod.F90 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 30a3e9e644..977b4bf5b0 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -1233,11 +1233,12 @@ subroutine active_crown_fire ( currentSite, canopy_fuel_load, ROS_torch, & ! calculate canopy fraction burnt, Eq 28 Scott & Reinhardt App A ! using wind at which ROS_active = ROS_active_min ! solve for phi_wind associated with ROS_active_min - phi_wind_ROS_SA = ((ROS_active_min*fuel_bd*eps*q_ig)/(3.34*ir*xi))-1.0 + phi_wind_ROS_SA = (ROS_active_min * fuel_bd * eps * q_ig - 3.34 * ir * xi) & + /(3.34 * ir * xi) ! solve for open wind for that phi_wind wind_ROS_SA = log(b)*(phi_wind_ROS_SA/(c*beta_ratio**(-e)))/log(b)*(3.28*0.4) - ! use this phi_wind for surface ROS - ROS_SA = (ir*xi*(1.0_r8+wind_ROS_SA)) / (fuel_bd*eps*q_ig) + ! use this phi_wind for potential surface ROS for canopy_frac_burnt calculation + ROS_SA = (ir * xi * (1.0_r8 + wind_ROS_SA)) / (fuel_bd * eps * q_ig) ! canopy fraction burnt, Eq 28 Scott & Reinhardt Appendix A canopy_frac_burnt = (min(1.0_r8, ((currentPatch%ROS_front - ROS_active_min) & From 92f7929921c22d2b000092e18269d79dcdabab40 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 19 Apr 2022 14:39:08 -0600 Subject: [PATCH 78/93] Revert to the scalar version of fates_fire_active_crown_fire To be used as on/off switch. Rm the version that varies by pft. --- main/EDParamsMod.F90 | 11 +++++++++++ main/EDPftvarcon.F90 | 10 ---------- parameter_files/fates_params_default.cdl | 10 +++++----- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/main/EDParamsMod.F90 b/main/EDParamsMod.F90 index 64dfab6c0f..c805e9f72d 100644 --- a/main/EDParamsMod.F90 +++ b/main/EDParamsMod.F90 @@ -62,6 +62,9 @@ module EDParamsMod real(r8),protected, public :: ED_val_canopy_closure_thresh ! site-level canopy closure point where trees take on forest (narrow) versus savannah (wide) crown allometry integer,protected, public :: stomatal_model !switch for choosing between stomatal conductance models, 1 for Ball-Berry, 2 for Medlyn + logical,protected, public :: active_crown_fire ! flag, 1=active crown fire 0=no active crown fire + character(len=param_string_length),parameter :: fates_name_active_crown_fire = "fates_fire_active_crown_fire" + real(r8), protected, public :: cg_strikes ! fraction of cloud to ground lightning strikes (0-1) character(len=param_string_length),parameter :: fates_name_cg_strikes="fates_fire_cg_strikes" @@ -448,6 +451,9 @@ subroutine FatesRegisterParams(fates_params) call fates_params%RegisterParameter(name=ED_name_history_height_bin_edges, dimension_shape=dimension_shape_1d, & dimension_names=dim_names_height) + call fates_params%RegisterParameter(name=fates_name_active_crown_fire, dimension_shape=dimension_shape_scalar, & + dimension_names=dim_names_scalar) + call fates_params%RegisterParameter(name=fates_name_cg_strikes, dimension_shape=dimension_shape_scalar, & dimension_names=dim_names_scalar) @@ -614,6 +620,10 @@ subroutine FatesReceiveParams(fates_params) call fates_params%RetreiveParameter(name=name_dev_arbitrary, & data=dev_arbitrary) + call fates_params%RetreiveParameter(name=fates_name_active_crown_fire, & + data=tmpreal) + active_crown_fire = (abs(tmpreal-1.0_r8)currentPatch%tallest do while(associated(currentCohort)) @@ -491,7 +492,7 @@ subroutine characteristics_of_crown ( currentSite, canopy_fuel_load, passive_cr ! passive_crown_FI = min fire intensity to ignite canopy fuel (kW/m or kJ/m/s) passive_crown_FI = (0.01_r8 * height_base_canopy * crown_ignite_energy)**1.5_r8 - endif ! fire? +! endif !active crown fire? currentPatch => currentPatch%younger; @@ -740,10 +741,11 @@ subroutine rate_of_spread ( currentSite, ROS_torch, passive_crown_FI, heat_per_a heat_per_area = ir * time_r ! calculate torching index based on wind speed and crown fuels - ! ROS for crown torch initation (m/min), Eq 18 Scott & Reinhardt 2001 - ROS_torch = (1.0 / 54.683 * wind_reduce)* & - ((((60.0*passive_crown_FI*currentPatch%fuel_bulkd*eps*q_ig)/heat_per_area*ir*xi)-1.0) & - / (c*beta_ratio)**-e)**1/b + ! ROS for crown torch initation (m/min), Eq 18 Scott & Reinhardt 2001 + ! TODO slevis: Are we missing a -phi_s after the -1? + ROS_torch = 1._r8 / (54.683_r8 * wind_reduce) * & + ((60._r8 * passive_crown_FI * currentPatch%fuel_bulkd * eps * q_ig / & + (heat_per_area * ir * xi) - 1._r8) / (c * beta_ratio**-e))**(1._r8 / b) endif ! Eq 10 in Thonicke et al. 2010 ! backward ROS from Can FBP System (1992) in m/min From 00d01ad0dee20cd061370a59aef340ecf9ac2e3c Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 19 Apr 2022 16:43:59 -0600 Subject: [PATCH 80/93] Code correction in do loop --- fire/SFMainMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 71644e1d4f..d81dd90d1f 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -448,7 +448,7 @@ subroutine characteristics_of_crown ( currentSite, canopy_fuel_load, passive_cr !sort crown fuel into bins from bottom to top of crown !accumulate across cohorts to find density within canopy 1m sections - do ih = int(height_cbb), int(currentCohort%hite) + do ih = max(1, nint(height_cbb)), max(1, nint(currentCohort%hite)) biom_matrix(ih) = biom_matrix(ih) + crown_fuel_per_m end do From ac0d7e038ca4b7312f123d8a4ef5bf99e112e181 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Fri, 22 Apr 2022 11:41:43 -0600 Subject: [PATCH 81/93] Updates toward getting the code to run --- fire/SFMainMod.F90 | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index d81dd90d1f..9ae3afe949 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -404,6 +404,7 @@ subroutine characteristics_of_crown ( currentSite, canopy_fuel_load, passive_cr canopy_fuel_load = 0.0_r8 passive_crown_FI = 0.0_r8 max_height = 0._r8 + biom_matrix(:) = 0._r8 ! if (currentPatch%active_crown_fire == 1) then @@ -473,8 +474,12 @@ subroutine characteristics_of_crown ( currentSite, canopy_fuel_load, passive_cr end if end do - !canopy_bulk_denisty (kg/m3) for Patch - canopy_bulk_density = sum(biom_matrix) / (max_height - height_base_canopy) + !canopy_bulk_denisty (kg/m3) for Patch TODO slevis: var not used + if (max_height - height_base_canopy > 0._r8) then + canopy_bulk_density = sum(biom_matrix) / (max_height - height_base_canopy) + else + canopy_bulk_density = 0._r8 + end if ! Note: crown_ignition_energy to be calculated based on PFT foliar moisture content from FATES-Hydro ! or create foliar moisture % based on BTRAN @@ -620,6 +625,7 @@ subroutine rate_of_spread ( currentSite, ROS_torch, passive_crown_FI, heat_per_a real(r8) a_beta ! dummy variable for product of a* beta_ratio for react_v_opt equation real(r8) a,b,c,e ! function of fuel sav real(r8) time_r ! residence time (min) + real(r8) temp1, temp2 real(r8),parameter :: q_dry = 581.0_r8 !heat of pre-ignition of dry fuels (kJ/kg) real(r8),parameter :: wind_reduce = 0.2_r8 !wind reduction factor (%) @@ -726,7 +732,10 @@ subroutine rate_of_spread ( currentSite, ROS_torch, passive_crown_FI, heat_per_a ! write(fates_log(),*) 'ir',gamma_aptr,moist_damp,SF_val_fuel_energy,SF_val_miner_damp - if (((currentPatch%fuel_bulkd) <= 0.0_r8).or.(eps <= 0.0_r8).or.(q_ig <= 0.0_r8)) then + if (currentPatch%fuel_bulkd <= 0.0_r8 .or. eps <= 0.0_r8 .or. & + q_ig <= 0.0_r8 .or. ir <= 0.0_r8 .or. & + currentPatch%fuel_sav <= 0.0_r8 .or. xi <= 0.0_r8 .or. & + c <= 0.0_r8 .or. beta_ratio <= 0.0_r8 .or. b <= 0.0_r8) then currentPatch%ROS_front = 0.0_r8 ROS_torch = 0.0_r8 else ! Eq 9. Thonicke et al. 2010. @@ -737,15 +746,20 @@ subroutine rate_of_spread ( currentSite, ROS_torch, passive_crown_FI, heat_per_a ! calculate heat release per unit area (HPA)(kJ/m2), Eq 2 Scott & Reinhardt 2001 ! and residence time (min), Eq 3 Scott & Reinhardt 2001 - time_r = 12.595 / currentPatch%fuel_sav + time_r = 12.595_r8 / currentPatch%fuel_sav heat_per_area = ir * time_r ! calculate torching index based on wind speed and crown fuels ! ROS for crown torch initation (m/min), Eq 18 Scott & Reinhardt 2001 - ! TODO slevis: Are we missing a -phi_s after the -1? - ROS_torch = 1._r8 / (54.683_r8 * wind_reduce) * & - ((60._r8 * passive_crown_FI * currentPatch%fuel_bulkd * eps * q_ig / & - (heat_per_area * ir * xi) - 1._r8) / (c * beta_ratio**-e))**(1._r8 / b) + ! temp1 requires max(0... to avoid raising a negative value to a + ! fractional temp2 power. + ! TODO slevis: omitting "- phi_s" after the -1 bc phi_s = 0 for now. + ! @jkshuman recommended naming it slope_factor. + temp1 = max(0._r8, (60._r8 * passive_crown_FI * & + currentPatch%fuel_bulkd * eps * q_ig / (heat_per_area * ir * xi) - 1._r8) / & + (c * beta_ratio**-e)) + temp2 = 1._r8 / b + ROS_torch = temp1**temp2 / (54.683_r8 * wind_reduce) endif ! Eq 10 in Thonicke et al. 2010 ! backward ROS from Can FBP System (1992) in m/min @@ -857,7 +871,6 @@ subroutine area_burnt_intensity ( currentSite, bc_in, lb) !currentPatch%ROS_front forward ROS (m/min) !currentPatch%TFC_ROS total fuel consumed by flaming front (kgC/m2 of burned area) - use FatesInterfaceTypesMod, only : hlm_spitfire_mode ! TODO slevis: redundant? use EDParamsMod, only : ED_val_nignitions use EDParamsMod, only : cg_strikes ! fraction of cloud-to-ground ligtning strikes use FatesConstantsMod, only : years_per_day @@ -1057,7 +1070,7 @@ subroutine active_crown_fire ( currentSite, canopy_fuel_load, ROS_torch, & type(ed_cohort_type), pointer :: currentCohort ! ARGUMENTS - real(r8), intent(in) :: ROS_torch ! ROS for crown torch initation (m/min) + real(r8), intent(in) :: ROS_torch ! ROS for crown torch initation (m/min) TODO slevis: var not used real(r8), intent(in) :: canopy_fuel_load ! available canopy fuel load in patch (kg biomass) real(r8), intent(in) :: lb !length to breadth ratio of fire ellipse (unitless) real(r8), intent(in) :: heat_per_area ! heat release per unit area (kJ/m2) for surface fuel From 4efbcba639a8c8c060594c1cdbc17ed613eac7df Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Fri, 22 Apr 2022 12:43:12 -0600 Subject: [PATCH 82/93] Clean-up in params file --- parameter_files/fates_params_default.cdl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index ebd84b7a6f..c7d1736cf4 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -602,7 +602,7 @@ variables: double fates_eca_plant_escalar ; fates_eca_plant_escalar:units = "" ; fates_eca_plant_escalar:long_name = "scaling factor for plant fine root biomass to calculate nutrient carrier enzyme abundance (ECA)" ; - double fates_fire_active_crown_fire ; + double fates_fire_active_crown_fire ; fates_fire_active_crown_fire:units = "0 or 1" ; fates_fire_active_crown_fire:long_name = "flag, 1=active crown fire 0=no active crown fire" ; double fates_fire_cg_strikes ; @@ -1385,7 +1385,7 @@ data: fates_eca_plant_escalar = 1.25e-05 ; - fates_fire_active_crown_fire = 0 ; + fates_fire_active_crown_fire = 0 ; fates_fire_cg_strikes = 0.2 ; From 3ab4d70d9753f62c70abef4a87acc7f2c9bc3e8d Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Fri, 22 Apr 2022 15:58:13 -0600 Subject: [PATCH 83/93] Adding "if active_crown_fire_switch" to make use of corresp. user choice In the absence of this if statement (before this commit), the code defaulted to active_crown_fire_switch = 1 --- fire/SFMainMod.F90 | 16 +++++++--------- main/EDParamsMod.F90 | 6 +++--- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 9ae3afe949..814ee3c4a7 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -115,6 +115,9 @@ subroutine fire_model( currentSite, bc_in) call fire_danger_index(currentSite, bc_in) call wind_effect(currentSite, bc_in) call characteristics_of_fuel(currentSite) + ! TODO Should canopy_fuel_load and passive_crown_FI be currentPatch% + ! variables to work? If so, don't pass them as arguments. + ! Same may apply to ROS_torch, heat_per_area, lb. call characteristics_of_crown(currentSite, canopy_fuel_load, passive_crown_FI) call rate_of_spread(currentSite, passive_crown_FI, ROS_torch, heat_per_area) call ground_fuel_consumption(currentSite) @@ -396,8 +399,6 @@ subroutine characteristics_of_crown ( currentSite, canopy_fuel_load, passive_cr currentPatch => currentSite%oldest_patch - !! check to see if active_crown_fire is enabled? - do while(associated(currentPatch)) !zero Patch level variables height_base_canopy = 0.0_r8 @@ -406,8 +407,6 @@ subroutine characteristics_of_crown ( currentSite, canopy_fuel_load, passive_cr max_height = 0._r8 biom_matrix(:) = 0._r8 -! if (currentPatch%active_crown_fire == 1) then - currentCohort=>currentPatch%tallest do while(associated(currentCohort)) @@ -497,8 +496,6 @@ subroutine characteristics_of_crown ( currentSite, canopy_fuel_load, passive_cr ! passive_crown_FI = min fire intensity to ignite canopy fuel (kW/m or kJ/m/s) passive_crown_FI = (0.01_r8 * height_base_canopy * crown_ignite_energy)**1.5_r8 -! endif !active crown fire? - currentPatch => currentPatch%younger; enddo !end patch loop @@ -1060,6 +1057,7 @@ subroutine active_crown_fire ( currentSite, canopy_fuel_load, ROS_torch, & !returns final rate of spread and fire intensity in patch with added fuel from active crown fire. !currentCohort%fraction_crown_burned is the proportion of crown affected by fire + use EDParamsMod, only : active_crown_fire_switch use SFParamsMod, only : SF_val_miner_total, SF_val_part_dens, SF_val_miner_damp, & SF_val_fuel_energy, SF_val_drying_ratio @@ -1138,8 +1136,6 @@ subroutine active_crown_fire ( currentSite, canopy_fuel_load, ROS_torch, & currentPatch => currentSite%oldest_patch - !! check to see if active_crown_fire is enabled - do while(associated(currentPatch)) if (currentPatch%fire == 1) then @@ -1236,7 +1232,9 @@ subroutine active_crown_fire ( currentSite, canopy_fuel_load, ROS_torch, & ROS_active_min = (critical_mass_flow_rate / fuel_bd) * 60.0 ! check threshold intensity and rate of spread - if (currentPatch%FI >= passive_crown_FI .and. ROS_active >= ROS_active_min) then + if (active_crown_fire_switch == 1 .and. & + currentPatch%FI >= passive_crown_FI .and. & + ROS_active >= ROS_active_min) then currentPatch%active_crown_fire_flg = 1 ! active crown fire ignited !ROS_final = ROS_surface+CFB(ROS_active - ROS_surface), Eq 21 Scott & Reinhardt 2001 !with active crown fire CFB (canopy fraction burned) = 100% diff --git a/main/EDParamsMod.F90 b/main/EDParamsMod.F90 index c805e9f72d..9c494fbdf3 100644 --- a/main/EDParamsMod.F90 +++ b/main/EDParamsMod.F90 @@ -62,7 +62,7 @@ module EDParamsMod real(r8),protected, public :: ED_val_canopy_closure_thresh ! site-level canopy closure point where trees take on forest (narrow) versus savannah (wide) crown allometry integer,protected, public :: stomatal_model !switch for choosing between stomatal conductance models, 1 for Ball-Berry, 2 for Medlyn - logical,protected, public :: active_crown_fire ! flag, 1=active crown fire 0=no active crown fire + logical,protected, public :: active_crown_fire_switch ! flag, 1=active crown fire 0=no active crown fire character(len=param_string_length),parameter :: fates_name_active_crown_fire = "fates_fire_active_crown_fire" real(r8), protected, public :: cg_strikes ! fraction of cloud to ground lightning strikes (0-1) @@ -622,7 +622,7 @@ subroutine FatesReceiveParams(fates_params) call fates_params%RetreiveParameter(name=fates_name_active_crown_fire, & data=tmpreal) - active_crown_fire = (abs(tmpreal-1.0_r8) Date: Mon, 2 May 2022 17:46:25 -0600 Subject: [PATCH 84/93] Changed 5 variables to currentPatch% variables As far as I can tell these variables need to be currentPatch% variables: canopy_fuel_load passive_crown_FI heat_per_area ros_torch lb --- biogeochem/EDPatchDynamicsMod.F90 | 15 ++++++ fire/SFMainMod.F90 | 85 +++++++++++++------------------ main/EDInitMod.F90 | 5 ++ main/EDTypesMod.F90 | 5 ++ 4 files changed, 60 insertions(+), 50 deletions(-) diff --git a/biogeochem/EDPatchDynamicsMod.F90 b/biogeochem/EDPatchDynamicsMod.F90 index 0236e91f08..ed31ccf42e 100644 --- a/biogeochem/EDPatchDynamicsMod.F90 +++ b/biogeochem/EDPatchDynamicsMod.F90 @@ -2124,6 +2124,11 @@ subroutine create_patch(currentSite, new_patch, age, areap, label,nocomp_pft) new_patch%fabi_sha_z(:,:,:) = 0._r8 new_patch%scorch_ht(:) = 0._r8 new_patch%frac_burnt = 0._r8 + new_patch%canopy_fuel_load = 0._r8 + new_patch%passive_crown_FI = 0._r8 + new_patch%ros_torch = 0._r8 + new_patch%heat_per_area = 0._r8 + new_patch%lb = 0._r8 new_patch%litter_moisture(:) = 0._r8 new_patch%fuel_eff_moist = 0._r8 new_patch%livegrass = 0._r8 @@ -2240,6 +2245,11 @@ subroutine zero_patch(cp_p) currentPatch%ros_back = nan ! backward ros (m/min) currentPatch%scorch_ht(:) = nan ! scorch height of flames on a given PFT currentPatch%frac_burnt = nan ! fraction burnt daily + currentPatch%canopy_fuel_load = nan ! available canopy fuel load in patch (kg biomass) + currentPatch%passive_crown_FI = nan ! fire intensity for ignition of passive canopy fuel (kW/m) + currentPatch%ros_torch = nan ! rate of spread (ROS) for crown torch initiation (m/min) + currentPatch%heat_per_area = nan ! heat release per unit area (kJ/m2) for surface fuel + currentPatch%lb = nan ! length to breadth ratio of fire ellipse (unitless) currentPatch%burnt_frac_litter(:) = nan currentPatch%btran_ft(:) = 0.0_r8 @@ -2659,6 +2669,11 @@ subroutine fuse_2_patches(csite, dp, rp) rp%ros_back = (dp%ros_back*dp%area + rp%ros_back*rp%area) * inv_sum_area rp%scorch_ht(:) = (dp%scorch_ht(:)*dp%area + rp%scorch_ht(:)*rp%area) * inv_sum_area rp%frac_burnt = (dp%frac_burnt*dp%area + rp%frac_burnt*rp%area) * inv_sum_area + rp%canopy_fuel_load = (dp%canopy_fuel_load*dp%area + rp%canopy_fuel_load*rp%area) * inv_sum_area + rp%passive_crown_FI = (dp%passive_crown_FI*dp%area + rp%passive_crown_FI*rp%area) * inv_sum_area + rp%ros_torch = (dp%ros_torch*dp%area + rp%ros_torch*rp%area) * inv_sum_area + rp%heat_per_area = (dp%heat_per_area*dp%area + rp%heat_per_area*rp%area) * inv_sum_area + rp%lb = (dp%lb*dp%area + rp%lb*rp%area) * inv_sum_area rp%burnt_frac_litter(:) = (dp%burnt_frac_litter(:)*dp%area + rp%burnt_frac_litter(:)*rp%area) * inv_sum_area rp%btran_ft(:) = (dp%btran_ft(:)*dp%area + rp%btran_ft(:)*rp%area) * inv_sum_area rp%zstar = (dp%zstar*dp%area + rp%zstar*rp%area) * inv_sum_area diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 814ee3c4a7..40fe7233f1 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -89,12 +89,6 @@ subroutine fire_model( currentSite, bc_in) type (ed_patch_type), pointer :: currentPatch - real(r8) :: canopy_fuel_load ! available canopy fuel load in patch (kg biomass) - real(r8) :: passive_crown_FI ! fire intensity for ignition of passive canopy fuel (kW/m) - real(r8) :: ROS_torch ! ROS for crown torch initation (m/min) - real(r8) :: lb !length to breadth ratio of fire ellipse (unitless) - real(r8) :: heat_per_area ! heat release per unit area (kJ/m2) for surface fuel - !zero fire things currentPatch => currentSite%youngest_patch @@ -115,14 +109,14 @@ subroutine fire_model( currentSite, bc_in) call fire_danger_index(currentSite, bc_in) call wind_effect(currentSite, bc_in) call characteristics_of_fuel(currentSite) - ! TODO Should canopy_fuel_load and passive_crown_FI be currentPatch% - ! variables to work? If so, don't pass them as arguments. - ! Same may apply to ROS_torch, heat_per_area, lb. - call characteristics_of_crown(currentSite, canopy_fuel_load, passive_crown_FI) - call rate_of_spread(currentSite, passive_crown_FI, ROS_torch, heat_per_area) + ! TODO canopy_fuel_load, passive_crown_FI, ROS_torch, heat_per_area, lb + ! look to me as though they should be currentPatch% variables, so I + ! stopped passing them as arguments + call characteristics_of_crown(currentSite) + call rate_of_spread(currentSite) call ground_fuel_consumption(currentSite) - call area_burnt_intensity(currentSite, bc_in, lb) - call active_crown_fire (currentSite,passive_crown_FI,canopy_fuel_load,ROS_torch,heat_per_area,lb) + call area_burnt_intensity(currentSite, bc_in) + call active_crown_fire (currentSite) call crown_scorching(currentSite) call crown_damage(currentSite) call cambial_damage_kill(currentSite) @@ -352,7 +346,7 @@ subroutine characteristics_of_fuel ( currentSite) end subroutine characteristics_of_fuel !**************************************************************** - subroutine characteristics_of_crown ( currentSite, canopy_fuel_load, passive_crown_FI) + subroutine characteristics_of_crown ( currentSite ) !****************************************************************. !returns the live crown fuel characteristics within each patch. @@ -366,8 +360,6 @@ subroutine characteristics_of_crown ( currentSite, canopy_fuel_load, passive_cr type(ed_cohort_type), pointer :: currentCohort ! ARGUMENTS - real(r8), intent(out) :: canopy_fuel_load ! available canopy fuel load in patch (kg biomass) - real(r8), intent(out) :: passive_crown_FI ! min fire intensity to ignite canopy fuel (kW/m) ! LOCAL real(r8) :: crown_depth ! depth of crown (m) @@ -402,8 +394,8 @@ subroutine characteristics_of_crown ( currentSite, canopy_fuel_load, passive_cr do while(associated(currentPatch)) !zero Patch level variables height_base_canopy = 0.0_r8 - canopy_fuel_load = 0.0_r8 - passive_crown_FI = 0.0_r8 + currentPatch%canopy_fuel_load = 0.0_r8 + currentPatch%passive_crown_FI = 0.0_r8 max_height = 0._r8 biom_matrix(:) = 0._r8 @@ -454,7 +446,7 @@ subroutine characteristics_of_crown ( currentSite, canopy_fuel_load, passive_cr !accumulate available canopy fuel for patch (kg biomass) ! use this in CFB (crown fraction burn) calculation and FI final - canopy_fuel_load = canopy_fuel_load + crown_fuel_biomass !canopy fuel in patch + currentPatch%canopy_fuel_load = currentPatch%canopy_fuel_load + crown_fuel_biomass !canopy fuel in patch endif !trees only @@ -494,7 +486,7 @@ subroutine characteristics_of_crown ( currentSite, canopy_fuel_load, passive_cr ! FI = (Czh)**3/2 where z=canopy base height,h=heat of crown ignite energy, FI=fire intensity ! 0.01 = C, empirical constant Van Wagner 1977 Eq 4 for 6m canopy base height, 100% FMC, FI 2500kW/m ! passive_crown_FI = min fire intensity to ignite canopy fuel (kW/m or kJ/m/s) - passive_crown_FI = (0.01_r8 * height_base_canopy * crown_ignite_energy)**1.5_r8 + currentPatch%passive_crown_FI = (0.01_r8 * height_base_canopy * crown_ignite_energy)**1.5_r8 currentPatch => currentPatch%younger; @@ -588,7 +580,7 @@ subroutine wind_effect ( currentSite, bc_in) end subroutine wind_effect !******************************************************************* - subroutine rate_of_spread ( currentSite, ROS_torch, passive_crown_FI, heat_per_area) + subroutine rate_of_spread ( currentSite) !*****************************************************************. !Routine called daily from within ED within a site loop. !Returns the updated currentPatch%ROS_front value for each patch. @@ -605,9 +597,6 @@ subroutine rate_of_spread ( currentSite, ROS_torch, passive_crown_FI, heat_per_a type(ed_patch_type), pointer :: currentPatch ! ARGUMENTS - real(r8), intent(out) :: ROS_torch ! ROS for crown torch initation (m/min) - real(r8), intent(out) :: heat_per_area ! heat release per unit area (kJ/m2) for surface fuel - real(r8), intent(in) :: passive_crown_FI ! min fire intensity to ignite canopy fuel (kW/m or kJ/m/s) ! LOCAL VARIABLES @@ -734,7 +723,7 @@ subroutine rate_of_spread ( currentSite, ROS_torch, passive_crown_FI, heat_per_a currentPatch%fuel_sav <= 0.0_r8 .or. xi <= 0.0_r8 .or. & c <= 0.0_r8 .or. beta_ratio <= 0.0_r8 .or. b <= 0.0_r8) then currentPatch%ROS_front = 0.0_r8 - ROS_torch = 0.0_r8 + currentPatch%ROS_torch = 0.0_r8 else ! Eq 9. Thonicke et al. 2010. ! forward ROS in m/min currentPatch%ROS_front = (ir*xi*(1.0_r8+phi_wind)) / (currentPatch%fuel_bulkd*eps*q_ig) @@ -744,7 +733,7 @@ subroutine rate_of_spread ( currentSite, ROS_torch, passive_crown_FI, heat_per_a ! calculate heat release per unit area (HPA)(kJ/m2), Eq 2 Scott & Reinhardt 2001 ! and residence time (min), Eq 3 Scott & Reinhardt 2001 time_r = 12.595_r8 / currentPatch%fuel_sav - heat_per_area = ir * time_r + currentPatch%heat_per_area = ir * time_r ! calculate torching index based on wind speed and crown fuels ! ROS for crown torch initation (m/min), Eq 18 Scott & Reinhardt 2001 @@ -752,11 +741,11 @@ subroutine rate_of_spread ( currentSite, ROS_torch, passive_crown_FI, heat_per_a ! fractional temp2 power. ! TODO slevis: omitting "- phi_s" after the -1 bc phi_s = 0 for now. ! @jkshuman recommended naming it slope_factor. - temp1 = max(0._r8, (60._r8 * passive_crown_FI * & - currentPatch%fuel_bulkd * eps * q_ig / (heat_per_area * ir * xi) - 1._r8) / & + temp1 = max(0._r8, (60._r8 * currentPatch%passive_crown_FI * & + currentPatch%fuel_bulkd * eps * q_ig / (currentPatch%heat_per_area * ir * xi) - 1._r8) / & (c * beta_ratio**-e)) temp2 = 1._r8 / b - ROS_torch = temp1**temp2 / (54.683_r8 * wind_reduce) + currentPatch%ROS_torch = temp1**temp2 / (54.683_r8 * wind_reduce) endif ! Eq 10 in Thonicke et al. 2010 ! backward ROS from Can FBP System (1992) in m/min @@ -857,7 +846,7 @@ end subroutine ground_fuel_consumption !***************************************************************** - subroutine area_burnt_intensity ( currentSite, bc_in, lb) + subroutine area_burnt_intensity ( currentSite, bc_in) !***************************************************************** !returns the updated currentPatch%FI value for each patch. @@ -879,7 +868,6 @@ subroutine area_burnt_intensity ( currentSite, bc_in, lb) type(bc_in_type), intent(in) :: bc_in ! ARGUMENTS - real(r8), intent(out) :: lb !length to breadth ratio of fire ellipse (unitless) ! LOCAL VARIABLES real(r8) ROS !rate of spread (m/s) @@ -966,15 +954,16 @@ subroutine area_burnt_intensity ( currentSite, bc_in, lb) endif if ((currentPatch%effect_wspeed*m_per_min__to__km_per_hour) < 1._r8) then !16.67m/min = 1km/hr - lb = 1.0_r8 + currentPatch%lb = 1.0_r8 else if (tree_fraction_patch > forest_grassland_lengthtobreadth_threshold) then ! Eq 79 forest fuels (Canadian Forest Fire Behavior Prediction System Ont.Inf.Rep. ST-X-3, 1992) - lb = (1.0_r8 + (8.729_r8 * & - ((1.0_r8 -(exp(-0.03_r8 * m_per_min__to__km_per_hour * currentPatch%effect_wspeed)))**2.155_r8))) + currentPatch%lb = (1.0_r8 + (8.729_r8 * & + ((1.0_r8 -(exp(-0.03_r8 * m_per_min__to__km_per_hour * currentPatch%effect_wspeed)))**2.155_r8))) else ! Eq 80 grass fuels (CFFBPS Ont.Inf.Rep. ST-X-3, 1992, with correction from errata published in ! Inf.Rep. GLC-X-10 (Bottom et al., 2009) because of typo in CFFBPS Ont.Inf.Rep. ST-X-3, 1992) - lb = (1.1_r8*((m_per_min__to__km_per_hour * currentPatch%effect_wspeed)**0.464_r8)) + currentPatch%lb = 1.1_r8 * & + ((m_per_min__to__km_per_hour * currentPatch%effect_wspeed)**0.464_r8) endif endif @@ -986,7 +975,7 @@ subroutine area_burnt_intensity ( currentSite, bc_in, lb) df = currentPatch%ROS_front * currentPatch%FD !m ! --- calculate area burnt--- - if(lb > 0.0_r8) then + if (currentPatch%lb > 0.0_r8) then ! Eq 1 in Thonicke et al. 2010 ! To Do: Connect here with the Li & Levis GDP fire suppression algorithm. @@ -994,7 +983,7 @@ subroutine area_burnt_intensity ( currentSite, bc_in, lb) ! AB = AB *3.0_r8 !size of fire = Eq 14 Arora and Boer JGR 2005 (area of an ellipse) - size_of_fire = ((pi_const/(4.0_r8*lb))*((df+db)**2.0_r8)) + size_of_fire = (df + db) * (df + db) * pi_const / (4.0_r8 * currentPatch%lb) ! AB = daily area burnt = size fires in m2 * num ignitions per day per km2 * prob ignition starts fire ! AB = m2 per km2 per day @@ -1049,13 +1038,13 @@ subroutine area_burnt_intensity ( currentSite, bc_in, lb) end subroutine area_burnt_intensity !***************************************************************** - subroutine active_crown_fire ( currentSite, canopy_fuel_load, ROS_torch, & - lb, heat_per_area, passive_crown_FI) + subroutine active_crown_fire ( currentSite) !***************************************************************** !evaluates if there will be an active crown fire based on canopy fuel and rate of spread !returns final rate of spread and fire intensity in patch with added fuel from active crown fire. !currentCohort%fraction_crown_burned is the proportion of crown affected by fire + ! TODO slevis: Jackie, you had ROS_torch coming in here but not used use EDParamsMod, only : active_crown_fire_switch use SFParamsMod, only : SF_val_miner_total, SF_val_part_dens, SF_val_miner_damp, & @@ -1068,12 +1057,8 @@ subroutine active_crown_fire ( currentSite, canopy_fuel_load, ROS_torch, & type(ed_cohort_type), pointer :: currentCohort ! ARGUMENTS - real(r8), intent(in) :: ROS_torch ! ROS for crown torch initation (m/min) TODO slevis: var not used - real(r8), intent(in) :: canopy_fuel_load ! available canopy fuel load in patch (kg biomass) - real(r8), intent(in) :: lb !length to breadth ratio of fire ellipse (unitless) - real(r8), intent(in) :: heat_per_area ! heat release per unit area (kJ/m2) for surface fuel - real(r8), intent(in) :: passive_crown_FI ! fire intensity for ignition of passive canopy fuel (kW/m) + ! LOCAL VARIABLES ! Active crown Rothermel fire spread model parameters using FM 10 real(r8) beta,beta_op ! weighted average of packing ratio (unitless) real(r8) ir ! reaction intensity (kJ/m2/min) @@ -1143,7 +1128,7 @@ subroutine active_crown_fire ( currentSite, canopy_fuel_load, ROS_torch, & ROS_active = 0.0_r8 ! check initiation of passive crown fire - if (currentPatch%FI >= passive_crown_FI) then + if (currentPatch%FI >= currentPatch%passive_crown_FI) then passive_canopy_fuel_flg = 1 !enough passive canopy fuels for vertical spread ! Calculate rate of spread using FM 10 as in Rothermel 1977 @@ -1233,7 +1218,6 @@ subroutine active_crown_fire ( currentSite, canopy_fuel_load, ROS_torch, & ! check threshold intensity and rate of spread if (active_crown_fire_switch == 1 .and. & - currentPatch%FI >= passive_crown_FI .and. & ROS_active >= ROS_active_min) then currentPatch%active_crown_fire_flg = 1 ! active crown fire ignited !ROS_final = ROS_surface+CFB(ROS_active - ROS_surface), Eq 21 Scott & Reinhardt 2001 @@ -1270,7 +1254,7 @@ subroutine active_crown_fire ( currentSite, canopy_fuel_load, ROS_torch, & currentPatch%ROS_front = ROS_final ! --- calculate updated area burnt using df from ROS final--- - if(lb > 0.0_r8) then + if (currentPatch%lb > 0.0_r8) then ! Eq 1 in Thonicke et al. 2010 ! To Do: Connect here with the Li & Levis GDP fire suppression algorithm. @@ -1278,7 +1262,7 @@ subroutine active_crown_fire ( currentSite, canopy_fuel_load, ROS_torch, & ! AB = AB *3.0_r8 !size of fire = Eq 14 Arora and Boer JGR 2005 (area of an ellipse) - size_of_fire = ((pi_const/(4.0_r8*lb))*((df+db)**2.0_r8)) + size_of_fire = (df + db) * (df + db) * pi_const / (4.0_r8 * currentPatch%lb) ! AB = daily area burnt = size fires in m2 * num ignitions per day per km2 * prob ignition starts fire ! AB = m2 per km2 per day @@ -1301,8 +1285,9 @@ subroutine active_crown_fire ( currentSite, canopy_fuel_load, ROS_torch, & endif ! lb !final fireline intensity (kJ/m/sec or kW/m), Eq 22 Scott & Reinhardt 2001 - FI_final = ((heat_per_area + (canopy_fuel_load*canopy_ignite_energy*canopy_frac_burnt))& - *currentPatch%ROS_front)/60.0 + FI_final = (currentPatch%heat_per_area + & + currentPatch%canopy_fuel_load * canopy_ignite_energy * canopy_frac_burnt) * & + currentPatch%ROS_front / 60._r8 ! update patch FI to adjust according to potential canopy fuel consumed (passive and active) currentPatch%FI = FI_final diff --git a/main/EDInitMod.F90 b/main/EDInitMod.F90 index 06bcd1858a..ad6a1d36a7 100644 --- a/main/EDInitMod.F90 +++ b/main/EDInitMod.F90 @@ -642,6 +642,11 @@ subroutine init_patches( nsites, sites, bc_in) currentPatch%scorch_ht(:) = 0._r8 currentPatch%frac_burnt = 0._r8 currentPatch%burnt_frac_litter(:) = 0._r8 + currentPatch%canopy_fuel_load = 0._r8 + currentPatch%passive_crown_FI = 0._r8 + currentPatch%ros_torch = 0._r8 + currentPatch%heat_per_area = 0._r8 + currentPatch%lb = 0._r8 currentPatch => currentPatch%older enddo diff --git a/main/EDTypesMod.F90 b/main/EDTypesMod.F90 index 15360eaf43..5864990779 100644 --- a/main/EDTypesMod.F90 +++ b/main/EDTypesMod.F90 @@ -565,8 +565,13 @@ module EDTypesMod real(r8) :: fuel_eff_moist ! effective avearage fuel moisture content of the ground fuel ! (incl. live grasses. omits 1000hr fuels) real(r8) :: litter_moisture(nfsc) + real(r8) :: canopy_fuel_load ! available canopy fuel load in patch (kg biomass) + real(r8) :: passive_crown_FI ! fire intensity for ignition of passive canopy fuel (kW/m) + real(r8) :: heat_per_area ! heat release per unit area (kJ/m2) for surface fuel ! FIRE SPREAD + real(r8) :: lb ! length to breadth ratio of fire ellipse (unitless) + real(r8) :: ros_torch ! rate of spread for crown torch initiation: m/min real(r8) :: ros_front ! rate of forward spread of fire: m/min real(r8) :: ros_back ! rate of backward spread of fire: m/min real(r8) :: effect_wspeed ! windspeed modified by fraction of relative grass and tree cover: m/min From 594db97e81da3b816a5d128fc9a8f06d2db22ea4 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 3 May 2022 17:40:05 -0600 Subject: [PATCH 85/93] Some clean-up --- fire/SFMainMod.F90 | 26 +++++++------------------- main/EDTypesMod.F90 | 2 +- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 40fe7233f1..58fa2351d1 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -27,7 +27,7 @@ module SFMainMod use EDtypesMod , only : ed_cohort_type use EDtypesMod , only : AREA use EDtypesMod , only : DL_SF - use EDtypesMod , only : crown_fire_threshold ! TODO slevis: NOT used; if end up using, look at SF_val_fire_threshold as template +! use EDtypesMod , only : crown_fire_threshold ! TODO slevis: NOT used; if end up using, look at SF_val_fire_threshold as template use EDTypesMod , only : TW_SF use EDtypesMod , only : LB_SF use EDtypesMod , only : LG_SF @@ -109,9 +109,6 @@ subroutine fire_model( currentSite, bc_in) call fire_danger_index(currentSite, bc_in) call wind_effect(currentSite, bc_in) call characteristics_of_fuel(currentSite) - ! TODO canopy_fuel_load, passive_crown_FI, ROS_torch, heat_per_area, lb - ! look to me as though they should be currentPatch% variables, so I - ! stopped passing them as arguments call characteristics_of_crown(currentSite) call rate_of_spread(currentSite) call ground_fuel_consumption(currentSite) @@ -375,7 +372,6 @@ subroutine characteristics_of_crown ( currentSite ) real(r8) :: crown_fuel_biomass ! biomass of crown fuel in cohort (kg biomass) real(r8) :: crown_fuel_per_m ! crown fuel per 1m section in cohort real(r8) :: height_base_canopy ! lowest height of fuels in patch to carry fire in crown - real(r8) :: canopy_bulk_density ! density of canopy fuel on patch integer :: ih ! counter @@ -465,13 +461,6 @@ subroutine characteristics_of_crown ( currentSite ) end if end do - !canopy_bulk_denisty (kg/m3) for Patch TODO slevis: var not used - if (max_height - height_base_canopy > 0._r8) then - canopy_bulk_density = sum(biom_matrix) / (max_height - height_base_canopy) - else - canopy_bulk_density = 0._r8 - end if - ! Note: crown_ignition_energy to be calculated based on PFT foliar moisture content from FATES-Hydro ! or create foliar moisture % based on BTRAN ! Use foliar_moisture(currentCohort%pft) and compute weighted PFT average with Eq 3 Van Wagner 1977 @@ -723,7 +712,7 @@ subroutine rate_of_spread ( currentSite) currentPatch%fuel_sav <= 0.0_r8 .or. xi <= 0.0_r8 .or. & c <= 0.0_r8 .or. beta_ratio <= 0.0_r8 .or. b <= 0.0_r8) then currentPatch%ROS_front = 0.0_r8 - currentPatch%ROS_torch = 0.0_r8 +! currentPatch%ROS_torch = 0.0_r8 ! potentially useful diagnostic else ! Eq 9. Thonicke et al. 2010. ! forward ROS in m/min currentPatch%ROS_front = (ir*xi*(1.0_r8+phi_wind)) / (currentPatch%fuel_bulkd*eps*q_ig) @@ -741,11 +730,11 @@ subroutine rate_of_spread ( currentSite) ! fractional temp2 power. ! TODO slevis: omitting "- phi_s" after the -1 bc phi_s = 0 for now. ! @jkshuman recommended naming it slope_factor. - temp1 = max(0._r8, (60._r8 * currentPatch%passive_crown_FI * & - currentPatch%fuel_bulkd * eps * q_ig / (currentPatch%heat_per_area * ir * xi) - 1._r8) / & - (c * beta_ratio**-e)) - temp2 = 1._r8 / b - currentPatch%ROS_torch = temp1**temp2 / (54.683_r8 * wind_reduce) +! temp1 = max(0._r8, (60._r8 * currentPatch%passive_crown_FI * & +! currentPatch%fuel_bulkd * eps * q_ig / (currentPatch%heat_per_area * ir * xi) - 1._r8) / & +! (c * beta_ratio**-e)) +! temp2 = 1._r8 / b +! currentPatch%ROS_torch = temp1**temp2 / (54.683_r8 * wind_reduce) endif ! Eq 10 in Thonicke et al. 2010 ! backward ROS from Can FBP System (1992) in m/min @@ -1044,7 +1033,6 @@ subroutine active_crown_fire ( currentSite) !evaluates if there will be an active crown fire based on canopy fuel and rate of spread !returns final rate of spread and fire intensity in patch with added fuel from active crown fire. !currentCohort%fraction_crown_burned is the proportion of crown affected by fire - ! TODO slevis: Jackie, you had ROS_torch coming in here but not used use EDParamsMod, only : active_crown_fire_switch use SFParamsMod, only : SF_val_miner_total, SF_val_part_dens, SF_val_miner_damp, & diff --git a/main/EDTypesMod.F90 b/main/EDTypesMod.F90 index 5864990779..8efbc58130 100644 --- a/main/EDTypesMod.F90 +++ b/main/EDTypesMod.F90 @@ -156,7 +156,7 @@ module EDTypesMod integer, parameter, public :: dl_sf = 5 ! array index of dead leaf pool for spitfire (dead grass and dead leaves) integer, parameter, public :: lg_sf = 6 ! array index of live grass pool for spitfire - real(r8), parameter, public :: crown_fire_threshold = 200.0_r8 ! threshold for passive crown fire ignition. KWm-2 (Bessie & Johnson 1995) TODO slevis: see corresponding todo in SFMainMod.F90 +! real(r8), parameter, public :: crown_fire_threshold = 200.0_r8 ! threshold for passive crown fire ignition. KWm-2 (Bessie & Johnson 1995) TODO slevis: see corresponding todo in SFMainMod.F90 ! PATCH FUSION From e9e282ca60e3db9937d89580f5c5ee28800ebd2c Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 5 May 2022 16:05:41 -0600 Subject: [PATCH 86/93] Added checks to avoid div by zero and negative canopy_frac_burnt --- fire/SFMainMod.F90 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 58fa2351d1..b2404ce461 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -1218,16 +1218,19 @@ subroutine active_crown_fire ( currentSite) ! calculate canopy fraction burnt, Eq 28 Scott & Reinhardt App A ! using wind at which ROS_active = ROS_active_min ! solve for phi_wind associated with ROS_active_min - phi_wind_ROS_SA = (ROS_active_min * fuel_bd * eps * q_ig - 3.34 * ir * xi) & - /(3.34 * ir * xi) + if (ir > 0._r8 .and. xi > 0._r8) then + phi_wind_ROS_SA = (ROS_active_min * fuel_bd * eps * q_ig - 3.34 * ir * xi) / (3.34 * ir * xi) + else + phi_wind_ROS_SA = 0._r8 + end if ! solve for open wind for that phi_wind wind_ROS_SA = log(b)*(phi_wind_ROS_SA/(c*beta_ratio**(-e)))/log(b)*(3.28*0.4) ! use this phi_wind for potential surface ROS for canopy_frac_burnt calculation ROS_SA = (ir * xi * (1.0_r8 + wind_ROS_SA)) / (fuel_bd * eps * q_ig) ! canopy fraction burnt, Eq 28 Scott & Reinhardt Appendix A - canopy_frac_burnt = (min(1.0_r8, ((currentPatch%ROS_front - ROS_active_min) & - /(ROS_SA - ROS_active_min)))) + canopy_frac_burnt = max(0._r8, min(1.0_r8, & + (currentPatch%ROS_front - ROS_active_min) / (ROS_SA - ROS_active_min))) !ROS_final = ROS_surface+CFB(ROS_active - ROS_surface), Eq 21 Scott & Reinhardt 2001 ROS_final = currentPatch%ROS_front + canopy_frac_burnt*(ROS_active-currentPatch%ROS_front) From 82f0df1bed94705f0d5ba285ab9f38d428e936b2 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 5 May 2022 16:12:53 -0600 Subject: [PATCH 87/93] Reduction of duplicated code by moving ROS_final to after if-block --- fire/SFMainMod.F90 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index b2404ce461..30ecc78ae1 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -1211,7 +1211,6 @@ subroutine active_crown_fire ( currentSite) !ROS_final = ROS_surface+CFB(ROS_active - ROS_surface), Eq 21 Scott & Reinhardt 2001 !with active crown fire CFB (canopy fraction burned) = 100% canopy_frac_burnt = 1.0_r8 - ROS_final = currentPatch%ROS_front + canopy_frac_burnt*(ROS_active-currentPatch%ROS_front) else currentPatch%active_crown_fire_flg = 0 ! only passive crown fire with partial crown burnt @@ -1231,11 +1230,13 @@ subroutine active_crown_fire ( currentSite) ! canopy fraction burnt, Eq 28 Scott & Reinhardt Appendix A canopy_frac_burnt = max(0._r8, min(1.0_r8, & (currentPatch%ROS_front - ROS_active_min) / (ROS_SA - ROS_active_min))) - !ROS_final = ROS_surface+CFB(ROS_active - ROS_surface), Eq 21 Scott & Reinhardt 2001 - ROS_final = currentPatch%ROS_front + canopy_frac_burnt*(ROS_active-currentPatch%ROS_front) endif !check intensity & ROS for active crown fire thresholds + !ROS_final = ROS_surface+CFB(ROS_active - ROS_surface), Eq 21 Scott & Reinhardt 2001 + ROS_final = currentPatch%ROS_front + & + canopy_frac_burnt * (ROS_active - currentPatch%ROS_front) + ! recalculate area burned with new ROS_front value from ROS_final ! ---- re-calculate length of major axis for df using new ROS_front value from ROS final--- db = currentPatch%ROS_back * currentPatch%FD !(m) From 80c6c5aae435052f68e6eb88b6268bdfedec5749 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 5 May 2022 17:48:44 -0600 Subject: [PATCH 88/93] Bring in Jackie's mods pertaining to canopy_bulk_density --- biogeochem/EDPatchDynamicsMod.F90 | 3 +++ fire/SFMainMod.F90 | 44 ++++++++++++++++++++----------- main/EDInitMod.F90 | 1 + main/EDTypesMod.F90 | 1 + 4 files changed, 33 insertions(+), 16 deletions(-) diff --git a/biogeochem/EDPatchDynamicsMod.F90 b/biogeochem/EDPatchDynamicsMod.F90 index ed31ccf42e..93520c4c56 100644 --- a/biogeochem/EDPatchDynamicsMod.F90 +++ b/biogeochem/EDPatchDynamicsMod.F90 @@ -2124,6 +2124,7 @@ subroutine create_patch(currentSite, new_patch, age, areap, label,nocomp_pft) new_patch%fabi_sha_z(:,:,:) = 0._r8 new_patch%scorch_ht(:) = 0._r8 new_patch%frac_burnt = 0._r8 + new_patch%canopy_bulk_density = 0._r8 new_patch%canopy_fuel_load = 0._r8 new_patch%passive_crown_FI = 0._r8 new_patch%ros_torch = 0._r8 @@ -2245,6 +2246,7 @@ subroutine zero_patch(cp_p) currentPatch%ros_back = nan ! backward ros (m/min) currentPatch%scorch_ht(:) = nan ! scorch height of flames on a given PFT currentPatch%frac_burnt = nan ! fraction burnt daily + currentPatch%canopy_bulk_density = nan ! available canopy fuel bulk density in patch (kg biomass/m3) currentPatch%canopy_fuel_load = nan ! available canopy fuel load in patch (kg biomass) currentPatch%passive_crown_FI = nan ! fire intensity for ignition of passive canopy fuel (kW/m) currentPatch%ros_torch = nan ! rate of spread (ROS) for crown torch initiation (m/min) @@ -2669,6 +2671,7 @@ subroutine fuse_2_patches(csite, dp, rp) rp%ros_back = (dp%ros_back*dp%area + rp%ros_back*rp%area) * inv_sum_area rp%scorch_ht(:) = (dp%scorch_ht(:)*dp%area + rp%scorch_ht(:)*rp%area) * inv_sum_area rp%frac_burnt = (dp%frac_burnt*dp%area + rp%frac_burnt*rp%area) * inv_sum_area + rp%canopy_bulk_density = (dp%canopy_bulk_density*dp%area + rp%canopy_bulk_density*rp%area) * inv_sum_area rp%canopy_fuel_load = (dp%canopy_fuel_load*dp%area + rp%canopy_fuel_load*rp%area) * inv_sum_area rp%passive_crown_FI = (dp%passive_crown_FI*dp%area + rp%passive_crown_FI*rp%area) * inv_sum_area rp%ros_torch = (dp%ros_torch*dp%area + rp%ros_torch*rp%area) * inv_sum_area diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 30ecc78ae1..db5b87bcf5 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -392,6 +392,7 @@ subroutine characteristics_of_crown ( currentSite ) height_base_canopy = 0.0_r8 currentPatch%canopy_fuel_load = 0.0_r8 currentPatch%passive_crown_FI = 0.0_r8 + currentPatch%canopy_bulk_density = 0.0_r8 max_height = 0._r8 biom_matrix(:) = 0._r8 @@ -461,6 +462,13 @@ subroutine characteristics_of_crown ( currentSite ) end if end do + !canopy_bulk_denisty (kg/m3) for Patch + if (max_height - height_base_canopy > 0._r8) then + currentPatch%canopy_bulk_density = sum(biom_matrix) / (max_height - height_base_canopy) + else + currentPatch%canopy_bulk_density = 0._r8 + end if + ! Note: crown_ignition_energy to be calculated based on PFT foliar moisture content from FATES-Hydro ! or create foliar moisture % based on BTRAN ! Use foliar_moisture(currentCohort%pft) and compute weighted PFT average with Eq 3 Van Wagner 1977 @@ -1078,9 +1086,9 @@ subroutine active_crown_fire ( currentSite) real(r8) size_of_fire ! in m2 real(r8) ROS_active ! actual rate of spread (m/min) using FM 10 fuels real(r8) ROS_active_min ! minimum rate of spread to ignite active crown fire - real(r8) phi_wind_ROS_SA ! phi_wind for ROS_active_min, use to find open wind for ROS_SA - real(r8) wind_ROS_SA ! open windspeed for ROS surface fire where ROS_SA = ROS_active_min - real(r8) ROS_SA ! rate of spread for surface fire with wind_ROS_SA + real(r8) CI_temp ! temporary variable to calculate wind_active_min + real(r8) wind_active_min ! open windspeed to sustain active crown fire where ROS_SA = ROS_active_min + real(r8) ROS_SA ! rate of spread for surface fire with wind_active_min real(r8) canopy_frac_burnt ! fraction of canopy fuels consumed (0, surface fire to 1,active crown fire) real(r8) ROS_final ! final rate of spread for combined surface and canopy spread (m/min) real(r8) FI_final ! final fireline intensity (kW/m or kJ/m/sec) with canopy consumption @@ -1152,7 +1160,7 @@ subroutine active_crown_fire ( currentSite) beta_ratio = beta/beta_op ! -- heat of pre-ignition -- - q_ig = q_dry + 2594.0 * fuel_eff_moist + q_ig = q_dry + 2594.0_r8 * fuel_eff_moist ! ---effective heating number--- ! Eq A3 in Thonicke et al. 2010. @@ -1199,10 +1207,10 @@ subroutine active_crown_fire ( currentSite) ir = reaction_v_opt*(net_fuel)*SF_val_fuel_energy*moist_damp*SF_val_miner_damp ! actual ROS (m/min) for FM 10 fuels for open windspeed, Eq 8 Scott & Reinhardt 2001 - ROS_active = 3.34*((ir*xi*(1.0_r8+phi_wind)) / (fuel_bd * eps * q_ig)) + ROS_active = 3.34_r8 * ((ir*xi*(1.0_r8+phi_wind)) / (fuel_bd * eps * q_ig)) ! critical min rate of spread (m/min) for active crowning - ROS_active_min = (critical_mass_flow_rate / fuel_bd) * 60.0 + ROS_active_min = (critical_mass_flow_rate / fuel_bd) * 60.0_r8 ! check threshold intensity and rate of spread if (active_crown_fire_switch == 1 .and. & @@ -1214,18 +1222,22 @@ subroutine active_crown_fire ( currentSite) else currentPatch%active_crown_fire_flg = 0 ! only passive crown fire with partial crown burnt - ! calculate canopy fraction burnt, Eq 28 Scott & Reinhardt App A - ! using wind at which ROS_active = ROS_active_min - ! solve for phi_wind associated with ROS_active_min - if (ir > 0._r8 .and. xi > 0._r8) then - phi_wind_ROS_SA = (ROS_active_min * fuel_bd * eps * q_ig - 3.34 * ir * xi) / (3.34 * ir * xi) + + ! phi_slope is not used yet. consider adding with later + ! development + ! calculate open wind speed critical to sustain active crown + ! fire Eq 20 Scott & Reinhardt + if (ir > 0._r8 .and. currentPatch%canopy_bulk_density > 0._r8) then + CI_temp = ((164.8_r8 * eps * q_ig)/(ir * currentPatch%canopy_bulk_density)) - 1.0_r8 else - phi_wind_ROS_SA = 0._r8 + CI_temp = 0._r8 end if - ! solve for open wind for that phi_wind - wind_ROS_SA = log(b)*(phi_wind_ROS_SA/(c*beta_ratio**(-e)))/log(b)*(3.28*0.4) - ! use this phi_wind for potential surface ROS for canopy_frac_burnt calculation - ROS_SA = (ir * xi * (1.0_r8 + wind_ROS_SA)) / (fuel_bd * eps * q_ig) + + wind_active_min = 0.0457_r8 * (CI_temp / 0.001612_r8)**0.7_r8 + + ! use open wind speed "wind_active_min" for ROS surface fire + ! where ROS_SA=ROS_active_min + ROS_SA = (ir * xi * (1.0_r8 + wind_active_min)) / (fuel_bd * eps * q_ig) ! canopy fraction burnt, Eq 28 Scott & Reinhardt Appendix A canopy_frac_burnt = max(0._r8, min(1.0_r8, & diff --git a/main/EDInitMod.F90 b/main/EDInitMod.F90 index ad6a1d36a7..edc4c0cf7c 100644 --- a/main/EDInitMod.F90 +++ b/main/EDInitMod.F90 @@ -642,6 +642,7 @@ subroutine init_patches( nsites, sites, bc_in) currentPatch%scorch_ht(:) = 0._r8 currentPatch%frac_burnt = 0._r8 currentPatch%burnt_frac_litter(:) = 0._r8 + currentPatch%canopy_bulk_density = 0._r8 currentPatch%canopy_fuel_load = 0._r8 currentPatch%passive_crown_FI = 0._r8 currentPatch%ros_torch = 0._r8 diff --git a/main/EDTypesMod.F90 b/main/EDTypesMod.F90 index 8efbc58130..ac447dccfb 100644 --- a/main/EDTypesMod.F90 +++ b/main/EDTypesMod.F90 @@ -565,6 +565,7 @@ module EDTypesMod real(r8) :: fuel_eff_moist ! effective avearage fuel moisture content of the ground fuel ! (incl. live grasses. omits 1000hr fuels) real(r8) :: litter_moisture(nfsc) + real(r8) :: canopy_bulk_density ! available canopy fuel bulk density in patch (kg biomass/m3) real(r8) :: canopy_fuel_load ! available canopy fuel load in patch (kg biomass) real(r8) :: passive_crown_FI ! fire intensity for ignition of passive canopy fuel (kW/m) real(r8) :: heat_per_area ! heat release per unit area (kJ/m2) for surface fuel From 4d43cf12920e330b1fa9fa02d00f34108630cbb3 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Fri, 6 May 2022 18:02:29 -0600 Subject: [PATCH 89/93] Bring in Jackie's mods: 5cb79fe5fa529c47e9e520e030524c4b78fba9ca --- fire/SFMainMod.F90 | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index db5b87bcf5..27ac30cefc 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -1075,6 +1075,10 @@ subroutine active_crown_fire ( currentSite) real(r8) fuel_moist10hr ! moisture 10 hour fuels real(r8) fuel_moist100hr ! moisture 100 hour fuels real(r8) fuel_moistlive ! moisture live fuels + real(r8) fuel_1hr ! FM 10 1-hr fuel loading (kg/m2) + real(r8) fuel_10hr ! FM 10 10-hr fuel loading (kg/m2) + real(r8) fuel_100hr ! FM 10 100-hr fuel loading (kg/m2) + real(r8) fuel_live ! FM 10 live fuel loading (kg/m2) real(r8) SAV_1hr ! surface area to volume 1 hour fuels (twigs) real(r8) SAV_10hr ! surface area to volume 10 hour fuels (small branches) real(r8) SAV_100hr ! surface area to volume 100 hour fuels (large branches) @@ -1095,11 +1099,11 @@ subroutine active_crown_fire ( currentSite) real(r8),parameter :: q_dry = 581.0_r8 !heat of pre-ignition of dry fuels (kJ/kg) ! fuel loading, MEF, and depth from Anderson 1982 Aids to determining fuel models for fire behavior - ! SAV values from BEHAVE model Burgan & Rothermel 1984) - real(r8),parameter :: fuel_1hr = 3.01_r8 ! FM 10 1-hr fuel loading (US tons/acre) - real(r8),parameter :: fuel_10hr = 2.0_r8 ! FM 10 10-hr fuel loading (US tons/acre) - real(r8),parameter :: fuel_100hr = 5.01_r8 ! FM 10 100-hr fuel loading (US tons/acre) - real(r8),parameter :: fuel_live = 2.0_r8 ! FM 10 live fuel loading (US tons/acre) + ! SAV values from BEHAVE model Burgan & Rothermel (1984) + real(r8),parameter :: fuel_1hr_ton = 3.01_r8 ! FM 10 1-hr fuel loading (US tons/acre) + real(r8),parameter :: fuel_10hr_ton = 2.0_r8 ! FM 10 10-hr fuel loading (US tons/acre) + real(r8),parameter :: fuel_100hr_ton = 5.01_r8 ! FM 10 100-hr fuel loading (US tons/acre) + real(r8),parameter :: fuel_live_ton = 2.0_r8 ! FM 10 live fuel loading (US tons/acre) real(r8),parameter :: fuel_mef = 0.25_r8 ! FM 10 moisture of extinction (volumetric) real(r8),parameter :: fuel_depth_ft= 1.0_r8 ! FM 10 fuel depth (ft) real(r8),parameter :: sav_1hr_ft = 2000.0_r8 ! FM 10 1-hr SAV (ft2/ft3) @@ -1129,7 +1133,12 @@ subroutine active_crown_fire ( currentSite) ! Calculate rate of spread using FM 10 as in Rothermel 1977 ! fuel characteristics - total_fuel = (fuel_1hr + fuel_10hr + fuel_100hr + fuel_live) * tonnes_acre_to_kg_m2 + fuel_1hr = fuel_1hr_ton * tonnes_acre_to_kg_m2 + fuel_10hr = fuel_10hr_ton * tonnes_acre_to_kg_m2 + fuel_100hr = fuel_100hr_ton * tonnes_acre_to_kg_m2 + fuel_live = fuel_live_ton * tonnes_acre_to_kg_m2 + + total_fuel = fuel_1hr + fuel_10hr + fuel_100hr + fuel_live !total fuel (kg/m2) SAV_1hr = sav_1hr_ft * sqft_cubicft_to_sqm_cubicm SAV_10hr = sav_10hr_ft * sqft_cubicft_to_sqm_cubicm @@ -1142,7 +1151,7 @@ subroutine active_crown_fire ( currentSite) fuel_moistlive = exp(-1.0_r8 * ((SAV_live/SF_val_drying_ratio) * currentSite%acc_NI)) fuel_depth = fuel_depth_ft *0.3048 !convert to meters - fuel_bd = total_fuel/fuel_depth + fuel_bd = total_fuel / fuel_depth !fuel bulk density (kg/m3) fuel_sav = SAV_1hr *(fuel_1hr/total_fuel) + SAV_10hr*(fuel_10hr/total_fuel) + & SAV_100hr*(fuel_100hr/total_fuel) + SAV_live*(fuel_live/total_fuel) @@ -1175,7 +1184,7 @@ subroutine active_crown_fire ( currentSite) midflame_wind = currentSite%wind *0.40_r8 !Scott & Reinhardt 2001 40% open wind speed ! Eq A5 in Thonicke et al. 2010 - ! convert current_wspeed (wind at elev relevant to fire) from m/min to ft/min for Rothermel ROS eqn + ! include convert wind from m/min to ft/min for Rothermel ROS eqn phi_wind = c * ((3.281_r8*midflame_wind)**b)*(beta_ratio**(-e)) !unitless ! ---propagating flux = xi (unitless) From cd6ca3f7692680c071e0f866e3563eb5975e144e Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Mon, 9 May 2022 12:25:42 -0600 Subject: [PATCH 90/93] Ensure that ROS_front & FI only increase due to fire in the upper canopy --- fire/SFMainMod.F90 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 27ac30cefc..e57e50e8e6 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -1264,7 +1264,8 @@ subroutine active_crown_fire ( currentSite) df = ROS_final * currentPatch%FD !(m) update with ROS final ! update ROS_front with ROS_final for output variable - currentPatch%ROS_front = ROS_final + ! if changing, expect only an increase in ROS_front + currentPatch%ROS_front = max(ROS_final, currentPatch%ROS_front) ! --- calculate updated area burnt using df from ROS final--- if (currentPatch%lb > 0.0_r8) then @@ -1302,7 +1303,8 @@ subroutine active_crown_fire ( currentSite) currentPatch%canopy_fuel_load * canopy_ignite_energy * canopy_frac_burnt) * & currentPatch%ROS_front / 60._r8 ! update patch FI to adjust according to potential canopy fuel consumed (passive and active) - currentPatch%FI = FI_final + ! if changing, expect only an increase in FI + currentPatch%FI = max(FI_final, currentPatch%FI) endif !check if passive crown fire? endif !fire? From a87fa2e4fd2b9b2422396a8330c7c74dbbd58a2a Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Mon, 9 May 2022 14:16:48 -0600 Subject: [PATCH 91/93] Add the decimal in the declaration of a real parameter --- fire/SFMainMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index e57e50e8e6..7707954b5f 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -1112,7 +1112,7 @@ subroutine active_crown_fire ( currentSite) real(r8),parameter :: sav_live_ft = 1650.0_r8 ! FM 10 live SAV (ft2/ft3) real(r8),parameter :: tonnes_acre_to_kg_m2 = 0.2241701 ! convert tons/acre to kg/m2 real(r8),parameter :: sqft_cubicft_to_sqm_cubicm = 0.03280844 !convert ft2/ft3 to m2/m3 - real(r8),parameter :: canopy_ignite_energy = 18000_r8 ! heat yield for canopy fuels (kJ/kg) + real(r8),parameter :: canopy_ignite_energy = 18000.0_r8 ! heat yield for canopy fuels (kJ/kg) real(r8),parameter :: critical_mass_flow_rate = 0.05_r8 ! critical mass flow rate (kg/m2/sec)for crown fire real(r8),parameter :: km2_to_m2 = 1000000.0_r8 ! area conversion for square km to square m From 71091733c17d235e82d9398e3b5ffe2cb0f55fbe Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 10 May 2022 10:18:33 -0600 Subject: [PATCH 92/93] Correction of if statement now allows active crown fire occurrence --- fire/SFMainMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 7707954b5f..fd1d630a29 100644 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -1222,7 +1222,7 @@ subroutine active_crown_fire ( currentSite) ROS_active_min = (critical_mass_flow_rate / fuel_bd) * 60.0_r8 ! check threshold intensity and rate of spread - if (active_crown_fire_switch == 1 .and. & + if (active_crown_fire_switch .and. & ROS_active >= ROS_active_min) then currentPatch%active_crown_fire_flg = 1 ! active crown fire ignited !ROS_final = ROS_surface+CFB(ROS_active - ROS_surface), Eq 21 Scott & Reinhardt 2001 From afaf1369bc44a657548872d5a24c6d2118d9c58a Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Fri, 20 May 2022 11:28:10 -0600 Subject: [PATCH 93/93] Changed two history fields to active FATES_FUEL_AMOUNT_APFC and FATES_MORTALITY_FIRE_SZPF Other fields that Polly requested were active already --- main/FatesHistoryInterfaceMod.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/FatesHistoryInterfaceMod.F90 b/main/FatesHistoryInterfaceMod.F90 index 0c3137127d..f3fbc57a84 100644 --- a/main/FatesHistoryInterfaceMod.F90 +++ b/main/FatesHistoryInterfaceMod.F90 @@ -4742,7 +4742,7 @@ subroutine define_history_vars(this, initialize_variables) call this%set_history_var(vname='FATES_FUEL_AMOUNT_APFC', units='kg m-2', & long='spitfire fuel quantity in each age x fuel class in kg carbon per m2 land area', & - use_default='inactive', avgflag='A', vtype=site_agefuel_r8, & + use_default='active', avgflag='A', vtype=site_agefuel_r8, & hlms='CLM:ALM', upfreq=1, ivar=ivar, initialize=initialize_variables, & index = ih_fuel_amount_age_fuel) @@ -5706,7 +5706,7 @@ subroutine define_history_vars(this, initialize_variables) call this%set_history_var(vname='FATES_MORTALITY_FIRE_SZPF', & units = 'm-2 yr-1', & long='fire mortality by pft/size in number of plants per m2 per year', & - use_default='inactive', avgflag='A', vtype=site_size_pft_r8, & + use_default='active', avgflag='A', vtype=site_size_pft_r8, & hlms='CLM:ALM', upfreq=1, ivar=ivar, & initialize=initialize_variables, index = ih_m5_si_scpf)