Commit 440bbcfd authored by R.K.Garcia's avatar R.K.Garcia
Browse files

only include band dimension on CMI if there are actually multiple bands

parent da30d031
......@@ -558,13 +558,15 @@ class HimawariAHIasCMIP(object):
yield each
# we almost forgot! the data itself
if not as_cmi: # SCMI has no band_id dimension
as_multi_band = as_cmi and bool(gdims[BAND_ID_DIM] > 1)
if not as_multi_band: # no band_id dimension for single-band files
v = self.data
d = self.data_dims
else:
v = self.data.reshape((1,) + tuple(self.data.shape))
d = OrderedDict({BAND_ID_DIM: gdims[BAND_ID_DIM]})
d.update(self.data_dims)
raise NotImplementedError("multi-band AHI not implemented")
a = dict(self.data_attrs)
a.update(extra_data_attrs)
yield self.p(self._data_name), v, d, a
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment