From cbc872eac0f0c6474c46953612c6478156e92582 Mon Sep 17 00:00:00 2001 From: Panu Lahtinen Date: Mon, 11 Nov 2024 15:48:34 +0200 Subject: [PATCH] Fix data masking to preserve dtype --- satpy/readers/mersi_l1b.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/satpy/readers/mersi_l1b.py b/satpy/readers/mersi_l1b.py index 5b1a960031..a6db73bee5 100644 --- a/satpy/readers/mersi_l1b.py +++ b/satpy/readers/mersi_l1b.py @@ -182,7 +182,7 @@ def _mask_data(self, data, dataset_id, attrs): attrs["_FillValue"] = fill_value new_fill = data.dtype.type(fill_value) else: - new_fill = np.nan + new_fill = np.float32(np.nan) try: # Due to a bug in the valid_range upper limit in the 10.8(24) and 12.0(25) # in the HDF data, this is hardcoded here.