-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exportable function for fao_allen98 #2067
Conversation
@saschahofmann There's a configuration in |
src/xclim/indices/_conversion.py
Outdated
# TODO: How can I check exact units for inputs | ||
# @declare_units( | ||
# net_radiation="[MJ m-2 day-1]", | ||
# tas="[degC]", | ||
# wind="[m s-1]", | ||
# es="[kPa]", | ||
# ea="[kPa]", | ||
# delta_svp="[kPa degC-1]", | ||
# gamma="[kPa degC]", | ||
# G="[MJ m-2 day-1]", | ||
# ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, the declare_units
really is needed only if there's a plan to make this function an indicator itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! (dang, Éric beat me to it)
I was coming to say so :P |
Co-authored-by: Pascal Bourgault <[email protected]>
@saschahofmann Sorry I should have asked if your PR was ready, I hope it was. Since I saw we both accepted, I thought it was ready to go, but that excluded you. I'm not used to be in the position where I do the review and do the merge |
All 👍 thanks for merging |
Pull Request Checklist:
number
) and pull request (:pull:number
) has been addedWhat kind of change does this PR introduce?
fao_allen98
that implements the FAO-56 Penman-Monteith equation and is used insidepotential_evapotranspiration
for theallen98
method. This allows providing some variables directly instead of using estimates e.g. tas mean or the different vapour pressures can be taken from datasets directly instead of being estimated. See discussion [Questions] potential_evapotranspiration with FAO providing net radiation directly #1853 or issue Adding pure FAO Penman-Monteith equation to compute potential evapotranspiration #2004.%
lead to wrong results for PET when usingallen98
Does this PR introduce a breaking change?
No.
Questions:
I would like to fix the units of the input for the new function exactly. Is there an easy way to do this? And how can I provide a scalar value as a default with units?