From 50c189c21b0e0e70519aeb0e01e66fa253738ac2 Mon Sep 17 00:00:00 2001 From: ckoven Date: Thu, 23 Apr 2020 11:32:07 -0600 Subject: [PATCH 1/9] changing/adding some fire history output --- main/FatesHistoryInterfaceMod.F90 | 47 ++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/main/FatesHistoryInterfaceMod.F90 b/main/FatesHistoryInterfaceMod.F90 index 51db184e95..3a1e1e2307 100644 --- a/main/FatesHistoryInterfaceMod.F90 +++ b/main/FatesHistoryInterfaceMod.F90 @@ -141,7 +141,6 @@ module FatesHistoryInterfaceMod integer :: ih_trimming_pa integer :: ih_area_plant_pa integer :: ih_area_treespread_pa - integer :: ih_nesterov_fire_danger_pa integer :: ih_spitfire_ROS_pa integer :: ih_effect_wspeed_pa integer :: ih_TFC_ROS_pa @@ -268,6 +267,7 @@ module FatesHistoryInterfaceMod integer :: ih_dleafon_si integer :: ih_meanliqvol_si + integer :: ih_nesterov_fire_danger_si integer :: ih_nplant_si_scpf integer :: ih_gpp_si_scpf @@ -327,7 +327,6 @@ module FatesHistoryInterfaceMod integer :: ih_c13disc_si_scpf - ! indices to (site x scls [size class bins]) variables integer :: ih_ba_si_scls integer :: ih_nplant_si_scls @@ -433,6 +432,10 @@ module FatesHistoryInterfaceMod integer :: ih_c_lblayer_si_age integer :: ih_agesince_anthrodist_si_age integer :: ih_secondaryforest_area_si_age + integer :: if_area_burnt_si_age + ! integer :: if_fire_rate_of_spread_front_si_age + ! integer :: if_fire_intensity_si_age + integer :: if_fire_sum_fuel_si_age ! indices to (site x height) variables integer :: ih_canopy_height_dist_si_height @@ -1733,7 +1736,7 @@ subroutine update_history_dyn(this,nc,nsites,sites) hio_recruitment_si_pft => this%hvars(ih_recruitment_si_pft)%r82d, & hio_mortality_si_pft => this%hvars(ih_mortality_si_pft)%r82d, & hio_crownarea_si_pft => this%hvars(ih_crownarea_si_pft)%r82d, & - hio_nesterov_fire_danger_pa => this%hvars(ih_nesterov_fire_danger_pa)%r81d, & + hio_nesterov_fire_danger_si => this%hvars(ih_nesterov_fire_danger_si)%r81d, & hio_spitfire_ros_pa => this%hvars(ih_spitfire_ROS_pa)%r81d, & hio_tfc_ros_pa => this%hvars(ih_TFC_ROS_pa)%r81d, & hio_effect_wspeed_pa => this%hvars(ih_effect_wspeed_pa)%r81d, & @@ -1909,6 +1912,10 @@ subroutine update_history_dyn(this,nc,nsites,sites) hio_woodproduct_si => this%hvars(ih_woodproduct_si)%r81d, & hio_agesince_anthrodist_si_age => this%hvars(ih_agesince_anthrodist_si_age)%r82d, & hio_secondaryforest_area_si_age => this%hvars(ih_secondaryforest_area_si_age)%r82d, & + hio_area_burnt_si_age => this%hvars(ih_area_burnt_si_age)%r82d, & + ! hio_fire_rate_of_spread_front_si_age => this%hvars(ih_fire_rate_of_spread_front_si_age)%r82d, & + ! hio_fire_intensity_si_age => this%hvars(ih_fire_intensity_si_age)%r82d, & + hio_fire_sum_fuel_si_age => this%hvars(ih_fire_sum_fuel_si_age)%r82d, & hio_canopy_height_dist_si_height => this%hvars(ih_canopy_height_dist_si_height)%r82d, & hio_leaf_height_dist_si_height => this%hvars(ih_leaf_height_dist_si_height)%r82d, & hio_litter_moisture_si_fuel => this%hvars(ih_litter_moisture_si_fuel)%r82d, & @@ -2007,6 +2014,8 @@ subroutine update_history_dyn(this,nc,nsites,sites) hio_woodproduct_si(io_si) = sites(s)%resources_management%trunk_product_site & * AREA_INV * g_per_kg + ! site-level fire variables + hio_nesterov_fire_danger_si(io_si) = sites(s)%acc_NI ! If hydraulics are turned on, track the error terms ! associated with dynamics @@ -2061,14 +2070,26 @@ subroutine update_history_dyn(this,nc,nsites,sites) + cpatch%area * AREA_INV endif + !!! patch-age-resolved fire variables do i_pft = 1,numpft ! for scorch height, weight the value by patch area within any given age calss (in the event that there is ! more than one patch per age class. iagepft = cpatch%age_class + (i_pft-1) * nlevage hio_scorch_height_si_agepft(io_si,iagepft) = hio_scorch_height_si_agepft(io_si,iagepft) + & cpatch%Scorch_ht(i_pft) * cpatch%area - end do + + hio_area_burnt_si_age(io_si,cpatch%age_class) = hio_area_burnt_si_age(io_si,cpatch%age_class) + & + cpatch*frac_burnt * cpatch%area * AREA_INV + + ! hio_fire_rate_of_spread_front_si_age(io_si, cpatch%age_class) = hio_fire_rate_of_spread_si_age(io_si, cpatch%age_class) + & + ! cpatch%ros_front * cpatch*frac_burnt * cpatch%area * AREA_INV + + ! hio_fire_intensity_si_age(io_si, cpatch%age_class) = hio_fire_intensity_si_age(io_si, cpatch%age_class) + & + ! cpatch%FI * cpatch*frac_burnt * cpatch%area * AREA_INV + + hio_fire_sum_fuel_si_age(io_si, cpatch%age_class) = hio_fire_sum_fuel_si_age(io_si, cpatch%age_class) + & + cpatch%sum_fuel * cpatch%area * AREA_INV ccohort => cpatch%shortest do while(associated(ccohort)) @@ -2604,7 +2625,6 @@ subroutine update_history_dyn(this,nc,nsites,sites) endif ! Update Fire Variables - hio_nesterov_fire_danger_pa(io_pa) = sites(s)%acc_NI hio_spitfire_ros_pa(io_pa) = cpatch%ROS_front hio_effect_wspeed_pa(io_pa) = cpatch%effect_wspeed hio_tfc_ros_pa(io_pa) = cpatch%TFC_ROS @@ -4001,8 +4021,8 @@ subroutine define_history_vars(this, initialize_variables) call this%set_history_var(vname='FIRE_NESTEROV_INDEX', units='none', & long='nesterov_fire_danger index', use_default='active', & - avgflag='A', vtype=patch_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & - ivar=ivar, initialize=initialize_variables, index = ih_nesterov_fire_danger_pa) + avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & + ivar=ivar, initialize=initialize_variables, index = ih_nesterov_fire_danger_si) call this%set_history_var(vname='FIRE_ROS', units='m/min', & long='fire rate of spread m/min', use_default='active', & @@ -4060,6 +4080,19 @@ subroutine define_history_vars(this, initialize_variables) avgflag='A', vtype=site_fuel_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & ivar=ivar, initialize=initialize_variables, index = ih_litter_moisture_si_fuel ) + call this%set_history_var(vname='AREA_BURNT_BY_PATCH_AGE', units='m2/m2', & + long='spitfire area burnt by patch age (divide by patch_area_by_age to get burnt fraction by age)', & + use_default='active', & + avgflag='A', vtype=site_age_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & + ivar=ivar, initialize=initialize_variables, index = ih_area_burnt_si_age ) + + call this%set_history_var(vname='SUM_FUEL_BY_PATCH_AGE', units='gC / m2 of site area', & + long='spitfire ground fuel related to ros (omits 1000hr fuels) within each patch age bin (divide by patch_area_by_age to get fuel per unit area of that-age patch)', & + use_default='active', & + avgflag='A', vtype=site_age_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & + ivar=ivar, initialize=initialize_variables, index = ih_sum_fuel_si_age ) + + ! Litter Variables call this%set_history_var(vname='LITTER_IN', units='gC m-2 s-1', & From 41d08dab8251075be218f14541073d748f5d8f22 Mon Sep 17 00:00:00 2001 From: ckoven Date: Thu, 23 Apr 2020 14:47:05 -0600 Subject: [PATCH 2/9] bugfixes --- main/FatesHistoryInterfaceMod.F90 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/main/FatesHistoryInterfaceMod.F90 b/main/FatesHistoryInterfaceMod.F90 index 3a1e1e2307..0d7acf91c4 100644 --- a/main/FatesHistoryInterfaceMod.F90 +++ b/main/FatesHistoryInterfaceMod.F90 @@ -432,10 +432,10 @@ module FatesHistoryInterfaceMod integer :: ih_c_lblayer_si_age integer :: ih_agesince_anthrodist_si_age integer :: ih_secondaryforest_area_si_age - integer :: if_area_burnt_si_age - ! integer :: if_fire_rate_of_spread_front_si_age - ! integer :: if_fire_intensity_si_age - integer :: if_fire_sum_fuel_si_age + integer :: ih_area_burnt_si_age + ! integer :: ih_fire_rate_of_spread_front_si_age + ! integer :: ih_fire_intensity_si_age + integer :: ih_fire_sum_fuel_si_age ! indices to (site x height) variables integer :: ih_canopy_height_dist_si_height @@ -2080,13 +2080,13 @@ subroutine update_history_dyn(this,nc,nsites,sites) end do hio_area_burnt_si_age(io_si,cpatch%age_class) = hio_area_burnt_si_age(io_si,cpatch%age_class) + & - cpatch*frac_burnt * cpatch%area * AREA_INV + cpatch%frac_burnt * cpatch%area * AREA_INV ! hio_fire_rate_of_spread_front_si_age(io_si, cpatch%age_class) = hio_fire_rate_of_spread_si_age(io_si, cpatch%age_class) + & ! cpatch%ros_front * cpatch*frac_burnt * cpatch%area * AREA_INV ! hio_fire_intensity_si_age(io_si, cpatch%age_class) = hio_fire_intensity_si_age(io_si, cpatch%age_class) + & - ! cpatch%FI * cpatch*frac_burnt * cpatch%area * AREA_INV + ! cpatch%FI * cpatch%frac_burnt * cpatch%area * AREA_INV hio_fire_sum_fuel_si_age(io_si, cpatch%age_class) = hio_fire_sum_fuel_si_age(io_si, cpatch%age_class) + & cpatch%sum_fuel * cpatch%area * AREA_INV @@ -4090,7 +4090,7 @@ subroutine define_history_vars(this, initialize_variables) long='spitfire ground fuel related to ros (omits 1000hr fuels) within each patch age bin (divide by patch_area_by_age to get fuel per unit area of that-age patch)', & use_default='active', & avgflag='A', vtype=site_age_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & - ivar=ivar, initialize=initialize_variables, index = ih_sum_fuel_si_age ) + ivar=ivar, initialize=initialize_variables, index = ih_fire_sum_fuel_si_age ) ! Litter Variables From f3822a5da40b6d48ae92748c829ae1105050aaea Mon Sep 17 00:00:00 2001 From: ckoven Date: Thu, 23 Apr 2020 17:53:06 -0600 Subject: [PATCH 3/9] added new fire intensity output vars --- main/FatesHistoryInterfaceMod.F90 | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/main/FatesHistoryInterfaceMod.F90 b/main/FatesHistoryInterfaceMod.F90 index 0d7acf91c4..2a0f4ef153 100644 --- a/main/FatesHistoryInterfaceMod.F90 +++ b/main/FatesHistoryInterfaceMod.F90 @@ -268,6 +268,7 @@ module FatesHistoryInterfaceMod integer :: ih_meanliqvol_si integer :: ih_nesterov_fire_danger_si + integer :: ih_fire_intensity_area_product_si integer :: ih_nplant_si_scpf integer :: ih_gpp_si_scpf @@ -434,7 +435,7 @@ module FatesHistoryInterfaceMod integer :: ih_secondaryforest_area_si_age integer :: ih_area_burnt_si_age ! integer :: ih_fire_rate_of_spread_front_si_age - ! integer :: ih_fire_intensity_si_age + integer :: ih_fire_intensity_si_age integer :: ih_fire_sum_fuel_si_age ! indices to (site x height) variables @@ -1741,6 +1742,7 @@ subroutine update_history_dyn(this,nc,nsites,sites) hio_tfc_ros_pa => this%hvars(ih_TFC_ROS_pa)%r81d, & hio_effect_wspeed_pa => this%hvars(ih_effect_wspeed_pa)%r81d, & hio_fire_intensity_pa => this%hvars(ih_fire_intensity_pa)%r81d, & + hio_fire_intensity_area_product_si => this%hvars(ih_fire_intensity_area_product_si)%r81d, & hio_fire_area_pa => this%hvars(ih_fire_area_pa)%r81d, & hio_fire_fuel_bulkd_pa => this%hvars(ih_fire_fuel_bulkd_pa)%r81d, & hio_fire_fuel_eff_moist_pa => this%hvars(ih_fire_fuel_eff_moist_pa)%r81d, & @@ -1914,7 +1916,7 @@ subroutine update_history_dyn(this,nc,nsites,sites) hio_secondaryforest_area_si_age => this%hvars(ih_secondaryforest_area_si_age)%r82d, & hio_area_burnt_si_age => this%hvars(ih_area_burnt_si_age)%r82d, & ! hio_fire_rate_of_spread_front_si_age => this%hvars(ih_fire_rate_of_spread_front_si_age)%r82d, & - ! hio_fire_intensity_si_age => this%hvars(ih_fire_intensity_si_age)%r82d, & + hio_fire_intensity_si_age => this%hvars(ih_fire_intensity_si_age)%r82d, & hio_fire_sum_fuel_si_age => this%hvars(ih_fire_sum_fuel_si_age)%r82d, & hio_canopy_height_dist_si_height => this%hvars(ih_canopy_height_dist_si_height)%r82d, & hio_leaf_height_dist_si_height => this%hvars(ih_leaf_height_dist_si_height)%r82d, & @@ -2085,8 +2087,8 @@ subroutine update_history_dyn(this,nc,nsites,sites) ! hio_fire_rate_of_spread_front_si_age(io_si, cpatch%age_class) = hio_fire_rate_of_spread_si_age(io_si, cpatch%age_class) + & ! cpatch%ros_front * cpatch*frac_burnt * cpatch%area * AREA_INV - ! hio_fire_intensity_si_age(io_si, cpatch%age_class) = hio_fire_intensity_si_age(io_si, cpatch%age_class) + & - ! cpatch%FI * cpatch%frac_burnt * cpatch%area * AREA_INV + hio_fire_intensity_si_age(io_si, cpatch%age_class) = hio_fire_intensity_si_age(io_si, cpatch%age_class) + & + cpatch%FI * cpatch%frac_burnt * cpatch%area * AREA_INV hio_fire_sum_fuel_si_age(io_si, cpatch%age_class) = hio_fire_sum_fuel_si_age(io_si, cpatch%age_class) + & cpatch%sum_fuel * cpatch%area * AREA_INV @@ -2641,6 +2643,10 @@ subroutine update_history_dyn(this,nc,nsites,sites) cpatch%litter_moisture(i_fuel) * cpatch%area * AREA_INV end do + + hio_fire_intensity_area_product_si(io_si) = hio_fire_intensity_area_product_si(io_si) + & + cpatch%FI * cpatch%frac_burnt * cpatch%area * AREA_INV + ! Update Litter Flux Variables litt_c => cpatch%litter(element_pos(carbon12_element)) @@ -4044,6 +4050,12 @@ subroutine define_history_vars(this, initialize_variables) avgflag='A', vtype=patch_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & ivar=ivar, initialize=initialize_variables, index = ih_fire_intensity_pa ) + call this%set_history_var(vname='FIRE_INTENSITY_AREA_PRODUCT', units='kJ/m/s', & + long='spitfire product of fire intensity and burned area (divide by FIRE_AREA to get area-weifghted mean intensity)', & + use_default='active', & + avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & + ivar=ivar, initialize=initialize_variables, index = ih_fire_intensity_area_product_si ) + call this%set_history_var(vname='FIRE_AREA', units='fraction', & long='spitfire fire area burn fraction', use_default='active', & avgflag='A', vtype=patch_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & @@ -4086,6 +4098,12 @@ subroutine define_history_vars(this, initialize_variables) avgflag='A', vtype=site_age_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & ivar=ivar, initialize=initialize_variables, index = ih_area_burnt_si_age ) + call this%set_history_var(vname='FIRE_INTENSITY_BY_PATCH_AGE', units='kJ/m/2', & + long='product of fire intensity and burned area, resolved by patch age (so divide by AREA_BURNT_BY_PATCH_AGE to get burned-area-weighted-average intensity', & + use_default='active', & + avgflag='A', vtype=site_age_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & + ivar=ivar, initialize=initialize_variables, index = ih_fire_intensity_si_age ) + call this%set_history_var(vname='SUM_FUEL_BY_PATCH_AGE', units='gC / m2 of site area', & long='spitfire ground fuel related to ros (omits 1000hr fuels) within each patch age bin (divide by patch_area_by_age to get fuel per unit area of that-age patch)', & use_default='active', & From a5fe759eb6d6c3c4e8e03049ed027f351eef7ba5 Mon Sep 17 00:00:00 2001 From: ckoven Date: Fri, 24 Apr 2020 11:39:00 -0600 Subject: [PATCH 4/9] changed _pa vars to be _si --- main/FatesHistoryInterfaceMod.F90 | 106 +++++++++++++++--------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/main/FatesHistoryInterfaceMod.F90 b/main/FatesHistoryInterfaceMod.F90 index 2a0f4ef153..fed76016db 100644 --- a/main/FatesHistoryInterfaceMod.F90 +++ b/main/FatesHistoryInterfaceMod.F90 @@ -141,16 +141,6 @@ module FatesHistoryInterfaceMod integer :: ih_trimming_pa integer :: ih_area_plant_pa integer :: ih_area_treespread_pa - integer :: ih_spitfire_ROS_pa - integer :: ih_effect_wspeed_pa - integer :: ih_TFC_ROS_pa - integer :: ih_fire_intensity_pa - integer :: ih_fire_area_pa - integer :: ih_fire_fuel_bulkd_pa - integer :: ih_fire_fuel_eff_moist_pa - integer :: ih_fire_fuel_sav_pa - integer :: ih_fire_fuel_mef_pa - integer :: ih_sum_fuel_pa integer :: ih_cwd_elcwd @@ -269,6 +259,16 @@ module FatesHistoryInterfaceMod integer :: ih_nesterov_fire_danger_si integer :: ih_fire_intensity_area_product_si + integer :: ih_spitfire_ROS_si + integer :: ih_effect_wspeed_si + integer :: ih_TFC_ROS_si + integer :: ih_fire_intensity_si + integer :: ih_fire_area_si + integer :: ih_fire_fuel_bulkd_si + integer :: ih_fire_fuel_eff_moist_si + integer :: ih_fire_fuel_sav_si + integer :: ih_fire_fuel_mef_si + integer :: ih_sum_fuel_si integer :: ih_nplant_si_scpf integer :: ih_gpp_si_scpf @@ -1738,17 +1738,17 @@ subroutine update_history_dyn(this,nc,nsites,sites) hio_mortality_si_pft => this%hvars(ih_mortality_si_pft)%r82d, & hio_crownarea_si_pft => this%hvars(ih_crownarea_si_pft)%r82d, & hio_nesterov_fire_danger_si => this%hvars(ih_nesterov_fire_danger_si)%r81d, & - hio_spitfire_ros_pa => this%hvars(ih_spitfire_ROS_pa)%r81d, & - hio_tfc_ros_pa => this%hvars(ih_TFC_ROS_pa)%r81d, & - hio_effect_wspeed_pa => this%hvars(ih_effect_wspeed_pa)%r81d, & - hio_fire_intensity_pa => this%hvars(ih_fire_intensity_pa)%r81d, & + hio_spitfire_ros_si => this%hvars(ih_spitfire_ROS_si)%r81d, & + hio_tfc_ros_si => this%hvars(ih_TFC_ROS_si)%r81d, & + hio_effect_wspeed_si => this%hvars(ih_effect_wspeed_si)%r81d, & + hio_fire_intensity_si => this%hvars(ih_fire_intensity_si)%r81d, & hio_fire_intensity_area_product_si => this%hvars(ih_fire_intensity_area_product_si)%r81d, & - hio_fire_area_pa => this%hvars(ih_fire_area_pa)%r81d, & - hio_fire_fuel_bulkd_pa => this%hvars(ih_fire_fuel_bulkd_pa)%r81d, & - hio_fire_fuel_eff_moist_pa => this%hvars(ih_fire_fuel_eff_moist_pa)%r81d, & - hio_fire_fuel_sav_pa => this%hvars(ih_fire_fuel_sav_pa)%r81d, & - hio_fire_fuel_mef_pa => this%hvars(ih_fire_fuel_mef_pa)%r81d, & - hio_sum_fuel_pa => this%hvars(ih_sum_fuel_pa)%r81d, & + hio_fire_area_si => this%hvars(ih_fire_area_si)%r81d, & + hio_fire_fuel_bulkd_si => this%hvars(ih_fire_fuel_bulkd_si)%r81d, & + hio_fire_fuel_eff_moist_si => this%hvars(ih_fire_fuel_eff_moist_si)%r81d, & + hio_fire_fuel_sav_si => this%hvars(ih_fire_fuel_sav_si)%r81d, & + hio_fire_fuel_mef_si => this%hvars(ih_fire_fuel_mef_si)%r81d, & + hio_sum_fuel_si => this%hvars(ih_sum_fuel_si)%r81d, & hio_litter_in_si => this%hvars(ih_litter_in_si)%r81d, & hio_litter_out_si => this%hvars(ih_litter_out_si)%r81d, & hio_seed_bank_si => this%hvars(ih_seed_bank_si)%r81d, & @@ -2627,16 +2627,16 @@ subroutine update_history_dyn(this,nc,nsites,sites) endif ! Update Fire Variables - hio_spitfire_ros_pa(io_pa) = cpatch%ROS_front - hio_effect_wspeed_pa(io_pa) = cpatch%effect_wspeed - hio_tfc_ros_pa(io_pa) = cpatch%TFC_ROS - hio_fire_intensity_pa(io_pa) = cpatch%FI - hio_fire_area_pa(io_pa) = cpatch%frac_burnt - hio_fire_fuel_bulkd_pa(io_pa) = cpatch%fuel_bulkd - hio_fire_fuel_eff_moist_pa(io_pa) = cpatch%fuel_eff_moist - hio_fire_fuel_sav_pa(io_pa) = cpatch%fuel_sav - hio_fire_fuel_mef_pa(io_pa) = cpatch%fuel_mef - hio_sum_fuel_pa(io_pa) = cpatch%sum_fuel * g_per_kg * patch_scaling_scalar + hio_spitfire_ros_si(io_si) = hio_spitfire_ros_si(io_si) + cpatch%ROS_front * cpatch%area * AREA_INV + hio_effect_wspeed_si(io_si) = hio_effect_wspeed_si(io_si) + cpatch%effect_wspeed * cpatch%area * AREA_INV + hio_tfc_ros_si(io_si) = hio_tfc_ros_si(io_si) + cpatch%TFC_ROS * cpatch%area * AREA_INV + hio_fire_intensity_si(io_si) = hio_fire_intensity_si(io_si) + cpatch%FI * cpatch%area * AREA_INV + hio_fire_area_si(io_si) = hio_fire_area_si(io_si) + cpatch%frac_burnt * cpatch%area * AREA_INV + hio_fire_fuel_bulkd_si(io_si) = hio_fire_fuel_bulkd_si(io_si) + cpatch%fuel_bulkd * cpatch%area * AREA_INV + hio_fire_fuel_eff_moist_si(io_si) = hio_fire_fuel_eff_moist_si(io_si) + cpatch%fuel_eff_moist * cpatch%area * AREA_INV + hio_fire_fuel_sav_si(io_si) = hio_fire_fuel_sav_si(io_si) + cpatch%fuel_sav * cpatch%area * AREA_INV + hio_fire_fuel_mef_si(io_si) = hio_fire_fuel_mef_si(io_si) + cpatch%fuel_mef * cpatch%area * AREA_INV + hio_sum_fuel_si(io_si) = hio_sum_fuel_si(io_si) + cpatch%sum_fuel * g_per_kg * patch_scaling_scalar * cpatch%area * AREA_INV do i_fuel = 1,nfsc hio_litter_moisture_si_fuel(io_si, i_fuel) = hio_litter_moisture_si_fuel(io_si, i_fuel) + & @@ -3825,17 +3825,17 @@ subroutine define_history_vars(this, initialize_variables) call this%set_history_var(vname='TRIMMING', units='none', & long='Degree to which canopy expansion is limited by leaf economics', & use_default='active', & - avgflag='A', vtype=patch_r8, hlms='CLM:ALM', flushval=1.0_r8, upfreq=1, & + avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=1.0_r8, upfreq=1, & ivar=ivar, initialize=initialize_variables, index = ih_trimming_pa) call this%set_history_var(vname='AREA_PLANT', units='m2', & long='area occupied by all plants', use_default='active', & - avgflag='A', vtype=patch_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & + avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & ivar=ivar, initialize=initialize_variables, index = ih_area_plant_pa) call this%set_history_var(vname='AREA_TREES', units='m2', & long='area occupied by woody plants', use_default='active', & - avgflag='A', vtype=patch_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & + avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & ivar=ivar, initialize=initialize_variables, index = ih_area_treespread_pa) call this%set_history_var(vname='SITE_COLD_STATUS', units='0,1,2', & @@ -4032,23 +4032,23 @@ subroutine define_history_vars(this, initialize_variables) call this%set_history_var(vname='FIRE_ROS', units='m/min', & long='fire rate of spread m/min', use_default='active', & - avgflag='A', vtype=patch_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & - ivar=ivar, initialize=initialize_variables, index = ih_spitfire_ROS_pa) + avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & + ivar=ivar, initialize=initialize_variables, index = ih_spitfire_ROS_si) call this%set_history_var(vname='EFFECT_WSPEED', units='none', & long ='effective windspeed for fire spread', use_default='active', & - avgflag='A', vtype=patch_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & - ivar=ivar, initialize=initialize_variables, index = ih_effect_wspeed_pa ) + avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & + ivar=ivar, initialize=initialize_variables, index = ih_effect_wspeed_si ) call this%set_history_var(vname='FIRE_TFC_ROS', units='kgC/m2', & long ='total fuel consumed', use_default='active', & - avgflag='A', vtype=patch_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & - ivar=ivar, initialize=initialize_variables, index = ih_TFC_ROS_pa ) + avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & + ivar=ivar, initialize=initialize_variables, index = ih_TFC_ROS_si ) call this%set_history_var(vname='FIRE_INTENSITY', units='kJ/m/s', & long='spitfire fire intensity: kJ/m/s', use_default='active', & - avgflag='A', vtype=patch_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & - ivar=ivar, initialize=initialize_variables, index = ih_fire_intensity_pa ) + avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & + ivar=ivar, initialize=initialize_variables, index = ih_fire_intensity_si ) call this%set_history_var(vname='FIRE_INTENSITY_AREA_PRODUCT', units='kJ/m/s', & long='spitfire product of fire intensity and burned area (divide by FIRE_AREA to get area-weifghted mean intensity)', & @@ -4058,34 +4058,34 @@ subroutine define_history_vars(this, initialize_variables) call this%set_history_var(vname='FIRE_AREA', units='fraction', & long='spitfire fire area burn fraction', use_default='active', & - avgflag='A', vtype=patch_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & - ivar=ivar, initialize=initialize_variables, index = ih_fire_area_pa ) + avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & + ivar=ivar, initialize=initialize_variables, index = ih_fire_area_si ) call this%set_history_var(vname='fire_fuel_mef', units='m', & long='spitfire fuel moisture', use_default='active', & - avgflag='A', vtype=patch_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & - ivar=ivar, initialize=initialize_variables, index = ih_fire_fuel_mef_pa ) + avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & + ivar=ivar, initialize=initialize_variables, index = ih_fire_fuel_mef_si ) call this%set_history_var(vname='fire_fuel_bulkd', units='kg biomass/m3', & long='spitfire fuel bulk density', use_default='active', & - avgflag='A', vtype=patch_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & - ivar=ivar, initialize=initialize_variables, index = ih_fire_fuel_bulkd_pa ) + avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & + ivar=ivar, initialize=initialize_variables, index = ih_fire_fuel_bulkd_si ) call this%set_history_var(vname='FIRE_FUEL_EFF_MOIST', units='m', & long='spitfire fuel moisture', use_default='active', & - avgflag='A', vtype=patch_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & - ivar=ivar, initialize=initialize_variables, index = ih_fire_fuel_eff_moist_pa ) + avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & + ivar=ivar, initialize=initialize_variables, index = ih_fire_fuel_eff_moist_si ) call this%set_history_var(vname='fire_fuel_sav', units='per m', & long='spitfire fuel surface/volume ', use_default='active', & - avgflag='A', vtype=patch_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & - ivar=ivar, initialize=initialize_variables, index = ih_fire_fuel_sav_pa ) + avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & + ivar=ivar, initialize=initialize_variables, index = ih_fire_fuel_sav_si ) call this%set_history_var(vname='SUM_FUEL', units='gC m-2', & long='total ground fuel related to ros (omits 1000hr fuels)', & use_default='active', & - avgflag='A', vtype=patch_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & - ivar=ivar, initialize=initialize_variables, index = ih_sum_fuel_pa ) + avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & + ivar=ivar, initialize=initialize_variables, index = ih_sum_fuel_si ) call this%set_history_var(vname='FUEL_MOISTURE_NFSC', units='-', & long='spitfire size-resolved fuel moisture', use_default='active', & From d66dac84dcb3e68001b25b9e6b06922a6f9c5ac8 Mon Sep 17 00:00:00 2001 From: ckoven Date: Fri, 24 Apr 2020 13:48:24 -0600 Subject: [PATCH 5/9] bugixes --- main/FatesHistoryInterfaceMod.F90 | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/main/FatesHistoryInterfaceMod.F90 b/main/FatesHistoryInterfaceMod.F90 index fed76016db..7920653c35 100644 --- a/main/FatesHistoryInterfaceMod.F90 +++ b/main/FatesHistoryInterfaceMod.F90 @@ -1685,7 +1685,6 @@ subroutine update_history_dyn(this,nc,nsites,sites) real(r8) :: n_density ! individual of cohort per m2. real(r8) :: n_perm2 ! individuals per m2 for the whole column - real(r8) :: patch_scaling_scalar ! ratio of canopy to patch area for counteracting patch scaling real(r8) :: dbh ! diameter ("at breast height") real(r8) :: coage ! cohort age real(r8) :: npp_partition_error ! a check that the NPP partitions sum to carbon allocation @@ -1738,7 +1737,7 @@ subroutine update_history_dyn(this,nc,nsites,sites) hio_mortality_si_pft => this%hvars(ih_mortality_si_pft)%r82d, & hio_crownarea_si_pft => this%hvars(ih_crownarea_si_pft)%r82d, & hio_nesterov_fire_danger_si => this%hvars(ih_nesterov_fire_danger_si)%r81d, & - hio_spitfire_ros_si => this%hvars(ih_spitfire_ROS_si)%r81d, & + hio_spitfire_ROS_si => this%hvars(ih_spitfire_ROS_si)%r81d, & hio_tfc_ros_si => this%hvars(ih_TFC_ROS_si)%r81d, & hio_effect_wspeed_si => this%hvars(ih_effect_wspeed_si)%r81d, & hio_fire_intensity_si => this%hvars(ih_fire_intensity_si)%r81d, & @@ -2619,13 +2618,7 @@ subroutine update_history_dyn(this,nc,nsites,sites) ! Patch specific variables that are already calculated ! These things are all duplicated. Should they all be converted to LL or array structures RF? ! define scalar to counteract the patch albedo scaling logic for conserved quantities - - if (cpatch%area .gt. 0._r8 .and. cpatch%total_canopy_area .gt.0 ) then - patch_scaling_scalar = min(1._r8, cpatch%area / cpatch%total_canopy_area) - else - patch_scaling_scalar = 0._r8 - endif - + ! Update Fire Variables hio_spitfire_ros_si(io_si) = hio_spitfire_ros_si(io_si) + cpatch%ROS_front * cpatch%area * AREA_INV hio_effect_wspeed_si(io_si) = hio_effect_wspeed_si(io_si) + cpatch%effect_wspeed * cpatch%area * AREA_INV @@ -2636,7 +2629,7 @@ subroutine update_history_dyn(this,nc,nsites,sites) hio_fire_fuel_eff_moist_si(io_si) = hio_fire_fuel_eff_moist_si(io_si) + cpatch%fuel_eff_moist * cpatch%area * AREA_INV hio_fire_fuel_sav_si(io_si) = hio_fire_fuel_sav_si(io_si) + cpatch%fuel_sav * cpatch%area * AREA_INV hio_fire_fuel_mef_si(io_si) = hio_fire_fuel_mef_si(io_si) + cpatch%fuel_mef * cpatch%area * AREA_INV - hio_sum_fuel_si(io_si) = hio_sum_fuel_si(io_si) + cpatch%sum_fuel * g_per_kg * patch_scaling_scalar * cpatch%area * AREA_INV + hio_sum_fuel_si(io_si) = hio_sum_fuel_si(io_si) + cpatch%sum_fuel * g_per_kg * cpatch%area * AREA_INV do i_fuel = 1,nfsc hio_litter_moisture_si_fuel(io_si, i_fuel) = hio_litter_moisture_si_fuel(io_si, i_fuel) + & @@ -3825,17 +3818,17 @@ subroutine define_history_vars(this, initialize_variables) call this%set_history_var(vname='TRIMMING', units='none', & long='Degree to which canopy expansion is limited by leaf economics', & use_default='active', & - avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=1.0_r8, upfreq=1, & + avgflag='A', vtype=patch_r8, hlms='CLM:ALM', flushval=1.0_r8, upfreq=1, & ivar=ivar, initialize=initialize_variables, index = ih_trimming_pa) call this%set_history_var(vname='AREA_PLANT', units='m2', & long='area occupied by all plants', use_default='active', & - avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & + avgflag='A', vtype=patch_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & ivar=ivar, initialize=initialize_variables, index = ih_area_plant_pa) call this%set_history_var(vname='AREA_TREES', units='m2', & long='area occupied by woody plants', use_default='active', & - avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & + avgflag='A', vtype=patch_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & ivar=ivar, initialize=initialize_variables, index = ih_area_treespread_pa) call this%set_history_var(vname='SITE_COLD_STATUS', units='0,1,2', & From 538415c682c6b0ada7eb0f9471043ec8561371df Mon Sep 17 00:00:00 2001 From: ckoven Date: Mon, 27 Apr 2020 17:15:48 -0600 Subject: [PATCH 6/9] added new fire variable * fire_area metrics --- main/FatesHistoryInterfaceMod.F90 | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/main/FatesHistoryInterfaceMod.F90 b/main/FatesHistoryInterfaceMod.F90 index 7920653c35..49fc51fe85 100644 --- a/main/FatesHistoryInterfaceMod.F90 +++ b/main/FatesHistoryInterfaceMod.F90 @@ -259,9 +259,11 @@ module FatesHistoryInterfaceMod integer :: ih_nesterov_fire_danger_si integer :: ih_fire_intensity_area_product_si - integer :: ih_spitfire_ROS_si + integer :: ih_spitfire_ros_si + integer :: ih_fire_ros_area_product_si integer :: ih_effect_wspeed_si - integer :: ih_TFC_ROS_si + integer :: ih_tfc_ros_si + integer :: ih_tfc_ros_area_product_si integer :: ih_fire_intensity_si integer :: ih_fire_area_si integer :: ih_fire_fuel_bulkd_si @@ -1737,8 +1739,10 @@ subroutine update_history_dyn(this,nc,nsites,sites) hio_mortality_si_pft => this%hvars(ih_mortality_si_pft)%r82d, & hio_crownarea_si_pft => this%hvars(ih_crownarea_si_pft)%r82d, & hio_nesterov_fire_danger_si => this%hvars(ih_nesterov_fire_danger_si)%r81d, & - hio_spitfire_ROS_si => this%hvars(ih_spitfire_ROS_si)%r81d, & - hio_tfc_ros_si => this%hvars(ih_TFC_ROS_si)%r81d, & + hio_spitfire_ros_si => this%hvars(ih_spitfire_ros_si)%r81d, & + hio_fire_ros_area_product_si=> this%hvars(ih_fire_ros_area_product_si)%r81d, & + hio_tfc_ros_si => this%hvars(ih_tfc_ros_si)%r81d, & + hio_tfc_ros_area_product_si => this%hvars(ih_tfc_ros_area_product_si)%r81d, & hio_effect_wspeed_si => this%hvars(ih_effect_wspeed_si)%r81d, & hio_fire_intensity_si => this%hvars(ih_fire_intensity_si)%r81d, & hio_fire_intensity_area_product_si => this%hvars(ih_fire_intensity_area_product_si)%r81d, & @@ -2621,8 +2625,12 @@ subroutine update_history_dyn(this,nc,nsites,sites) ! Update Fire Variables hio_spitfire_ros_si(io_si) = hio_spitfire_ros_si(io_si) + cpatch%ROS_front * cpatch%area * AREA_INV + hio_fire_ros_area_product_si(io_si)= hio_fire_ros_area_product_si(io_si) + & + cpatch%frac_burnt * cpatch%ROS_front * cpatch%area * AREA_INV hio_effect_wspeed_si(io_si) = hio_effect_wspeed_si(io_si) + cpatch%effect_wspeed * cpatch%area * AREA_INV hio_tfc_ros_si(io_si) = hio_tfc_ros_si(io_si) + cpatch%TFC_ROS * cpatch%area * AREA_INV + hio_tfc_ros_area_product_si(io_si) = hio_tfc_ros_area_product_si(io_si) + & + cpatch%frac_burnt * cpatch%TFC_ROS * cpatch%area * AREA_INV hio_fire_intensity_si(io_si) = hio_fire_intensity_si(io_si) + cpatch%FI * cpatch%area * AREA_INV hio_fire_area_si(io_si) = hio_fire_area_si(io_si) + cpatch%frac_burnt * cpatch%area * AREA_INV hio_fire_fuel_bulkd_si(io_si) = hio_fire_fuel_bulkd_si(io_si) + cpatch%fuel_bulkd * cpatch%area * AREA_INV @@ -4026,7 +4034,12 @@ subroutine define_history_vars(this, initialize_variables) call this%set_history_var(vname='FIRE_ROS', units='m/min', & long='fire rate of spread m/min', use_default='active', & avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & - ivar=ivar, initialize=initialize_variables, index = ih_spitfire_ROS_si) + ivar=ivar, initialize=initialize_variables, index = ih_spitfire_ros_si) + + call this%set_history_var(vname='FIRE_ROS_AREA_PRODUCT', units='m/min', & + long='product of fire rate of spread (m/min) and burned area (fraction)--divide by FIRE_AREA to get burned-area-weighted-mean ROS', use_default='active', & + avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & + ivar=ivar, initialize=initialize_variables, index = ih_fire_ros_area_product_si) call this%set_history_var(vname='EFFECT_WSPEED', units='none', & long ='effective windspeed for fire spread', use_default='active', & @@ -4036,7 +4049,12 @@ subroutine define_history_vars(this, initialize_variables) call this%set_history_var(vname='FIRE_TFC_ROS', units='kgC/m2', & long ='total fuel consumed', use_default='active', & avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & - ivar=ivar, initialize=initialize_variables, index = ih_TFC_ROS_si ) + ivar=ivar, initialize=initialize_variables, index = ih_tfc_ros_si ) + + call this%set_history_var(vname='FIRE_TFC_ROS_AREA_PRODUCT', units='kgC/m2', & + long ='product of total fuel consumed and burned area--divide by FIRE_AREA to get burned-area-weighted-mean TFC', use_default='active', & + avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & + ivar=ivar, initialize=initialize_variables, index = ih_tfc_ros_area_product_si ) call this%set_history_var(vname='FIRE_INTENSITY', units='kJ/m/s', & long='spitfire fire intensity: kJ/m/s', use_default='active', & From 6f2803dd70dc9be8c6066fc89ffb869c476d523b Mon Sep 17 00:00:00 2001 From: ckoven Date: Tue, 28 Apr 2020 11:38:21 -0600 Subject: [PATCH 7/9] added element-indexed burn flux var and fuel-indexed frac-burned var --- main/FatesHistoryInterfaceMod.F90 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/main/FatesHistoryInterfaceMod.F90 b/main/FatesHistoryInterfaceMod.F90 index 49fc51fe85..d854aaffb9 100644 --- a/main/FatesHistoryInterfaceMod.F90 +++ b/main/FatesHistoryInterfaceMod.F90 @@ -161,6 +161,7 @@ module FatesHistoryInterfaceMod integer :: ih_fines_bg_elem integer :: ih_cwd_ag_elem integer :: ih_cwd_bg_elem + integer :: ih_burn_flux_elem integer :: ih_daily_temp integer :: ih_daily_rh @@ -490,6 +491,7 @@ module FatesHistoryInterfaceMod ! indices to (site x fuel class) variables integer :: ih_litter_moisture_si_fuel + integer :: ih_burnt_frac_litter_si_fuel ! indices to (site x cwd size class) variables integer :: ih_cwd_ag_si_cwdsc @@ -1830,6 +1832,7 @@ subroutine update_history_dyn(this,nc,nsites,sites) hio_cambialfiremort_si_scpf => this%hvars(ih_cambialfiremort_si_scpf)%r82d, & hio_fire_c_to_atm_si => this%hvars(ih_fire_c_to_atm_si)%r81d, & + hio_burn_flux_elem => this%hvars(ih_burn_flux_elem)%r82d, & hio_m1_si_scls => this%hvars(ih_m1_si_scls)%r82d, & hio_m2_si_scls => this%hvars(ih_m2_si_scls)%r82d, & @@ -1921,6 +1924,7 @@ subroutine update_history_dyn(this,nc,nsites,sites) ! hio_fire_rate_of_spread_front_si_age => this%hvars(ih_fire_rate_of_spread_front_si_age)%r82d, & hio_fire_intensity_si_age => this%hvars(ih_fire_intensity_si_age)%r82d, & hio_fire_sum_fuel_si_age => this%hvars(ih_fire_sum_fuel_si_age)%r82d, & + hio_burnt_frac_litter_si_fuel => this%hvars(ih_burnt_frac_litter_si_fuel)%r82d, & hio_canopy_height_dist_si_height => this%hvars(ih_canopy_height_dist_si_height)%r82d, & hio_leaf_height_dist_si_height => this%hvars(ih_leaf_height_dist_si_height)%r82d, & hio_litter_moisture_si_fuel => this%hvars(ih_litter_moisture_si_fuel)%r82d, & @@ -1991,6 +1995,12 @@ subroutine update_history_dyn(this,nc,nsites,sites) do el = 1, num_elements site_mass => sites(s)%mass_balance(el) hio_err_fates_si(io_si,el) = site_mass%err_fates * mg_per_kg + + ! Total element lost to atmosphere from burning (kg/site/day -> g/m2/s) + hio_burn_flux_elem(io_si,el) = & + sites(s)%mass_balance(el)%burn_flux_to_atm * & + g_per_kg * ha_per_m2 * days_per_sec + end do hio_canopy_spread_si(io_si) = sites(s)%spread @@ -2642,6 +2652,9 @@ subroutine update_history_dyn(this,nc,nsites,sites) do i_fuel = 1,nfsc hio_litter_moisture_si_fuel(io_si, i_fuel) = hio_litter_moisture_si_fuel(io_si, i_fuel) + & cpatch%litter_moisture(i_fuel) * cpatch%area * AREA_INV + + hio_burnt_frac_litter_si_fuel(io_si, i_fuel) = hio_burnt_frac_litter_si_fuel(io_si, i_fuel) + & + cpatch%burnt_frac_litter(i_fuel) * cpatch%frac_burnt * cpatch%area * AREA_INV end do @@ -4121,6 +4134,12 @@ subroutine define_history_vars(this, initialize_variables) avgflag='A', vtype=site_age_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & ivar=ivar, initialize=initialize_variables, index = ih_fire_sum_fuel_si_age ) + call this%set_history_var(vname='BURNT_LITTER_FRAC_AREA_PRODUCT', units='fraction', & + long='product of fraction of fuel burnt and burned area (divide by FIRE_AREA to get burned-area-weighted mean fraction fuel burnt)', & + use_default='active', & + avgflag='A', vtype=site_fuel_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & + ivar=ivar, initialize=initialize_variables, index = ih_burnt_frac_litter_si_fuel ) + ! Litter Variables @@ -5280,6 +5299,11 @@ subroutine define_history_vars(this, initialize_variables) avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=hlm_hio_ignore_val, & upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_fire_c_to_atm_si ) + call this%set_history_var(vname='FIRE_FLUX', units='g/m^2/s', & + long='ED/SPitfire loss to atmosphere of elements', use_default='active', & + avgflag='A', vtype=site_elem_r8, hlms='CLM:ALM', flushval=hlm_hio_ignore_val, & + upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_burn_flux_elem ) + call this%set_history_var(vname='CBALANCE_ERROR_FATES', units='mgC/day', & long='total carbon error, FATES', use_default='active', & avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=hlm_hio_ignore_val, & From 82cb0e45395b38b6dc697133e01dbcd097118056 Mon Sep 17 00:00:00 2001 From: ckoven Date: Tue, 28 Apr 2020 13:28:07 -0600 Subject: [PATCH 8/9] deleted rather than commented-out prior call to ZeroMassBalFlux --- main/EDMainMod.F90 | 1 - 1 file changed, 1 deletion(-) diff --git a/main/EDMainMod.F90 b/main/EDMainMod.F90 index 31f9d930e8..b5fcb7d31f 100644 --- a/main/EDMainMod.F90 +++ b/main/EDMainMod.F90 @@ -721,7 +721,6 @@ subroutine TotalBalanceCheck (currentSite, call_index ) if(call_index == final_check_id) then site_mass%old_stock = total_stock site_mass%err_fates = net_flux - change_in_stock - call site_mass%ZeroMassBalFlux() end if end do From 5ac1cebe44b441253df4bd8a5f4ba7c97764aebc Mon Sep 17 00:00:00 2001 From: Charlie Koven Date: Wed, 6 May 2020 10:36:57 -0700 Subject: [PATCH 9/9] Apply suggestions from code review Co-authored-by: jkshuman --- main/FatesHistoryInterfaceMod.F90 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main/FatesHistoryInterfaceMod.F90 b/main/FatesHistoryInterfaceMod.F90 index d854aaffb9..b1f45ebf0d 100644 --- a/main/FatesHistoryInterfaceMod.F90 +++ b/main/FatesHistoryInterfaceMod.F90 @@ -4075,7 +4075,7 @@ subroutine define_history_vars(this, initialize_variables) ivar=ivar, initialize=initialize_variables, index = ih_fire_intensity_si ) call this%set_history_var(vname='FIRE_INTENSITY_AREA_PRODUCT', units='kJ/m/s', & - long='spitfire product of fire intensity and burned area (divide by FIRE_AREA to get area-weifghted mean intensity)', & + long='spitfire product of fire intensity and burned area (divide by FIRE_AREA to get area-weighted mean intensity)', & use_default='active', & avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & ivar=ivar, initialize=initialize_variables, index = ih_fire_intensity_area_product_si ) @@ -4085,12 +4085,12 @@ subroutine define_history_vars(this, initialize_variables) avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & ivar=ivar, initialize=initialize_variables, index = ih_fire_area_si ) - call this%set_history_var(vname='fire_fuel_mef', units='m', & + call this%set_history_var(vname='FIRE_FUEL_MEF', units='m', & long='spitfire fuel moisture', use_default='active', & avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & ivar=ivar, initialize=initialize_variables, index = ih_fire_fuel_mef_si ) - call this%set_history_var(vname='fire_fuel_bulkd', units='kg biomass/m3', & + call this%set_history_var(vname='FIRE_FUEL_BULKD', units='kg biomass/m3', & long='spitfire fuel bulk density', use_default='active', & avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & ivar=ivar, initialize=initialize_variables, index = ih_fire_fuel_bulkd_si ) @@ -4100,7 +4100,7 @@ subroutine define_history_vars(this, initialize_variables) avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & ivar=ivar, initialize=initialize_variables, index = ih_fire_fuel_eff_moist_si ) - call this%set_history_var(vname='fire_fuel_sav', units='per m', & + call this%set_history_var(vname='FIRE_FUEL_SAV', units='per m', & long='spitfire fuel surface/volume ', use_default='active', & avgflag='A', vtype=site_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, & ivar=ivar, initialize=initialize_variables, index = ih_fire_fuel_sav_si ) @@ -5300,7 +5300,7 @@ subroutine define_history_vars(this, initialize_variables) upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_fire_c_to_atm_si ) call this%set_history_var(vname='FIRE_FLUX', units='g/m^2/s', & - long='ED/SPitfire loss to atmosphere of elements', use_default='active', & + long='ED-spitfire loss to atmosphere of elements', use_default='active', & avgflag='A', vtype=site_elem_r8, hlms='CLM:ALM', flushval=hlm_hio_ignore_val, & upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_burn_flux_elem )