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
In [22]: f = '/work/durack1/Shared/obs_data/Argo/UCSD/180719_UCSD_monthly_TAndS_200401-201806_2p5-1975db.nc'
In [23]: fH = cdm.open(f)
In [24]: testAxes = fH['to'] <- This is a file handle reference
In [25]: timeAx = testAxes.getTime()
In [26]: timeAx
Out[26]:
id: time
Designated a time axis.
units: days since 2004-1-1
Length: 174
First: 15.5
Last: 5280.0
Other axis attributes:
long_name: time
standard_name: time
calendar: gregorian
axis: T
Python id: 0x7fe90c0a4490
In [27]: timeAx2 = timeAx.clone()
In [28]: timeAx2
Out[28]:
id: time
Designated a time axis.
units:
Length: 174
First: 15.5
Last: 5280.0
Other axis attributes:
realtopology: linear
long_name: time
standard_name: time
calendar: gregorian
axis: T
Python id: 0x7fe90c1124d0
And file variable reference vs file variable load seems to be the issue:
In [34]: testAxes = fH('to') <- This is a file load, actual read, rather than reference
In [35]: timeAx = testAxes.getTime()
In [36]: type(timeAx)
Out[36]: cdms2.axis.TransientAxis
In [37]: timeAx
Out[37]:
id: time
Designated a time axis.
units: days since 2004-1-1
Length: 174
First: 15.5
Last: 5280.0
Other axis attributes:
realtopology: linear
long_name: time
standard_name: time
calendar: gregorian
axis: T
Python id: 0x7fe90efa60d0
In [38]: timeAx2 = timeAx.clone()
In [39]: timeAx2
Out[39]:
id: time
Designated a time axis.
units: days since 2004-1-1
Length: 174
First: 15.5
Last: 5280.0
Other axis attributes:
realtopology: linear
long_name: time
standard_name: time
calendar: gregorian
axis: T
Python id: 0x7fe90c112850
Conda env info:
(cdat80py2) duro@ocean:[8800]> ls anaconda2/envs/cdat80py2/conda-meta/cdtime*
anaconda2/envs/cdat80py2/conda-meta/cdtime-3.0-py27h6091dcd_1.json
(cdat80py2) duro@ocean:[8801]> ls anaconda2/envs/cdat80py2/conda-meta/cdms2*
anaconda2/envs/cdat80py2/conda-meta/cdms2-3.0.1-py27h6091dcd_1.json
As a quick debug, the little demo case works:
In [31]: data=[1,2,3,4]
...: t=cdm.createAxis(data,id="time")
...: t.units="days since 2001-01-01"
...:
In [32]: b=t.clone()
...: b.units
...:
Out[32]: 'days since 2001-01-01'
The text was updated successfully, but these errors were encountered:
And file variable reference vs file variable load seems to be the issue:
Conda env info:
As a quick debug, the little demo case works:
The text was updated successfully, but these errors were encountered: