diff --git a/biogeochem/EDCanopyStructureMod.F90 b/biogeochem/EDCanopyStructureMod.F90 index f7d4782f15..e12fcd81ee 100644 --- a/biogeochem/EDCanopyStructureMod.F90 +++ b/biogeochem/EDCanopyStructureMod.F90 @@ -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 ! ----------------------------------------------------------------------------- @@ -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) diff --git a/biogeochem/EDPatchDynamicsMod.F90 b/biogeochem/EDPatchDynamicsMod.F90 index b1fc9af66d..1d8b824f92 100644 --- a/biogeochem/EDPatchDynamicsMod.F90 +++ b/biogeochem/EDPatchDynamicsMod.F90 @@ -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 @@ -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, @@ -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 @@ -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) @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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. @@ -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) ! ----------------------------------------------------------------------------------- ! @@ -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 @@ -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 @@ -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 @@ -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. @@ -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: @@ -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) @@ -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 @@ -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: @@ -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 ! @@ -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) @@ -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)) @@ -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 diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index 1f247de245..c58b718a1f 100644 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -34,6 +34,8 @@ module EDPhysiologyMod use FatesConstantsMod, only : megajoules_per_joule use FatesConstantsMod, only : mpa_per_mm_suction use FatesConstantsMod, only : g_per_kg + use FatesConstantsMod, only : ha_per_m2 + use FatesConstantsMod, only : days_per_sec use FatesConstantsMod, only : ndays_per_year use FatesConstantsMod, only : nocomp_bareground use FatesConstantsMod, only : nocomp_bareground_land @@ -432,7 +434,7 @@ end subroutine GenerateDamageAndLitterFluxes ! ============================================================================ - subroutine PreDisturbanceLitterFluxes( currentSite, currentPatch, bc_in ) + subroutine PreDisturbanceLitterFluxes( currentSite, currentPatch, bc_in, bc_out ) ! ----------------------------------------------------------------------------------- ! @@ -440,8 +442,7 @@ subroutine PreDisturbanceLitterFluxes( currentSite, currentPatch, bc_in ) ! associated with seed turnover, seed influx, litterfall from live and ! dead plants, germination, and fragmentation. ! - ! At this time we do not have explicit herbivory, and burning losses to litter - ! are handled elsewhere. + ! Herbivory is handled here. burning losses to litter are handled elsewhere. ! ! Note: The processes conducted here DO NOT handle litter fluxes associated ! with disturbance. Those fluxes are handled elsewhere (EDPatchDynamcisMod) @@ -455,6 +456,7 @@ subroutine PreDisturbanceLitterFluxes( currentSite, currentPatch, bc_in ) type(ed_site_type), intent(inout) :: currentSite type(fates_patch_type), intent(inout) :: currentPatch type(bc_in_type), intent(in) :: bc_in + type(bc_out_type), intent(inout) :: bc_out ! ! !LOCAL VARIABLES: @@ -473,34 +475,33 @@ subroutine PreDisturbanceLitterFluxes( currentSite, currentPatch, bc_in ) site_mass => currentSite%mass_balance(el), & diag => currentSite%flux_diags%elem(el)) - ! Calculate loss rate of viable seeds to litter - call SeedDecay(litt, currentPatch, bc_in) - - ! Calculate seed germination rate, the status flags prevent - ! germination from occuring when the site is in a drought - ! (for drought deciduous) or too cold (for cold deciduous) - call SeedGermination(litt, currentSite%cstatus, currentSite%dstatus(1:numpft), bc_in, currentPatch) - - ! Send fluxes from newly created litter into the litter pools - ! This litter flux is from non-disturbance inducing mortality, as well - ! as litter fluxes from live trees - call CWDInput(currentSite, currentPatch, litt,bc_in) - - ! Only calculate fragmentation flux over layers that are active - ! (RGK-Mar2019) SHOULD WE MAX THIS AT 1? DONT HAVE TO - - nlev_eff_decomp = max(bc_in%max_rooting_depth_index_col, 1) - call CWDOut(litt,currentPatch%fragmentation_scaler,nlev_eff_decomp) - - ! Fragmentation flux to soil decomposition model [kg/site/day] - site_mass%frag_out = site_mass%frag_out + currentPatch%area * & - ( sum(litt%ag_cwd_frag) + sum(litt%bg_cwd_frag) + & - sum(litt%leaf_fines_frag) + sum(litt%root_fines_frag) + & - sum(litt%seed_decay) + sum(litt%seed_germ_decay)) - - ! Track total seed decay diagnostic in [kg/m2/day] - diag%tot_seed_turnover = diag%tot_seed_turnover + & - (sum(litt%seed_decay) + sum(litt%seed_germ_decay))*currentPatch%area*area_inv + ! Calculate loss rate of viable seeds to litter + call SeedDecay(litt, currentPatch, bc_in) + + + ! Calculate seed germination rate, the status flags prevent + ! germination from occuring when the site is in a drought + ! (for drought deciduous) or too cold (for cold deciduous) + call SeedGermination(litt, currentSite%cstatus, currentSite%dstatus(1:numpft), bc_in, currentPatch) + + ! Send fluxes from newly created litter into the litter pools + ! This litter flux is from non-disturbance inducing mortality, as well + ! as litter fluxes from live trees + call CWDInput(currentSite, currentPatch, litt,bc_in, bc_out) + + ! Only calculate fragmentation flux over layers that are active + ! (RGK-Mar2019) SHOULD WE MAX THIS AT 1? DONT HAVE TO + + nlev_eff_decomp = max(bc_in%max_rooting_depth_index_col, 1) + call CWDOut(litt,currentPatch%fragmentation_scaler,nlev_eff_decomp) + + + ! Fragmentation flux to soil decomposition model [kg/site/day] + site_mass%frag_out = site_mass%frag_out + currentPatch%area * & + ( sum(litt%ag_cwd_frag) + sum(litt%bg_cwd_frag) + & + sum(litt%leaf_fines_frag) + sum(litt%root_fines_frag) + & + sum(litt%seed_decay) + sum(litt%seed_germ_decay)) + end associate end do @@ -2785,7 +2786,7 @@ end subroutine recruitment ! ====================================================================================== - subroutine CWDInput( currentSite, currentPatch, litt, bc_in) + subroutine CWDInput( currentSite, currentPatch, litt, bc_in, bc_out) ! ! !DESCRIPTION: @@ -2805,6 +2806,7 @@ subroutine CWDInput( currentSite, currentPatch, litt, bc_in) type(fates_patch_type),intent(inout), target :: currentPatch type(litter_type),intent(inout),target :: litt type(bc_in_type),intent(in) :: bc_in + type(bc_out_type),intent(inout) :: bc_out ! ! !LOCAL VARIABLES: @@ -2952,12 +2954,16 @@ subroutine CWDInput( currentSite, currentPatch, litt, bc_in) elflux_diags%root_litter_input(pft) + & (fnrt_m_turnover + store_m_turnover ) * currentCohort%n - ! send the part of the herbivory flux that doesn't go to litter to the atmosphere + ! send the part of the herbivory flux that doesn't go to litter to the atmosphere (and also for tracking) site_mass%herbivory_flux_out = & site_mass%herbivory_flux_out + & leaf_herbivory * (1._r8 - herbivory_element_use_efficiency) * currentCohort%n + bc_out%grazing_closs_to_atm_si = bc_out%grazing_closs_to_atm_si + & + leaf_herbivory * (1._r8 - herbivory_element_use_efficiency) * currentCohort%n * & + ha_per_m2 * days_per_sec + ! Assumption: turnover from deadwood and sapwood are lumped together in CWD pool !update partitioning of stem wood (struct + sapw) to cwd based on cohort dbh diff --git a/biogeochem/FatesPatchMod.F90 b/biogeochem/FatesPatchMod.F90 index 9b3b9ef919..dd32bbfc80 100644 --- a/biogeochem/FatesPatchMod.F90 +++ b/biogeochem/FatesPatchMod.F90 @@ -72,6 +72,8 @@ module FatesPatchMod real(r8) :: age_since_anthro_disturbance ! average age for secondary forest since last anthropogenic disturbance [years] logical :: changed_landuse_this_ts ! logical flag to track patches that have just undergone land use change [only used with nocomp and land use change] + + !--------------------------------------------------------------------------- ! RUNNING MEANS @@ -735,7 +737,7 @@ subroutine Create(this, age, area, land_use_label, nocomp_pft, num_swb, num_pft, this%age_since_anthro_disturbance = fates_unset_r8 endif this%nocomp_pft_label = nocomp_pft - + this%tr_soil_dir(:) = 1.0_r8 this%tr_soil_dif(:) = 1.0_r8 this%NCL_p = 1 diff --git a/biogeophys/EDAccumulateFluxesMod.F90 b/biogeophys/EDAccumulateFluxesMod.F90 index b4f93ba5c9..9befde6321 100644 --- a/biogeophys/EDAccumulateFluxesMod.F90 +++ b/biogeophys/EDAccumulateFluxesMod.F90 @@ -41,7 +41,12 @@ subroutine AccumulateFluxes_ED(nsites, sites, bc_in, bc_out, dt_time) use FatesPatchMod, only : fates_patch_type use FatesCohortMod, only : fates_cohort_type use FatesInterfaceTypesMod , only : bc_in_type,bc_out_type - + use EDtypesMod , only : AREA_INV + use clm_time_manager , only : get_curr_days_per_year + use FatesConstantsMod , only : sec_per_day + use FatesConstantsMod , only : days_per_year + use FatesConstantsMod , only : g_per_kg + ! ! !ARGUMENTS integer, intent(in) :: nsites @@ -57,8 +62,9 @@ subroutine AccumulateFluxes_ED(nsites, sites, bc_in, bc_out, dt_time) integer :: c ! clm/alm column integer :: s ! ed site integer :: ifp ! index fates patch + real :: ind_per_m2 !---------------------------------------------------------------------- - + do s = 1, nsites ! Note: Do not attempt to accumulate or log any @@ -66,6 +72,9 @@ subroutine AccumulateFluxes_ED(nsites, sites, bc_in, bc_out, dt_time) ! It is likely this has not been calculated yet (ELM/CLM) cpatch => sites(s)%oldest_patch + bc_out(s)%npp_acc_site = 0._r8 + bc_out(s)%npp_site = 0._r8 + do while (associated(cpatch)) ifp = cpatch%patchno @@ -75,13 +84,35 @@ subroutine AccumulateFluxes_ED(nsites, sites, bc_in, bc_out, dt_time) if( bc_in(s)%filter_photo_pa(ifp) == 3 ) then ccohort => cpatch%shortest do while(associated(ccohort)) + ind_per_m2 = ccohort%n * AREA_INV ! Accumulate fluxes from hourly to daily values. ! _tstep fluxes are KgC/indiv/timestep _acc are KgC/indiv/day - ccohort%gpp_acc = ccohort%gpp_acc + ccohort%gpp_tstep ccohort%resp_m_acc = ccohort%resp_m_acc + ccohort%resp_m_tstep + ! Make npp_acc variable for the site level to add to the NBP balance check + ! Convert from kgC/ind to gC/m2 + if(.not.ccohort%isnew)then + bc_out(s)%npp_acc_site = bc_out(s)%npp_acc_site + & + (ccohort%gpp_acc - ccohort%resp_m_acc) & + * ind_per_m2 * g_per_kg & + -(ccohort%resp_g_acc_hold+ccohort%resp_excess_hold) * & + ind_per_m2 * g_per_kg * dt_time/(days_per_year*sec_per_day) + ! gresp is converted from kgC/indiv/year to gC/m2/timestep. + endif + + ! Net Ecosystem Production [kgC/m2/s]. Use yesterday's growth respiration + ! This is taken from the NEP history variable calculation. + ! first add GPP-Rm and convert units from kgC/indiv/timestep to gC/m2/s + ! then smooth out yesterdays's calculated growth respiration and + ! convert units from kgC/indiv/year to gC/m2/s. + if(.not.ccohort%isnew)then + bc_out(s)%npp_site = bc_out(s)%npp_site + (ccohort%gpp_tstep-ccohort%resp_m_tstep) & + * ind_per_m2 * g_per_kg / dt_time - & + (ccohort%resp_g_acc_hold+ccohort%resp_excess_hold) * & + ind_per_m2 * g_per_kg / (days_per_year*sec_per_day) + endif ccohort%sym_nfix_daily = ccohort%sym_nfix_daily + ccohort%sym_nfix_tstep ! weighted mean of D13C by gpp @@ -107,7 +138,8 @@ subroutine AccumulateFluxes_ED(nsites, sites, bc_in, bc_out, dt_time) cpatch => cpatch%younger end do ! while(associated(cpatch)) - end do + + end do return end subroutine AccumulateFluxes_ED diff --git a/biogeophys/FatesPlantRespPhotosynthMod.F90 b/biogeophys/FatesPlantRespPhotosynthMod.F90 index 60cf234a64..85c5ee4010 100644 --- a/biogeophys/FatesPlantRespPhotosynthMod.F90 +++ b/biogeophys/FatesPlantRespPhotosynthMod.F90 @@ -23,6 +23,7 @@ module FATESPlantRespPhotosynthMod use FatesGlobals, only : endrun => fates_endrun use FatesGlobals, only : fates_log use FatesGlobals, only : FatesWarn,N2S,A2S,I2S + use FatesInterfaceTypesMod , only : hlm_use_nocomp use FatesConstantsMod, only : r8 => fates_r8 use FatesConstantsMod, only : itrue use FatesConstantsMod, only : nearzero @@ -161,12 +162,15 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) ! net leaf photosynthesis averaged over sun and shade leaves. [umol CO2/m**2/s] real(r8) :: anet_av_z(nlevleaf,maxpft,nclmax) - ! photsynthesis - real(r8) :: psn_z(nlevleaf,maxpft,nclmax) + ! internal leaf Co2 memory variable (for passing into MEGAN) Pa + real(r8) :: internal_co2_z(nlevleaf,maxpft,nclmax) + + ! photosynthesis [umol /m2 /s] + real(r8) :: psn_z(nlevleaf,maxpft,nclmax) ! carbon 13 in newly assimilated carbon at leaf level - real(r8) :: c13disc_z(nlevleaf,maxpft,nclmax) - + real(r8) :: c13disc_z(nlevleaf,maxpft,nclmax) + ! Mask used to determine which leaf-layer biophysical rates have been ! used already logical :: rate_mask_z(nlevleaf,maxpft,nclmax) @@ -245,7 +249,8 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) real(r8) :: fsun ! sun-shade fraction real(r8) :: par_per_sunla, par_per_shala ! PAR per sunlit and shaded leaf area [W/m2 leaf] real(r8) :: ac_utest, aj_utest ! Gross rubisco and rubp limited assimilation (for unit tests) - real(r8) :: ap_utest, co2_inter_c_utest ! PEP limited assimilation, and intracellular co2 (for unit tests) + real(r8) :: ap_utest, co2_inter_c_utest ! PEP limited assimilation, and (for unit tests) + real(r8),dimension(150) :: cohort_vaitop ! The top-down integrated vegetation area index ! (leaf+stem) at the top of the layer real(r8),dimension(150) :: cohort_vaibot ! The top-down integrated vegetation area index @@ -267,6 +272,9 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) real(r8) :: gstoma ! stomatal conductance at leaf bin (sun/shade combined) [m/s] real(r8) :: anet_ll ! leaf level net assimilation [umol CO2/m**2/s] real(r8) :: c13disc_ll ! leaf level c13 assimilation + real(r8) :: co2_inter_c_ll ! Leaf level intracellular co2 (Pa) + real(r8) :: co2_inter_c ! cohort level intracellular co2 (Pa) (sun/shade combined) [Pa] + real(r8) :: patch_co2_inter ! patch level level intracellular co2 (Pa) (sun/shade combined) [Pa] real(r8) :: hydr_k_lwp ! inner leaf humidity scaling coefficient [-] real(r8) :: gs0 ! stomatal intercept, possibly scaled by btran depending on hypothesis real(r8) :: gs1 ! stomatal slope, possibly scaled by btran depending on hypothesis @@ -345,8 +353,10 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) ! --------------------------------------------------------------------------- bc_out(s)%rssun_pa(ifp) = 0._r8 bc_out(s)%rssha_pa(ifp) = 0._r8 + bc_out(s)%ci_pa(ifp) = 0._r8 g_sb_leaves = 0._r8 + patch_co2_inter = 0._r8 patch_la = 0._r8 ! Part II. Filter out patches @@ -471,6 +481,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) call LowstorageMainRespReduction(frac,currentCohort%pft, & maintresp_reduction_factor) + co2_inter_c = 0.0_r8 ! are there any leaves of this pft in this layer? canopy_mask_if: if(currentPatch%canopy_mask(cl,ft) == 1)then @@ -692,6 +703,8 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) gb_mol = (1._r8/bc_in(s)%rb_pa(ifp)) * vmol_cf gstoma = 0._r8 + co2_inter_c_ll = 0.0_r8 + do_sunsha: do isunsha = 1,2 ! Determine absorbed PAR per square meter of leaf @@ -776,7 +789,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) gstoma_ll, & ! out anet_ll, & ! out c13disc_ll, & ! out - co2_inter_c_utest, & ! out (unit tests) + co2_inter_c_ll, & ! out (unit tests) solve_iter) ! out performance tracking ! Average output quantities across sunlit and shaded leaves @@ -787,8 +800,8 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) psn_z(iv,ft,cl) = psn_z(iv,ft,cl) + area_frac * psn_ll anet_av_z(iv,ft,cl) = anet_av_z(iv,ft,cl) + area_frac * anet_ll c13disc_z(iv,ft,cl) = c13disc_z(iv,ft,cl) + area_frac * c13disc_ll - - + internal_co2_z(iv,ft,cl) = internal_co2_z(iv,ft,cl) & + + area_frac * co2_inter_c_ll end do do_sunsha ! Stomatal resistance of the leaf-layer @@ -832,6 +845,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) rs_z(1:nv,ft,cl), & !in currentPatch%elai_profile(cl,ft,1:nv), & !in c13disc_z(1:nv,ft,cl), & !in + internal_co2_z(1:nv,ft,cl), & !in currentCohort%c_area, & !in currentCohort%n, & !in bc_in(s)%rb_pa(ifp), & !in @@ -840,6 +854,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) currentCohort%gpp_tstep, & !out currentCohort%rdark, & !out currentCohort%c13disc_clm, & !out + co2_inter_c, & !out cohort_eleaf_area) !out else @@ -852,6 +867,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) rs_z(1:nv,ft,cl), & !in cohort_layer_elai(1:nv), & !in c13disc_z(1:nv,ft,cl), & !in + internal_co2_z(1:nv,ft,cl), & !in currentCohort%c_area, & !in currentCohort%n, & !in bc_in(s)%rb_pa(ifp), & !in @@ -860,6 +876,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) currentCohort%gpp_tstep, & !out currentCohort%rdark, & !out currentCohort%c13disc_clm, & !out + co2_inter_c, & !out cohort_eleaf_area) !out end if @@ -877,6 +894,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) currentCohort%rdark = 0.0_r8 currentCohort%g_sb_laweight = 0.0_r8 currentCohort%ts_net_uptake(:) = 0.0_r8 + co2_inter_c = 0.0_r8 end if canopy_mask_if @@ -1060,7 +1078,8 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) ! of each cohort and has units of [m/s] * [m2 leaf] g_sb_leaves = g_sb_leaves + currentCohort%g_sb_laweight - + ! accumulate lead intercellular co2 + patch_co2_inter = patch_co2_inter + co2_inter_c ! Accumulate the total effective leaf area from all cohorts ! in this patch. Normalize by canopy area outside the loop patch_la = patch_la + cohort_eleaf_area @@ -1081,6 +1100,8 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) ! units of [m/s]*[m2] / [m2] = [m/s] g_sb_leaves = g_sb_leaves / patch_la + + patch_co2_inter = patch_co2_inter / patch_la if_above_mincond: if( g_sb_leaves > (1._r8/rsmax0) ) then @@ -1111,7 +1132,13 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) ! when it comes time to calculate a flux rate per unit ground bc_out(s)%rssun_pa(ifp) = r_stomata bc_out(s)%rssha_pa(ifp) = r_stomata - + + if(hlm_use_nocomp .eq. itrue)then + bc_out(s)%ci_pa(ifp) = patch_co2_inter + else + bc_out(s)%ci_pa(ifp) = -999 + endif + ! This value is used for diagnostics, the molar form of conductance ! is what is used in the field usually, so we track that form ! vmol_cf : s m**2/umol -> s/m (ideal gas conversion) [umol/m3] @@ -1213,7 +1240,8 @@ subroutine ScaleLeafLayerFluxToCohort(nv, & ! in lmr_llz, & ! in rs_llz, & ! in elai_llz, & ! in - c13disc_llz, & ! in + c13disc_llz, & ! in + internal_co2_llz, & ! in c_area, & ! in nplant, & ! in rb, & ! in @@ -1222,6 +1250,7 @@ subroutine ScaleLeafLayerFluxToCohort(nv, & ! in gpp, & ! out rdark, & ! out c13disc_clm, & ! out + co2_inter, & ! out cohort_eleaf_area ) ! out ! ------------------------------------------------------------------------------------ @@ -1241,6 +1270,7 @@ subroutine ScaleLeafLayerFluxToCohort(nv, & ! in real(r8), intent(in) :: rs_llz(nv) ! leaf layer stomatal resistance [s/m] real(r8), intent(in) :: elai_llz(nv) ! exposed LAI per layer [m2 leaf/ m2 pft footprint] real(r8), intent(in) :: c13disc_llz(nv) ! leaf layer c13 discrimination, weighted mean + real(r8), intent(in) :: internal_co2_llz(nv) !Intercellular co2 pressure per layer Pa real(r8), intent(in) :: c_area ! crown area m2/m2 real(r8), intent(in) :: nplant ! indiv/m2 real(r8), intent(in) :: rb ! leaf boundary layer resistance (s/m) @@ -1251,6 +1281,7 @@ subroutine ScaleLeafLayerFluxToCohort(nv, & ! in real(r8), intent(out) :: rdark ! Dark Leaf Respiration (kgC/indiv/s) real(r8), intent(out) :: cohort_eleaf_area ! Effective leaf area of the cohort [m2] real(r8), intent(out) :: c13disc_clm ! unpacked Cohort level c13 discrimination + real(r8), intent(out) :: co2_inter ! Intercellular co2 pressure weighted by leaf area [P]*[m2] real(r8) :: sum_weight ! sum of weight for unpacking d13c flux (c13disc_z) from ! (canopy_layer, pft, leaf_layer) matrix to cohort (c13disc_clm) @@ -1265,6 +1296,7 @@ subroutine ScaleLeafLayerFluxToCohort(nv, & ! in g_sb_laweight = 0.0_r8 gpp = 0.0_r8 rdark = 0.0_r8 + co2_inter = 0.0_r8 do il = 1, nv ! Loop over the leaf layers this cohort participates in @@ -1285,6 +1317,8 @@ subroutine ScaleLeafLayerFluxToCohort(nv, & ! in ! on total leaf area, and not really footprint area ! [m/s] * [m2 cohort's leaf layer] g_sb_laweight = g_sb_laweight + 1.0_r8/(rs_llz(il)+rb) * cohort_layer_eleaf_area + ! same for intercellular co2 [Pa] * [m2 cohort's leaf layer] + co2_inter = co2_inter * cohort_layer_eleaf_area ! GPP [umolC/m2leaf/s] * [m2 leaf ] -> [umolC/s] gpp = gpp + psn_llz(il) * cohort_layer_eleaf_area diff --git a/main/EDMainMod.F90 b/main/EDMainMod.F90 index bfba6d7d56..8fa97d3b6d 100644 --- a/main/EDMainMod.F90 +++ b/main/EDMainMod.F90 @@ -294,7 +294,7 @@ subroutine ed_ecosystem_dynamics(currentSite, bc_in, bc_out) ! make new patches from disturbed land if (do_patch_dynamics.eq.itrue ) then - call spawn_patches(currentSite, bc_in) + call spawn_patches(currentSite, bc_in, bc_out) call TotalBalanceCheck(currentSite,3) @@ -320,7 +320,6 @@ subroutine ed_ecosystem_dynamics(currentSite, bc_in, bc_out) ! Final instantaneous mass balance check call TotalBalanceCheck(currentSite,5) - end subroutine ed_ecosystem_dynamics !-------------------------------------------------------------------------------! @@ -642,8 +641,9 @@ subroutine ed_integrate_state_variables(currentSite, bc_in, bc_out ) bc_out%gpp_site = bc_out%gpp_site + currentCohort%gpp_acc_hold * & AREA_INV * currentCohort%n / real( hlm_days_per_year,r8) / sec_per_day bc_out%ar_site = bc_out%ar_site + (currentCohort%resp_m_acc_hold + & - currentCohort%resp_g_acc_hold + currentCohort%resp_excess_hold*real(hlm_days_per_year,r8) ) * & - AREA_INV * currentCohort%n / real( hlm_days_per_year,r8) / sec_per_day + currentCohort%resp_g_acc_hold + currentCohort%resp_excess_hold) * & + AREA_INV * currentCohort%n / hlm_days_per_year / sec_per_day + ! Update the mass balance tracking for the daily nutrient uptake flux ! Then zero out the daily uptakes, they have been used @@ -784,7 +784,7 @@ subroutine ed_integrate_state_variables(currentSite, bc_in, bc_out ) call GenerateDamageAndLitterFluxes( currentSite, currentPatch, bc_in) - call PreDisturbanceLitterFluxes( currentSite, currentPatch, bc_in) + call PreDisturbanceLitterFluxes( currentSite, currentPatch, bc_in, bc_out) call PreDisturbanceIntegrateLitter(currentPatch ) @@ -837,6 +837,11 @@ subroutine ed_update_site( currentSite, bc_in, bc_out, is_restarting ) type(bc_out_type) , intent(inout) :: bc_out logical,intent(in) :: is_restarting ! is this called during restart read? ! + real(r8) :: biomass_stock ! total biomass in Kg/site + real(r8) :: litter_stock ! total litter in Kg/site + real(r8) :: seed_stock ! total seed mass in Kg/site + real(r8) :: total_stock ! total ED carbon in Kg/site + ! !LOCAL VARIABLES: type (fates_patch_type) , pointer :: currentPatch !----------------------------------------------------------------------- @@ -858,6 +863,9 @@ subroutine ed_update_site( currentSite, bc_in, bc_out, is_restarting ) call TotalBalanceCheck(currentSite,final_check_id) + call SiteMassStock(currentSite,1,total_stock,biomass_stock,litter_stock,seed_stock) + bc_out%fates_total_carbon_site = total_stock + ! Update recruit L2FRs based on new canopy position call SetRecruitL2FR(currentSite) @@ -970,7 +978,7 @@ subroutine TotalBalanceCheck (currentSite, call_index ) call SiteMassStock(currentSite,el,total_stock,biomass_stock,litter_stock,seed_stock) change_in_stock = total_stock - site_mass%old_stock - + flux_in = site_mass%seed_in + & site_mass%net_root_uptake + & site_mass%gpp_acc + & diff --git a/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index 835ffab36f..d894e9ac82 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -124,7 +124,8 @@ module EDPftvarcon real(r8), allocatable :: rhos(:, :) ! Stem reflectance; second dim: 1 = vis, 2 = nir real(r8), allocatable :: taul(:, :) ! Leaf transmittance; second dim: 1 = vis, 2 = nir real(r8), allocatable :: taus(:, :) ! Stem transmittance; second dim: 1 = vis, 2 = nir - + real(r8), allocatable :: voc_pftindex(:) ! Index for MEGAN parameters + ! Fire Parameters (No PFT vector capabilities in their own routines) ! See fire/SFParamsMod.F90 for bulk of fire parameters ! ------------------------------------------------------------------------------------------- @@ -266,6 +267,9 @@ module EDPftvarcon ! Grazing real(r8), allocatable :: landuse_grazing_palatability(:) ! Relative intensity of leaf grazing/browsing per PFT (unitless 0-1) + ! dry deposition + real(r8), allocatable :: wesley_pft_index_fordrydep(:) + contains procedure, public :: Init => EDpftconInit procedure, public :: Register @@ -418,6 +422,10 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) + name = 'fates_voc_pftindex' + call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & + dimension_names=dim_names, lower_bounds=dim_lower_bound) + name = 'fates_nonhydro_smpso' call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) @@ -745,6 +753,10 @@ subroutine Register_PFT(this, fates_params) call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, & dimension_names=dim_names, lower_bounds=dim_lower_bound) + name = 'fates_wesley_pft_index_fordrydep' + 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 HLM PFTno pftmap_dim_names(1) = dimension_name_pft pftmap_dim_names(2) = dimension_name_hlm_pftno @@ -827,6 +839,10 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetrieveParameterAllocate(name=name, & data=this%clumping_index) + name = 'fates_voc_pftindex' + call fates_params%RetrieveParameterAllocate(name=name, & + data=this%voc_pftindex) + name = 'fates_nonhydro_smpso' call fates_params%RetrieveParameterAllocate(name=name, & data=this%smpso) @@ -1145,6 +1161,10 @@ subroutine Receive_PFT(this, fates_params) call fates_params%RetrieveParameterAllocate(name=name, & data=this%eca_lambda_ptase) + name = 'fates_wesley_pft_index_fordrydep' + call fates_params%RetrieveParameterAllocate(name=name, & + data=this%wesley_pft_index_fordrydep) + name = 'fates_hlm_pft_map' call fates_params%RetrieveParameterAllocate(name=name, & data=this%hlm_pft_map) @@ -1590,7 +1610,8 @@ subroutine FatesReportPFTParams(is_master) write(fates_log(),fmt0) 'fr_flig = ',EDPftvarcon_inst%fr_flig write(fates_log(),fmt0) 'xl = ',EDPftvarcon_inst%xl write(fates_log(),fmt0) 'clumping_index = ',EDPftvarcon_inst%clumping_index - + write(fates_log(),fmt0) 'voc_pftindex = ',EDPftvarcon_inst%voc_pftindex + write(fates_log(),fmt0) 'vcmax25top = ',EDPftvarcon_inst%vcmax25top write(fates_log(),fmt0) 'smpso = ',EDPftvarcon_inst%smpso write(fates_log(),fmt0) 'smpsc = ',EDPftvarcon_inst%smpsc @@ -1653,6 +1674,7 @@ subroutine FatesReportPFTParams(is_master) write(fates_log(),fmt0) 'hydro_pinot_node = ',EDPftvarcon_inst%hydr_pinot_node write(fates_log(),fmt0) 'hydro_kmax_node = ',EDPftvarcon_inst%hydr_kmax_node write(fates_log(),fmt0) 'hlm_pft_map = ', EDPftvarcon_inst%hlm_pft_map + write(fates_log(),fmt0) 'wesley_pft_index_fordrydep = ', EDPftvarcon_inst%wesley_pft_index_fordrydep write(fates_log(),fmt0) 'hydro_vg_alpha_node = ',EDPftvarcon_inst%hydr_vg_alpha_node write(fates_log(),fmt0) 'hydro_vg_m_node = ',EDPftvarcon_inst%hydr_vg_m_node write(fates_log(),fmt0) 'hydro_vg_n_node = ',EDPftvarcon_inst%hydr_vg_n_node @@ -2056,7 +2078,12 @@ subroutine FatesCheckParams(is_master) call endrun(msg=errMsg(sourcefile, __LINE__)) end if - + write(*,*) EDPftvarcon_inst%voc_pftindex(:) + if(EDPftvarcon_inst%voc_pftindex(ipft) .le. 0 .or. EDPftvarcon_inst%voc_pftindex(ipft) .gt. 16 ) then + write(fates_log(),*) 'MEGAN indices must be between 1 and 16',ipft,EDPftvarcon_inst%voc_pftindex(ipft) + call endrun(msg=errMsg(sourcefile, __LINE__)) + endif + if( hlm_use_fixed_biogeog .eq. itrue ) then ! check that the host-fates PFT map adds to one along HLM dimension so that all the HLM area ! goes to a FATES PFT. Each FATES PFT can get < or > 1 of an HLM PFT. diff --git a/main/FatesInterfaceMod.F90 b/main/FatesInterfaceMod.F90 index fc05a75af3..27326c8b9d 100644 --- a/main/FatesInterfaceMod.F90 +++ b/main/FatesInterfaceMod.F90 @@ -181,7 +181,8 @@ module FatesInterfaceMod public :: set_bcs public :: UpdateFatesRMeansTStep public :: InitTimeAveragingGlobals - + public :: set_fates_drydep_indices + private :: FatesReadParameters public :: DetermineGridCellNeighbors @@ -325,6 +326,7 @@ subroutine zero_bcs(fates,s) ! Output boundaries fates%bc_out(s)%active_suction_sl(:) = .false. fates%bc_out(s)%fsun_pa(:) = 0.0_r8 + fates%bc_out(s)%ci_pa(:) = 0.0_r8 fates%bc_out(s)%laisun_pa(:) = 0.0_r8 fates%bc_out(s)%laisha_pa(:) = 0.0_r8 fates%bc_out(s)%rootr_pasl(:,:) = 0.0_r8 @@ -369,7 +371,11 @@ subroutine zero_bcs(fates,s) write(fates_log(), *) 'hlm_parteh_mode: ',hlm_parteh_mode call endrun(msg=errMsg(sourcefile, __LINE__)) end select - + + ! carbon loss to atmosphere pathways + fates%bc_out(s)%grazing_closs_to_atm_si = 0.0_r8 + fates%bc_out(s)%fire_closs_to_atm_si = 0.0_r8 + fates%bc_out(s)%rssun_pa(:) = 0.0_r8 fates%bc_out(s)%rssha_pa(:) = 0.0_r8 @@ -391,7 +397,9 @@ subroutine zero_bcs(fates,s) fates%bc_out(s)%z0m_pa(:) = 0.0_r8 fates%bc_out(s)%dleaf_pa(:) = 0.0_r8 fates%bc_out(s)%nocomp_pft_label_pa(:) = 0 - + fates%bc_out(s)%nocomp_MEGAN_pft_label_pa(:) = 0 + fates%bc_out(s)%wesley_pft_label_pa(:) = 0 + fates%bc_out(s)%drydep_season_pa(:) = 0 fates%bc_out(s)%canopy_fraction_pa(:) = 0.0_r8 fates%bc_out(s)%frac_veg_nosno_alb_pa(:) = 0.0_r8 @@ -404,6 +412,9 @@ subroutine zero_bcs(fates,s) ! Land Use realated fates%bc_out(s)%gpp_site = 0.0_r8 fates%bc_out(s)%ar_site = 0.0_r8 + fates%bc_out(s)%npp_site = 0.0_r8 + fates%bc_out(s)%npp_acc_site = 0.0_r8 + fates%bc_out(s)%fates_total_carbon_site = 0.0_r8 fates%bc_out(s)%hrv_deadstemc_to_prod10c = 0.0_r8 fates%bc_out(s)%hrv_deadstemc_to_prod100c = 0.0_r8 @@ -604,6 +615,7 @@ subroutine allocate_bcout(bc_out, nlevsoil_in, nlevdecomp_in) ! Radiation allocate(bc_out%fsun_pa(maxpatch_total)) + allocate(bc_out%ci_pa(maxpatch_total)) allocate(bc_out%laisun_pa(maxpatch_total)) allocate(bc_out%laisha_pa(maxpatch_total)) @@ -719,6 +731,9 @@ subroutine allocate_bcout(bc_out, nlevsoil_in, nlevdecomp_in) allocate(bc_out%frac_veg_nosno_alb_pa(maxpatch_total)) allocate(bc_out%nocomp_pft_label_pa(maxpatch_total)) + allocate(bc_out%nocomp_MEGAN_pft_label_pa(maxpatch_total)) + allocate(bc_out%wesley_pft_label_pa(maxpatch_total)) + allocate(bc_out%drydep_season_pa(maxpatch_total)) ! Plant-Hydro BC's if (hlm_use_planthydro.eq.itrue) then @@ -1995,6 +2010,12 @@ subroutine set_fates_ctrlparms(tag,ival,rval,cval) write(fates_log(),*) 'Transfering hlm_use_sp= ',ival,' to FATES' end if + case('use_drydep') + hlm_use_drydep = ival + if (fates_global_verbose()) then + write(fates_log(),*) 'Transfering hlm_use_drydep= ',ival,' to FATES' + end if + case('use_planthydro') hlm_use_planthydro = ival if (fates_global_verbose()) then @@ -2354,6 +2375,66 @@ end subroutine UpdateFatesRMeansTStep ! ======================================================================================== +subroutine set_fates_drydep_indices(nsites,sites,bc_out) + use EDPftvarcon , only : EDPftvarcon_inst + type(bc_out_type), intent(inout) :: bc_out(nsites) + type(ed_site_type), pointer :: sites(:) + integer :: nsites + integer :: s, ifp, p + type (fates_patch_type) , pointer :: currentPatch + + do s = 1,nsites + ifp=0 + bc_out(s)%wesley_pft_label_pa(:)=8 !for no vegetation. + bc_out(s)%drydep_season_pa(:) = 3 ! bare + currentPatch => sites(s)%oldest_patch + ifp=ifp+1 + do while(associated(currentPatch)) + if(currentPatch%nocomp_pft_label>0)then + bc_out(s)%wesley_pft_label_pa(ifp) = EDPftvarcon_inst%wesley_pft_index_fordrydep(currentPatch%nocomp_pft_label) + ! Wesely seasonal "index_season" + ! 1 - midsummer with lush vegetation + ! 2 - Autumn with unharvested cropland + ! 3 - Late autumn after frost, no snow + ! 4 - Winter, snow on ground and subfreezing + ! 5 - Transitional spring with partially green short annuals + if(bc_out(s)%tlai_pa(ifp) .gt. 2.0_r8)then + bc_out(s)%drydep_season_pa(ifp) = 1 ! Summer, or something like it. + else ! NOT SUMMER + if(sites(s)%lat>0)then ! Northern HS + if(hlm_day_of_year .lt. 180)then ! DOY + bc_out(s)%drydep_season_pa(ifp) = 5 ! NH spring + else ! autumn + if(bc_out(s)%tlai_pa(ifp) .gt. 1.0_r8)then + bc_out(s)%drydep_season_pa(ifp) = 2 ! NH early autumn + else + bc_out(s)%drydep_season_pa(ifp) = 3 ! NH late autumn + endif + endif ! DOY + else !Southern HS + if(hlm_day_of_year .gt. 180)then ! spring + bc_out(s)%drydep_season_pa(ifp) = 5 ! SH spring + else ! SH autumn + if(bc_out(s)%tlai_pa(ifp) .gt. 1.0_r8)then + bc_out(s)%drydep_season_pa(ifp) = 2 ! SH early autumn + else + bc_out(s)%drydep_season_pa(ifp) = 3 ! SH late autumn + endif ! autumn + endif ! DOY + endif ! Hemisphere + endif ! summer? + + else ! bare ground + bc_out(s)%drydep_season_pa(ifp) = 3 + bc_out(s)%wesley_pft_label_pa(ifp)= 8 + endif ! not bare ground. + currentPatch => currentPatch%younger + end do ! patch + end do ! site +end subroutine set_fates_drydep_indices + +! ======================================================================================== + subroutine SeedlingParPatch(cpatch, & atm_par, & seedling_par_high, par_high_frac, & diff --git a/main/FatesInterfaceTypesMod.F90 b/main/FatesInterfaceTypesMod.F90 index abaa6dedf0..32b5a3dd3c 100644 --- a/main/FatesInterfaceTypesMod.F90 +++ b/main/FatesInterfaceTypesMod.F90 @@ -222,6 +222,8 @@ module FatesInterfaceTypesMod integer, public :: hlm_use_sp ! Flag to use FATES satellite phenology (LAI) mode ! 1 = TRUE, 0 = FALSE + integer, public :: hlm_use_drydep ! Flag to use calculate drydep-related variables in FATES + ! 1 = TRUE, 0 = FALSE ! Flag specifying what types of history fields to allocate and prepare @@ -616,6 +618,10 @@ module FatesInterfaceTypesMod ! Shaded canopy LAI real(r8),allocatable :: laisha_pa(:) + + ! Average internal CO2 concentration + real(r8), allocatable :: ci_pa(:) + ! Logical stating whether a soil layer can have water uptake by plants ! The only condition right now is that liquid water exists @@ -768,7 +774,11 @@ module FatesInterfaceTypesMod ! [0,1] integer, allocatable :: nocomp_pft_label_pa(:) ! in nocomp and SP mode, each patch has a PFT identity. + integer, allocatable :: wesley_pft_label_pa(:) ! For dry deposition, each FATES PFT needs to correspond to a PFT from the 'wesley 1989' scheme + integer, allocatable :: drydep_season_pa(:) ! For dry deposition, we need to define the season index, from 1-5, for the purposes of detrmining the deposition velocity parameters. See drydep code for details of season indices. + integer, allocatable :: nocomp_MEGAN_pft_label_pa(:) ! Index to map from FATES NOCOMP PFT identity into MEGAN PFT space. + ! FATES Hydraulics @@ -794,6 +804,13 @@ module FatesInterfaceTypesMod real(r8) :: hrv_deadstemc_to_prod100c ! Harvested C flux to 100-yr wood product pool [Site-Level, gC m-2 s-1] real(r8) :: gpp_site ! Site level GPP, for NBP diagnosis in HLM [Site-Level, gC m-2 s-1] real(r8) :: ar_site ! Site level Autotrophic Resp, for NBP diagnosis in HLM [Site-Level, gC m-2 s-1] + real(r8) :: npp_site ! Site level timestep-specific NPP, for NBP diagnosis in HLM [Site-Level, gC m-2 s-1] + real(r8) :: npp_acc_site ! Sitelevel, timestep-specific accumulated NPP to account for assimilate but not allocated C in HLM balance check + real(r8) :: fates_total_carbon_site ! Site level total carbon in FATES (g/m2) for HLM balance check + + ! direct carbon loss to atm pathways + real(r8) :: grazing_closs_to_atm_si ! Loss of carbon to atmosphere via grazing [Site-Level, gC m-2 s-1] + real(r8) :: fire_closs_to_atm_si ! Loss of carbon to atmosphere via burning (includes burning from land use change) [Site-Level, kgC m-2 s-1] end type bc_out_type diff --git a/main/FatesRestartInterfaceMod.F90 b/main/FatesRestartInterfaceMod.F90 index f2c78051a1..a313dfeaf7 100644 --- a/main/FatesRestartInterfaceMod.F90 +++ b/main/FatesRestartInterfaceMod.F90 @@ -29,6 +29,7 @@ module FatesRestartInterfaceMod use FatesInterfaceTypesMod, only : hlm_use_potentialveg use FatesInterfaceTypesMod, only : fates_maxElementsPerSite use FatesInterfaceTypesMod, only : hlm_use_tree_damage + use FatesInterfaceTypesMod , only : hlm_hio_ignore_val use FatesHydraulicsMemMod, only : nshell use FatesHydraulicsMemMod, only : n_hypool_ag use FatesHydraulicsMemMod, only : n_hypool_troot @@ -3875,7 +3876,7 @@ subroutine update_3dpatch_radiation(this, nsites, sites, bc_out) ! zero diagnostic radiation profiles currentPatch%nrmlzd_parprof_pft_dir_z(:,:,:,:) = 0._r8 currentPatch%nrmlzd_parprof_pft_dif_z(:,:,:,:) = 0._r8 - currentPatch%rad_error(:) = 0._r8 + currentPatch%rad_error(:) = hlm_hio_ignore_val if_notbareground: if(currentPatch%nocomp_pft_label.ne.nocomp_bareground) then diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index 9fb97c811f..4c83df1fc6 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -1,4 +1,4 @@ -netcdf fates_params_default { +netcdf fates_params_api.40.0.0_14pft_c250807_noresm_v250812__noresm_v25 { dimensions: fates_NCWD = 4 ; fates_history_age_bins = 7 ; @@ -678,9 +678,15 @@ variables: double fates_woody(fates_pft) ; fates_woody:units = "logical flag" ; fates_woody:long_name = "Binary woody lifeform flag" ; + double fates_voc_pftindex(fates_pft) ; + fates_voc_pftindex:units = "Integer PFT index" ; + fates_voc_pftindex:long_name = "integer index for MEGAN PFT definitions" ; double fates_hlm_pft_map(fates_hlm_pftno, fates_pft) ; fates_hlm_pft_map:units = "area fraction" ; fates_hlm_pft_map:long_name = "In fixed biogeog mode, fraction of HLM area associated with each FATES PFT" ; + double fates_wesley_pft_index_fordrydep(fates_pft) ; + fates_wesley_pft_index_fordrydep:units = "integer index" ; + fates_wesley_pft_index_fordrydep:long_name = "index to map from fates pfts into the wesley pft space used to determing dry deposition veolcity." ; double fates_fire_FBD(fates_litterclass) ; fates_fire_FBD:units = "kg Biomass/m3" ; fates_fire_FBD:long_name = "fuel bulk density" ; @@ -917,7 +923,9 @@ variables: fates_vai_width_increase_factor:long_name = "factor by which each leaf+stem scattering element increases in VAI width (1 = uniform spacing)" ; // global attributes: - :history = "This file was generated by BatchPatchParams.py:\nCDL Base File = fates_params_default.cdl\nXML patch file = archive/api36.1.0_100224_pr1255-2.xml" ; + :history = "This file was generated by BatchPatchParams.py:\n", + "CDL Base File = fates_params_default.cdl\n", + "XML patch file = archive/api36.1.0_100224_pr1255-2.xml" ; data: fates_history_ageclass_bin_edges = 0, 1, 2, 5, 10, 20, 50 ; @@ -984,11 +992,11 @@ data: 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 ; - fates_alloc_storage_cushion = 1.2, 1.2, 1.2, 1.2, 2.4, 1.2, 1.2, 2.4, 1.2, - 1.5, 1.4, 1.2, 1.2, 1.2 ; + fates_alloc_storage_cushion = 1.2, 2.4, 2.4, 2.4, 2.4, 2.4, 2.4, 2.4, 2.4, + 2.4, 2.4, 2.4, 2.4, 2.4 ; fates_alloc_store_priority_frac = 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, - 0.8, 0.7, 0.6, 0.6, 0.8, 0.8 ; + 0.8, 0.7, 0.6, 0.3, 0.3, 0.3 ; fates_allom_agb1 = 0.0673, 0.1364012, 0.0393057, 0.2653695, 0.0673, 0.0728698, 0.06896, 0.06896, 0.06896, 0.06896, 0.06896, 0.001, 0.001, @@ -1013,8 +1021,8 @@ data: fates_allom_cmode = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; - fates_allom_d2bl1 = 0.04, 0.07, 0.07, 0.01, 0.04, 0.07, 0.07, 0.07, 0.07, - 0.0481934, 0.0481934, 0.0004, 0.0004, 0.0012 ; + fates_allom_d2bl1 = 0.04, 0.08, 0.08, 0.01, 0.04, 0.07, 0.07, 0.07, 0.05, + 0.0481934, 0.0481934, 0.05, 0.04, 0.04 ; fates_allom_d2bl2 = 1.6019679, 1.5234373, 1.3051237, 1.9621397, 1.6019679, 1.3998939, 1.3, 1.3, 1.3, 1.0600586, 1.7176758, 1.7092, 1.7092, 1.5879 ; @@ -1063,7 +1071,7 @@ data: fates_allom_hmode = 5, 5, 5, 5, 5, 5, 1, 1, 1, 1, 1, 3, 3, 3 ; - fates_allom_l2fr = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.67, 0.67, 1.41 ; + fates_allom_l2fr = 1.5, 0.75, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1.5, 3, 3 ; fates_allom_la_per_sa_int = 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8 ; @@ -1205,8 +1213,8 @@ data: fates_frag_seed_decay_rate = 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.51, 0.74, 0.46, 0.35, 0.51, 0.51 ; - fates_grperc = 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.12, - 0.11, 0.16, 0.11, 0.11 ; + fates_grperc = 0.35, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, + 0.25, 0.25, 0.25, 0.25 ; fates_hydro_avuln_gs = 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5 ; @@ -1309,14 +1317,14 @@ data: 0.75, 0.75 ; fates_hydro_vg_alpha_node = - 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, - 0.12, 0.12, - 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, - 0.12, 0.12, - 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, - 0.12, 0.12, - 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, - 0.12, 0.12 ; + 0.0005, 0.0005, 0.0005, 0.0005, 0.0005, 0.005, 0.005, 0.005, 0.005, 0.005, + 0.005, 0.005, 0.005, 0.005, + 0.0005, 0.0005, 0.0005, 0.0005, 0.0005, 0.005, 0.005, 0.005, 0.005, 0.005, + 0.005, 0.005, 0.005, 0.005, + 0.0005, 0.0005, 0.0005, 0.0005, 0.0005, 0.005, 0.005, 0.005, 0.005, 0.005, + 0.005, 0.005, 0.005, 0.005, + 0.0005, 0.0005, 0.0005, 0.0005, 0.0005, 0.005, 0.005, 0.005, 0.005, 0.005, + 0.005, 0.005, 0.005, 0.005 ; fates_hydro_vg_m_node = 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, @@ -1360,24 +1368,27 @@ data: fates_leaf_jmaxse = 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495 ; - fates_leaf_slamax = 0.0954, 0.0954, 0.0954, 0.0954, 0.0954, 0.0954, 0.012, - 0.03, 0.03, 0.012, 0.032, 0.05, 0.05, 0.05 ; + fates_leaf_slamax = 0.03, 0.03, 0.025, 0.03, 0.05, 0.05, 0.012, 0.03, 0.03, + 0.012, 0.032, 0.05, 0.05, 0.05 ; - fates_leaf_slatop = 0.012, 0.005, 0.024, 0.009, 0.03, 0.03, 0.012, 0.03, - 0.03, 0.01, 0.032, 0.027, 0.05, 0.05 ; + fates_leaf_slatop = 0.024, 0.01, 0.026, 0.024, 0.02, 0.03, 0.012, 0.03, + 0.03, 0.01, 0.032, 0.027, 0.027, 0.03 ; fates_leaf_stomatal_btran_model = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; - fates_leaf_stomatal_intercept = 10000, 10000, 10000, 10000, 10000, 10000, - 10000, 10000, 10000, 10000, 10000, 10000, 10000, 40000 ; + fates_leaf_stomatal_intercept = 16033.365, 21529.33, 13370.411, 26779.681, + 12869.022, 6205.777, 10000, 10000, 3750.669, 10000, 10000, 1624.209, + 313709.616, 439459.319 ; - fates_leaf_stomatal_slope_ballberry = 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 ; + fates_leaf_stomatal_slope_ballberry = 10, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8 ; - fates_leaf_stomatal_slope_medlyn = 4.1, 2.3, 2.3, 4.1, 4.4, 4.4, 4.7, 4.7, - 4.7, 4.7, 4.7, 2.2, 5.3, 1.6 ; + fates_leaf_stomatal_slope_medlyn = 2.038, 2.482, 2.571, 4.038, 3.459, 4.353, + 4.7, 4.7, 2.503, 4.7, 4.7, 2.423, 5.799, 0.967 ; fates_leaf_vcmax25top = - 50, 62, 39, 61, 58, 58, 62, 54, 54, 38, 54, 86, 78, 78 ; + 53.142, 24, 40, 40, 38.393, 34.363, 62, 54, 43.712, 38, 54, 39.168, 64, + 17.955 ; fates_leaf_vcmaxha = 65330, 65330, 65330, 65330, 65330, 65330, 65330, 65330, 65330, 65330, 65330, 65330, 65330, 65330 ; @@ -1395,11 +1406,10 @@ data: fates_leafn_vert_scaler_coeff2 = 2.43, 2.43, 2.43, 2.43, 2.43, 2.43, 2.43, 2.43, 2.43, 2.43, 2.43, 2.43, 2.43, 2.43 ; - fates_maintresp_leaf_atkin2017_baserate = 1.756, 1.4995, 1.4995, 1.756, - 1.756, 1.756, 2.0749, 2.0749, 2.0749, 2.0749, 2.0749, 2.1956, 2.1956, - 2.1956 ; + fates_maintresp_leaf_atkin2017_baserate = 1.734, 2.169, 2.104, 2.104, 2.069, + 1.622, 2.0749, 2.0749, 3.054, 2.0749, 2.0749, 2.079, 2.0749, 2.182 ; - fates_maintresp_leaf_ryan1991_baserate = 2.525e-06, 2.525e-06, 2.525e-06, + fates_maintresp_leaf_ryan1991_baserate = 2.6e-06, 2.525e-06, 2.525e-06, 2.525e-06, 2.525e-06, 2.525e-06, 2.525e-06, 2.525e-06, 2.525e-06, 2.525e-06, 2.525e-06, 2.525e-06, 2.525e-06, 2.525e-06 ; @@ -1408,7 +1418,7 @@ data: 0.00963, 0.00963, 0.00963 ; fates_maintresp_leaf_vert_scaler_coeff2 = 2.43, 2.43, 2.43, 2.43, 2.43, - 2.43, 2.43, 2.43, 2.43, 2.43, 2.43, 2.43, 2.43, 2.43 ; + 2.43, 2.43, 2.43, 2.43, 2.43, 2.43, 2.43, 2.43, 2.25 ; fates_maintresp_reduction_curvature = 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01 ; @@ -1426,12 +1436,13 @@ data: fates_mort_hf_flc_threshold = 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 ; - fates_mort_hf_sm_threshold = 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, - 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06, 1e-06 ; + fates_mort_hf_sm_threshold = 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1 ; fates_mort_ip_age_senescence = _, _, _, _, _, _, _, _, _, _, _, _, _, _ ; - fates_mort_ip_size_senescence = _, _, _, _, _, _, _, _, _, _, _, _, _, _ ; + fates_mort_ip_size_senescence = 170, 150, 150, 150, 150, 150, 150, _, _, _, + _, _, _, _ ; fates_mort_prescribed_canopy = 0.0194, 0.0194, 0.0194, 0.0194, 0.0194, 0.0194, 0.0194, 0.0194, 0.0194, 0.0194, 0.0194, 0.0194, 0.0194, 0.0194 ; @@ -1441,23 +1452,25 @@ data: fates_mort_r_age_senescence = _, _, _, _, _, _, _, _, _, _, _, _, _, _ ; - fates_mort_r_size_senescence = _, _, _, _, _, _, _, _, _, _, _, _, _, _ ; + fates_mort_r_size_senescence = 0.045, 0.045, 0.045, 0.045, 0.045, 0.045, + 0.045, 0.045, 0.045, 0.045, 0.045, 0.045, 0.045, 0.045 ; - fates_mort_scalar_coldstress = 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3.5, 2.3, 3, 3 ; + fates_mort_scalar_coldstress = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; - fates_mort_scalar_cstarvation = 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, - 0.6, 0.57, 0.6, 0.6, 0.6 ; + fates_mort_scalar_cstarvation = 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1 ; - fates_mort_scalar_hydrfailure = 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, - 0.6, 0.8, 0.6, 0.6, 0.6 ; + fates_mort_scalar_hydrfailure = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; fates_mort_upthresh_cstarvation = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; - fates_nonhydro_smpsc = -255000, -255000, -255000, -255000, -255000, -255000, - -255000, -255000, -255000, -255000, -255000, -255000, -255000, -255000 ; + fates_nonhydro_smpsc = -177537.967, -352444.342, -214798.413, -307679.665, + -347451.834, -175120.945, -255000, -255000, -134673.93, -255000, -255000, + -317882.916, -200123.906, -360214.919 ; - fates_nonhydro_smpso = -66000, -66000, -66000, -66000, -66000, -66000, - -66000, -66000, -66000, -66000, -66000, -66000, -66000, -66000 ; + fates_nonhydro_smpso = -34844.846, -87067.176, -33560.298, -98998.485, + -98986.971, -33160.364, -66000, -66000, -33137.782, -66000, -66000, + -96187.704, -35291.509, -51250.654 ; fates_phen_cold_size_threshold = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; @@ -1470,7 +1483,7 @@ data: fates_phen_fnrt_drop_fraction = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; - fates_phen_leaf_habit = 1, 1, 2, 1, 3, 2, 1, 3, 2, 1, 2, 2, 3, 3 ; + fates_phen_leaf_habit = 1, 1, 2, 1, 3, 2, 1, 3, 2, 1, 2, 2, 1, 1 ; fates_phen_mindaysoff = 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 ; @@ -1521,25 +1534,25 @@ data: fates_recruit_height_min = 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 0.2, 0.2, 0.2, 0.8, 0.8, 0.11, 0.2, 0.2 ; - fates_recruit_init_density = 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, - 0.16, 0.2, 0.2, 0.2, 0.2 ; + fates_recruit_init_density = 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 5, 2, 2 ; fates_recruit_prescribed_rate = 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02 ; fates_recruit_seed_alloc = 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, - 0.07, 0.1, 0, 0, 0 ; + 0.07, 0.1, 0.1, 0.1, 0.1 ; fates_recruit_seed_alloc_mature = 0, 0, 0, 0, 0, 0, 0.9, 0.9, 0.9, 0.9, 0.9, - 0.25, 0.25, 0.2 ; + 0.25, 0.25, 0.9 ; fates_recruit_seed_dbh_repro_threshold = 90, 80, 80, 80, 90, 80, 3, 3, 2, - 2.4, 1.9, 3, 3, 3 ; + 2.4, 1.9, 3, 3, 30 ; fates_recruit_seed_germination_rate = 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.4, 0.49, 0.29, 0.5, 0.5 ; - fates_recruit_seed_supplement = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; + fates_recruit_seed_supplement = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.001, + 0.001 ; fates_seed_dispersal_fraction = _, _, _, _, _, _, _, _, _, _, _, _, _, _ ; @@ -1655,13 +1668,13 @@ data: fates_turnover_branch = 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 0, 0, 0 ; - fates_turnover_fnrt = 1, 2, 1, 1.5, 1, 1, 1.5, 1, 1, 1.5, 1, 1, 1, 1 ; + fates_turnover_fnrt = 1, 2, 2, 1.5, 1, 1, 1.5, 1, 1, 1.5, 1, 1.5, 0.5, 0.2 ; fates_turnover_leaf_canopy = - 1.5, 4, 1, 1.5, 1, 1, 1.5, 1, 1, 1.5, 1, 1, 1, 1 ; + 1.5, 4, 1, 1.5, 1, 1, 1.5, 1, 1, 1.5, 1, 1, 0.2, 0.15 ; fates_turnover_leaf_ustory = - 1.5, 4, 1, 1.5, 1, 1, 1.5, 1, 1, 1.5, 1, 1, 1, 1 ; + 2.5, 5, 1, 1.5, 1, 1, 1.5, 1, 1, 1.5, 1, 1, 0.2, 0.15 ; fates_turnover_senleaf_fdrought = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ; @@ -1670,6 +1683,8 @@ data: fates_woody = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 ; + fates_voc_pftindex = 4, 1, 3, 5, 6, 7, 9, 10, 10, 9, 11, 12, 13, 14 ; + fates_hlm_pft_map = 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1686,6 +1701,8 @@ data: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 ; + fates_wesley_pft_index_fordrydep = 4, 5, 5, 4, 4, 4, 11, 11, 11, 3, 3, 3, 3, 3 ; + fates_fire_FBD = 15.4, 16.8, 19.6, 999, 4, 4 ; fates_fire_low_moisture_Coeff = 1.12, 1.09, 0.98, 0.8, 1.15, 1.15 ; @@ -1706,9 +1723,9 @@ data: fates_frag_cwd_frac = 0.045, 0.075, 0.21, 0.67 ; - fates_landuse_crop_lu_pft_vector = -999, -999, -999, -999, 11 ; + fates_landuse_crop_lu_pft_vector = -999, -999, -999, -999, 13 ; - fates_landuse_grazing_rate = 0, 0, 0, 0, 0 ; + fates_landuse_grazing_rate = 0, 0, 0.01, 0.02, 0 ; fates_max_nocomp_pfts_by_landuse = 4, 4, 1, 1, 1 ; @@ -1718,9 +1735,9 @@ data: fates_cnp_eca_plant_escalar = 1.25e-05 ; - fates_cohort_age_fusion_tol = 0.08 ; + fates_cohort_age_fusion_tol = 0.25 ; - fates_cohort_size_fusion_tol = 0.08 ; + fates_cohort_size_fusion_tol = 0.25 ; fates_comp_excln = -1 ; @@ -1774,9 +1791,9 @@ data: fates_landuse_grazing_phosphorus_use_eff = 0.5 ; - fates_landuse_logging_coll_under_frac = 0. ; + fates_landuse_logging_coll_under_frac = 0 ; - fates_landuse_logging_collateral_frac = 0. ; + fates_landuse_logging_collateral_frac = 0 ; fates_landuse_logging_dbhmax = _ ; @@ -1784,13 +1801,13 @@ data: fates_landuse_logging_dbhmin = 0 ; - fates_landuse_logging_direct_frac = 1. ; + fates_landuse_logging_direct_frac = 1 ; fates_landuse_logging_event_code = -30 ; fates_landuse_logging_export_frac = 0.8 ; - fates_landuse_logging_mechanical_frac = 0. ; + fates_landuse_logging_mechanical_frac = 0 ; fates_leaf_photo_temp_acclim_thome_time = 30 ; @@ -1808,7 +1825,7 @@ data: fates_mort_understorey_death = 0.55983 ; - fates_patch_fusion_tol = 0.05 ; + fates_patch_fusion_tol = 0.15 ; fates_phen_chilltemp = 5 ; @@ -1838,7 +1855,7 @@ data: fates_trs_seedling_mort_par_timescale = 32 ; - fates_vai_top_bin_width = 1 ; + fates_vai_top_bin_width = 0.5 ; - fates_vai_width_increase_factor = 1 ; + fates_vai_width_increase_factor = 1.25 ; } diff --git a/radiation/FatesRadiationDriveMod.F90 b/radiation/FatesRadiationDriveMod.F90 index fb97b80cf0..f595e041be 100644 --- a/radiation/FatesRadiationDriveMod.F90 +++ b/radiation/FatesRadiationDriveMod.F90 @@ -108,8 +108,7 @@ subroutine FatesNormalizedCanopyRadiation(sites, bc_in, bc_out ) if_bareground: if(currentpatch%nocomp_pft_label.ne.nocomp_bareground)then ! Initialize output boundary conditions with trivial assumption - ! This matches CLM/ELM - ! Albedo is perfect reflector, no flux into or through canopy + ! of a black body soil and fully transmitting canopy bc_out(s)%albd_parb(ifp,:) = 1._r8 bc_out(s)%albi_parb(ifp,:) = 1._r8 bc_out(s)%fabi_parb(ifp,:) = 0._r8 @@ -320,8 +319,12 @@ subroutine FatesSunShadeFracs(nsites, sites,bc_in,bc_out) ! Convert normalized radiation error units from fraction of radiation to W/m2 do ib = 1,num_swb - cpatch%rad_error(ib) = cpatch%rad_error(ib) * & + if (cpatch%rad_error(ib) /= hlm_hio_ignore_val) then + cpatch%rad_error(ib) = cpatch%rad_error(ib) * & (bc_in(s)%solad_parb(ifp,ib) + bc_in(s)%solai_parb(ifp,ib)) + else + cpatch%rad_error(ib) = hlm_hio_ignore_val + endif end do ! output the actual PAR profiles through the canopy for diagnostic purposes