Low light behaviour

Issue #25 open
Belinda Medlyn
created an issue

Something funny happens at low light levels - try this:

testPAR <- seq(0,1500,by=5) testps <- Photosyn(PPFD=testPAR, VPD=1.0, Jmax=120, Vcmax=60, alpha=0.26, gsmodel="BBOpti", g1 = 2.74, theta=0.7) testps$Agross <- testps$ALEAF + testps$Rd

head(testps)

     Ci         ALEAF            GS         ELEAF       Ac        Aj   Rd VPD Tleaf  Ca PPFD Patm    Agross

1 400.0000 -9.200000e-01 -1.350514e-02 -1.350514e-01 19.30524 0.0000000 0.92 1 25 400 0 100 0.0000000 2 400.0000 -6.816332e-01 -1.000603e-02 -1.000603e-01 14.96747 0.2383672 0.92 1 25 400 5 100 0.2383668 3 -387.4598 -6.025202e-06 -8.844695e-08 -8.844695e-07 14.96747 0.9200000 0.92 1 25 400 10 100 0.9199940 4 2643.3251 -6.025202e-06 -8.844695e-08 -8.844695e-07 14.96747 0.9200000 0.92 1 25 400 15 100 0.9199940 5 367.9625 -6.025202e-06 -8.844695e-08 -8.844695e-07 14.96747 0.9200000 0.92 1 25 400 20 100 0.9199940 6 293.0481 1.366159e-01 2.005452e-03 2.005452e-02 14.96747 1.0566239 0.92 1 25 400 25 100 1.0566159

Comments (6)

  1. Belinda Medlyn reporter

    Also happens when g0 > 0 - the stomatal conductance goes below zero instead of to g0 at low light testpsg0 <- Photosyn(PPFD=testPAR, VPD=1.0, Ca=380, + Jmax=120, Vcmax=60, + alpha=0.26, gsmodel="BBOpti", + g1 = 2.74, g0 = 0.01, theta=0.7) with(testpsg0,points(PPFD,ALEAF+Rd,col="green",type="l")) head(testpsg0) Ci ALEAF GS ELEAF Ac Aj Rd VPD Tleaf Ca PPFD Patm 1 380.0000 -0.920000000 -0.0042159368 -0.042159368 18.55877 0.0000000 0.92 1 25 380 0 100 2 380.0000 -0.685309756 -0.0005894785 -0.005894785 14.51255 0.2346906 0.92 1 25 380 5 100 3 380.0000 -0.452170611 0.0030130121 0.030130121 14.51255 0.4678309 0.92 1 25 380 10 100

  2. Kunstler

    I stumble along this issue while using the Photosyn function, and I'm wondering if this is related to a numerical issue that lead to pb at low light.

    For instance:

    require(plantecophys)
    plot(1:150, Photosyn(PPFD=1:150)$ALEAF)
    

    gives some negative Amax below the light compensation point while some are set to zero.

    Changing the way the comparison between A_j and R_d is done in the function to identify point below the compensation point seems to solve that. Just by adding a small numerical error constant in the comparison (see below). But maybe this is a bad solution and the problem is arising before?

    In the function Photosyn replacing

          # When below light-compensation points, assume Ci=Ca.
          if(!inputCi){
            lesslcp <- vector("logical", length(Aj))
            lesslcp <- Aj-Rd < 0
    
            if(length(Ca) == 1)Ca <- rep(Ca, length(CIJ))
            if(length(GammaStar) == 1)GammaStar <- rep(GammaStar, length(CIJ))
            if(length(VJ) == 1)VJ <- rep(VJ, length(CIJ))
    
            CIJ[lesslcp] <- Ca[lesslcp]
            Aj[lesslcp] <- VJ[lesslcp] * (CIJ[lesslcp] - GammaStar[lesslcp]) /
              (CIJ[lesslcp] + 2*GammaStar[lesslcp])
    
            Ci <- ifelse(Aj < Ac, CIJ, CIC)
          }
    

    by

          # When below light-compensation points, assume Ci=Ca.
          if(!inputCi){
            lesslcp <- vector("logical", length(Aj))
            lesslcp <- Aj-Rd < 1e-10
    
            if(length(Ca) == 1)Ca <- rep(Ca, length(CIJ))
            if(length(GammaStar) == 1)GammaStar <- rep(GammaStar, length(CIJ))
            if(length(VJ) == 1)VJ <- rep(VJ, length(CIJ))
    
            CIJ[lesslcp] <- Ca[lesslcp]
            Aj[lesslcp] <- VJ[lesslcp] * (CIJ[lesslcp] - GammaStar[lesslcp]) /
              (CIJ[lesslcp] + 2*GammaStar[lesslcp])
    
            Ci <- ifelse(Aj < Ac, CIJ, CIC)
          }
    
  3. Remko Duursma repo owner

    Thanks Georges for bringing this to my attention. Your solution must be really close, or at least hinting at the solution. But if you use that and do,

    p <- Photosyn(PPFD=1:150)$ALEAF
    plot(diff(p))
    

    you will see that the transition is far from smooth; so this might cause some issues. I will look into it (again - these sort of boundary issues have come up a number of times!).

  4. Remko Duursma repo owner

    See commit 16244f4 , used Georges idea above, but this still gives the transition problem (from my comment, run the diff bit).

    I think I have to add a smooth transition from Aj to Rd at the light compensation point, using the hyperbolic minimum, to fix this.

  5. Log in to comment