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
I am trying to use create_ensemble_on in to_dataset.
I want to convert calendars to noleap. I get an error to use cftime, but that arg is not available through to_dataset. It is fixed to calendar == "default". Why is cftime only acceptable with default ? Is there a problem with adding a use_cftime_for_calendar arg to to_dataset ?
ValueError: Calendar 'noleap' is only valid with cftime. Try using `use_cftime=True`.
Additional context
Note that technically these two sources are already noleap in cftime. When I use to_dataset without converting to a calendar, the time axis becomes a numpy datetime (but february 29th are still missing.) This seems like a weird behavior to me.
It leads to issue, because xr.infer_freqdoesn't work anymore (outputs None). This means that default xclim checks on indicators fail.
Contribution
I would be willing/able to open a Pull Request to address this bug.
The text was updated successfully, but these errors were encountered:
Hum. haha what was I thinking ? Maybe its a typo and I actually meant calendar != 'default' ?
Because "default" is the name xclim (and only xclim) gives to the numpy datetime calendar.
On the other hand, if all datasets are using noleap and you are not getting a noleap calendar output, than that's an issue of catalog.to_dask think. Strange!
Setup Information
Description
I am trying to use
create_ensemble_on
into_dataset
.I want to convert calendars to
noleap
. I get an error to use cftime, but that arg is not available throughto_dataset
. It is fixed tocalendar == "default"
. Why is cftime only acceptable with default ? Is there a problem with adding ause_cftime_for_calendar
arg toto_dataset
?xscen/xscen/catalog.py
Line 493 in db7c976
Steps To Reproduce
gives:
Additional context
Note that technically these two sources are already noleap in cftime. When I use
to_dataset
without converting to a calendar, the time axis becomes a numpy datetime (but february 29th are still missing.) This seems like a weird behavior to me.It leads to issue, because
xr.infer_freq
doesn't work anymore (outputsNone
). This means that default xclim checks on indicators fail.Contribution
The text was updated successfully, but these errors were encountered: