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

cdms cannot read in all requested data on some climo files #2071

Closed
doutriaux1 opened this issue Aug 3, 2016 · 1 comment
Closed

cdms cannot read in all requested data on some climo files #2071

doutriaux1 opened this issue Aug 3, 2016 · 1 comment
Assignees
Milestone

Comments

@doutriaux1
Copy link
Contributor

@doutriaux1 doutriaux1 commented Aug 3, 2016

In [7]:  pr = cdmsfile('pr',lat=(-88.75, 88.75),squeeze=1,lon=(1.25, 358.75),time=('0-01-16', '0-12-16'))
In [8]: pr.shape
Out[8]: (11, 72, 144)
In [9]:  pr = cdmsfile('pr',lat=(-88.75, 88.75),squeeze=1,lon=(1.25, 358.75))
In [10]: pr.shape
Out[10]: (12, 72, 144)

file to reproduce this is attached:
pr_GPCP_000001-000012_ac.nc.zip

@dnadeau4
Copy link
Contributor

@dnadeau4 dnadeau4 commented Aug 3, 2016

The time array is until noon (12pm), so you have to set your time to "0-12-16 12"

pr = cdmsfile('pr',lat=(-88.75, 88.75),squeeze=1,lon=(1.25, 358.75),time=('0-01-16', '0-12-16 12')
pr.shape
(12, 72, 144)
pr.getTime()[:]
array([  15.5,   45.5,   75.5,  106. ,  136.5,  167. ,  197.5,  228.5,
        259. ,  289.5,  320. ,  350.5])
import cdtime
a=cdtime.reltime(350.5, 'days since 0')
a.tocomp()
1980-12-16 12:0:0.0

@dnadeau4 dnadeau4 removed their assignment Aug 3, 2016
@dnadeau4 dnadeau4 closed this Oct 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants