Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
d98f99b
title for emission factors parameter
rosiealice Mar 14, 2024
ea19afe
created variables for emission factors and injection heights
rosiealice Mar 14, 2024
b0113a3
added compound names to PFT file
rosiealice Mar 14, 2024
42d8cf3
mapped emission factors into FATES PFT space
rosiealice Mar 14, 2024
bcd874a
mapped fates emission heights from CTSM
rosiealice Mar 14, 2024
5bdc569
minor whitespace correction
rosiealice Mar 14, 2024
57c5e7a
more whitespace changes
rosiealice Mar 14, 2024
b8ec555
more whitespace changes
rosiealice Mar 14, 2024
bcdff53
Merge pull request #1 from NorESMhub/fireemission_parameters
mvdebolskiy Mar 14, 2024
3048976
Code now should read in the PFT indexed emission variables
rosiealice Mar 14, 2024
3d39733
Merge commit '3048976e5a3cacf792b7beac9e6bb9904d2dbfe6' into feature/…
mvdebolskiy Mar 14, 2024
3351e64
bug fixes
rosiealice Mar 14, 2024
ae75ff2
skeleton fire emissions subroutine
rosiealice Mar 14, 2024
eaa0e69
add hardwired num_emission_compounds
rosiealice Mar 14, 2024
cef84f4
register dimension_name_nemission_compounds
rosiealice Mar 14, 2024
21171ae
created fire_emissions_pa variable
rosiealice Mar 14, 2024
f899aa5
create fire_emisions_pa
rosiealice Mar 14, 2024
694f49d
link to num_emission_compounds in SFMain
rosiealice Mar 14, 2024
aca34a3
add fire emission variables to FatesPatch type.
rosiealice Mar 14, 2024
a6d0f4d
link FATES patch emission variable to bc_out fates interface emission…
rosiealice Mar 14, 2024
df3a1c3
link FATES patch emission height variable to bc_out fates interface e…
rosiealice Mar 14, 2024
ea7948c
added patch operations for patch fire_emissions and fire_emission_hei…
rosiealice Mar 14, 2024
884962d
bug fixes to fates parameter file
rosiealice Mar 14, 2024
1f716cc
Merge pull request #3 from NorESMhub/fates_parameter_file
rosiealice Mar 14, 2024
45ff801
patch operations, take II
rosiealice Mar 15, 2024
d929fb4
Merge pull request #4 from NorESMhub/fireemission_parameters
maritsandstad Mar 15, 2024
1cbb306
compilation error fixes
rosiealice Mar 15, 2024
d3f0067
typo in EDParams
rosiealice Mar 15, 2024
060000c
working 2d parameter inputs :)
rosiealice Mar 15, 2024
93d45c4
Merge pull request #6 from NorESMhub/fe_parameter_testing
rosiealice Mar 15, 2024
bbe27fd
bug fixes to allow compliation
rosiealice Mar 15, 2024
f573816
Corrected logic of the nocomp flag in fire emissions subroutine
rosiealice Mar 18, 2024
96559fa
adding fire emissions call to this branch
rosiealice Mar 19, 2024
9b0fab5
new history variable code. compiles
rosiealice Mar 19, 2024
0dc8dfd
creates history variables
rosiealice Mar 19, 2024
1c249c3
Corrected infinite loop issue in fixed biogeog mode :)
rosiealice Mar 19, 2024
ab52f06
typo in the emissions factors
rosiealice Mar 19, 2024
9b3ec7c
added fire emissions to FATES restart file
rosiealice Mar 21, 2024
1627515
Merge branch 'fates_fire_emissions' into fireemission_parameters
rosiealice Mar 29, 2025
1e02edf
Merge pull request #13 from NorESMhub/fireemission_parameters
rosiealice Mar 29, 2025
1288c56
Merge branch 'fates_fire_emissions' into fire_emissions_calcs
rosiealice Mar 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions biogeochem/EDCanopyStructureMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1877,6 +1877,8 @@ subroutine update_hlm_dynamics(nsites,sites,fcolumn,bc_out)
use EDTypesMod , only : ed_site_type, AREA
use FatesPatchMod, only : fates_patch_type
use FatesInterfaceTypesMod , only : bc_out_type
use EDParamsMod, only : num_emission_compounds
use FatesConstantsMod , only : sec_per_day

!
! !ARGUMENTS
Expand All @@ -1903,6 +1905,8 @@ subroutine update_hlm_dynamics(nsites,sites,fcolumn,bc_out)
bc_out(s)%dleaf_pa(:) = 0._r8
bc_out(s)%z0m_pa(:) = 0._r8
bc_out(s)%displa_pa(:) = 0._r8
bc_out(s)%fire_emissions_pa(:,:) = 0._r8
bc_out(s)%fire_emission_height_pa(:) = 0._r8

currentPatch => sites(s)%oldest_patch
c = fcolumn(s)
Expand Down Expand Up @@ -1956,6 +1960,13 @@ subroutine update_hlm_dynamics(nsites,sites,fcolumn,bc_out)
currentCohort => currentCohort%taller
end do

do c = 1, num_emission_compounds
!is this in the right place in the code?
!what else do we need to do with restarts to not mess up the first day of emissions?
bc_out(s)%fire_emissions_pa(ifp,c) = currentPatch%fire_emissions(c) / sec_per_day
end do
bc_out(s)%fire_emission_height_pa(ifp) = currentPatch%fire_emission_height

! make sure there is some leaf and stem area
if (total_patch_leaf_stem_area > nearzero) then
currentCohort => currentPatch%shortest
Expand Down
5 changes: 5 additions & 0 deletions biogeochem/EDPatchDynamicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3136,6 +3136,7 @@ subroutine fuse_2_patches(csite, dp, rp)
!
! !USES:
use FatesSizeAgeTypeIndicesMod, only: get_age_class_index
use EDParamsMod, only: num_emission_compounds
!
! !ARGUMENTS:
type (ed_site_type), intent(inout),target :: csite ! Current site
Expand Down Expand Up @@ -3203,6 +3204,10 @@ subroutine fuse_2_patches(csite, dp, rp)
rp%ros_front = (dp%ros_front*dp%area + rp%ros_front*rp%area) * inv_sum_area
rp%tau_l = (dp%tau_l*dp%area + rp%tau_l*rp%area) * inv_sum_area
rp%tfc_ros = (dp%tfc_ros*dp%area + rp%tfc_ros*rp%area) * inv_sum_area
rp%fire_emission_height = (dp%fire_emission_height*dp%area + rp%fire_emission_height*rp%area) * inv_sum_area
do c = 1, num_emission_compounds
rp%fire_emissions(c) = (dp%fire_emissions(c)*dp%area + rp%fire_emissions(c)*rp%area) * inv_sum_area
enddo
rp%fi = (dp%fi*dp%area + rp%fi*rp%area) * inv_sum_area
rp%fd = (dp%fd*dp%area + rp%fd*rp%area) * inv_sum_area
rp%ros_back = (dp%ros_back*dp%area + rp%ros_back*rp%area) * inv_sum_area
Expand Down
9 changes: 9 additions & 0 deletions biogeochem/FatesPatchMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module FatesPatchMod
use PRTParametersMod, only : prt_params
use FatesConstantsMod, only : nocomp_bareground
use EDParamsMod, only : nlevleaf, nclmax, maxpft
use EDParamsMod, only : num_emission_compounds
use FatesConstantsMod, only : n_dbh_bins, n_dist_types
use FatesConstantsMod, only : t_water_freeze_k_1atm
use FatesRunningMeanMod, only : ema_24hr, fixed_24hr, ema_lpa, ema_longterm
Expand Down Expand Up @@ -216,6 +217,9 @@ module FatesPatchMod
! fire effects
real(r8) :: scorch_ht(maxpft) ! scorch height [m]
real(r8) :: tfc_ros ! total intensity-relevant fuel consumed - no trunks [kgC/m2 of burned ground/day]
real(r8) :: fire_emission_height ! Height of fire emissions into the atmsophere. m.
real(r8) :: fire_emissions(num_emission_compounds) ! Emissions from fires. g emissions/m2/day

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

! PLANT HYDRAULICS (not currently used in hydraulics RGK 03-2018)
Expand Down Expand Up @@ -507,6 +511,9 @@ subroutine NanValues(this)
this%scorch_ht(:) = nan
this%tfc_ros = nan
this%frac_burnt = nan
this%fire_emissions(:) = nan
this%fire_emission_height = nan


end subroutine NanValues

Expand Down Expand Up @@ -592,6 +599,8 @@ subroutine ZeroValues(this)
this%fd = 0.0_r8
this%scorch_ht(:) = 0.0_r8
this%tfc_ros = 0.0_r8
this%fire_emissions(:) = 0.0_r8
this%fire_emission_height = 0.0_r8
this%frac_burnt = 0.0_r8

end subroutine ZeroValues
Expand Down
61 changes: 61 additions & 0 deletions fire/SFMainMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,24 @@ module SFMainMod
implicit none
private


public :: fire_model
public :: fire_danger_index
public :: charecteristics_of_fuel
public :: rate_of_spread
public :: ground_fuel_consumption
public :: wind_effect
public :: area_burnt_intensity
public :: crown_scorching
public :: crown_damage
public :: cambial_damage_kill
public :: post_fire_mortality
public :: fire_emissions

! The following parameter represents one of the values of hlm_spitfire_mode
! and more of these appear in subroutine area_burnt_intensity below
! NB. The same parameters are set in /src/biogeochem/CNFireFactoryMod

public :: DailyFireModel
public :: UpdateFuelCharacteristics

Expand Down Expand Up @@ -70,6 +88,8 @@ subroutine DailyFireModel(currentSite, bc_in)
call crown_damage(currentSite)
call cambial_damage_kill(currentSite)
call post_fire_mortality(currentSite)
call fire_emissions(currentSite)

end if

end subroutine DailyFireModel
Expand Down Expand Up @@ -693,5 +713,46 @@ subroutine post_fire_mortality ( currentSite )

end subroutine post_fire_mortality

!*****************************************************************
subroutine fire_emissions ( currentSite )
!*****************************************************************

use EDParamsMod , only : num_emission_compounds
use FatesInterfaceTypesMod , only : hlm_use_nocomp

type(ed_site_type), intent(in), target :: currentSite
type(fates_patch_type), pointer :: currentPatch
type(fates_cohort_type), pointer :: currentCohort
real(r8) biomass_burned ! Local biomass burned variable
real(r8) emission_factor ! Local emission factor variable
integer c

currentPatch => currentSite%oldest_patch
if(hlm_use_nocomp == itrue)then
! Do not do fire emissions if we are not in nocomp mode
!this capability has not been added yet.

do while(associated(currentPatch))
if(currentPatch%nocomp_pft_label .ne. nocomp_bareground)then
biomass_burned = currentPatch%TFC_ROS / 0.45_r8 ! kg biomass/m2/day
!n.b. does this also need to include the amount of tree canopy consumed?

do c = 1, num_emission_compounds
emission_factor = EDPftvarcon_inst%fire_emission_factors(currentPatch%nocomp_pft_label,c)
currentPatch%fire_emissions(c) = biomass_burned * emission_factor
enddo

currentPatch%fire_emission_height = EDPftvarcon_inst%fire_emission_heights(currentPatch%nocomp_pft_label)
if(currentPatch%fire_emissions(c).gt.0.0_r8)then
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can/should be deleted...

write(*,*) 'postivie emissionssf',currentPatch%fire_emissions(1),biomass_burned
endif
endif ! bare ground
currentPatch => currentPatch%younger

enddo !end patch loop
end if ! is nocomp

end subroutine fire_emissions

! ============================================================================
end module SFMainMod
3 changes: 3 additions & 0 deletions main/EDInitMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,9 @@ subroutine init_patches( nsites, sites, bc_in)
currentPatch%ros_back = 0._r8
currentPatch%scorch_ht(:) = 0._r8
currentPatch%frac_burnt = 0._r8
currentPatch%fire_emissions(:) = 0._r8
currentPatch%fire_emission_height = 0._r8

currentPatch => currentPatch%older
enddo
enddo
Expand Down
8 changes: 6 additions & 2 deletions main/EDParamsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ module EDParamsMod

integer, parameter, public :: maxpft = 16 ! maximum number of PFTs allowed

integer, parameter, public :: num_emission_compounds = 13 ! number of fire emission fields calculated

real(r8),protected,public :: q10_mr ! Q10 for respiration rate (for soil fragmenation and plant respiration) (unitless)
real(r8),protected,public :: q10_froz ! Q10 for frozen-soil respiration rates (for soil fragmentation) (unitless)

Expand Down Expand Up @@ -342,7 +344,7 @@ subroutine FatesRegisterParams(fates_params)
use FatesParametersInterface, only : dimension_name_history_size_bins, dimension_name_history_age_bins
use FatesParametersInterface, only : dimension_name_history_height_bins, dimension_name_hydr_organs
use FatesParametersInterface, only : dimension_name_history_coage_bins, dimension_name_history_damage_bins
use FatesParametersInterface, only : dimension_shape_scalar, dimension_name_landuse
use FatesParametersInterface, only : dimension_shape_scalar, dimension_name_landuse, dimension_name_nemission_compounds


implicit none
Expand All @@ -357,7 +359,8 @@ subroutine FatesRegisterParams(fates_params)
character(len=param_string_length), parameter :: dim_names_hydro_organs(1) = (/dimension_name_hydr_organs/)
character(len=param_string_length), parameter :: dim_names_damageclass(1)= (/dimension_name_history_damage_bins/)
character(len=param_string_length), parameter :: dim_names_landuse(1)= (/dimension_name_landuse/)

character(len=param_string_length), parameter :: dim_names_nemission_compounds(1)= (/dimension_name_nemission_compounds/)

call FatesParamsInit()

call fates_params%RegisterParameter(name=ED_name_photo_temp_acclim_timescale, dimension_shape=dimension_shape_scalar, &
Expand Down Expand Up @@ -550,6 +553,7 @@ subroutine FatesRegisterParams(fates_params)

call fates_params%RegisterParameter(name=name_landuse_grazing_rate, dimension_shape=dimension_shape_1d, &
dimension_names=dim_names_landuse)

end subroutine FatesRegisterParams


Expand Down
34 changes: 30 additions & 4 deletions main/EDPftvarcon.F90
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ module EDPftvarcon
! -------------------------------------------------------------------------------------------
real(r8), allocatable :: fire_alpha_SH(:) ! spitfire parameter, alpha scorch height
! Equation 16 Thonicke et al 2010

real(r8), allocatable :: fire_emission_factors(:,:) ! emission factorss indexed by PFT and emission type/species. g emissions/m2/s per kg biomass burned.
real(r8), allocatable :: fire_emission_heights(:) ! heights that fire emissions are injected into the atmosphere (m)

! Non-PARTEH Allometry Parameters
! --------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -342,7 +344,8 @@ subroutine Register_PFT(this, fates_params)

use FatesParametersInterface, only : fates_parameters_type, param_string_length
use FatesParametersInterface, only : dimension_name_pft, dimension_shape_1d
use FatesParametersInterface, only : dimension_name_hlm_pftno, dimension_shape_2d
use FatesParametersInterface, only : dimension_name_hlm_pftno, dimension_name_nemission_compounds
use FatesParametersInterface, only : dimension_shape_2d

implicit none

Expand All @@ -351,7 +354,8 @@ subroutine Register_PFT(this, fates_params)

character(len=param_string_length), parameter :: dim_names(1) = (/dimension_name_pft/)
character(len=param_string_length) :: pftmap_dim_names(2)

character(len=param_string_length) :: emission_factors_dim_names(2)

integer, parameter :: dim_lower_bound(1) = (/ lower_bound_pft /)


Expand Down Expand Up @@ -473,6 +477,18 @@ 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)

! adding the hlm_pft_map variable with two dimensions - FATES PFTno and N emission factors
emission_factors_dim_names(2) = dimension_name_pft
emission_factors_dim_names(1) = dimension_name_nemission_compounds

name = 'fates_fire_emission_factors'
call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_2d, &
dimension_names=emission_factors_dim_names, lower_bounds=dim_lower_bound)

name = 'fates_fire_emission_heights'
call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, &
dimension_names=dim_names, lower_bounds=dim_lower_bound)

name = 'fates_allom_frbstor_repro'
call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, &
dimension_names=dim_names, lower_bounds=dim_lower_bound)
Expand Down Expand Up @@ -882,6 +898,14 @@ subroutine Receive_PFT(this, fates_params)
call fates_params%RetrieveParameterAllocate(name=name, &
data=this%fire_alpha_SH)

name = 'fates_fire_emission_factors'
call fates_params%RetrieveParameterAllocate(name=name, &
data=this%fire_emission_factors)

name = 'fates_fire_emission_heights'
call fates_params%RetrieveParameterAllocate(name=name, &
data=this%fire_emission_heights)

name = 'fates_allom_frbstor_repro'
call fates_params%RetrieveParameterAllocate(name=name, &
data=this%allom_frbstor_repro)
Expand Down Expand Up @@ -1177,7 +1201,7 @@ subroutine Register_PFT_numrad(this, fates_params)
! arrays. We have to register the parameters as 1-d arrays as they
! are on the parameter file. We store them as 2-d in the receive step.
use FatesParametersInterface, only : fates_parameters_type, param_string_length
use FatesParametersInterface, only : dimension_name_pft, dimension_shape_1d
use FatesParametersInterface, only : dimension_name_pft, dimension_name_nemission_compounds, dimension_shape_1d

implicit none

Expand Down Expand Up @@ -1634,6 +1658,8 @@ subroutine FatesReportPFTParams(is_master)
write(fates_log(),fmt0) 'phen_flush_fraction',EDpftvarcon_inst%phenflush_fraction
write(fates_log(),fmt0) 'phen_cold_size_threshold = ',EDPftvarcon_inst%phen_cold_size_threshold
write(fates_log(),fmt0) 'fire_alpha_SH = ',EDPftvarcon_inst%fire_alpha_SH
write(fates_log(),fmt0) 'fire_emission_factors = ',EDPftvarcon_inst%fire_emission_factors
write(fates_log(),fmt0) 'fire_emission_factors = ',EDPftvarcon_inst%fire_emission_heights
write(fates_log(),fmt0) 'allom_frbstor_repro = ',EDPftvarcon_inst%allom_frbstor_repro
write(fates_log(),fmt0) 'hydro_p_taper = ',EDPftvarcon_inst%hydr_p_taper
write(fates_log(),fmt0) 'hydro_rs2 = ',EDPftvarcon_inst%hydr_rs2
Expand Down
3 changes: 1 addition & 2 deletions main/EDTypesMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ module EDTypesMod
! The actual number of soil layers should not exceed this




! BIOLOGY/BIOGEOCHEMISTRY
integer , parameter, public :: num_vegtemp_mem = 10 ! Window of time over which we track temp for cold sensecence (days)

Expand Down Expand Up @@ -457,6 +455,7 @@ module EDTypesMod
real(r8) :: NF_successful ! daily ignitions in km2 that actually lead to fire
class(fire_weather), pointer :: fireWeather ! fire weather object


! PLANT HYDRAULICS
type(ed_site_hydr_type), pointer :: si_hydr

Expand Down
Loading