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

Controlrun, time format issue #105

Open
stinsage opened this issue Oct 21, 2019 · 1 comment
Open

Controlrun, time format issue #105

stinsage opened this issue Oct 21, 2019 · 1 comment

Comments

@stinsage
Copy link
Contributor

For the piControl files in the CanESM5 model data in CMIP6, the time is not given in Datetime64, but in the following format:

<xarray.DataArray 'time' (time: 13980)>
array([cftime.DatetimeNoLeap(5201, 1, 16, 12, 0, 0, 0, 1, 16),
cftime.DatetimeNoLeap(5201, 2, 15, 0, 0, 0, 0, 3, 46),
cftime.DatetimeNoLeap(5201, 3, 16, 12, 0, 0, 0, 4, 75), ...,
cftime.DatetimeNoLeap(6200, 10, 16, 12, 0, 0, 0, 6, 289),
cftime.DatetimeNoLeap(6200, 11, 16, 0, 0, 0, 0, 2, 320),
cftime.DatetimeNoLeap(6200, 12, 16, 12, 0, 0, 0, 4, 350)], dtype=object)
Coordinates:
height float64 2.0

  • time (time) object 5201-01-16 12:00:00 ... 6200-12-16 12:00:00
    Attributes:
    bounds: time_bnds
    axis: T
    long_name: time
    standard_name: time

How to convert from this into datetime64?

@daliagachc
Copy link
Contributor

daliagachc commented Oct 21, 2019

hi! the solution is explained in this issue 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