Skip to content

Commit

Permalink
Fix bug of setting shape to viirs reader using foreign band name
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Raspaud <martin.raspaud@smhi.se>
  • Loading branch information
mraspaud committed Aug 29, 2016
1 parent 4320f3d commit 587de34
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mpop/satin/viirs_sdr.py
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,10 @@ def load(self, satscene, calibrate=1, time_interval=None,

satscene[chn].area.area_id = area_name
satscene[chn].area_id = area_name

if self.shape is None:
self.shape = band.data.shape

# except ImportError:
# satscene[chn].area = None
# satscene[chn].lat = np.ma.array(band.latitude, mask=band.data.mask)
Expand All @@ -846,8 +850,6 @@ def load(self, satscene, calibrate=1, time_interval=None,

ViirsGeolocationData.clear_cache()

self.shape = satscene[chn].data.shape

# Compulsory global attribudes
satscene.info["title"] = (satscene.satname.capitalize() +
" satellite, " +
Expand Down

0 comments on commit 587de34

Please sign in to comment.