diff --git a/biogeochem/EDLoggingMortalityMod.F90 b/biogeochem/EDLoggingMortalityMod.F90 index 7ff878dbc6..214de27289 100644 --- a/biogeochem/EDLoggingMortalityMod.F90 +++ b/biogeochem/EDLoggingMortalityMod.F90 @@ -67,7 +67,7 @@ module EDLoggingMortalityMod use PRTGenericMod , only : sapw_organ, struct_organ, leaf_organ use PRTGenericMod , only : fnrt_organ, store_organ, repro_organ use FatesAllometryMod , only : set_root_fraction - use FatesConstantsMod , only : primaryland, secondaryland, secondary_age_threshold + use FatesConstantsMod , only : primaryland, secondaryland, secondary_age_threshold, nocomp_bareground_land use FatesConstantsMod , only : fates_tiny use FatesConstantsMod , only : months_per_year, days_per_sec, years_per_day, g_per_kg use FatesConstantsMod , only : hlm_harvest_area_fraction @@ -207,7 +207,7 @@ subroutine LoggingMortality_frac( currentSite, bc_in, pft_i, dbh, canopy_layer, hlm_harvest_rates, hlm_harvest_catnames, & hlm_harvest_units, & patch_land_use_label, secondary_age, & - frac_site_primary, frac_site_secondary, harvestable_forest_c, & + current_fates_landuse_state_vector, harvestable_forest_c, & harvest_tag) ! Arguments @@ -223,8 +223,7 @@ subroutine LoggingMortality_frac( currentSite, bc_in, pft_i, dbh, canopy_layer, real(r8), intent(in) :: secondary_age ! patch level age_since_anthro_disturbance real(r8), intent(in) :: harvestable_forest_c(:) ! total harvestable forest carbon ! of all hlm harvest categories - real(r8), intent(in) :: frac_site_primary - real(r8), intent(in) :: frac_site_secondary + real(r8), intent(in) :: current_fates_landuse_state_vector(n_landuse_cats) ! [m2/m2] real(r8), intent(out) :: lmort_direct ! direct (harvestable) mortality fraction real(r8), intent(out) :: lmort_collateral ! collateral damage mortality fraction real(r8), intent(out) :: lmort_infra ! infrastructure mortality fraction @@ -299,17 +298,22 @@ subroutine LoggingMortality_frac( currentSite, bc_in, pft_i, dbh, canopy_layer, ! Definitions of the underlying harvest land category variables ! these are hardcoded to match the LUH input data via landuse.timseries file (see dynHarvestMod) ! these are fractions of vegetated area harvested, split into five land category variables + + ! if using the classic CLM/ELM surface file, the variable names are: ! HARVEST_VH1 = harvest from primary forest ! HARVEST_VH2 = harvest from primary non-forest ! HARVEST_SH1 = harvest from secondary mature forest ! HARVEST_SH2 = harvest from secondary young forest ! HARVEST_SH3 = harvest from secondary non-forest (assume this is young for biomass) + ! if using the direct LUH2 drivers, the variable names are instead (if using area-based logging): + ! 'primf_harv', 'primn_harv', 'secmf_harv', 'secyf_harv', 'secnf_harv' + secondary_young_fraction = currentSite%get_secondary_young_fraction() ! Get the area-based harvest rates based on info passed to FATES from the boundary condition call get_harvest_rate_area (patch_land_use_label, hlm_harvest_catnames, & - hlm_harvest_rates, frac_site_primary, frac_site_secondary, secondary_young_fraction, secondary_age, harvest_rate) + hlm_harvest_rates, current_fates_landuse_state_vector, secondary_young_fraction, secondary_age, harvest_rate) ! For area-based harvest, harvest_tag shall always be 2 (not applicable). harvest_tag = 2 @@ -387,16 +391,24 @@ subroutine LoggingMortality_frac( currentSite, bc_in, pft_i, dbh, canopy_layer, endif else - call GetInitLanduseHarvestRate(bc_in, currentSite%min_allowed_landuse_fraction, & - harvest_rate, currentSite%landuse_vector_gt_min) + ! the logic below is mainly to prevent conversion of bare ground land; everything else should be primary at this point. lmort_direct = 0.0_r8 lmort_collateral = 0.0_r8 lmort_infra = 0.0_r8 l_degrad = 0.0_r8 - if(prt_params%woody(pft_i) == itrue)then - lmort_direct = harvest_rate - else if (canopy_layer .eq. 1) then - l_degrad = harvest_rate + if ( patch_land_use_label .eq. primaryland ) then + call GetInitLanduseHarvestRate(bc_in, currentSite%min_allowed_landuse_fraction, & + harvest_rate, currentSite%landuse_vector_gt_min) + if(prt_params%woody(pft_i) == itrue)then + lmort_direct = harvest_rate + else if (canopy_layer .eq. 1) then + l_degrad = harvest_rate + endif + else if ( patch_land_use_label .ne. nocomp_bareground_land ) then + write(fates_log(),*) 'trying to transition away from something that isnt either primary or bare ground,' + write(fates_log(),*) 'on what should be a first timestep away from potential vaegetatino. this shouldnt happen.' + write(fates_log(),*) 'exiting' + call endrun(msg=errMsg(sourcefile, __LINE__)) endif endif @@ -406,7 +418,7 @@ end subroutine LoggingMortality_frac ! ============================================================================ subroutine get_harvest_rate_area (patch_land_use_label, hlm_harvest_catnames, hlm_harvest_rates, & - frac_site_primary, frac_site_secondary, secondary_young_fraction, secondary_age, harvest_rate) + current_fates_landuse_state_vector, secondary_young_fraction, secondary_age, harvest_rate) ! ------------------------------------------------------------------------------------------- @@ -420,33 +432,39 @@ subroutine get_harvest_rate_area (patch_land_use_label, hlm_harvest_catnames, hl character(len=64), intent(in) :: hlm_harvest_catnames(:) ! names of hlm harvest categories integer, intent(in) :: patch_land_use_label ! patch level land_use_label real(r8), intent(in) :: secondary_age ! patch level age_since_anthro_disturbance - real(r8), intent(in) :: frac_site_primary - real(r8), intent(in) :: frac_site_secondary + real(r8), intent(in) :: current_fates_landuse_state_vector(n_landuse_cats) ! [m2/m2] real(r8), intent(in) :: secondary_young_fraction ! what fraction of secondary land is young secondary land real(r8), intent(out) :: harvest_rate ! Local Variables integer :: h_index ! for looping over harvest categories integer :: icode ! Integer equivalent of the event code (parameter file only allows reals) + real(r8) :: frac_site_primary + real(r8) :: frac_site_secondary + real(r8) :: frac_not_bareground ! Loop around harvest categories to determine the annual hlm harvest rate for the current cohort based on patch history info - ! We do account forest only since non-forest harvest has geographical mismatch to LUH2 dataset harvest_rate = 0._r8 do h_index = 1,hlm_num_lu_harvest_cats if (patch_land_use_label .eq. primaryland) then if(hlm_harvest_catnames(h_index) .eq. "HARVEST_VH1" .or. & - hlm_harvest_catnames(h_index) .eq. "HARVEST_VH2") then + hlm_harvest_catnames(h_index) .eq. "HARVEST_VH2" .or. & + hlm_harvest_catnames(h_index) .eq. "primf_harv" .or. & + hlm_harvest_catnames(h_index) .eq. "primn_harv") then harvest_rate = harvest_rate + hlm_harvest_rates(h_index) endif else if (patch_land_use_label .eq. secondaryland .and. & secondary_age >= secondary_age_threshold) then - if(hlm_harvest_catnames(h_index) .eq. "HARVEST_SH1") then + if(hlm_harvest_catnames(h_index) .eq. "HARVEST_SH1" .or. & + hlm_harvest_catnames(h_index) .eq. "secmf_harv") then harvest_rate = harvest_rate + hlm_harvest_rates(h_index) endif else if (patch_land_use_label .eq. secondaryland .and. & secondary_age < secondary_age_threshold) then if(hlm_harvest_catnames(h_index) .eq. "HARVEST_SH2" .or. & - hlm_harvest_catnames(h_index) .eq. "HARVEST_SH3") then + hlm_harvest_catnames(h_index) .eq. "HARVEST_SH3" .or. & + hlm_harvest_catnames(h_index) .eq. "secyf_harv" .or. & + hlm_harvest_catnames(h_index) .eq. "secnf_harv") then harvest_rate = harvest_rate + hlm_harvest_rates(h_index) endif endif @@ -456,19 +474,23 @@ subroutine get_harvest_rate_area (patch_land_use_label, hlm_harvest_catnames, hl ! since harvest_rate is specified as a fraction of the gridcell ! also need to put a cap so as not to harvest more primary or secondary area than there is in a gridcell ! For secondary, also need to normalize by the young/old fraction. + ! Lastly, we need to remove the bare ground fraction since the harvest rates are per unit area of the not-bare-ground fraction. + frac_site_primary = current_fates_landuse_state_vector(primaryland) + frac_site_secondary = current_fates_landuse_state_vector(secondaryland) + frac_not_bareground = sum(current_fates_landuse_state_vector(:)) if (patch_land_use_label .eq. primaryland) then - if (frac_site_primary .gt. fates_tiny) then - harvest_rate = min((harvest_rate / frac_site_primary),1._r8) + if (frac_site_primary .gt. fates_tiny .and. frac_not_bareground .gt. fates_tiny) then + harvest_rate = min((harvest_rate / (frac_site_primary / frac_not_bareground)),1._r8) else harvest_rate = 0._r8 endif else if (patch_land_use_label .eq. secondaryland) then ! the .gt. -0.5 in the next line is because frac_site_secondary returns -1 if no secondary area. - if (frac_site_secondary .gt. fates_tiny .and. frac_site_secondary .gt. -0.5_r8) then + if (frac_site_secondary .gt. fates_tiny .and. frac_site_secondary .gt. -0.5_r8 .and. frac_not_bareground .gt. fates_tiny) then if (secondary_age .lt. secondary_age_threshold) then - harvest_rate = min((harvest_rate / (frac_site_secondary * secondary_young_fraction)), 1._r8) + harvest_rate = min((harvest_rate / ((frac_site_secondary / frac_not_bareground) * secondary_young_fraction)), 1._r8) else - harvest_rate = min((harvest_rate / (frac_site_secondary * (1._r8 - secondary_young_fraction))), 1._r8) + harvest_rate = min((harvest_rate / ((frac_site_secondary / frac_not_bareground) * (1._r8 - secondary_young_fraction))), 1._r8) endif else harvest_rate = 0._r8 diff --git a/biogeochem/EDMortalityFunctionsMod.F90 b/biogeochem/EDMortalityFunctionsMod.F90 index 2778f3c0b7..ba65ad0801 100644 --- a/biogeochem/EDMortalityFunctionsMod.F90 +++ b/biogeochem/EDMortalityFunctionsMod.F90 @@ -29,7 +29,7 @@ module EDMortalityFunctionsMod use FatesInterfaceTypesMod , only : hlm_use_tree_damage use EDLoggingMortalityMod , only : LoggingMortality_frac use EDParamsMod , only : fates_mortality_disturbance_fraction - + use FatesConstantsMod , only : n_landuse_cats use PRTGenericMod, only : carbon12_element use PRTGenericMod, only : store_organ use PRTParametersMod , only : prt_params @@ -281,7 +281,7 @@ end subroutine mortality_rates subroutine Mortality_Derivative( currentSite, currentCohort, bc_in, btran_ft, & mean_temp, land_use_label, age_since_anthro_disturbance, & - frac_site_primary, frac_site_secondary, harvestable_forest_c, harvest_tag) + current_fates_landuse_state_vector, harvestable_forest_c, harvest_tag) ! ! !DESCRIPTION: @@ -300,9 +300,8 @@ subroutine Mortality_Derivative( currentSite, currentCohort, bc_in, btran_ft, & real(r8), intent(in) :: mean_temp integer, intent(in) :: land_use_label real(r8), intent(in) :: age_since_anthro_disturbance - real(r8), intent(in) :: frac_site_primary - real(r8), intent(in) :: frac_site_secondary - + real(r8), intent(in) :: current_fates_landuse_state_vector(n_landuse_cats) + real(r8), intent(in) :: harvestable_forest_c(:) ! total carbon available for logging, kgC site-1 integer, intent(out) :: harvest_tag(:) ! tag to record the harvest status ! for the calculation of harvest debt in C-based @@ -340,7 +339,7 @@ subroutine Mortality_Derivative( currentSite, currentCohort, bc_in, btran_ft, & bc_in%hlm_harvest_units, & land_use_label, & age_since_anthro_disturbance, & - frac_site_primary, frac_site_secondary, harvestable_forest_c, harvest_tag) + current_fates_landuse_state_vector, harvestable_forest_c, harvest_tag) if (currentCohort%canopy_layer > 1)then ! Include understory logging mortality rates not associated with disturbance diff --git a/biogeochem/EDPatchDynamicsMod.F90 b/biogeochem/EDPatchDynamicsMod.F90 index 696a88514c..a6559f5e56 100644 --- a/biogeochem/EDPatchDynamicsMod.F90 +++ b/biogeochem/EDPatchDynamicsMod.F90 @@ -271,8 +271,7 @@ subroutine disturbance_rates( site_in, bc_in) bc_in%hlm_harvest_units, & currentPatch%land_use_label, & currentPatch%age_since_anthro_disturbance, & - current_fates_landuse_state_vector(primaryland), & - current_fates_landuse_state_vector(secondaryland), & + current_fates_landuse_state_vector, & harvestable_forest_c, & harvest_tag) @@ -401,8 +400,7 @@ subroutine disturbance_rates( site_in, bc_in) harvest_rate, harvest_tag) else call get_harvest_rate_area (currentPatch%land_use_label, bc_in%hlm_harvest_catnames, & - bc_in%hlm_harvest_rates, current_fates_landuse_state_vector(primaryland), & - current_fates_landuse_state_vector(secondaryland), secondary_young_fraction, & + bc_in%hlm_harvest_rates, current_fates_landuse_state_vector, secondary_young_fraction, & currentPatch%age_since_anthro_disturbance, harvest_rate) end if @@ -430,11 +428,12 @@ subroutine disturbance_rates( site_in, bc_in) (currentPatch%area - currentPatch%total_canopy_area) * harvest_rate / currentPatch%area endif - ! For nocomp mode, we need to prevent producing too small patches, which may produce small patches - if ((hlm_use_nocomp .eq. itrue) .and. & - (currentPatch%disturbance_rates(dtype_ilog)*currentPatch%area .lt. min_patch_area_forced)) then - currentPatch%disturbance_rates(dtype_ilog) = 0._r8 - end if + ! cdk. Oct. 24, 2024. I don't think we need this anymore. commenting out. + ! ! For nocomp mode, we need to prevent producing too small patches, which may produce small patches + ! if ((hlm_use_nocomp .eq. itrue) .and. & + ! (currentPatch%disturbance_rates(dtype_ilog)*currentPatch%area .lt. min_patch_area_forced)) then + ! currentPatch%disturbance_rates(dtype_ilog) = 0._r8 + ! end if ! fraction of the logging disturbance rate that is non-harvested if (currentPatch%disturbance_rates(dtype_ilog) .gt. nearzero) then diff --git a/biogeochem/FatesLandUseChangeMod.F90 b/biogeochem/FatesLandUseChangeMod.F90 index 5873da97eb..bc2339305a 100644 --- a/biogeochem/FatesLandUseChangeMod.F90 +++ b/biogeochem/FatesLandUseChangeMod.F90 @@ -386,6 +386,8 @@ subroutine GetInitLanduseHarvestRate(bc_in, min_allowed_landuse_fraction, harves if ( state_vector(secondaryland) .gt. min_allowed_landuse_fraction) then harvest_rate = state_vector(secondaryland) landuse_vector_gt_min(secondaryland) = .true. + else + harvest_rate = 0._r8 endif end subroutine GetInitLanduseHarvestRate diff --git a/main/EDMainMod.F90 b/main/EDMainMod.F90 index 1e7ee14e13..ff36138e03 100644 --- a/main/EDMainMod.F90 +++ b/main/EDMainMod.F90 @@ -478,8 +478,8 @@ subroutine ed_integrate_state_variables(currentSite, bc_in, bc_out ) call Mortality_Derivative(currentSite, currentCohort, bc_in, & currentPatch%btran_ft, mean_temp, & currentPatch%land_use_label, & - currentPatch%age_since_anthro_disturbance, current_fates_landuse_state_vector(primaryland), & - current_fates_landuse_state_vector(secondaryland), harvestable_forest_c, harvest_tag) + currentPatch%age_since_anthro_disturbance, current_fates_landuse_state_vector, & + harvestable_forest_c, harvest_tag) ! ----------------------------------------------------------------------------- ! Apply Plant Allocation and Reactive Transport diff --git a/main/FatesHistoryInterfaceMod.F90 b/main/FatesHistoryInterfaceMod.F90 index 364ad816cf..5fd398b724 100644 --- a/main/FatesHistoryInterfaceMod.F90 +++ b/main/FatesHistoryInterfaceMod.F90 @@ -113,6 +113,7 @@ module FatesHistoryInterfaceMod use FatesConstantsMod , only : grav_earth use FatesLitterMod , only : litter_type use FatesConstantsMod , only : secondaryland + use FatesConstantsMod , only : primaryland use PRTGenericMod , only : leaf_organ, fnrt_organ, sapw_organ use PRTGenericMod , only : struct_organ, store_organ, repro_organ @@ -352,15 +353,16 @@ module FatesHistoryInterfaceMod integer :: ih_understory_biomass_si integer :: ih_maint_resp_unreduced_si - integer :: ih_npp_secondary_si - integer :: ih_gpp_secondary_si - integer :: ih_aresp_secondary_si - integer :: ih_maint_resp_secondary_si - integer :: ih_growth_resp_secondary_si - integer :: ih_primaryland_fusion_error_si + ! land-use-resolved variables integer :: ih_area_si_landuse + integer :: ih_biomass_si_landuse + integer :: ih_burnedarea_si_landuse + integer :: ih_gpp_si_landuse + integer :: ih_npp_si_landuse + + ! land use by land use variables integer :: ih_disturbance_rate_si_lulu integer :: ih_transition_matrix_si_lulu @@ -408,9 +410,7 @@ module FatesHistoryInterfaceMod integer :: ih_err_fates_elem integer :: ih_npatches_si - integer :: ih_npatches_sec_si integer :: ih_ncohorts_si - integer :: ih_ncohorts_sec_si integer :: ih_demotion_carbonflux_si integer :: ih_promotion_carbonflux_si integer :: ih_canopy_mortality_carbonflux_si @@ -428,8 +428,6 @@ module FatesHistoryInterfaceMod integer :: ih_froot_mr_si integer :: ih_livestem_mr_si integer :: ih_livecroot_mr_si - integer :: ih_fraction_secondary_forest_si - integer :: ih_biomass_secondary_forest_si integer :: ih_woodproduct_si integer :: ih_h2oveg_si integer :: ih_h2oveg_dead_si @@ -561,14 +559,6 @@ module FatesHistoryInterfaceMod integer :: ih_m9_si_scls integer :: ih_m10_si_scls - integer :: ih_m1_sec_si_scls - integer :: ih_m2_sec_si_scls - integer :: ih_m3_sec_si_scls - integer :: ih_m7_sec_si_scls - integer :: ih_m8_sec_si_scls - integer :: ih_m9_sec_si_scls - integer :: ih_m10_sec_si_scls - integer :: ih_m10_si_cacls integer :: ih_nplant_si_cacls @@ -618,11 +608,9 @@ module FatesHistoryInterfaceMod ! indices to (site x pft) variables integer :: ih_biomass_si_pft - integer :: ih_biomass_sec_si_pft integer :: ih_leafbiomass_si_pft integer :: ih_storebiomass_si_pft integer :: ih_nindivs_si_pft - integer :: ih_nindivs_sec_si_pft integer :: ih_recruitment_si_pft integer :: ih_recruitment_cflux_si_pft integer :: ih_mortality_si_pft @@ -635,9 +623,7 @@ module FatesHistoryInterfaceMod integer :: ih_canopycrownarea_si_pft integer :: ih_crownarea_si_cnlf integer :: ih_gpp_si_pft - integer :: ih_gpp_sec_si_pft integer :: ih_npp_si_pft - integer :: ih_npp_sec_si_pft integer :: ih_site_dstatus_si_pft integer :: ih_dleafoff_si_pft integer :: ih_dleafon_si_pft @@ -664,13 +650,12 @@ module FatesHistoryInterfaceMod integer :: ih_c_lblayer_si_age integer :: ih_agesince_anthrodist_si_age integer :: ih_secondarylands_area_si_age + integer :: ih_primarylands_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_sum_fuel_si_age - integer :: ih_lai_secondary_si - ! indices to (site x height) variables integer :: ih_canopy_height_dist_si_height integer :: ih_leaf_height_dist_si_height @@ -2398,9 +2383,7 @@ subroutine update_history_dyn1(this,nc,nsites,sites,bc_in) real(r8) :: area_frac ! Fraction of area for this patch associate( hio_npatches_si => this%hvars(ih_npatches_si)%r81d, & - hio_npatches_sec_si => this%hvars(ih_npatches_sec_si)%r81d, & hio_ncohorts_si => this%hvars(ih_ncohorts_si)%r81d, & - hio_ncohorts_sec_si => this%hvars(ih_ncohorts_sec_si)%r81d, & hio_trimming_si => this%hvars(ih_trimming_si)%r81d, & hio_area_plant_si => this%hvars(ih_area_plant_si)%r81d, & hio_area_trees_si => this%hvars(ih_area_trees_si)%r81d, & @@ -2453,9 +2436,6 @@ subroutine update_history_dyn1(this,nc,nsites,sites,bc_in) hio_promotion_carbonflux_si => this%hvars(ih_promotion_carbonflux_si)%r81d, & hio_canopy_mortality_carbonflux_si => this%hvars(ih_canopy_mortality_carbonflux_si)%r81d, & hio_ustory_mortality_carbonflux_si => this%hvars(ih_understory_mortality_carbonflux_si)%r81d, & - hio_lai_secondary_si => this%hvars(ih_lai_secondary_si)%r81d, & - hio_fraction_secondary_forest_si => this%hvars(ih_fraction_secondary_forest_si)%r81d, & - hio_biomass_secondary_forest_si => this%hvars(ih_biomass_secondary_forest_si)%r81d, & hio_woodproduct_si => this%hvars(ih_woodproduct_si)%r81d, & hio_gdd_si => this%hvars(ih_gdd_si)%r81d, & hio_site_ncolddays_si => this%hvars(ih_site_ncolddays_si)%r81d, & @@ -2633,9 +2613,6 @@ subroutine update_history_dyn1(this,nc,nsites,sites,bc_in) ! Increment the number of patches per site hio_npatches_si(io_si) = hio_npatches_si(io_si) + 1._r8 - if ( cpatch%land_use_label .eq. secondaryland ) then - hio_npatches_sec_si(io_si) = hio_npatches_sec_si(io_si) + 1._r8 - end if hio_lai_si(io_si) = hio_lai_si(io_si) + sum( cpatch%canopy_area_profile(:,:,:) * cpatch%tlai_profile(:,:,:) ) * & cpatch%total_canopy_area * AREA_INV @@ -2655,17 +2632,6 @@ subroutine update_history_dyn1(this,nc,nsites,sites,bc_in) hio_tgrowth(io_si) = hio_tgrowth(io_si) + & (cpatch%tveg_lpa%GetMean()- t_water_freeze_k_1atm)*cpatch%area*AREA_INV - ! some diagnostics on secondary forest area and its age distribution - if ( cpatch%land_use_label .eq. secondaryland ) then - hio_fraction_secondary_forest_si(io_si) = hio_fraction_secondary_forest_si(io_si) + & - cpatch%area * AREA_INV - - ! Secondary forest mean LAI - - hio_lai_secondary_si(io_si) = hio_lai_secondary_si(io_si) & - + sum(cpatch%tlai_profile(:,:,:)) * cpatch%total_canopy_area - end if - ! Canopy trimming - degree to which canopy expansion is limited by leaf economics (0-1) if(associated(cpatch%tallest))then hio_trimming_si(io_si) = hio_trimming_si(io_si) + cpatch%tallest%canopy_trim * cpatch%area * AREA_INV @@ -2739,10 +2705,6 @@ subroutine update_history_dyn1(this,nc,nsites,sites,bc_in) ! Increment the number of cohorts per site hio_ncohorts_si(io_si) = hio_ncohorts_si(io_si) + 1._r8 - if ( cpatch%land_use_label .eq. secondaryland ) then - hio_ncohorts_sec_si(io_si) = hio_ncohorts_sec_si(io_si) + 1._r8 - end if - ! Update biomass components ! Mass pools [kg] elloop: do el = 1, num_elements @@ -2792,12 +2754,6 @@ subroutine update_history_dyn1(this,nc,nsites,sites,bc_in) hio_agb_si(io_si) = hio_agb_si(io_si) + n_perm2 * & ( leaf_m + (sapw_m + struct_m + store_m) * prt_params%allom_agb_frac(ccohort%pft) ) - ! track the total biomass on all secondary lands - if ( cpatch%land_use_label .eq. secondaryland ) then - hio_biomass_secondary_forest_si(io_si) = hio_biomass_secondary_forest_si(io_si) + & - total_m * ccohort%n * AREA_INV - endif - if( hlm_parteh_mode == prt_cnp_flex_allom_hyp) then this%hvars(ih_l2fr_si)%r81d(io_si) = & this%hvars(ih_l2fr_si)%r81d(io_si) + & @@ -2969,11 +2925,6 @@ subroutine update_history_dyn1(this,nc,nsites,sites,bc_in) ! Perform any necessary normalizations ! ---------------------------------------------------------------------------------------- - ! divide secondary plant leaf area by secondary forest area to get the secondary forest LAI - if (hio_fraction_secondary_forest_si(io_si) .gt. nearzero) then - hio_lai_secondary_si(io_si) = hio_lai_secondary_si(io_si) / (hio_fraction_secondary_forest_si(io_si)*AREA) - end if - ! Normalize crown-area weighted height if(site_ca>nearzero)then hio_ca_weighted_height_si(io_si) = hio_ca_weighted_height_si(io_si)/site_ca @@ -3103,11 +3054,9 @@ subroutine update_history_dyn2(this,nc,nsites,sites,bc_in) real(r8), parameter :: reallytalltrees = 1000. ! some large number (m) associate( hio_biomass_si_pft => this%hvars(ih_biomass_si_pft)%r82d, & - hio_biomass_sec_si_pft => this%hvars(ih_biomass_sec_si_pft)%r82d, & hio_leafbiomass_si_pft => this%hvars(ih_leafbiomass_si_pft)%r82d, & hio_storebiomass_si_pft => this%hvars(ih_storebiomass_si_pft)%r82d, & hio_nindivs_si_pft => this%hvars(ih_nindivs_si_pft)%r82d, & - hio_nindivs_sec_si_pft => this%hvars(ih_nindivs_sec_si_pft)%r82d, & hio_recruitment_si_pft => this%hvars(ih_recruitment_si_pft)%r82d, & hio_recruitment_cflux_si_pft => this%hvars(ih_recruitment_cflux_si_pft)%r82d, & hio_seeds_out_gc_si_pft => this%hvars(ih_seeds_out_gc_si_pft)%r82d, & @@ -3120,9 +3069,7 @@ subroutine update_history_dyn2(this,nc,nsites,sites,bc_in) hio_crownarea_si_pft => this%hvars(ih_crownarea_si_pft)%r82d, & hio_canopycrownarea_si_pft => this%hvars(ih_canopycrownarea_si_pft)%r82d, & hio_gpp_si_pft => this%hvars(ih_gpp_si_pft)%r82d, & - hio_gpp_sec_si_pft => this%hvars(ih_gpp_sec_si_pft)%r82d, & hio_npp_si_pft => this%hvars(ih_npp_si_pft)%r82d, & - hio_npp_sec_si_pft => this%hvars(ih_npp_sec_si_pft)%r82d, & hio_fragmentation_scaler_sl => this%hvars(ih_fragmentation_scaler_sl)%r82d, & hio_litter_in_elem => this%hvars(ih_litter_in_elem)%r82d, & hio_litter_out_elem => this%hvars(ih_litter_out_elem)%r82d, & @@ -3202,14 +3149,7 @@ subroutine update_history_dyn2(this,nc,nsites,sites,bc_in) hio_m10_si_cacls => this%hvars(ih_m10_si_cacls)%r82d) ! Break up associates for NAG compilers - associate(hio_m1_sec_si_scls => this%hvars(ih_m1_sec_si_scls)%r82d, & - hio_m2_sec_si_scls => this%hvars(ih_m2_sec_si_scls)%r82d, & - hio_m3_sec_si_scls => this%hvars(ih_m3_sec_si_scls)%r82d, & - hio_m7_sec_si_scls => this%hvars(ih_m7_sec_si_scls)%r82d, & - hio_m8_sec_si_scls => this%hvars(ih_m8_sec_si_scls)%r82d, & - hio_m9_sec_si_scls => this%hvars(ih_m9_sec_si_scls)%r82d, & - hio_m10_sec_si_scls => this%hvars(ih_m10_sec_si_scls)%r82d, & - hio_c13disc_si_scpf => this%hvars(ih_c13disc_si_scpf)%r82d, & + associate(hio_c13disc_si_scpf => this%hvars(ih_c13disc_si_scpf)%r82d, & hio_cwd_elcwd => this%hvars(ih_cwd_elcwd)%r82d, & hio_cwd_ag_elem => this%hvars(ih_cwd_ag_elem)%r82d, & hio_cwd_bg_elem => this%hvars(ih_cwd_bg_elem)%r82d, & @@ -3275,7 +3215,10 @@ subroutine update_history_dyn2(this,nc,nsites,sites,bc_in) hio_biomass_si_age => this%hvars(ih_biomass_si_age)%r82d, & hio_agesince_anthrodist_si_age => this%hvars(ih_agesince_anthrodist_si_age)%r82d, & hio_secondarylands_area_si_age => this%hvars(ih_secondarylands_area_si_age)%r82d, & - hio_area_si_landuse => this%hvars(ih_area_si_landuse)%r82d, & + hio_primarylands_area_si_age => this%hvars(ih_primarylands_area_si_age)%r82d, & + hio_area_si_landuse => this%hvars(ih_area_si_landuse)%r82d, & + hio_biomass_si_landuse => this%hvars(ih_biomass_si_landuse)%r82d, & + hio_burnedarea_si_landuse => this%hvars(ih_burnedarea_si_landuse)%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, & @@ -3419,6 +3362,10 @@ subroutine update_history_dyn2(this,nc,nsites,sites,bc_in) hio_area_si_landuse(io_si, cpatch%land_use_label) = & hio_area_si_landuse(io_si, cpatch%land_use_label) & + cpatch%area * AREA_INV + + hio_burnedarea_si_landuse(io_si, cpatch%land_use_label) = & + hio_burnedarea_si_landuse(io_si, cpatch%land_use_label) + & + cpatch%frac_burnt * cpatch%area * AREA_INV / sec_per_day end if ! Increment some patch-age-resolved diagnostics @@ -3449,6 +3396,12 @@ subroutine update_history_dyn2(this,nc,nsites,sites,bc_in) hio_secondarylands_area_si_age(io_si,cpatch%age_class) = & hio_secondarylands_area_si_age(io_si,cpatch%age_class) & + cpatch%area * AREA_INV + + else if ( cpatch%land_use_label .eq. primaryland) then + hio_primarylands_area_si_age(io_si,cpatch%age_class) = & + hio_primarylands_area_si_age(io_si,cpatch%age_class) & + + cpatch%area * AREA_INV + endif @@ -3588,13 +3541,6 @@ subroutine update_history_dyn2(this,nc,nsites,sites,bc_in) hio_nindivs_si_pft(io_si,ft) = hio_nindivs_si_pft(io_si,ft) + & ccohort%n * AREA_INV - if ( cpatch%land_use_label .eq. secondaryland ) then - hio_nindivs_sec_si_pft(io_si,ft) = hio_nindivs_sec_si_pft(io_si,ft) + & - ccohort%n * AREA_INV - hio_biomass_sec_si_pft(io_si, ft) = hio_biomass_sec_si_pft(io_si, ft) + & - (ccohort%n * AREA_INV) * total_m - end if - if(ccohort%isnew) then hio_recruitment_cflux_si_pft(io_si, ft) = hio_recruitment_cflux_si_pft(io_si, ft) + & (ccohort%n * AREA_INV) * total_m * days_per_year @@ -3607,6 +3553,11 @@ subroutine update_history_dyn2(this,nc,nsites,sites,bc_in) hio_biomass_si_age(io_si,cpatch%age_class) = hio_biomass_si_age(io_si,cpatch%age_class) & + total_m * ccohort%n * AREA_INV + ! biomass by land use type + hio_biomass_si_landuse(io_si, cpatch%land_use_label) = & + hio_biomass_si_landuse(io_si, cpatch%land_use_label) & + + total_m * ccohort%n * AREA_INV + if (ccohort%canopy_layer .eq. 1) then storec_canopy_scpf(i_scpf) = & storec_canopy_scpf(i_scpf) + ccohort%n * store_m @@ -3686,13 +3637,6 @@ subroutine update_history_dyn2(this,nc,nsites,sites,bc_in) hio_npp_si_pft(io_si, ft) = hio_npp_si_pft(io_si, ft) + & ccohort%npp_acc_hold * n_perm2 / (days_per_year*sec_per_day) - if ( cpatch%land_use_label .eq. secondaryland ) then - hio_gpp_sec_si_pft(io_si, ft) = hio_gpp_sec_si_pft(io_si, ft) + & - ccohort%gpp_acc_hold * n_perm2 / (days_per_year*sec_per_day) - hio_npp_sec_si_pft(io_si, ft) = hio_npp_sec_si_pft(io_si, ft) + & - ccohort%npp_acc_hold * n_perm2 / (days_per_year*sec_per_day) - end if - ! Turnover pools [kgC/day] * [day/yr] = [kgC/yr] sapw_m_turnover = ccohort%prt%GetTurnover(sapw_organ, carbon12_element) * days_per_year store_m_turnover = ccohort%prt%GetTurnover(store_organ, carbon12_element) * days_per_year @@ -3809,23 +3753,6 @@ subroutine update_history_dyn2(this,nc,nsites,sites,bc_in) ccohort%frmort*ccohort%n / m2_per_ha hio_m9_si_scls(io_si,scls) = hio_m9_si_scls(io_si,scls) + ccohort%smort*ccohort%n / m2_per_ha - ! Examine secondary forest mortality and mortality rates - if(cpatch%land_use_label .eq. secondaryland) then - if (hlm_use_cohort_age_tracking .eq.itrue) then - hio_m10_sec_si_scls(io_si,scls) = hio_m10_sec_si_scls(io_si,scls) + & - ccohort%asmort*ccohort%n / m2_per_ha - end if - - hio_m1_sec_si_scls(io_si,scls) = hio_m1_sec_si_scls(io_si,scls) + ccohort%bmort*ccohort%n / m2_per_ha - hio_m2_sec_si_scls(io_si,scls) = hio_m2_sec_si_scls(io_si,scls) + ccohort%hmort*ccohort%n / m2_per_ha - hio_m3_sec_si_scls(io_si,scls) = hio_m3_sec_si_scls(io_si,scls) + ccohort%cmort*ccohort%n / m2_per_ha - hio_m7_sec_si_scls(io_si,scls) = hio_m7_sec_si_scls(io_si,scls) + & - (ccohort%lmort_direct+ccohort%lmort_collateral+ccohort%lmort_infra) * ccohort%n / m2_per_ha - hio_m8_sec_si_scls(io_si,scls) = hio_m8_sec_si_scls(io_si,scls) + & - ccohort%frmort*ccohort%n / m2_per_ha - hio_m9_sec_si_scls(io_si,scls) = hio_m9_sec_si_scls(io_si,scls) + ccohort%smort*ccohort%n / m2_per_ha - end if - !C13 discrimination if(abs(gpp_cached_scpf(scpf)-hlm_hio_ignore_val)>nearzero .and. & (gpp_cached_scpf(scpf) + ccohort%gpp_acc_hold) > 0.0_r8) then @@ -4444,12 +4371,6 @@ subroutine update_history_dyn2(this,nc,nsites,sites,bc_in) hio_mortality_canopy_si_scls(io_si,i_scls) = hio_mortality_canopy_si_scls(io_si,i_scls) + & sites(s)%fmort_rate_canopy(i_scls, ft) / m2_per_ha - ! Shijie: Think about how to add later? - !if ( cpatch%land_use_label .eq. secondaryland ) then - ! hio_mortality_canopy_secondary_si_scls(io_si,i_scls) = hio_mortality_canopy_secondary_si_scls(io_si,i_scls) + & - ! sites(s)%term_nindivs_canopy(i_scls,ft) * days_per_year / m2_per_ha - !end if - ! the fire mortality rates for each layer are total dead, since the usable ! output will then normalize by the counts, we are allowed to sum over layers hio_mortality_understory_si_scpf(io_si,i_scpf) = hio_mortality_understory_si_scpf(io_si,i_scpf) + & @@ -4940,15 +4861,10 @@ subroutine update_history_hifrq1(this,nc,nsites,sites,bc_in,bc_out,dt_tstep) associate( hio_gpp_si => this%hvars(ih_gpp_si)%r81d, & - hio_gpp_secondary_si => this%hvars(ih_gpp_secondary_si)%r81d, & hio_npp_si => this%hvars(ih_npp_si)%r81d, & - hio_npp_secondary_si => this%hvars(ih_npp_secondary_si)%r81d, & hio_aresp_si => this%hvars(ih_aresp_si)%r81d, & - hio_aresp_secondary_si => this%hvars(ih_aresp_secondary_si)%r81d, & hio_maint_resp_si => this%hvars(ih_maint_resp_si)%r81d, & - hio_maint_resp_secondary_si => this%hvars(ih_maint_resp_secondary_si)%r81d, & hio_growth_resp_si => this%hvars(ih_growth_resp_si)%r81d, & - hio_growth_resp_secondary_si => this%hvars(ih_growth_resp_secondary_si)%r81d, & hio_c_stomata_si => this%hvars(ih_c_stomata_si)%r81d, & hio_c_lblayer_si => this%hvars(ih_c_lblayer_si)%r81d, & hio_vis_rad_err_si => this%hvars(ih_vis_rad_err_si)%r81d, & @@ -5106,24 +5022,6 @@ subroutine update_history_hifrq1(this,nc,nsites,sites,bc_in,bc_out,dt_tstep) hio_maint_resp_unreduced_si(io_si) = hio_maint_resp_unreduced_si(io_si) + & ccohort%resp_m_unreduced * n_perm2 * dt_tstep_inv - ! Secondary forest only - if(cpatch%land_use_label .eq. secondaryland) then - hio_npp_secondary_si(io_si) = hio_npp_secondary_si(io_si) + & - ccohort%npp_tstep * n_perm2 * dt_tstep_inv - - hio_gpp_secondary_si(io_si) = hio_gpp_secondary_si(io_si) + & - ccohort%gpp_tstep * n_perm2 * dt_tstep_inv - - hio_aresp_secondary_si(io_si) = hio_aresp_secondary_si(io_si) + & - ccohort%resp_tstep * n_perm2 * dt_tstep_inv - - hio_growth_resp_secondary_si(io_si) = hio_growth_resp_secondary_si(io_si) + & - ccohort%resp_g_tstep * n_perm2 * dt_tstep_inv - - hio_maint_resp_secondary_si(io_si) = hio_maint_resp_secondary_si(io_si) + & - ccohort%resp_m * n_perm2 * dt_tstep_inv - end if - ! Maintenance respiration of different organs hio_leaf_mr_si(io_si) = hio_leaf_mr_si(io_si) + ccohort%rdark & * n_perm2 @@ -5235,6 +5133,8 @@ subroutine update_history_hifrq2(this,nc,nsites,sites,bc_in,bc_out,dt_tstep) hio_resp_m_understory_si_scls => this%hvars(ih_resp_m_understory_si_scls)%r82d, & hio_gpp_si_age => this%hvars(ih_gpp_si_age)%r82d, & hio_npp_si_age => this%hvars(ih_npp_si_age)%r82d, & + hio_gpp_si_landuse => this%hvars(ih_gpp_si_landuse)%r82d, & + hio_npp_si_landuse => this%hvars(ih_npp_si_landuse)%r82d, & hio_c_stomata_si_age => this%hvars(ih_c_stomata_si_age)%r82d, & hio_c_lblayer_si_age => this%hvars(ih_c_lblayer_si_age)%r82d, & hio_parsun_z_si_cnlf => this%hvars(ih_parsun_z_si_cnlf)%r82d, & @@ -5359,6 +5259,14 @@ subroutine update_history_hifrq2(this,nc,nsites,sites,bc_in,bc_out,dt_tstep) hio_npp_si_age(io_si,cpatch%age_class) = hio_npp_si_age(io_si,cpatch%age_class) & + npp * ccohort%n * dt_tstep_inv + if (cpatch%land_use_label .gt. nocomp_bareground_land) then + hio_gpp_si_landuse(io_si,cpatch%land_use_label) = hio_gpp_si_landuse(io_si,cpatch%land_use_label) & + + ccohort%gpp_tstep * ccohort%n * dt_tstep_inv + + hio_npp_si_landuse(io_si,cpatch%land_use_label) = hio_npp_si_landuse(io_si,cpatch%land_use_label) & + + npp * ccohort%n * dt_tstep_inv + end if + ! accumulate fluxes on canopy- and understory- separated fluxes if (ccohort%canopy_layer .eq. 1) then @@ -6130,18 +6038,6 @@ subroutine define_history_vars(this, initialize_variables) upfreq=group_dyna_simple, ivar=ivar, initialize=initialize_variables, & index=ih_ncohorts_si) - call this%set_history_var(vname='FATES_NPATCHES_SECONDARY', units='', & - long='total number of patches per site', use_default='active', & - avgflag='A', vtype=site_r8, hlms='CLM:ALM', & - upfreq=group_dyna_simple, ivar=ivar, initialize=initialize_variables, & - index=ih_npatches_sec_si) - - call this%set_history_var(vname='FATES_NCOHORTS_SECONDARY', units='', & - long='total number of cohorts per site', use_default='active', & - avgflag='A', vtype=site_r8, hlms='CLM:ALM', & - upfreq=group_dyna_simple, ivar=ivar, initialize=initialize_variables, & - index=ih_ncohorts_sec_si) - ! Patch variables call this%set_history_var(vname='FATES_TRIMMING', units='1', & long='degree to which canopy expansion is limited by leaf economics (0-1)', & @@ -6231,34 +6127,12 @@ subroutine define_history_vars(this, initialize_variables) upfreq=group_dyna_simple, ivar=ivar, initialize=initialize_variables, & index=ih_elai_si) - call this%set_history_var(vname='FATES_LAI_SECONDARY', units='m2 m-2', & - long='leaf area index per m2 land area, secondary patches', & - use_default='active', avgflag='A', vtype=site_r8, hlms='CLM:ALM', & - upfreq=group_dyna_simple, ivar=ivar, initialize=initialize_variables, & - index=ih_lai_secondary_si) - - - - ! Secondary forest area and age diagnostics - - call this%set_history_var(vname='FATES_SECONDARY_FOREST_FRACTION', & - units='m2 m-2', long='secondary forest fraction', & - use_default='active', avgflag='A', vtype=site_r8, hlms='CLM:ALM', & - upfreq=group_dyna_simple, ivar=ivar, initialize=initialize_variables, & - index=ih_fraction_secondary_forest_si) - call this%set_history_var(vname='FATES_WOOD_PRODUCT', units='kg m-2', & long='total wood product from logging in kg carbon per m2 land area', & use_default='active', avgflag='A', vtype=site_r8, hlms='CLM:ALM', & upfreq=group_dyna_simple, ivar=ivar, initialize=initialize_variables, & index=ih_woodproduct_si) - call this%set_history_var(vname='FATES_SECONDARY_FOREST_VEGC', & - units='kg m-2', & - long='biomass on secondary lands in kg carbon per m2 land area (mult by FATES_SECONDARY_FOREST_FRACTION to get per secondary forest area)', & - use_default='active', avgflag='A', vtype=site_r8, & - hlms='CLM:ALM', upfreq=group_dyna_simple, ivar=ivar, initialize=initialize_variables, & - index=ih_biomass_secondary_forest_si) ! Fire Variables call this%set_history_var(vname='FATES_NESTEROV_INDEX', units='', & @@ -6814,7 +6688,17 @@ subroutine define_history_vars(this, initialize_variables) long='patch area by land use type', use_default='active', & avgflag='A', vtype=site_landuse_r8, hlms='CLM:ALM', upfreq=group_dyna_complx, & ivar=ivar, initialize=initialize_variables, index=ih_area_si_landuse) - + + call this%set_history_var(vname='FATES_VEGC_LU', units='kg m-2', & + long='Vegetation Carbon by land use type', use_default='active', & + avgflag='A', vtype=site_landuse_r8, hlms='CLM:ALM', upfreq=group_dyna_complx, & + ivar=ivar, initialize=initialize_variables, index=ih_biomass_si_landuse) + + call this%set_history_var(vname='FATES_BURNEDAREA_LU', units='s-1', & + long='burned area by land use type', use_default='active', & + avgflag='A', vtype=site_landuse_r8, hlms='CLM:ALM', upfreq=group_dyna_complx, & + ivar=ivar, initialize=initialize_variables, index=ih_burnedarea_si_landuse) + call this%set_history_var(vname='FATES_TRANSITION_MATRIX_LULU', units='m2 m-2 yr-1', & long='land use transition matrix', use_default='active', & avgflag='A', vtype=site_lulu_r8, hlms='CLM:ALM', upfreq=group_dyna_complx, ivar=ivar, & @@ -6831,12 +6715,6 @@ subroutine define_history_vars(this, initialize_variables) upfreq=group_dyna_complx, ivar=ivar, initialize=initialize_variables, & index=ih_biomass_si_pft) - call this%set_history_var(vname='FATES_VEGC_SE_PF', units='kg m-2', & - long='total PFT-level biomass in kg of carbon per land area, secondary patches', & - use_default='active', avgflag='A', vtype=site_pft_r8, hlms='CLM:ALM', & - upfreq=group_dyna_complx, ivar=ivar, initialize=initialize_variables, & - index=ih_biomass_sec_si_pft) - call this%set_history_var(vname='FATES_RECRUITMENT_CFLUX_PF', units='kg m-2 yr-1', & long='total PFT-level biomass of new recruits in kg of carbon per land area', & use_default='active', avgflag='A', vtype=site_pft_r8, hlms='CLM:ALM', & @@ -6879,30 +6757,12 @@ subroutine define_history_vars(this, initialize_variables) upfreq=group_dyna_complx, ivar=ivar, initialize=initialize_variables, & index=ih_npp_si_pft) - call this%set_history_var(vname='FATES_GPP_SE_PF', units='kg m-2 s-1', & - long='total PFT-level GPP in kg carbon per m2 land area per second, secondary patches', & - use_default='active', avgflag='A', vtype=site_pft_r8, hlms='CLM:ALM', & - upfreq=group_dyna_complx, ivar=ivar, initialize=initialize_variables, & - index=ih_gpp_sec_si_pft) - - call this%set_history_var(vname='FATES_NPP_SE_PF', units='kg m-2 s-1', & - long='total PFT-level NPP in kg carbon per m2 land area per second, secondary patches', & - use_default='active', avgflag='A', vtype=site_pft_r8, hlms='CLM:ALM', & - upfreq=group_dyna_complx, ivar=ivar, initialize=initialize_variables, & - index=ih_npp_sec_si_pft) - call this%set_history_var(vname='FATES_NPLANT_PF', units='m-2', & long='total PFT-level number of individuals per m2 land area', & use_default='active', avgflag='A', vtype=site_pft_r8, hlms='CLM:ALM', & upfreq=group_dyna_complx, ivar=ivar, initialize=initialize_variables, & index=ih_nindivs_si_pft) - call this%set_history_var(vname='FATES_NPLANT_SEC_PF', units='m-2', & - long='total PFT-level number of individuals per m2 land area, secondary patches', & - use_default='active', avgflag='A', vtype=site_pft_r8, hlms='CLM:ALM', & - upfreq=group_dyna_complx, ivar=ivar, initialize=initialize_variables, & - index=ih_nindivs_sec_si_pft) - call this%set_history_var(vname='FATES_RECRUITMENT_PF', & units='m-2 yr-1', & long='PFT-level recruitment rate in number of individuals per m2 land area per year', & @@ -7053,20 +6913,27 @@ subroutine define_history_vars(this, initialize_variables) hlms='CLM:ALM', upfreq=group_dyna_complx, ivar=ivar, initialize=initialize_variables, & index=ih_biomass_si_age) - call this%set_history_var(vname='FATES_SECONDAREA_ANTHRODIST_AP', & + call this%set_history_var(vname='FATES_SECONDARY_ANTHRODISTAGE_AP', & units='m2 m-2', & - long='secondary forest patch area age distribution since anthropgenic disturbance', & + long='secondary forest patch area age distribution since anthropogenic disturbance', & use_default='inactive', avgflag='A', vtype=site_age_r8, & hlms='CLM:ALM', upfreq=group_dyna_complx, ivar=ivar, initialize=initialize_variables, & index=ih_agesince_anthrodist_si_age) - call this%set_history_var(vname='FATES_SECONDAREA_DIST_AP', & + call this%set_history_var(vname='FATES_SECONDARY_AREA_AP', & units='m2 m-2', & long='secondary forest patch area age distribution since any kind of disturbance', & use_default='inactive', avgflag='A', vtype=site_age_r8, & hlms='CLM:ALM', upfreq=group_dyna_complx, ivar=ivar, initialize=initialize_variables, & index=ih_secondarylands_area_si_age) + call this%set_history_var(vname='FATES_PRIMARY_AREA_AP', & + units='m2 m-2', & + long='primary forest patch area age distribution since any kind of disturbance', & + use_default='inactive', avgflag='A', vtype=site_age_r8, & + hlms='CLM:ALM', upfreq=group_dyna_complx, ivar=ivar, initialize=initialize_variables, & + index=ih_primarylands_area_si_age) + call this%set_history_var(vname='FATES_FRAGMENTATION_SCALER_SL', units='', & long='factor (0-1) by which litter/cwd fragmentation proceeds relative to max rate by soil layer', & use_default='active', avgflag='A', vtype=site_soil_r8, & @@ -8044,27 +7911,6 @@ subroutine define_history_vars(this, initialize_variables) hlms='CLM:ALM', upfreq=group_dyna_complx, ivar=ivar, & initialize=initialize_variables, index = ih_m3_si_scls) - call this%set_history_var(vname='FATES_MORTALITY_BACKGROUND_SE_SZ', & - units = 'm-2 yr-1', & - long='background mortality by size in number of plants per m2 per year, secondary patches', & - use_default='active', avgflag='A', vtype=site_size_r8, & - hlms='CLM:ALM', upfreq=group_dyna_complx, ivar=ivar, & - initialize=initialize_variables, index = ih_m1_sec_si_scls) - - call this%set_history_var(vname='FATES_MORTALITY_HYDRAULIC_SE_SZ', & - units = 'm-2 yr-1', & - long='hydraulic mortality by size in number of plants per m2 per year, secondary patches', & - use_default='active', avgflag='A', vtype=site_size_r8, & - hlms='CLM:ALM', upfreq=group_dyna_complx, ivar=ivar, & - initialize=initialize_variables, index = ih_m2_sec_si_scls) - - call this%set_history_var(vname='FATES_MORTALITY_CSTARV_SE_SZ', & - units = 'm-2 yr-1', & - long='carbon starvation mortality by size in number of plants per m2 per year, secondary patches', & - use_default='active', avgflag='A', vtype=site_size_r8, & - hlms='CLM:ALM', upfreq=group_dyna_complx, ivar=ivar, & - initialize=initialize_variables, index = ih_m3_sec_si_scls) - call this%set_history_var(vname='FATES_MORTALITY_IMPACT_SZ', & units = 'm-2 yr-1', & long='impact mortality by size in number of plants per m2 per year', & @@ -8121,34 +7967,6 @@ subroutine define_history_vars(this, initialize_variables) hlms='CLM:ALM', upfreq=group_dyna_complx, ivar=ivar, & initialize=initialize_variables, index = ih_m10_si_cacls) - call this%set_history_var(vname='FATES_MORTALITY_LOGGING_SE_SZ', & - units = 'm-2 yr-1', & - long='logging mortality by size in number of plants per m2 per event, secondary patches', & - use_default='active', avgflag='A', vtype=site_size_r8, & - hlms='CLM:ALM', upfreq=group_dyna_complx, ivar=ivar, & - initialize=initialize_variables, index = ih_m7_sec_si_scls) - - call this%set_history_var(vname='FATES_MORTALITY_FREEZING_SE_SZ', & - units = 'm-2 event-1', & - long='freezing mortality by size in number of plants per m2 per event, secondary patches', & - use_default='active', avgflag='A', vtype=site_size_r8, & - hlms='CLM:ALM', upfreq=group_dyna_complx, ivar=ivar, & - initialize=initialize_variables, index = ih_m8_sec_si_scls) - - call this%set_history_var(vname='FATES_MORTALITY_SENESCENCE_SE_SZ', & - units = 'm-2 yr-1', & - long='senescence mortality by size in number of plants per m2 per event, secondary patches', & - use_default='active', avgflag='A', vtype=site_size_r8, & - hlms='CLM:ALM', upfreq=group_dyna_complx, ivar=ivar, & - initialize=initialize_variables, index = ih_m9_sec_si_scls) - - call this%set_history_var(vname='FATES_MORTALITY_AGESCEN_SE_SZ', & - units = 'm-2 yr-1', & - long='age senescence mortality by size in number of plants per m2 per year, secondary patches', & - use_default='active', avgflag='A', vtype=site_size_r8, & - hlms='CLM:ALM', upfreq=group_dyna_complx, ivar=ivar, & - initialize=initialize_variables, index = ih_m10_sec_si_scls) - call this%set_history_var(vname='FATES_NPP_CANOPY_SZ', units = 'kg m-2 s-1', & long='NPP of canopy plants by size class in kg carbon per m2 per second', & use_default='inactive', avgflag='A', vtype=site_size_r8, & @@ -8598,43 +8416,22 @@ subroutine define_history_vars(this, initialize_variables) use_default='active', avgflag='A', vtype=site_r8, hlms='CLM:ALM', & upfreq=group_hifr_simple, ivar=ivar, initialize=initialize_variables, index = ih_npp_si) - call this%set_history_var(vname='FATES_NPP_SECONDARY', units='kg m-2 s-1', & - long='net primary production in kg carbon per m2 per second, secondary patches', & - use_default='active', avgflag='A', vtype=site_r8, hlms='CLM:ALM', & - upfreq=group_hifr_simple, ivar=ivar, initialize=initialize_variables, index = ih_npp_secondary_si) - call this%set_history_var(vname='FATES_GPP', units='kg m-2 s-1', & long='gross primary production in kg carbon per m2 per second', & use_default='active', avgflag='A', vtype=site_r8, hlms='CLM:ALM', & upfreq=group_hifr_simple, ivar=ivar, initialize=initialize_variables, index = ih_gpp_si) - call this%set_history_var(vname='FATES_GPP_SECONDARY', units='kg m-2 s-1', & - long='gross primary production in kg carbon per m2 per second, secondary patches', & - use_default='active', avgflag='A', vtype=site_r8, hlms='CLM:ALM', & - upfreq=group_hifr_simple, ivar=ivar, initialize=initialize_variables, index = ih_gpp_secondary_si) - call this%set_history_var(vname='FATES_AUTORESP', units='kg m-2 s-1', & long='autotrophic respiration in kg carbon per m2 per second', & use_default='active', avgflag='A', vtype=site_r8, hlms='CLM:ALM', & upfreq=group_hifr_simple, ivar=ivar, initialize=initialize_variables, index = ih_aresp_si) - call this%set_history_var(vname='FATES_AUTORESP_SECONDARY', units='kg m-2 s-1', & - long='autotrophic respiration in kg carbon per m2 per second, secondary patches', & - use_default='active', avgflag='A', vtype=site_r8, hlms='CLM:ALM', & - upfreq=group_hifr_simple, ivar=ivar, initialize=initialize_variables, index = ih_aresp_secondary_si) - call this%set_history_var(vname='FATES_GROWTH_RESP', units='kg m-2 s-1', & long='growth respiration in kg carbon per m2 per second', & use_default='active', avgflag='A', vtype=site_r8, hlms='CLM:ALM', & upfreq=group_hifr_simple, ivar=ivar, initialize=initialize_variables, & index = ih_growth_resp_si) - call this%set_history_var(vname='FATES_GROWTH_RESP_SECONDARY', units='kg m-2 s-1', & - long='growth respiration in kg carbon per m2 per second, secondary patches', & - use_default='active', avgflag='A', vtype=site_r8, hlms='CLM:ALM', & - upfreq=group_hifr_simple, ivar=ivar, initialize=initialize_variables, & - index = ih_growth_resp_secondary_si) - call this%set_history_var(vname='FATES_MAINT_RESP', units='kg m-2 s-1', & long='maintenance respiration in kg carbon per m2 land area per second', & use_default='active', avgflag='A', vtype=site_r8, hlms='CLM:ALM', & @@ -8647,12 +8444,6 @@ subroutine define_history_vars(this, initialize_variables) upfreq=group_hifr_simple, ivar=ivar, initialize=initialize_variables, & index = ih_maint_resp_unreduced_si) - call this%set_history_var(vname='FATES_MAINT_RESP_SECONDARY', units='kg m-2 s-1', & - long='maintenance respiration in kg carbon per m2 land area per second, secondary patches', & - use_default='active', avgflag='A', vtype=site_r8, hlms='CLM:ALM', & - upfreq=group_hifr_simple, ivar=ivar, initialize=initialize_variables, & - index = ih_maint_resp_secondary_si) - ! fast fluxes separated canopy/understory call this%set_history_var(vname='FATES_GPP_CANOPY', units='kg m-2 s-1', & long='gross primary production of canopy plants in kg carbon per m2 per second', & @@ -8787,6 +8578,18 @@ subroutine define_history_vars(this, initialize_variables) hlms='CLM:ALM', upfreq=group_hifr_complx, ivar=ivar, initialize=initialize_variables, & index = ih_gpp_si_age) + call this%set_history_var(vname='FATES_NPP_LU', units='kg m-2 s-1', & + long='net primary productivity by age bin in kg carbon per m2 per second', & + use_default='inactive', avgflag='A', vtype=site_landuse_r8, & + hlms='CLM:ALM', upfreq=group_hifr_complx, ivar=ivar, initialize=initialize_variables, & + index = ih_npp_si_landuse) + + call this%set_history_var(vname='FATES_GPP_LU', units='kg m-2 s-1', & + long='gross primary productivity by age bin in kg carbon per m2 per second', & + use_default='inactive', avgflag='A', vtype=site_landuse_r8, & + hlms='CLM:ALM', upfreq=group_hifr_complx, ivar=ivar, initialize=initialize_variables, & + index = ih_gpp_si_landuse) + call this%set_history_var(vname='FATES_RDARK_USTORY_SZ', & units = 'kg m-2 s-1', & long='dark respiration for understory plants in kg carbon per m2 per second by size', &