You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calculating PET after thornthwaite works great except for one important detail. Having a dataset that uses a fixed 365-day calendar, there is currently no option to do the correct calculation defining all years as no-leap years.
Adding an argument for PET calculation to set the calendar to "gregorian" or in my case "365-days" would be ideal.
I have changed the code in eto.py to not check for leap years and that works, but it would be greatly appreciated if implemented into the package, so that it can be easily shared.
The text was updated successfully, but these errors were encountered:
If you want to submit a PR of your code with this option enabled then I'll certainly consider it for inclusion in the main branch. I assume you're thinking of a new CLI argument such as --use_gregorian which would only be applicable/relevant if we're computing daily values? A corresponding function argument should be added across all the functions that compute daily values, for consistency (i.e. it should work the same for all the indices and not just PET).
Personally, I'd first auto-detect it from the attributes of the time dimension, since xarray has all sorts of utilities for knowing what calendar is being used.
Calculating PET after thornthwaite works great except for one important detail. Having a dataset that uses a fixed 365-day calendar, there is currently no option to do the correct calculation defining all years as no-leap years.
Adding an argument for PET calculation to set the calendar to "gregorian" or in my case "365-days" would be ideal.
I have changed the code in eto.py to not check for leap years and that works, but it would be greatly appreciated if implemented into the package, so that it can be easily shared.
The text was updated successfully, but these errors were encountered: