@@ -24,7 +24,7 @@ module FATESPlantRespPhotosynthMod
2424 use FatesGlobals, only : fates_log
2525 use FatesGlobals, only : FatesWarn,N2S,A2S,I2S
2626 use FatesConstantsMod, only : r8 = > fates_r8
27- use FatesConstantsMod, only : itrue
27+ use FatesConstantsMod, only : itrue, ifalse
2828 use FatesConstantsMod, only : nearzero
2929 use FatesConstantsMod, only : fates_unset_r8
3030 use FatesConstantsMod, only : tfrz = > t_water_freeze_k_1atm
@@ -114,13 +114,15 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime)
114114 use EDCanopyStructureMod, only : calc_areaindex
115115 use FatesConstantsMod, only : umolC_to_kgC
116116 use FatesConstantsMod, only : umol_per_mmol
117+ use FatesConstantsMod, only : m2_per_ha
117118
118119 use FatesParameterDerivedMod, only : param_derived
119120 use FatesAllometryMod, only : bleaf, bstore_allom
120121 use FatesAllometryMod, only : storage_fraction_of_target
121122 use FatesAllometryMod, only : set_root_fraction
122123 use DamageMainMod, only : GetCrownReduction
123124 use FatesInterfaceTypesMod, only : hlm_use_tree_damage
125+ use FatesMossMod, only : moss
124126
125127 ! ARGUMENTS:
126128 ! -----------------------------------------------------------------------------------
@@ -209,7 +211,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime)
209211 real (r8 ) :: r_stomata ! Mean stomatal resistance across all leaves in the patch [s/m]
210212 real (r8 ) :: maintresp_reduction_factor ! factor by which to reduce maintenance
211213 ! respiration when storage pools are low
212- real (r8 ) :: b_leaf ! leaf biomass kgC
214+ real (r8 ) :: b_leaf ! leaf biomass kgC/m2 plot
213215 real (r8 ) :: frac ! storage pool as a fraction of target leaf biomass
214216 ! over each cohort x layer.
215217 real (r8 ) :: cohort_eleaf_area ! This is the effective leaf area [m2] reported by each cohort
@@ -288,7 +290,14 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime)
288290 integer :: NCL_p ! number of canopy layers in patch
289291 integer :: iage ! loop counter for leaf age classes
290292 integer :: solve_iter ! number of iterations required for photosynthesis solve
291-
293+
294+ ! Variables for moss: Call of moss()
295+ real (r8 ) :: alff = 1._r8 ! available light on forest floor. TODO: Change from 1?
296+ real (r8 ) :: decid_litter = 0._r8 ! Fresh deciduous leaf litter (kg/m2). TODO: Change from 0.
297+ real (r8 ) :: dummy_moss_to_litter_flux_kg_per_m2plot
298+ real (r8 ) :: dummy_moss_to_atmos_flux_kg_per_m2plot
299+ real (r8 ) :: dummy_livemoss_depth_m
300+
292301 ! Parameters
293302 ! Absolute convergence tolerance on solving intracellular CO2 concentration [Pa]
294303
@@ -532,8 +541,17 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime)
532541 ! vascular plants isn't applied anywhere in this subroutine. This will make it so that
533542 ! you can use ScaleLeafLayerFluxToCohort and its leaf area scaling with no adjustments.
534543
535- write (fates_log(),* ) ' Moss not yet implemented in FatesPlantRespPhotosynthDrive'
536- call endrun(msg= errMsg(sourcefile, __LINE__))
544+ ! Moss has no stomatal resistance because it has no stomata
545+ rs_z(iv,ft,cl) = 0._r8
546+
547+ ! Get leaf biomass
548+ leaf_c = currentCohort% prt% GetState(leaf_organ, carbon12_element)
549+ ! Convert kg/plant to kg/m2 plot
550+ b_leaf = leaf_c * currentCohort% n / m2_per_ha
551+
552+ call moss(alff, lai_canopy_above, decid_litter, dtime, b_leaf, &
553+ dummy_moss_to_litter_flux_kg_per_m2plot, dummy_moss_to_atmos_flux_kg_per_m2plot, &
554+ dummy_livemoss_depth_m, psn_z(iv,ft,cl), anet_av_z(iv,ft,cl), lmr_z(iv,ft,cl))
537555 else
538556
539557 if (hlm_use_planthydro.eq. itrue ) then
0 commit comments