Custom configurations - satpy

44 views
Skip to first unread message

B. Schitter

unread,
Oct 15, 2024, 6:50:51 AM10/15/24
to pytroll
Hello,

I created some custom composites, areas, ...

I stored this files in the following files/directories:

/usr/local/lib/python3.9/site-packages/satpy/etc_custom/areas.yaml
/usr/local/lib/python3.9/site-packages/satpy/etc_custom/composites/seviri.yaml
/usr/local/lib/python3.9/site-packages/satpy/etc_custom/composites/visir.yaml
/usr/local/lib/python3.9/site-packages/satpy/etc_custom/enhancements/generic.yaml

Then I set the environment variable $SATPY_CONFIG_PATH to /usr/local/lib/python3.9/site-packages/satpy/etc_custom/

When I start my script I get the error "KeyError: "Unknown Datasets: {dataQuery(name='mycustomcomposite')}'

I also tried to copy the files areas.yaml, seviri.yaml, visir.yaml and generic.yaml into the original installation directory (below etc), but I get the same error.

What have I forgotten?

Best regards,
Bernhard

Raspaud Martin

unread,
Oct 15, 2024, 7:08:50 AM10/15/24
to pytroll
Hello Bernhard,

I would advise against having your custom files in central directories, it's better practice to have them in the user's home somewhere. This way, it's easier to change (permissions, etc), and if something goes wrong it does not destroy the installation.

Now, onto you problem. First, make sure the general composites work. As you may have changed the central config files, I would be very careful to make sure the stock composites all work, if you don't want to make a clean install.
Second, start with one custom composite, and using SATPY_CONFIG_PATH, check if it is found. Once this is confirmed, go on and add the others. If it doesn't work, make sure the dependencies of your composites are meat by the data.

If it still doesn't work, don't hesitate to create a minimal example for us to look at and try.

Best regards,
Martin


________________________________________
From: pyt...@googlegroups.com <pyt...@googlegroups.com> on behalf of B. Schitter <bernhard...@gmail.com>
Sent: 15 October 2024 12:50:51
To: pytroll
Subject: [pytroll] Custom configurations - satpy
--
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 on the web, visit https://groups.google.com/d/msgid/pytroll/4a2bf5b6-a672-428a-ad42-c33b43f381d6n%40googlegroups.com<https://groups.google.com/d/msgid/pytroll/4a2bf5b6-a672-428a-ad42-c33b43f381d6n%40googlegroups.com?utm_medium=email&utm_source=footer>.

B. Schitter

unread,
Oct 15, 2024, 9:17:04 AM10/15/24
to pytroll
Dear Martin,

thank you for your answer.

I changed the location of the custom configs - it's a good idea.

For my old MSG-Processing I had modifications in seviri.yaml and visir.yaml for some products that I want  to have also for MTG, so I copied this files.

But because I use the fci_l1c_nc reader I think I have to use the fci.yaml file for modifications - is this correct?

For MSG-Processing I had prerequisites HRV, IR_108, IR_016 in my definitions - what are the equivalents for MTG / fci?

Should my custom config contain only my changes or the default config + custom config?

Best regards,
Bernhard

Raspaud Martin

unread,
Oct 16, 2024, 3:06:31 AM10/16/24
to pytroll
Dear Bernhard,

Yes, fci is different, so look at the fci.yaml file in the satpy repo, that should give you all you need to start building your own composites.
You don't need to copy the existing composites though, having just the new one should just work.

Best regards,
Martin
________________________________________
From: pyt...@googlegroups.com <pyt...@googlegroups.com> on behalf of B. Schitter <bernhard...@gmail.com>
Sent: 15 October 2024 15:17:03
To: pytroll
Subject: Re: [pytroll] Custom configurations - satpy
To view this discussion on the web, visit https://groups.google.com/d/msgid/pytroll/aabff4c2-a915-4cad-9c48-fc556df32f1en%40googlegroups.com<https://groups.google.com/d/msgid/pytroll/aabff4c2-a915-4cad-9c48-fc556df32f1en%40googlegroups.com?utm_medium=email&utm_source=footer>.

B. Schitter

unread,
Oct 17, 2024, 2:21:09 AM10/17/24
to pytroll
Dear Martin,

thank's for the answer, I could define some products for fci :-)

Best regards,
Bernhard
Reply all
Reply to author
Forward
0 new messages