---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-10-1e3dff0de36e> in <module>()
3 var='Water Temperature'
4 lev=-1
----> 5 slice=var_lev_date(url=url,var=var, mytime=mytime, lev=lev)
6 myplot(slice,model=model)
<ipython-input-4-d9023d1bf69c> in var_lev_date(url, var, mytime, lev, subsample)
1 def var_lev_date(url=None,var=None,mytime=None,lev=0,subsample=1):
2 time0=time.time()
----> 3 cubes = iris.load(url)
4 cube = cubes.extract(iris.Constraint(name=var.strip()))[0]
5 try:
/home/local/python27_epd/lib/python2.7/site-packages/Iris-1.5.0_dev-py2.7.egg/iris/__init__.pyc in load(uris, constraints, callback)
196
197 """
--> 198 return _load_collection(uris, constraints, callback).merged().cubes()
199
200
/home/local/python27_epd/lib/python2.7/site-packages/Iris-1.5.0_dev-py2.7.egg/iris/__init__.pyc in _load_collection(uris, constraints, callback)
166 try:
167 cubes = _generate_cubes(uris, callback)
--> 168 result = iris.cube._CubeFilterCollection.from_cubes(cubes, constraints)
169 except EOFError as e:
170 raise iris.exceptions.TranslationError(
/home/local/python27_epd/lib/python2.7/site-packages/Iris-1.5.0_dev-py2.7.egg/iris/cube.pyc in from_cubes(cubes, constraints)
133 pairs = [_CubeFilter(constraint) for constraint in constraints]
134 collection = _CubeFilterCollection(pairs)
--> 135 for cube in cubes:
136 collection.add_cube(cube)
137 return collection
/home/local/python27_epd/lib/python2.7/site-packages/Iris-1.5.0_dev-py2.7.egg/iris/__init__.pyc in _generate_cubes(uris, callback)
157 elif scheme in ['http', 'https']:
158 urls = [':'.join(x) for x in groups]
--> 159 for cube in iris.io.load_http(urls, callback):
160 yield cube
161 else:
/home/local/python27_epd/lib/python2.7/site-packages/Iris-1.5.0_dev-py2.7.egg/iris/io/__init__.pyc in load_http(urls, callback)
198 # Call each iris format handler with the appropriate filenames
199 for handling_format_spec, fnames in handler_map.iteritems():
--> 200 for cube in handling_format_spec.handler(fnames, callback):
201 yield cube
202
/home/local/python27_epd/lib/python2.7/site-packages/Iris-1.5.0_dev-py2.7.egg/iris/fileformats/netcdf.pyc in load_cubes(filenames, callback)
461 # formula term.
462 if not cf_var.has_formula_terms():
--> 463 cube = _load_cube(engine, cf, cf_var, filename)
464
465 # Process any associated formula terms and attach
/home/local/python27_epd/lib/python2.7/site-packages/Iris-1.5.0_dev-py2.7.egg/iris/fileformats/netcdf.pyc in _load_cube(engine, cf, cf_var, filename)
366
367 # Run pyke inference engine with forward chaining rules.
--> 368 engine.activate(_PYKE_RULE_BASE)
369
370 # Populate coordinate attributes with the untouched attributes from the
/home/local/python27_epd/lib/python2.7/site-packages/pyke/knowledge_engine.pyc in activate(self, *rb_names)
294 add your facts before doing this!
295 '''
--> 296 for rb_name in rb_names: self.get_rb(rb_name).activate()
297
298 def lookup(self, kb_name, entity_name, pat_context, patterns):
/home/local/python27_epd/lib/python2.7/site-packages/pyke/rule_base.pyc in activate(self)
157 self.engine.knowledge_bases[self.root_name] = self
158 self.register_fc_rules(current_rb)
--> 159 self.run_fc_rules(current_rb)
160
161 def reset(self):
/home/local/python27_epd/lib/python2.7/site-packages/pyke/rule_base.pyc in run_fc_rules(self, stop_at_rb)
145 rb = self
146 while rb is not stop_at_rb:
--> 147 for fc_rule in rb.fc_rules: fc_rule.run()
148 if not rb.parent: break
149 rb = rb.parent
/home/local/python27_epd/lib/python2.7/site-packages/pyke/fc_rule.pyc in run(self)
88 def run(self):
89 self.ran = True
---> 90 self.rule_fn(self)
91
92 def new_fact(self, fact_args, n):
/home/local/python27_epd/lib/python2.7/site-packages/Iris-1.5.0_dev-py2.7.egg/iris/fileformats/_pyke_rules/compiled_krb/fc_rules_cf_fc.pyc in fc_build_auxiliary_coordinate_latitude(rule, context, index)
257 cf_coord_var = engine.cf_var.cf_group.auxiliary_coordinates[context.lookup_data('coordinate')]
258 build_auxiliary_coordinate(engine, cf_coord_var,
--> 259 coord_name=CF_VALUE_STD_NAME_LAT)
260 engine.rule_triggered.add(rule.name)
261 rule.rule_base.num_fc_rules_triggered += 1
/home/local/python27_epd/lib/python2.7/site-packages/Iris-1.5.0_dev-py2.7.egg/iris/fileformats/_pyke_rules/compiled_krb/fc_rules_cf_fc.pyc in build_auxiliary_coordinate(engine, cf_coord_var, coord_name, coord_system)
1337 bounds=bounds_data,
1338 attributes=attributes,
-> 1339 coord_system=coord_system)
1340 cube.add_aux_coord(coord, data_dims)
1341 engine.provides['coordinates'].append((coord, cf_coord_var.cf_name))
/home/local/python27_epd/lib/python2.7/site-packages/Iris-1.5.0_dev-py2.7.egg/iris/coords.pyc in __init__(self, points, standard_name, long_name, var_name, units, bounds, attributes, coord_system)
344
345 self.points = points
--> 346 self.bounds = bounds
347
348 def __getitem__(self, key):
/home/local/python27_epd/lib/python2.7/site-packages/Iris-1.5.0_dev-py2.7.egg/iris/coords.pyc in bounds(self, bounds)
1384 # NB. Use _points to avoid triggering any lazy array.
1385 if self._points.shape != bounds.shape[:-1]:
-> 1386 raise ValueError("Bounds shape must be compatible with points "
1387 "shape.")
1388 self._bounds = bounds
ValueError: Bounds shape must be compatible with points shape.