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
097076bc
Commit
097076bc
authored
Oct 20, 2017
by
R.K.Garcia
Browse files
fix for redundant band_id and band_wavelength
parent
4a4a323b
Changes
1
Hide whitespace changes
Inline
Side-by-side
himawari/ahi2cmi.py
View file @
097076bc
...
...
@@ -478,7 +478,7 @@ class HimawariAHIasCMIP(object):
geospatial_lat_lon_extent:geospatial_lon_units = "degrees_east" ;
"""
def
pvda_misc
(
self
):
def
pvda_misc
(
self
,
as_cmi
=
False
):
band
=
np
.
array
([
self
.
_hs
.
band
],
dtype
=
np
.
uint8
)
a
=
dict
(
...
...
@@ -495,7 +495,7 @@ class HimawariAHIasCMIP(object):
)
bwl_um
=
self
.
_hs
.
metadata
.
central_wavelength
/
1e6
bwl
=
np
.
array
([
bwl_um
],
dtype
=
np
.
float32
)
yield
self
.
p
(
'band_
id
'
),
b
and
,
self
.
d
(
DEFAULT_BAND_DIM_NAME
),
a
yield
self
.
p
(
'band_
wavelength
'
),
b
wl
,
self
.
d
(
DEFAULT_BAND_DIM_NAME
),
a
def
lat_lon_to_l_c
(
self
,
lat
,
lon
,
round
=
True
):
"""
...
...
@@ -540,11 +540,11 @@ class HimawariAHIasCMIP(object):
yield
self
.
p
(
self
.
_projection_name
),
np
.
int32
(
0
),
{},
self
.
nav
# band_wavelength in µm
yield
self
.
p
(
'band_wavelength'
),
np
.
float64
(
self
.
central_wavelength
),
{},
{}
#
yield self.p('band_wavelength'), np.float64(self.central_wavelength), {}, {}
# band number, primarily for CMI
if
as_cmi
:
yield
self
.
p
(
'band_id'
),
np
.
array
([
self
.
band
],
dtype
=
np
.
int8
),
OrderedDict
({
BAND_ID_DIM
:
gdims
[
BAND_ID_DIM
]}),
{}
#
if as_cmi:
#
yield self.p('band_id'), np.array([self.band], dtype=np.int8), OrderedDict({BAND_ID_DIM: gdims[BAND_ID_DIM]}), {}
# y and x variables and friends
for
each
in
self
.
pvda_yx
():
...
...
@@ -553,7 +553,7 @@ class HimawariAHIasCMIP(object):
yield
each
# misc
for
each
in
self
.
pvda_misc
():
for
each
in
self
.
pvda_misc
(
as_cmi
=
as_cmi
):
assert
(
len
(
each
)
==
4
)
yield
each
...
...
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