SmithEcophysLab / optimal_vcmax_R

calculate optimal vcmax in R as in Smith et al. Photosynthetic capacity is optimized to the environment. Ecology Letters.
16 stars 16 forks source link

Solutions of omega #3

Closed eviatarbach closed 11 months ago

eviatarbach commented 1 year ago

Compared to the code in calc_omega.R, I get a different expression for the domain of validity for the two solutions of omega. By solving Eq. 14 in Smith et al. (2019) for omega, assuming that m, I, c, theta, and phi are all greater than 0, and requiring that omega >= 0 and A_j >= 0, Mathematica returns the following (see notebook here):

Minus solution: ((8 c > m && 4 c < m && m/c < 8 theta && theta < 1) || (4 c > m && theta > 1)) Plus solution: ((8 c < m && theta < 1) || (m/c > 8 theta && 8 c > m && 4 c < m))

It seems that this is equivalent to the code in calc_omega.R in some cases, not so in others. For one thing, theta cannot be greater than 0.85 in calc_omega.R due to the computation of the quad_root variable, whereas the above does not have this limitation. Also, calc_omega.R can return negative values, for example with theta=0.85, c=0.053, m=0.2, which I don't think makes sense, since it leads to a negative Vcmax.

SmithEcophysLab commented 1 year ago

Thanks for pointing this out @eviatarbach ! Yes, both of these are issues and the solution you gave (hopefully) can solve things. Can you provide the traditional notation for the solutions for omega?

eviatarbach commented 12 months ago

Great! Is this clear?

image

SmithEcophysLab commented 11 months ago

This has been revised to the equation above. Thanks @eviatarbach !!