Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
2bf1d1b
added megan_voc_pftindex parameter
rosiealice Apr 1, 2024
786b27b
reading new parameter
rosiealice Apr 1, 2024
a075d76
adding interface variable for MEGAN PFT
rosiealice Apr 1, 2024
e96f09e
Merge pull request #12 from NGEET/main
mvertens Oct 15, 2024
b237219
Merge branch 'noresmhub_fates_noresm' into megan_fates
rosiealice Oct 17, 2024
c12e75d
altered PFT map to use the right numbers
rosiealice Oct 17, 2024
53e71bc
bunch of minor debugging changes from parallel fire emissions branch
rosiealice Oct 17, 2024
fa46a84
error in bounds check statement
rosiealice Oct 17, 2024
c8d7602
correct the parameter file
rosiealice Oct 18, 2024
d58f9ac
adjusted parameter map to point at HLM parameters
rosiealice Oct 28, 2024
42f8953
add megan indices for bare ground and no canopy patches
rosiealice Oct 28, 2024
1458166
changes bounds of check on VOC index
rosiealice Oct 28, 2024
efc5098
making the bc_out ci variable
rosiealice Oct 28, 2024
63021ea
internal co2 variable construction
rosiealice Oct 28, 2024
f2ea09e
Merge pull request #10 from rosiealice/megan_fates
mvertens Nov 14, 2024
e5cd91b
merge conflicts on pftvarcon file
Sep 19, 2024
ed1c87d
merge conflicts in main/FatesInterfaceMod.F90
Sep 19, 2024
0923df3
set the boundary conditions
Sep 19, 2024
9e86f45
more merge conflicts in main/EDPftvarcon.F90
Sep 19, 2024
6ed133e
more merge conflicts in biogeochem/FatesPatchMod.F90
Sep 20, 2024
18d5f12
add drydep_season_pa to the fates interface, plus bugfixes
Sep 20, 2024
1972039
add new mapping for Wesley PFTs
Oct 3, 2024
1cbf176
add initial value for drydep_season
rosiealice Oct 10, 2024
d911660
modifictions to EDCanopyStructure to update drydep properties for all…
rosiealice Oct 11, 2024
cd793ed
parameter file change
rosiealice Oct 11, 2024
b52edcf
merge conflicts in biogeochem/FatesPatchMod.F90
rosiealice Oct 16, 2024
9e049a5
added calculation of drydep season into FATES
rosiealice Nov 27, 2024
96c14dc
Update z0mr parameters to CLM5vdefault values and add temporary incre…
rosiealice Jan 31, 2025
883537b
fix logical for ci
mvdebolskiy Feb 25, 2025
ecc6815
Merge pull request #14 from mvdebolskiy/fix-gnu
mvdebolskiy Feb 27, 2025
23b6f3e
Merge commit '6903518a5ebaf711b924583eb109d79805f69e05' into rpointer…
mvdebolskiy Mar 8, 2025
5c1692a
add drydep control to the insteface
mvdebolskiy Mar 14, 2025
72823e2
add set_fates_drydep_indices to FatesInterfaceMod
rosiealice Mar 14, 2025
df85755
remove the previous calculation of wesley PFT and season indices from…
rosiealice Mar 14, 2025
9f63d53
forgot ro zero out drydep_season_pa
rosiealice Mar 14, 2025
0b825c7
debugging
rosiealice Mar 15, 2025
8924c40
Merge pull request #15 from mvdebolskiy/rpointers-update-fates
mvdebolskiy Mar 20, 2025
78cfa5a
adding bare ground patch term for drydep into FatesInterfaceMod and f…
rosiealice Mar 24, 2025
29b5434
reversing arbitrary parameter changes to be brought in with a differe…
rosiealice Mar 24, 2025
25a6dc0
more reverts on parameter file
rosiealice Mar 24, 2025
5ee29a6
removing whitespace changes to EDCanopyStructure
rosiealice Mar 24, 2025
c3ece13
merge sci.1.82.3_api.39.0.0 into noresm
mvdebolskiy Mar 28, 2025
55c8af4
fix megan emis
mvdebolskiy Mar 29, 2025
823d67b
update paramfile to latest calibration
mvdebolskiy Mar 29, 2025
441c7a3
Merge pull request #16 from mvdebolskiy/main39_to_nor38_v0
mvdebolskiy Mar 29, 2025
ec282ca
merge drydep into api39
mvdebolskiy Mar 29, 2025
c4fcc8c
Merge branch 'merge39-drydep' into rebased_drydep_fates
mvdebolskiy Mar 29, 2025
21546a4
Merge pull request #13 from rosiealice/rebased_drydep_fates
mvdebolskiy Mar 30, 2025
1fc3209
fix to trivial radiation transmission
rgknox Apr 1, 2025
cae3fc0
make consistent with ctsm
mvdebolskiy Apr 9, 2025
1eda02c
add fix for rad_error
mvdebolskiy Apr 13, 2025
289f116
Merge pull request #17 from mvdebolskiy/fx-rad
mvdebolskiy Apr 13, 2025
f4494ea
added grazing and burn fluxes as bc_out variables so that HLMs can ca…
ckoven Mar 7, 2025
26832fa
fixes on new bc_out vars
ckoven Mar 7, 2025
dc87f5b
merge conflicts to do with dist_type use
rosiealice Apr 29, 2025
8816e46
adding references to fates constants
rosiealice Apr 29, 2025
d5ae053
change name of internal FATES_NEP
rosiealice May 13, 2025
3dea7ea
add the calculation of instantaneous site NPP to the accumulatefluxes…
rosiealice May 20, 2025
ba6a701
add bc_out C flux variables to fatesinterface
rosiealice May 20, 2025
f3771b9
add the total carbon stock to the bc_out variable
rosiealice May 20, 2025
df85c8c
change logic in EDaccumulatefluxes
rosiealice May 25, 2025
c953c44
rename FATES_NEP
rosiealice Jun 5, 2025
8c63c68
merge ngeet-main
mvdebolskiy Jun 14, 2025
ee865e1
Merge pull request #21 from mvdebolskiy/api40-updt
mvdebolskiy Jun 15, 2025
47ffce8
added grazing and burn fluxes as bc_out variables so that HLMs can ca…
ckoven Mar 7, 2025
6f591b7
fixes on new bc_out vars
ckoven Mar 7, 2025
29c11ed
merge conflicts to do with dist_type use
rosiealice Apr 29, 2025
f492cc5
adding references to fates constants
rosiealice Apr 29, 2025
1ce8da8
change name of internal FATES_NEP
rosiealice May 13, 2025
dca5d75
add the calculation of instantaneous site NPP to the accumulatefluxes…
rosiealice May 20, 2025
c9db9bd
add bc_out C flux variables to fatesinterface
rosiealice May 20, 2025
7a304a2
add the total carbon stock to the bc_out variable
rosiealice May 20, 2025
a99ed54
change logic in EDaccumulatefluxes
rosiealice May 25, 2025
96979bf
rename FATES_NEP
rosiealice Jun 5, 2025
ee13fbd
Merge branch 'nbp_nobalancechec' into ros_nbp
mvdebolskiy Jun 15, 2025
3ff29e5
Merge pull request #20 from rosiealice/nbp_nobalancechec
rosiealice Jun 16, 2025
e373733
Update default fates cdl parameter file to NorESM3b1 version
kjetilaas Jun 27, 2025
2a1ffb3
Merge pull request #25 from kjetilaas/updated_fates_param_for_NorESM3b1
maritsandstad Jun 27, 2025
7617344
Updating parameterfile
maritsandstad Aug 12, 2025
3e3792f
Update parameter_files/fates_params_default.cdl
maritsandstad Aug 12, 2025
7c850f3
Merge pull request #27 from NorESMhub/maritsandstad/update-pamfile-to…
maritsandstad Aug 12, 2025
34aa04b
Correct fire_closs_to_atm_si unit comment to conform to actual output…
maritsandstad Sep 26, 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
7 changes: 7 additions & 0 deletions biogeochem/EDCanopyStructureMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1968,6 +1968,7 @@ subroutine update_hlm_dynamics(nsites,sites,fcolumn,bc_out)
bc_out(s)%z0m_pa(ifp) = EDPftvarcon_inst%z0mr(1) * bc_out(s)%htop_pa(ifp)
bc_out(s)%displa_pa(ifp) = EDPftvarcon_inst%displar(1) * bc_out(s)%htop_pa(ifp)
bc_out(s)%dleaf_pa(ifp) = EDPftvarcon_inst%dleaf(1)
bc_out(s)%nocomp_MEGAN_pft_label_pa(ifp) = 1
endif
! -----------------------------------------------------------------------------

Expand All @@ -1993,6 +1994,12 @@ subroutine update_hlm_dynamics(nsites,sites,fcolumn,bc_out)

bc_out(s)%nocomp_pft_label_pa(ifp) = currentPatch%nocomp_pft_label

if(currentPatch%nocomp_pft_label.gt.0)then
bc_out(s)%nocomp_MEGAN_pft_label_pa(ifp) = EDPftvarcon_inst%voc_pftindex(currentPatch%nocomp_pft_label)
else
bc_out(s)%nocomp_MEGAN_pft_label_pa(ifp) = 1 ! dummy for bare ground.
endif

! Calculate area indices for output boundary to HLM
! It is assumed that cpatch%canopy_area_profile and cpat%xai_profiles
! have been updated (ie ed_leaf_area_profile has been called since dynamics has been called)
Expand Down
60 changes: 37 additions & 23 deletions biogeochem/EDPatchDynamicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ module EDPatchDynamicsMod
use FatesConstantsMod , only : nocomp_bareground
use FatesInterfaceTypesMod , only : hlm_use_planthydro
use FatesInterfaceTypesMod , only : bc_in_type
use FatesInterfaceTypesMod , only : bc_out_type
use FatesInterfaceTypesMod , only : numpft
use FatesInterfaceTypesMod , only : hlm_stepsize
use FatesInterfaceTypesMod , only : hlm_use_sp
Expand Down Expand Up @@ -482,7 +483,7 @@ end subroutine disturbance_rates

! ============================================================================

subroutine spawn_patches( currentSite, bc_in)
subroutine spawn_patches( currentSite, bc_in, bc_out)
!
! !DESCRIPTION:
! In this subroutine, the following happens,
Expand All @@ -509,6 +510,7 @@ subroutine spawn_patches( currentSite, bc_in)
! !ARGUMENTS:
type (ed_site_type), intent(inout) :: currentSite
type (bc_in_type), intent(in) :: bc_in
type (bc_out_type), intent(inout) :: bc_out
!
! !LOCAL VARIABLES:
type (fates_patch_type) , pointer :: newPatch
Expand Down Expand Up @@ -753,7 +755,9 @@ subroutine spawn_patches( currentSite, bc_in)

call CopyPatchMeansTimers(currentPatch, newPatch)

call TransLitterNewPatch( currentSite, currentPatch, newPatch, patch_site_areadis, i_disturbance_type)

call TransLitterNewPatch( currentSite, currentPatch, newPatch, patch_site_areadis, bc_out, i_disturbance_type)


! Transfer in litter fluxes from plants in various contexts of death and destruction
select case(i_disturbance_type)
Expand All @@ -768,13 +772,13 @@ subroutine spawn_patches( currentSite, bc_in)
end if
case (dtype_ifire)
call fire_litter_fluxes(currentSite, currentPatch, &
newPatch, patch_site_areadis,bc_in)
newPatch, patch_site_areadis,bc_in, bc_out)
case (dtype_ifall)
call mortality_litter_fluxes(currentSite, currentPatch, &
newPatch, patch_site_areadis,bc_in)
case (dtype_ilandusechange)
call landusechange_litter_fluxes(currentSite, currentPatch, &
newPatch, patch_site_areadis,bc_in, &
newPatch, patch_site_areadis,bc_in, bc_out, &
clearing_matrix(i_donorpatch_landuse_type,i_landusechange_receiverpatchlabel))

! if land use change, then may need to change nocomp pft, so tag as having transitioned LU
Expand Down Expand Up @@ -1068,11 +1072,8 @@ subroutine spawn_patches( currentSite, bc_in)
currentSite%mass_balance(el)%burn_flux_to_atm + &
leaf_burn_frac * leaf_m * nc%n

! This diagnostic only tracks
currentSite%flux_diags%elem(el)%burned_liveveg = &
currentSite%flux_diags%elem(el)%burned_liveveg + &
leaf_burn_frac * leaf_m * nc%n * area_inv

bc_out%fire_closs_to_atm_si = bc_out%fire_closs_to_atm_si + &
leaf_burn_frac * leaf_m * nc%n * ha_per_m2 * days_per_sec
end do

! Here the mass is removed from the plant
Expand Down Expand Up @@ -1421,7 +1422,7 @@ subroutine spawn_patches( currentSite, bc_in)

allocate(temp_patch)

call split_patch(currentSite, currentPatch, temp_patch, fraction_to_keep, newp_area)
call split_patch(currentSite, currentPatch, temp_patch, fraction_to_keep, newp_area, bc_out)
!
temp_patch%nocomp_pft_label = 0

Expand Down Expand Up @@ -1524,7 +1525,7 @@ subroutine spawn_patches( currentSite, bc_in)
! split buffer patch in two, keeping the smaller buffer patch to put into new patches
allocate(temp_patch)

call split_patch(currentSite, buffer_patch, temp_patch, fraction_to_keep, newp_area)
call split_patch(currentSite, buffer_patch, temp_patch, fraction_to_keep, newp_area, bc_out)

! give the new patch the intended nocomp PFT label
temp_patch%nocomp_pft_label = i_pft
Expand Down Expand Up @@ -1633,7 +1634,7 @@ end subroutine spawn_patches

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

subroutine split_patch(currentSite, currentPatch, new_patch, fraction_to_keep, area_to_remove)
subroutine split_patch(currentSite, currentPatch, new_patch, fraction_to_keep, area_to_remove, bc_out)
!
! !DESCRIPTION:
! Split a patch into two patches that are identical except in their areas
Expand All @@ -1644,6 +1645,7 @@ subroutine split_patch(currentSite, currentPatch, new_patch, fraction_to_keep, a
type(fates_patch_type) , intent(inout), pointer :: new_patch ! New Patch
real(r8), intent(in) :: fraction_to_keep ! fraction of currentPatch to keep, the rest goes to newpatch
real(r8), intent(in), optional :: area_to_remove ! area of currentPatch to remove, the rest goes to newpatch
type(bc_out_type) , intent(inout) :: bc_out
!
! !LOCAL VARIABLES:
integer :: el ! element loop index
Expand Down Expand Up @@ -1680,7 +1682,8 @@ subroutine split_patch(currentSite, currentPatch, new_patch, fraction_to_keep, a

call CopyPatchMeansTimers(currentPatch, new_patch)

call TransLitterNewPatch( currentSite, currentPatch, new_patch, temp_area, 0)
call TransLitterNewPatch( currentSite, currentPatch, new_patch, temp_area, bc_out, 0)


! Next, we loop through the cohorts in the donor patch, copy them with
! area modified number density into the new-patch, and apply survivorship.
Expand Down Expand Up @@ -1814,8 +1817,7 @@ end subroutine check_patch_area
subroutine TransLitterNewPatch(currentSite, &
currentPatch, &
newPatch, &
patch_site_areadis, &
dist_type)
patch_site_areadis, bc_out, dist_type)

! -----------------------------------------------------------------------------------
!
Expand Down Expand Up @@ -1864,8 +1866,8 @@ subroutine TransLitterNewPatch(currentSite, &
type(fates_patch_type) , intent(inout) :: newPatch ! New patch
real(r8) , intent(in) :: patch_site_areadis ! Area being donated
! by current patch
type(bc_out_type) , intent(inout) :: bc_out
integer, intent(in) :: dist_type ! disturbance type


! locals
type(site_massbal_type), pointer :: site_mass
Expand Down Expand Up @@ -1989,7 +1991,9 @@ subroutine TransLitterNewPatch(currentSite, &
curr_litt%ag_cwd(c) = curr_litt%ag_cwd(c) + donatable_mass*retain_m2

site_mass%burn_flux_to_atm = site_mass%burn_flux_to_atm + burned_mass


bc_out%fire_closs_to_atm_si = bc_out%fire_closs_to_atm_si + burned_mass * ha_per_m2 * days_per_sec

! Transfer below ground CWD (none burns)

do sl = 1,currentSite%nlevsoil
Expand Down Expand Up @@ -2018,7 +2022,9 @@ subroutine TransLitterNewPatch(currentSite, &
curr_litt%leaf_fines(dcmpy) = curr_litt%leaf_fines(dcmpy) + donatable_mass*retain_m2

site_mass%burn_flux_to_atm = site_mass%burn_flux_to_atm + burned_mass


bc_out%fire_closs_to_atm_si = bc_out%fire_closs_to_atm_si + burned_mass * ha_per_m2 * days_per_sec

! Transfer root fines (none burns)
do sl = 1,currentSite%nlevsoil
donatable_mass = curr_litt%root_fines(dcmpy,sl) * patch_site_areadis
Expand Down Expand Up @@ -2068,7 +2074,7 @@ end subroutine TransLitterNewPatch
! ============================================================================

subroutine fire_litter_fluxes(currentSite, currentPatch, &
newPatch, patch_site_areadis, bc_in)
newPatch, patch_site_areadis, bc_in, bc_out)
!
! !DESCRIPTION:
! CWD pool burned by a fire.
Expand All @@ -2088,6 +2094,7 @@ subroutine fire_litter_fluxes(currentSite, currentPatch, &
type(fates_patch_type) , intent(inout), target :: newPatch ! New Patch
real(r8) , intent(in) :: patch_site_areadis ! Area being donated
type(bc_in_type) , intent(in) :: bc_in
type(bc_out_type) , intent(inout) :: bc_out

!
! !LOCAL VARIABLES:
Expand Down Expand Up @@ -2229,8 +2236,8 @@ subroutine fire_litter_fluxes(currentSite, currentPatch, &

site_mass%burn_flux_to_atm = site_mass%burn_flux_to_atm + burned_mass


bc_out%fire_closs_to_atm_si = bc_out%fire_closs_to_atm_si + burned_mass * ha_per_m2 * days_per_sec

call set_root_fraction(currentSite%rootfrac_scr, pft, currentSite%zi_soil, &
bc_in%max_rooting_depth_index_col)

Expand Down Expand Up @@ -2292,6 +2299,7 @@ subroutine fire_litter_fluxes(currentSite, currentPatch, &
burned_mass = num_dead_trees * SF_val_CWD_frac_adj(c) * bstem * &
currentCohort%fraction_crown_burned
site_mass%burn_flux_to_atm = site_mass%burn_flux_to_atm + burned_mass
bc_out%fire_closs_to_atm_si = bc_out%fire_closs_to_atm_si + burned_mass * ha_per_m2 * days_per_sec
endif
new_litt%ag_cwd(c) = new_litt%ag_cwd(c) + donatable_mass * donate_m2
curr_litt%ag_cwd(c) = curr_litt%ag_cwd(c) + donatable_mass * retain_m2
Expand Down Expand Up @@ -2542,7 +2550,7 @@ end subroutine mortality_litter_fluxes
! ============================================================================

subroutine landusechange_litter_fluxes(currentSite, currentPatch, &
newPatch, patch_site_areadis, bc_in, &
newPatch, patch_site_areadis, bc_in, bc_out, &
clearing_matrix_element)
!
! !DESCRIPTION:
Expand All @@ -2559,6 +2567,7 @@ subroutine landusechange_litter_fluxes(currentSite, currentPatch, &
type(fates_patch_type) , intent(inout), target :: newPatch ! New Patch
real(r8) , intent(in) :: patch_site_areadis ! Area being donated
type(bc_in_type) , intent(in) :: bc_in
type(bc_out_type) , intent(inout) :: bc_out
logical , intent(in) :: clearing_matrix_element ! whether or not to clear vegetation

!
Expand Down Expand Up @@ -2702,7 +2711,9 @@ subroutine landusechange_litter_fluxes(currentSite, currentPatch, &
end do

site_mass%burn_flux_to_atm = site_mass%burn_flux_to_atm + burned_mass


bc_out%fire_closs_to_atm_si = bc_out%fire_closs_to_atm_si + burned_mass * ha_per_m2 * days_per_sec

call set_root_fraction(currentSite%rootfrac_scr, pft, currentSite%zi_soil, &
bc_in%max_rooting_depth_index_col)

Expand Down Expand Up @@ -2762,6 +2773,7 @@ subroutine landusechange_litter_fluxes(currentSite, currentPatch, &
EDPftvarcon_inst%landusechange_frac_burned(pft)

site_mass%burn_flux_to_atm = site_mass%burn_flux_to_atm + burned_mass
bc_out%fire_closs_to_atm_si = bc_out%fire_closs_to_atm_si + burned_mass * ha_per_m2 * days_per_sec
else ! all other pools can end up as timber products or burn or go to litter
donatable_mass = donatable_mass * (1.0_r8-EDPftvarcon_inst%landusechange_frac_exported(pft)) * &
(1.0_r8-EDPftvarcon_inst%landusechange_frac_burned(pft))
Expand All @@ -2775,6 +2787,8 @@ subroutine landusechange_litter_fluxes(currentSite, currentPatch, &

site_mass%burn_flux_to_atm = site_mass%burn_flux_to_atm + burned_mass

bc_out%fire_closs_to_atm_si = bc_out%fire_closs_to_atm_si + burned_mass * ha_per_m2 * days_per_sec

trunk_product_site = trunk_product_site + &
woodproduct_mass

Expand Down
Loading