Skip to content

Commit

Permalink
Add \0 to palette strings.
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 4, 2015
1 parent 18239e8 commit 061a2fa
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions mpop/satin/msg_hdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,23 +454,23 @@ def convert2pps(self):

retv.PALETTE = InfoObject()
retv.PALETTE.data = old_ctype_palette_data()
retv.PALETTE.info["CLASS"] = np.string_("PALETTE")
retv.PALETTE.info["PAL_COLORMODEL"] = np.string_("RGB")
retv.PALETTE.info["PAL_TYPE"] = np.string_("STANDARD8")
retv.PALETTE.info["PAL_VERSION"] = np.string_("1.2")
retv.PALETTE.info["CLASS"] = np.string_("PALETTE\0")
retv.PALETTE.info["PAL_COLORMODEL"] = np.string_("RGB\0")
retv.PALETTE.info["PAL_TYPE"] = np.string_("STANDARD8\0")
retv.PALETTE.info["PAL_VERSION"] = np.string_("1.2\0")
retv._keys.append("PALETTE")

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

retv.cloudtype = InfoObject()
#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")
retv.cloudtype.info["CLASS"] = np.string_("IMAGE\0")
retv.cloudtype.info["IMAGE_VERSION"] = np.string_("1.2\0")
retv._refs[("cloudtype", "PALETTE")] = np.string_("PALETTE\0")
retv.cloudtype.info["description"] = np.string_(
"MSG SEVIRI Cloud Type")
retv.cloudtype.data = self.cloudtype.astype('B')
Expand Down

0 comments on commit 061a2fa

Please sign in to comment.