Problem with dataset 'geo_color'

54 views
Skip to first unread message

B. Schitter

unread,
Jul 14, 2025, 5:21:53 AMJul 14
to pytroll
Hi,

I tried with a very simple script (see attached file) to calculate the product 'geo_color'.

I can load the dataset 'geo_color' but when I do a resample I get the following message:

/opt/met-mtg/lib64/python3.12/site-packages/satpy/readers/generic_image.py:83: UserWarning: The specified chunks separate the stored chunks along dimension "x" starting at index 4096. This could degrade performance. Instead, consider rechunking after loading.
  data = xr.open_dataset(self.finfo["filename"], engine="rasterio",
cannot convert float NaN to integer
rsr data may not be up to date: /opt/met-mtg/share/pyspectral/rsr_fci_Meteosat-12.h5
The following datasets were not created and may require resampling to be generated: DataID(name='geo_color')


How can I calculate the dataset 'geo_color' correctly?

When I do the same with 'dust', 'airmass', ... I don't get this message.

Regards,
Bernhard


B. Schitter

unread,
Jul 14, 2025, 5:23:13 AMJul 14
to pytroll
Here the script.
satpy_test.py

Andrea Meraner

unread,
Jul 14, 2025, 10:31:04 AMJul 14
to pytroll
Hi Bernhard, 

you are likely encountering the issue as described here: https://github.com/pytroll/satpy/issues/2733 
The solution is to use generate=True, or to resample twice the composite - check which one is faster for your use case.

Cheers, 
Andrea

Holl Gerrit

unread,
Jul 14, 2025, 10:51:56 AMJul 14
to pytroll
Hi Bernhard,

as the message says, you need to resample after the load call:

ls = sc.resample(resampler="native")

You get this message because geo color combines channels with different resolutions, and it needs to resample them onto a common grid in order to calculate the composite.

Regards,
Gerrit.

--
Remote Sensing Application Development
Research and development
Deutscher Wetterdienst (DWD)
+49 (69) 8062-3171

________________________________________
From: pyt...@googlegroups.com <pyt...@googlegroups.com> on behalf of B. Schitter <bernhard...@gmail.com>
Sent: 14 July 2025 11:21:53
To: pytroll
Subject: [pytroll] Problem with dataset 'geo_color'
--
You received this message because you are subscribed to the Google Groups "pytroll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pytroll+u...@googlegroups.com<mailto:pytroll+u...@googlegroups.com>.
To view this discussion, visit https://groups.google.com/d/msgid/pytroll/15ae93b0-323d-4e26-a25b-7f169c0a0f8bn%40googlegroups.com<https://groups.google.com/d/msgid/pytroll/15ae93b0-323d-4e26-a25b-7f169c0a0f8bn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Johan Strandgren

unread,
Jul 14, 2025, 10:52:30 AMJul 14
to pyt...@googlegroups.com
Hi Bernard,

The message you get is expected for geo_color since it uses two static global files (land water mask and NASA black marble with citylights) in the background that have to be resampled. However, you do resample after the loading so in principle it should work. Did you try to save the image and actually get an error? Because the error message you get is from the load call, but should be fixed by the following resample call.

Cheers,
Johan

--
You received this message because you are subscribed to the Google Groups "pytroll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pytroll+u...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/pytroll/9eb22356-1b7a-46e6-aeda-5482bd91f860n%40googlegroups.com.


--

B. Schitter

unread,
Jul 14, 2025, 5:07:17 PMJul 14
to pytroll
Dear Andrea, Gerrit and Johan,

thank you very much for your help - now I can create the image.

Kind regards,
Bernhard
Message has been deleted
Message has been deleted

B. Schitter

unread,
Jul 16, 2025, 7:12:20 AMJul 16
to pytroll
Hi again,

I am experimenting a little bit with all available datasets.

During processing "true_color_reproduction" I get the following error:

KeyError: 'No conversion matrix found for platform Meteosat-12'

What does this mean?

FYI: I am working on an offline machine with no connection to the internet. I set the environment variables PSP_CONFIG_FILE and SATPY_DATA_DIR pointing to local directories.

Kind regards,
Bernhard

Andrea Meraner

unread,
Jul 16, 2025, 8:41:45 AMJul 16
to pytroll
Hi Bernhard, 

I believe you found a bug: in this dictionary we still use `mtg-i1` even though the platform is now `meteosat-12`  https://github.com/pytroll/satpy/blob/main/satpy/enhancements/__init__.py#L640

I will try to do a PR for the fix. In the meanwhile, as a hotfix, you can try to modify that file in your environment manually if you want to test it.

Cheers, 
Andrea

B. Schitter

unread,
Jul 16, 2025, 9:24:45 AMJul 16
to pytroll
Dear Andrea,

thank you for the answer. The modification in my environment works for me at the moment :-)

The last dataset on which I have "problems" is the "simple_fci_fire_mask". I can load and resample, but when I try to save the image (png) it I get a TypeError (see attachment).

Kind regards,
Bernhard
simple_fci_fire_mask.txt

Andrea Meraner

unread,
Jul 16, 2025, 9:51:40 AMJul 16
to pytroll
Hi Bernhard, 

good to hear! 
Interesting, I never tried to save that composite by itself - it is a binary mask that is used to identify fires during the generation of the "true_color_flames_with_night_ir105" composite. The fact that it is boolean is probably causing the issue - I will look into it. However it is not meant to be used by itself but it's rather only a component of the other dataset, so you can just ignore it.

Cheers, 
Andrea 
Reply all
Reply to author
Forward
0 new messages