Skip to content

Commit

Permalink
Fix pps format output for msg products.
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 Jun 3, 2015
1 parent 8bd9f56 commit 18239e8
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions mpop/satin/msg_hdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def convert2pps(self):
('lat_ts', '<f4'),
('id', 'S64'),
('name', 'S64'),
('pcs_id', 'S128'),
('pcs_id', 'S64'),
('pcs_def', 'S128')])

region = np.zeros((1, ), dtype=region_type)
Expand All @@ -446,6 +446,9 @@ def convert2pps(self):
retv.region.data = region
retv._keys.append("region")

retv.Region = region_type
retv._keys.append("Region")

retv._md["satellite"] = self.satid
retv._md["time_slot"] = self.nominal_product_time

Expand All @@ -457,8 +460,14 @@ def convert2pps(self):
retv.PALETTE.info["PAL_VERSION"] = np.string_("1.2")
retv._keys.append("PALETTE")

namelist = np.dtype([('desc', 'S128')])
retv.OutputValueNameList = namelist
retv._keys.append("OutputValueNameList")

retv.cloudtype = InfoObject()
retv.cloudtype.info["output_value_nameslist"] = ctype_lut
#retv.cloudtype.info["output_value_namelist"] = ctype_lut
retv.cloudtype.info["output_value_namelist"] = np.zeros((21, ),
dtype=namelist)
retv.cloudtype.info["CLASS"] = np.string_("IMAGE")
retv.cloudtype.info["IMAGE_VERSION"] = np.string_("1.2")
retv._refs[("cloudtype", "PALETTE")] = np.string_("PALETTE")
Expand Down

0 comments on commit 18239e8

Please sign in to comment.