In [1]:
from ocgis import Inspect
import os.path
In [2]:
url='http://geoport.whoi.edu/thredds/dodsC/coawst_4/use/fmrc/coawst_4_use_best.ncd'
In [12]:
Inspect(url,variable='zeta')
---------------------------------------------------------------------------
DimensionNotFound Traceback (most recent call last)
<ipython-input-12-7472f5646276> in <module>()
----> 1 Inspect(url,variable='zeta')
/home/local/python27_epd/lib/python2.7/site-packages/ocgis/util/inspect.pyc in __init__(self, uri, variable, interface_overload, request_dataset)
51 kwds.update(interface_overload)
52 rd = RequestDataset(**kwds)
---> 53 self.ds = rd.get()
54 self.meta = self.ds.meta
55 else:
/home/local/python27_epd/lib/python2.7/site-packages/ocgis/api/request/nc.pyc in get(self, format_time)
110 axis_value = v['axis'] or v['cls']._axis
111 ## pull the axis information out of the dimension map
--> 112 ref_axis = self._source_metadata['dim_map'].get(axis_value)
113 ## if the axis is not represented, fill it with none. this happens
114 ## when a dataset does not have a vertical level or projection axis
/home/local/python27_epd/lib/python2.7/site-packages/ocgis/api/request/nc.pyc in _source_metadata(self)
76 var = ds.variables[self.variable]
77 if self.dimension_map is None:
---> 78 self.__source_metadata['dim_map'] = get_dimension_map(ds,var,self._source_metadata)
79 else:
80 for k,v in self.dimension_map.iteritems():
/home/local/python27_epd/lib/python2.7/site-packages/ocgis/api/request/nc.pyc in get_dimension_map(ds, var, metadata)
473 if dimvar is None:
474 msg = 'Dimension variable not found for axis: "{0}". You may need to use the "dimension_map" parameter.'.format(dim)
--> 475 ocgis_lh(logger='request.nc',exc=DimensionNotFound(msg))
476 axis = get_axis(dimvar,dims,dim)
477 ## pull metadata information the variable and dimension names
/home/local/python27_epd/lib/python2.7/site-packages/ocgis/util/logging_ocgis.pyc in __call__(self, msg, logger, level, alias, ugid, exc, check_duplicate)
25 pass
26 else:
---> 27 raise(exc)
28 else:
29 if check_duplicate:
DimensionNotFound: Dimension variable not found for axis: "eta_rho". You may need to use the "dimension_map" parameter.
In [10]:
f.get_temporal_report()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-10-c936f4ee79c1> in <module>()
----> 1 f.get_temporal_report()
/home/local/python27_epd/lib/python2.7/site-packages/ocgis/util/inspect.pyc in get_temporal_report(self)
84
85 try:
---> 86 if self._t.format_time:
87 res = int(self._t.resolution)
88 try:
/home/local/python27_epd/lib/python2.7/site-packages/ocgis/util/inspect.pyc in _t(self)
73 @property
74 def _t(self):
---> 75 return(self.ds.temporal)
76 @property
77 def _s(self):
AttributeError: 'NoneType' object has no attribute 'temporal'
In [ ]:
Content source: rsignell-usgs/notebook
Similar notebooks: