When using Phyosyn with gsmodel = BallBerry, supplying negative g0 often produces the following warning and results in NaNs in the output. It seems that the warning is being thrown from within the QUAD functions.
Photosyn(gsmodel = "BallBerry", g1 = 9, g0 = -0.03)
works fine, but the following does not:
Photosyn(gsmodel = "BallBerry", g1 = 9, g0 = -0.04)
Ci ALEAF GS ELEAF Ac Aj Ap Rd VPD Tleaf Ca PPFD Patm 1 NA NaN NaN NaN NaN 13.80673 3000 0.92 1.5 25 400 1500 100 Warning message: In sqrt(B * B - 4 * A * C) : NaNs produced