Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ray Garcia
himawari
Commits
440bbcfd
Commit
440bbcfd
authored
Oct 16, 2017
by
R.K.Garcia
Browse files
only include band dimension on CMI if there are actually multiple bands
parent
da30d031
Changes
1
Hide whitespace changes
Inline
Side-by-side
himawari/ahi2cmi.py
View file @
440bbcfd
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment