NGEET / fates

repository for the Functionally Assembled Terrestrial Ecosystem Simulator (FATES)
Other
105 stars 92 forks source link

leaf photosynthesis does not check for leaf area/stems and day/night correctly #1222

Open adrifoster opened 4 months ago

adrifoster commented 4 months ago

In the LeafLayerPhotosynthesis code we first check whether it is daytime or nighttime and set the subroutine outputs a certain way.

Then ONLY if it is daytime we also check if the layer is just stems (i.e. the layer has dropped leaves for some reason) and set the outputs differently.

As per quick discussion with @rosiealice and @walkeranthonyp we should check if the layer is stems at night as well as during the day.

I am not clear what we should set the output to in this new case, so far we have:

  1. Daytime/some leaves: calculate stomatal conductance and assimilation using lots of equations :)
  2. Daytime/no leaves:
        ! No leaf area. This layer is present only because of stems.
        ! Net assimilation is zero, not negative because there are
        ! no leaves to even respire
        ! (leaves are off, or have reduced to 0)

        psn_out     = 0._r8
        anet_av_out = 0._r8

        rstoma_out  = min(rsmax0,cf/(stem_cuticle_loss_frac*stomatal_intercept(ft)))
        c13disc_z = 0.0_r8
  1. Nighttime/some leaves:
     anet_av_out = -lmr
     psn_out     = 0._r8

     ! The cuticular conductance already factored in maximum resistance as a bound
     ! no need to re-bound it

     rstoma_out = cf/stomatal_intercept_btran

     c13disc_z = 0.0_r8    !carbon 13 discrimination in night time carbon flux, note value of 1.0 is used in CLM
  1. nighttime/no leaves: ???????
adrifoster commented 4 weeks ago

Just pinging everyone here again as we are working on this now

@rgknox @mpaiao @ckoven

rgknox commented 3 weeks ago

Adding this as a "fixes" to PR: #1262