Processing MTG Data

39 views
Skip to first unread message

woo...@gmail.com

unread,
Sep 26, 2024, 8:20:08 AMSep 26
to pytroll
Hi

I am trying to process the MTG data and I get the following errors

I am running with Satpy 0.51 and all other packages are up to date

Many thanks

Graham

Traceback (most recent call last):
  File "I:\SPStools\GEOscripts\MTI1-area.py", line 118, in <module>
    height = geo_images(Yea, Mon, Day, Hou, Min, sat, segdir, True, isbulk, 'fci_l1c_nc', composites, area, area_cities,
  File "I:\SPStools\GEOscripts\GEOstuff.py", line 1125, in geo_images
    global_scene.load(fcomposites, generate = False)
  File "C:\Users\graha\miniconda3\envs\pytroll\lib\site-packages\satpy\scene.py", line 1452, in load
    self._update_dependency_tree(needed_datasets, query)
  File "C:\Users\graha\miniconda3\envs\pytroll\lib\site-packages\satpy\scene.py", line 1462, in _update_dependency_tree
    comps, mods = load_compositor_configs_for_sensors(self.sensor_names)
  File "C:\Users\graha\miniconda3\envs\pytroll\lib\site-packages\satpy\composites\config_loader.py", line 305, in load_compositor_configs_for_sensors
    sensor_comps, sensor_mods = load_compositor_configs_for_sensor(sensor_name)[:2]
  File "C:\Users\graha\miniconda3\envs\pytroll\lib\site-packages\satpy\composites\config_loader.py", line 235, in _add_config_path_wrapper
    return _call_without_config_path_wrapper(sensor_name, config_path)
  File "C:\Users\graha\miniconda3\envs\pytroll\lib\site-packages\satpy\composites\config_loader.py", line 229, in _call_without_config_path_wrapper
    return func(sensor_name)
  File "C:\Users\graha\miniconda3\envs\pytroll\lib\site-packages\satpy\composites\config_loader.py", line 281, in load_compositor_configs_for_sensor
    return _load_config(composite_configs)
  File "C:\Users\graha\miniconda3\envs\pytroll\lib\site-packages\satpy\composites\config_loader.py", line 183, in _load_config
    conf = recursive_dict_update(conf, yaml.load(conf_file, Loader=UnsafeLoader))
  File "C:\Users\graha\miniconda3\envs\pytroll\lib\site-packages\yaml\__init__.py", line 81, in load
    return loader.get_single_data()
  File "C:\Users\graha\miniconda3\envs\pytroll\lib\site-packages\yaml\constructor.py", line 51, in get_single_data
    return self.construct_document(node)
  File "C:\Users\graha\miniconda3\envs\pytroll\lib\site-packages\yaml\constructor.py", line 60, in construct_document
    for dummy in generator:
  File "C:\Users\graha\miniconda3\envs\pytroll\lib\site-packages\yaml\constructor.py", line 413, in construct_yaml_map
    value = self.construct_mapping(node)
  File "C:\Users\graha\miniconda3\envs\pytroll\lib\site-packages\yaml\constructor.py", line 218, in construct_mapping
    return super().construct_mapping(node, deep=deep)
  File "C:\Users\graha\miniconda3\envs\pytroll\lib\site-packages\yaml\constructor.py", line 143, in construct_mapping
    value = self.construct_object(value_node, deep=deep)
  File "C:\Users\graha\miniconda3\envs\pytroll\lib\site-packages\yaml\constructor.py", line 102, in construct_object
    data = constructor(self, tag_suffix, node)
  File "C:\Users\graha\miniconda3\envs\pytroll\lib\site-packages\yaml\constructor.py", line 570, in construct_python_name
    return self.find_python_name(suffix, node.start_mark)
  File "C:\Users\graha\miniconda3\envs\pytroll\lib\site-packages\yaml\constructor.py", line 719, in find_python_name
    return super(UnsafeConstructor, self).find_python_name(name, mark, unsafe=True)
  File "C:\Users\graha\miniconda3\envs\pytroll\lib\site-packages\yaml\constructor.py", line 560, in find_python_name
    raise ConstructorError("while constructing a Python object", mark,
yaml.constructor.ConstructorError: while constructing a Python object
cannot find 'CloudTopHeightCompositor' in the module 'satpy.composites.cloud_products'
  in "I:\SPStools\userconfig\composites\fci.yaml", line 330, column 17

Panu Lahtinen

unread,
Sep 26, 2024, 8:23:24 AMSep 26
to pyt...@googlegroups.com
On 26.9.2024 15.20, woo...@gmail.com wrote:
> Hi
>
> I am trying to process the MTG data and I get the following errors

Hi,

What were the commands that resulted in the trace you show below? Which
composites did you load for example?


P
> --
> 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 on the web, visit
> https://groups.google.com/d/msgid/pytroll/cfd2fa38-9d18-4fb6-a6c1-9ce665f6652bn%40googlegroups.com
> <https://groups.google.com/d/msgid/pytroll/cfd2fa38-9d18-4fb6-a6c1-9ce665f6652bn%40googlegroups.com?utm_medium=email&utm_source=footer>.


--
Arctic Space Centre
Finnish Meteorological Institute
Phone: +358 50 380 3261

woo...@gmail.com

unread,
Sep 26, 2024, 8:46:00 AMSep 26
to pytroll
Hi these are the scripts I am running based on files from Ernst Lobsiger
Graham
MTI1-area.py
GEOstuff.py

José Daniel Gómez de Segura

unread,
Sep 26, 2024, 10:13:59 AMSep 26
to pyt...@googlegroups.com
Hi, Graham.
It looks like GEOstuff.py is setting the config directory to a wrong one. That's my guess. Please, check these two lines
# Replace environment variable 'SATPY_CONFIG_PATH'
config.set(config_path = [toodir + '/userconfig'])

tooldir is /home/eumetcast/SPStools in the script.

Regards,

José
Euskalmet

woo...@gmail.com

unread,
Sep 26, 2024, 10:20:15 AMSep 26
to pytroll
Hi Jose

Thanks for your reply

I should have mentioned that I am running the scripts on a Windows PC so the user_config should be pointing to the correct location

I:/SPStools/userconfig

I think it must be because all my other scripts for MSG, GOES16/18 and Himawari work correctly

Warm Wishes

Graham

José Daniel Gómez de Segura

unread,
Sep 26, 2024, 10:30:46 AMSep 26
to pyt...@googlegroups.com
Ok, sorry and thank you, because I've just started to play with MTG from the DataStore and I may need the same scripts.

By the way, don't download the Q1 chunk with eumdac unless you want South Africa (or Q4 for Europe). The docs are... 'inverted'. :-)

Regards,

José

woo...@gmail.com

unread,
Sep 26, 2024, 11:58:29 AMSep 26
to pytroll
Hi all

Its working now - there must have been a problem with my composite file
 Warm wishes

Graham
Reply all
Reply to author
Forward
0 new messages