xcdat icon indicating copy to clipboard operation
xcdat copied to clipboard

[Enhancement]: Time to decimal time functionality

Open pochedls opened this issue 4 months ago • 1 comments

Is your feature request related to a problem?

To regress on time (e.g., to calculate a linear trend), the user needs a time axis in units of decimal year (or something similar), but xcdat defaults to cftime objects. It would be helpful to have a convenience function that could produce an array of decimal time values.

Describe the solution you'd like

An ideal solution would enable you to simply convert a standard cftime axis to decimal time (e.g., xc.to_decimal_time(time)).

Describe alternatives you've considered

No response

Additional context

No response

pochedls avatar Oct 02 '24 02:10 pochedls