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
This is on a Ubuntu 14.04.3 system with uvcdat 2.1.0.
I see the same failure on a vm with Ubuntu 13.10 with uvcdat 1.5.0-rc5.
When I used cdscan for two .nc files, the resulting xml no longer contains time axis bounds which makes the cdutil.YEAR function fail:
ev_mean = cdutil.YEAR(ev)
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/uvcdat/2.1.0/lib/python2.7/site-packages/cdutil/times.py", line 1286, in get
s.append(TimeSlicer.get(self,slab,season,criteriaarg,statusbar=statusbar,sum=sum))
File "/usr/local/uvcdat/2.1.0/lib/python2.7/site-packages/cdutil/times.py", line 383, in get
slices,bounds,norm=self.slicer(tim,slicerarg)
File "/usr/local/uvcdat/2.1.0/lib/python2.7/site-packages/cdutil/times.py", line 631, in monthBasedSlicer
b0=cdtime.reltime(bnds[i][0],units)
TypeError: 'NoneType' object has no attribute 'getitem'
I am able to use cdutil.YEAR on each of the .nc files individually (and confirmed that they have bounds on their time axes).
I include output below showing the xml failure and the success on the two .nc files.
I also show the var info for the two individual .nc files.
------------ example code ----------------------------
bhayes@dge-calc:.../CESM1-CAM5/r1i1p1$ cdscan -x ev.xml evspsbl_Amon*
Finding common directory ...
Common directory:
Scanning files ...
evspsbl_Amon_CESM1-CAM5_rcp26_r1i1p1_200601-210012.nc
Setting reference time units to days since 2006-01-01 00:00:00
evspsbl_Amon_CESM1-CAM5_rcp26_r1i1p1_210101-230012.nc
Setting reference time units to days since 2006-01-01 00:00:00
ev.xml written
bhayes@dge-calc:.../CESM1-CAM5/r1i1p1$ cdat
Python 2.7.8 (default, Jan 14 2015, 10:22:34)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import cdms2 as cdms
import cdutil
f = cdms.open('ev.xml')
f.variables.keys()
['time_bnds', 'lat_bnds', 'evspsbl', 'lon_bnds']
ev = f('evspsbl')
ev.shape
(3540, 192, 288)
ev_mean = cdutil.YEAR(ev)
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/uvcdat/2.1.0/lib/python2.7/site-packages/cdutil/times.py", line 1286, in get
s.append(TimeSlicer.get(self,slab,season,criteriaarg,statusbar=statusbar,sum=sum))
File "/usr/local/uvcdat/2.1.0/lib/python2.7/site-packages/cdutil/times.py", line 383, in get
slices,bounds,norm=self.slicer(tim,slicerarg)
File "/usr/local/uvcdat/2.1.0/lib/python2.7/site-packages/cdutil/times.py", line 631, in monthBasedSlicer
b0=cdtime.reltime(bnds[i][0],units)
TypeError: 'NoneType' object has no attribute 'getitem'
ev1.info()
*** Description of Slab evspsbl ***
id: evspsbl
shape: (1140, 192, 288)
filename:
missing_value: 1e+20
comments:
grid_name:
grid_type: generic
time_statistic:
long_name: Evaporation
units: kg m-2 s-1
comment: QFLX no change, CMIP5_table_comment: at surface; flux of water into the atmosphere due to conversion of both liquid and solid phases to vapor (from underlying surface and vegetation)
_FillValue: [ 1.00000002e+20]
autoApiInfo: <AutoAPI.AutoAPI.Info instance at 0x7efcc240ef38>
tileIndex: None
original_name: QFLX
associated_files: baseURL: http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation gridspecFile: gridspec_atmos_fx_CESM1-CAM5_rcp26_r0i0p0.nc areacella: areacella_fx_CESM1-CAM5_rcp26_r0i0p0.nc
standard_name: water_evaporation_flux
cell_methods: time: mean (interval: 30 days)
cell_measures: area: areacella
original_units: kg/m2/s
history: 2012-06-08T23:37:19Z altered by CMOR: Converted units from 'kg/m2/s' to 'kg m-2 s-1'. 2012-06-08T23:37:19Z altered by CMOR: Reordered dimensions, original order: lat lon time. 2012-06-08T23:37:19Z altered by CMOR: replaced missing value flag (-1e+32) with standard missing value (1e+20).
Grid has Python id 0x7efcc241b050.
Gridtype: generic
Grid shape: (192, 288)
Order: yx
** Dimension 1 **
id: time
Designated a time axis.
units: days since 2006-01-01 00:00:00
Length: 1140
First: 15.5
Last: 34659.5
Other axis attributes:
long_name: time
standard_name: time
calendar: noleap
axis: T
Python id: 0x7efcc241b890
** Dimension 2 **
id: lat
Designated a latitude axis.
units: degrees_north
Length: 192
First: -90.0
Last: 90.0
Other axis attributes:
long_name: latitude
standard_name: latitude
axis: Y
Python id: 0x7efcc241b910
** Dimension 3 **
id: lon
Designated a longitude axis.
units: degrees_east
Length: 288
First: 0.0
Last: 358.75
Other axis attributes:
modulo: 360.0
long_name: longitude
standard_name: longitude
axis: X
topology: circular
Python id: 0x7efcc241b990
*** End of description for evspsbl ***
---------- ev2 info ---------------------
...
ev2.info()
*** Description of Slab evspsbl ***
id: evspsbl
shape: (2400, 192, 288)
filename:
missing_value: 1e+20
comments:
grid_name:
grid_type: generic
time_statistic:
long_name: Evaporation
units: kg m-2 s-1
comment: QFLX no change, CMIP5_table_comment: at surface; flux of water into the atmosphere due to conversion of both liquid and solid phases to vapor (from underlying surface and vegetation)
_FillValue: [ 1.00000002e+20]
autoApiInfo: <AutoAPI.AutoAPI.Info instance at 0x7efcc24236c8>
tileIndex: None
original_name: QFLX
associated_files: baseURL: http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation gridspecFile: gridspec_atmos_fx_CESM1-CAM5_rcp26_r0i0p0.nc areacella: areacella_fx_CESM1-CAM5_rcp26_r0i0p0.nc
standard_name: water_evaporation_flux
cell_methods: time: mean (interval: 30 days)
cell_measures: area: areacella
original_units: kg/m2/s
history: 2012-06-15T22:28:22Z altered by CMOR: Converted units from 'kg/m2/s' to 'kg m-2 s-1'. 2012-06-15T22:28:22Z altered by CMOR: Reordered dimensions, original order: lat lon time. 2012-06-15T22:28:22Z altered by CMOR: replaced missing value flag (-1e+32) with standard missing value (1e+20).
Grid has Python id 0x7efcc241bf50.
Gridtype: generic
Grid shape: (192, 288)
Order: yx
** Dimension 1 **
id: time
Designated a time axis.
units: days since 2100-01-01 00:00:00
Length: 2400
First: 380.5
Last: 73349.5
Other axis attributes:
long_name: time
standard_name: time
calendar: noleap
axis: T
Python id: 0x7efcc241bf10
** Dimension 2 **
id: lat
Designated a latitude axis.
units: degrees_north
Length: 192
First: -90.0
Last: 90.0
Other axis attributes:
long_name: latitude
standard_name: latitude
axis: Y
Python id: 0x7efcc241b850
** Dimension 3 **
id: lon
Designated a longitude axis.
units: degrees_east
Length: 288
First: 0.0
Last: 358.75
Other axis attributes:
modulo: 360.0
long_name: longitude
standard_name: longitude
axis: X
topology: circular
Python id: 0x7efcc2437150
*** End of description for evspsbl ***
The text was updated successfully, but these errors were encountered:
This is on a Ubuntu 14.04.3 system with uvcdat 2.1.0.
I see the same failure on a vm with Ubuntu 13.10 with uvcdat 1.5.0-rc5.
When I used cdscan for two .nc files, the resulting xml no longer contains time axis bounds which makes the cdutil.YEAR function fail:
I am able to use cdutil.YEAR on each of the .nc files individually (and confirmed that they have bounds on their time axes).
I include output below showing the xml failure and the success on the two .nc files.
I also show the var info for the two individual .nc files.
------------ example code ----------------------------
bhayes@dge-calc:.../CESM1-CAM5/r1i1p1$ cdscan -x ev.xml evspsbl_Amon*
Finding common directory ...
Common directory:
Scanning files ...
evspsbl_Amon_CESM1-CAM5_rcp26_r1i1p1_200601-210012.nc
Setting reference time units to days since 2006-01-01 00:00:00
evspsbl_Amon_CESM1-CAM5_rcp26_r1i1p1_210101-230012.nc
Setting reference time units to days since 2006-01-01 00:00:00
ev.xml written
bhayes@dge-calc:.../CESM1-CAM5/r1i1p1$ cdat
Python 2.7.8 (default, Jan 14 2015, 10:22:34)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
The text was updated successfully, but these errors were encountered: