pyet-org / pyet

:sunflower: pyet is a Python package to estimate reference and potential evaporation.
https://pyet.readthedocs.io/
MIT License
130 stars 33 forks source link

[BUG] daylight_hours return nans for high latitudes #25

Closed raoulcollenteur closed 2 years ago

raoulcollenteur commented 2 years ago

pyet.daylight_hours returns NaNs for high latitudes (e.g., Sweden) in winter, this should returns zero (hours of daylight) I think.

To reproduce:

pyet.daylight_hours(df.index, 70*(np.pi/180)). # where df.index is somewhere in January

mvremec commented 2 years ago

Hei Raoul, Thank you for this! This should be fixed in the pyet_xarray branch. Let's try to push to main this week.