From 6231ee96ed73f4ad0c98c6973ee7cdc31a249f09 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Tue, 9 Jan 2018 16:34:15 -0800 Subject: [PATCH 1/3] Added a site level storage pool for water bound in dead plants. Still requires unit checking and has no release flux. --- biogeochem/EDLoggingMortalityMod.F90 | 12 +++++-- biogeochem/EDPatchDynamicsMod.F90 | 16 +++++++++ biogeochem/EDPhysiologyMod.F90 | 7 ++++ biogeophys/FatesPlantHydraulicsMod.F90 | 49 ++++++++++++++++++++++++-- main/FatesHydraulicsMemMod.F90 | 6 +++- main/FatesInterfaceMod.F90 | 16 +++++---- 6 files changed, 94 insertions(+), 12 deletions(-) diff --git a/biogeochem/EDLoggingMortalityMod.F90 b/biogeochem/EDLoggingMortalityMod.F90 index 4f87fcaa..399f51b4 100644 --- a/biogeochem/EDLoggingMortalityMod.F90 +++ b/biogeochem/EDLoggingMortalityMod.F90 @@ -36,12 +36,14 @@ module EDLoggingMortalityMod use FatesInterfaceMod , only : hlm_model_day use FatesInterfaceMod , only : hlm_day_of_year use FatesInterfaceMod , only : hlm_days_per_year - use FatesInterfaceMod , only : hlm_use_logging + use FatesInterfaceMod , only : hlm_use_logging + use FatesInterfaceMod , only : hlm_use_planthydro use FatesConstantsMod , only : itrue,ifalse use FatesGlobals , only : endrun => fates_endrun use FatesGlobals , only : fates_log use shr_log_mod , only : errMsg => shr_log_errMsg - + use FatesPlantHydraulicsMod, only : AccumulateMortalityWaterStorage + implicit none private @@ -289,6 +291,12 @@ subroutine logging_litter_fluxes(currentSite, currentPatch, newPatch, patch_site litter_area = currentPatch%area np_mult = patch_site_areadis/newPatch%area + + if( hlm_use_planthydro == itrue ) then + call AccumulateMortalityWaterStorage(currentSite,currentCohort,(direct_dead+indirect_dead)) + end if + + ! ---------------------------------------------------------------------------------------- ! Handle woody litter flux for non-bole components of biomass ! This litter is distributed between the current and new patches, & diff --git a/biogeochem/EDPatchDynamicsMod.F90 b/biogeochem/EDPatchDynamicsMod.F90 index bde59daf..af6734c4 100644 --- a/biogeochem/EDPatchDynamicsMod.F90 +++ b/biogeochem/EDPatchDynamicsMod.F90 @@ -27,6 +27,7 @@ module EDPatchDynamicsMod use FatesConstantsMod , only : r8 => fates_r8 use FatesConstantsMod , only : itrue use FatesPlantHydraulicsMod, only : InitHydrCohort + use FatesPlantHydraulicsMod, only : AccumulateMortalityWaterStorage use FatesPlantHydraulicsMod, only : DeallocateHydrCohort use EDLoggingMortalityMod, only : logging_litter_fluxes use EDLoggingMortalityMod, only : logging_time @@ -843,6 +844,10 @@ subroutine fire_litter_fluxes(currentSite, cp_target, new_patch_target, patch_si bcroot = (currentCohort%bsw + currentCohort%bdead) * (1.0_r8 - EDPftvarcon_inst%allom_agb_frac(p) ) ! density of dead trees per m2. dead_tree_density = (currentCohort%fire_mort * currentCohort%n*patch_site_areadis/currentPatch%area) / AREA + + if( hlm_use_planthydro == itrue ) then + call AccumulateMortalityWaterStorage(currentSite,currentCohort,dead_tree_density*AREA) + end if ! Unburned parts of dead tree pool. ! Unburned leaves and roots @@ -1019,6 +1024,10 @@ subroutine mortality_litter_fluxes(currentSite, cp_target, new_patch_target, pat canopy_mortality_root_litter(p) = canopy_mortality_root_litter(p)+ & canopy_dead*(currentCohort%br+currentCohort%bstore) + if( hlm_use_planthydro == itrue ) then + call AccumulateMortalityWaterStorage(currentSite,currentCohort, canopy_dead) + end if + else if(EDPftvarcon_inst%woody(currentCohort%pft) == 1)then @@ -1029,6 +1038,10 @@ subroutine mortality_litter_fluxes(currentSite, cp_target, new_patch_target, pat understorey_dead* currentCohort%bl canopy_mortality_root_litter(p)= canopy_mortality_root_litter(p)+ & understorey_dead*(currentCohort%br+currentCohort%bstore) + + if( hlm_use_planthydro == itrue ) then + call AccumulateMortalityWaterStorage(currentSite,currentCohort, understorey_dead) + end if ! FIX(SPM,040114) - clarify this comment ! grass is not killed by canopy mortality disturbance events. @@ -1037,6 +1050,9 @@ subroutine mortality_litter_fluxes(currentSite, cp_target, new_patch_target, pat ! no-op endif endif + + + currentCohort => currentCohort%taller diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index 4752963b..4b271ccb 100755 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -12,6 +12,7 @@ module EDPhysiologyMod use FatesInterfaceMod, only : hlm_freq_day use FatesInterfaceMod, only : hlm_day_of_year use FatesInterfaceMod, only : numpft + use FatesInterfaceMod, only : hlm_use_planthydro use FatesConstantsMod, only : r8 => fates_r8 use EDPftvarcon , only : EDPftvarcon_inst use FatesInterfaceMod, only : bc_in_type @@ -32,6 +33,7 @@ module EDPhysiologyMod use FatesGlobals , only : endrun => fates_endrun use EDParamsMod , only : fates_mortality_disturbance_fraction use FatesConstantsMod , only : itrue,ifalse + use FatesPlantHydraulicsMod , only : AccumulateMortalityWaterStorage implicit none private @@ -1217,6 +1219,11 @@ subroutine CWD_Input( currentSite, currentPatch) (dead_n_ilogging+dead_n_dlogging) * & hlm_freq_day * currentPatch%area + if( hlm_use_planthydro == itrue ) then + call AccumulateMortalityWaterStorage(currentSite,currentCohort,dead_n) + end if + + do c = 1,ncwd currentPatch%cwd_BG_in(c) = currentPatch%cwd_BG_in(c) + (currentCohort%bdead+currentCohort%bsw) * & diff --git a/biogeophys/FatesPlantHydraulicsMod.F90 b/biogeophys/FatesPlantHydraulicsMod.F90 index 1855b0be..0b32bdaf 100644 --- a/biogeophys/FatesPlantHydraulicsMod.F90 +++ b/biogeophys/FatesPlantHydraulicsMod.F90 @@ -110,6 +110,7 @@ module FatesPlantHydraulicsMod __FILE__ ! ! !PUBLIC MEMBER FUNCTIONS: + public :: AccumulateMortalityWaterStorage public :: hydraulics_drive public :: InitHydrSites public :: HydrSiteColdStart @@ -842,7 +843,11 @@ subroutine UpdateH2OVeg(nsites,sites,bc_out) enddo !end patch loop csite_hydr%h2oveg = csite_hydr%h2oveg / AREA - bc_out(s)%plant_stored_h2o_si = csite_hydr%h2oveg + + ! Note that h2oveg_dead is incremented wherever we have litter fluxes + ! and it will be reduced via an evaporation term + bc_out(s)%plant_stored_h2o_si = csite_hydr%h2oveg + csite_hydr%h2oveg_dead + end do return @@ -2165,14 +2170,54 @@ subroutine hydraulics_bc ( nsites, sites,bc_in,bc_out,dtime ) ! The Host Land Model may need to know what the total stored vegetation water is ! in order for it to fill its balance checks - bc_out(s)%plant_stored_h2o_si = site_hydr%h2oveg + bc_out(s)%plant_stored_h2o_si = site_hydr%h2oveg + site_hydr%h2oveg_dead enddo !site end subroutine Hydraulics_BC + + ! ===================================================================================== + + + subroutine AccumulateMortalityWaterStorage(csite,ccohort,delta_n) + + ! --------------------------------------------------------------------------- + ! This subroutine accounts for the water bound in plants that have + ! just died. This water is accumulated at the site level for all plants + ! that die. + ! In another routine, this pool is reduced as water vapor flux, and + ! passed to the HLM. + ! --------------------------------------------------------------------------- + + + ! Arguments + + type(ed_site_type), intent(inout), target :: csite + type(ed_cohort_type) , intent(inout), target :: ccohort + real(r8), intent(in) :: delta_n ! Loss in number density + ! for this cohort /m2/s + + ! Locals + type(ed_site_hydr_type), pointer :: csite_hydr + type(ed_cohort_hydr_type), pointer :: ccohort_hydr + + ccohort_hydr => ccohort%co_hydr + csite_hydr => csite%si_hydr + + csite_hydr%h2oveg_dead = csite_hydr%h2oveg_dead + & + (sum(ccohort_hydr%th_ag(:)*ccohort_hydr%v_ag(:)) + & + sum(ccohort_hydr%th_bg(:)*ccohort_hydr%v_bg(:)) + & + sum(ccohort_hydr%th_aroot(:)*ccohort_hydr%v_aroot_layer(:)))* & + denh2o*delta_n + + return + end subroutine AccumulateMortalityWaterStorage + + + !-------------------------------------------------------------------------------! subroutine Hydraulics_1DSolve(cc_p, ft, z_node, v_node, ths_node, thr_node, kmax_bound, kmax_upper, kmax_lower, & diff --git a/main/FatesHydraulicsMemMod.F90 b/main/FatesHydraulicsMemMod.F90 index 35aa1a14..c8ccaa65 100644 --- a/main/FatesHydraulicsMemMod.F90 +++ b/main/FatesHydraulicsMemMod.F90 @@ -123,7 +123,10 @@ module FatesHydraulicsMemMod ! cohorts to column level (mm) real(r8) :: dwat_veg ! change in stored water in vegetation ! column level (kg) - real(r8) :: h2oveg ! stored water in vegetation (kg) + real(r8) :: h2oveg ! stored water in vegetation (kg/site) [kg/ha] + + real(r8) :: h2oveg_dead ! stored water in dead vegetation (kg/site) [kg/ha] + ! Hold Until Van Genuchten is implemented ! col inverse of air-entry pressure [MPa-1] (for van Genuchten SWC only) @@ -249,6 +252,7 @@ subroutine InitHydrSite(this) this%errh2o_hyd = nan this%dwat_veg = nan this%h2oveg = nan + this%h2oveg_dead = 0.0_r8 return end subroutine InitHydrSite diff --git a/main/FatesInterfaceMod.F90 b/main/FatesInterfaceMod.F90 index 500826a3..e59f44e5 100644 --- a/main/FatesInterfaceMod.F90 +++ b/main/FatesInterfaceMod.F90 @@ -524,15 +524,17 @@ module FatesInterfaceMod ! FATES Hydraulics - real(r8) :: plant_stored_h2o_si ! stored water in vegetation (kg/m2 H2O) - ! Assuming density of 1Mg/m3 ~= mm/m2 H2O - ! This must be set and transfered prior to clm_drv() - ! following the calls to ed_update_site() - ! ed_update_site() is called during both the restart - ! and coldstart process - + real(r8) :: plant_stored_h2o_si ! stored water in LIVE+DEAD vegetation (kg/m2 H2O) + ! Assuming density of 1Mg/m3 ~= mm/m2 H2O + ! This must be set and transfered prior to clm_drv() + ! following the calls to ed_update_site() + ! ed_update_site() is called during both the restart + ! and coldstart process + real(r8),allocatable :: qflx_soil2root_sisl(:) ! Water flux from soil into root by site and soil layer ! [mm H2O/s] [+ into root] + + end type bc_out_type From 898c3aecfa2d7aa8b9925e4fe1fd97032008a07a Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Tue, 9 Jan 2018 16:37:40 -0800 Subject: [PATCH 2/3] Fixed units on h2oveg_dead, kg/m2 --- biogeophys/FatesPlantHydraulicsMod.F90 | 4 ++-- main/FatesHydraulicsMemMod.F90 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/biogeophys/FatesPlantHydraulicsMod.F90 b/biogeophys/FatesPlantHydraulicsMod.F90 index 0b32bdaf..1d16b1c0 100644 --- a/biogeophys/FatesPlantHydraulicsMod.F90 +++ b/biogeophys/FatesPlantHydraulicsMod.F90 @@ -2197,7 +2197,7 @@ subroutine AccumulateMortalityWaterStorage(csite,ccohort,delta_n) type(ed_site_type), intent(inout), target :: csite type(ed_cohort_type) , intent(inout), target :: ccohort real(r8), intent(in) :: delta_n ! Loss in number density - ! for this cohort /m2/s + ! for this cohort /ha/day ! Locals type(ed_site_hydr_type), pointer :: csite_hydr @@ -2210,7 +2210,7 @@ subroutine AccumulateMortalityWaterStorage(csite,ccohort,delta_n) (sum(ccohort_hydr%th_ag(:)*ccohort_hydr%v_ag(:)) + & sum(ccohort_hydr%th_bg(:)*ccohort_hydr%v_bg(:)) + & sum(ccohort_hydr%th_aroot(:)*ccohort_hydr%v_aroot_layer(:)))* & - denh2o*delta_n + denh2o*delta_n/AREA return end subroutine AccumulateMortalityWaterStorage diff --git a/main/FatesHydraulicsMemMod.F90 b/main/FatesHydraulicsMemMod.F90 index c8ccaa65..8326bcc4 100644 --- a/main/FatesHydraulicsMemMod.F90 +++ b/main/FatesHydraulicsMemMod.F90 @@ -123,9 +123,9 @@ module FatesHydraulicsMemMod ! cohorts to column level (mm) real(r8) :: dwat_veg ! change in stored water in vegetation ! column level (kg) - real(r8) :: h2oveg ! stored water in vegetation (kg/site) [kg/ha] + real(r8) :: h2oveg ! stored water in vegetation (kg/m2) - real(r8) :: h2oveg_dead ! stored water in dead vegetation (kg/site) [kg/ha] + real(r8) :: h2oveg_dead ! stored water in dead vegetation (kg/m2) ! Hold Until Van Genuchten is implemented From c0ca0a20b3fe8a297983c6beccd4b99c05c0bd1b Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Tue, 9 Jan 2018 16:47:11 -0800 Subject: [PATCH 3/3] Added water storage flux to termination mortality. --- biogeochem/EDCohortDynamicsMod.F90 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/biogeochem/EDCohortDynamicsMod.F90 b/biogeochem/EDCohortDynamicsMod.F90 index 755c5277..034f312a 100755 --- a/biogeochem/EDCohortDynamicsMod.F90 +++ b/biogeochem/EDCohortDynamicsMod.F90 @@ -653,7 +653,10 @@ subroutine terminate_cohorts( currentSite, patchptr, level ) currentSite%root_litter_diagnostic_input_carbonflux(currentCohort%pft) + & currentCohort%n * (currentCohort%br+currentCohort%bstore) * hlm_days_per_year / AREA - if (hlm_use_planthydro.eq.itrue) call DeallocateHydrCohort(currentCohort) + if( hlm_use_planthydro == itrue ) then + call AccumulateMortalityWaterStorage(currentSite,currentCohort,currentCohort%n) + call DeallocateHydrCohort(currentCohort) + end if deallocate(currentCohort) endif