Skip to content
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

cftime-manipulation methods #193

Open
aulemahal opened this issue Apr 1, 2021 · 1 comment
Open

cftime-manipulation methods #193

aulemahal opened this issue Apr 1, 2021 · 1 comment

Comments

@aulemahal
Copy link
Contributor

At xclim, we implemented some methods for dealing with cftime arrays in xarray. I was wondering if any of this could be of interest for cf-xarray? We are planning to add cf-xarray as a dependency in the near future, so moving some functionality over here would make sense for everyone.

The two functions that could be interesting:

  • xclim.core.calendar.convert_calendar, it converts datetime variables to other calendars, handling missing days and stuff like that. It could be made available as ds.time.cf.convert_calendar or simply as an helper I guess.
  • xclim.core.calender.interp_calendar, same but instead of converting dates it interpolates data on a yearly basis. This might be too narrow for cf-xarray, because it only makes sense on data coarser than daily.
@dcherian
Copy link
Contributor

dcherian commented Apr 1, 2021

These look awesome!

I would ask over at xarray if people are interested in adding some of this stuff. interp_calendar could go in interp for example. convert_calendar may be a little out of scope of xarray, so we could add that here. date_range could make sense in xarray etc...

What doesn't go in xarray can go here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants