avoid symbolic gradient derivation at Esat_slope
Currently, the gradient of the Esag~Tair relationship is computed on each function call by symbolically computing the derivative of the relationship.
This relationship does not change with the inputs. Hence, I suggest to replace it by the code of the derivate:
L172: (https://bitbucket.org/juergenknauer/bigleaf/src/master/R/meteorological_variables.r#lines-172))
Delta <- eval(D(expression(a * exp((b * Tair) / (c + Tair))),name="Tair"))
by
Delta <- a * (exp((b * Tair)/(c + Tair)) * (b/(c + Tair) - (b * Tair)/(c + Tair)^2))
If ok with @juergenknauer, I can commit this change by directly editing in bitbucket web-interface.
Comments (3)
-
repo owner -
reporter - changed status to closed
hard-code derivative in ESat computation. Closes
#5→ <<cset ffe1e7dc9ddb>>
-
reporter Merged in Thomas-Wutzler/hardcode-derivative-in-esat-computation--1635189859904 (pull request #3)
hard-code derivative in ESat computation. Closes
#5→ <<cset 2c6f0e4e502a>>
- Log in to comment
Thanks @Thomas Wutzler for the suggestion. I am happy with your suggestion of committing this directly.