EPS Second Generation (VII-L1B) Problem

19 views
Skip to first unread message

lobsiger...@gmail.com

unread,
Jan 26, 2022, 10:08:04 AMJan 26
to pytroll
Hi all,

I downloaded the latest test data for EPSSG_METimage (VII_L1B) from


and took the following code with an updated SatPy 0.33.1 install


The first problem was filenames with upercase like
W_XX-EUMETSAT-Darmstadt,SAT,SGA1-VII-1B-RAD_C_EUMT_20210415141529_G_D_20070912102404_20070912102504_T_B____.nc

I added a corresponding file pattern to a local vii_l1b_nc.yaml
..., 'W_XX-EUMETSAT-Darmstadt,SAT,{spacecraft_name:s}-VII-1B-RAD_C_EUMT_{creation_time:%Y%m%d%H%M%S}_{mission_type:s}_{environment:s}_{sensing_start_time:%Y%m%d%H%M%S}_{sensing_end_time:%Y%m%d%H%M%S}_{disposition_mode:s}_{processing_mode:s}____.nc']

But I didn't get far. When I start the code with debug on it has a problem with tie-points:

(pytroll) eumetcast@luna:~/EMCtools$ python ./eps2g.py
[DEBUG: 2022-01-26 14:31:55 : satpy.readers.yaml_reader] Reading ('/home/eumetcast/miniconda3/envs/pytroll/lib/python3.9/site-packages/satpy/etc/readers/vii_l1b_nc.yaml', '/home/eumetcast/EMCtools/pppconfig/readers/vii_l1b_nc.yaml')
[DEBUG: 2022-01-26 14:31:56 : satpy.readers.yaml_reader] Assigning to vii_l1b_nc: ['/home/eumetcast/VII_L1B/orbit12/W_XX-EUMETSAT-Darmstadt,SAT,SGA1-VII-1B-RAD_C_EUMT_20210315090216_G_D_20070912102203_20070912102303_T_B____.nc']
Traceback (most recent call last):
  File "/home/eumetcast/EMCtools/./eps2g.py", line 11, in <module>
    scn = Scene(filenames=filenames, reader='vii_l1b_nc')
  File "/home/eumetcast/miniconda3/envs/pytroll/lib/python3.9/site-packages/satpy/scene.py", line 106, in __init__
    self._readers = self._create_reader_instances(filenames=filenames,
  File "/home/eumetcast/miniconda3/envs/pytroll/lib/python3.9/site-packages/satpy/scene.py", line 127, in _create_reader_instances
    return load_readers(filenames=filenames,
  File "/home/eumetcast/miniconda3/envs/pytroll/lib/python3.9/site-packages/satpy/readers/__init__.py", line 569, in load_readers
    reader_instance.create_filehandlers(
  File "/home/eumetcast/miniconda3/envs/pytroll/lib/python3.9/site-packages/satpy/readers/yaml_reader.py", line 613, in create_filehandlers
    filehandlers = self._new_filehandlers_for_filetype(filetype_info,
  File "/home/eumetcast/miniconda3/envs/pytroll/lib/python3.9/site-packages/satpy/readers/yaml_reader.py", line 601, in _new_filehandlers_for_filetype
    return list(filtered_iter)
  File "/home/eumetcast/miniconda3/envs/pytroll/lib/python3.9/site-packages/satpy/readers/yaml_reader.py", line 569, in filter_fh_by_metadata
    for filehandler in filehandlers:
  File "/home/eumetcast/miniconda3/envs/pytroll/lib/python3.9/site-packages/satpy/readers/yaml_reader.py", line 510, in _new_filehandler_instances
    yield filetype_cls(filename, filename_info, filetype_info, *req_fh, **fh_kwargs)
  File "/home/eumetcast/miniconda3/envs/pytroll/lib/python3.9/site-packages/satpy/readers/vii_l1b_nc.py", line 42, in __init__
    super().__init__(filename, filename_info, filetype_info, **kwargs)
  File "/home/eumetcast/miniconda3/envs/pytroll/lib/python3.9/site-packages/satpy/readers/vii_base_nc.py", line 58, in __init__
    self.longitude, self.latitude = self._perform_geo_interpolation(longitude, latitude)
  File "/home/eumetcast/miniconda3/envs/pytroll/lib/python3.9/site-packages/satpy/readers/vii_base_nc.py", line 155, in _perform_geo_interpolation
    interpolated_longitude, interpolated_latitude = tie_points_geo_interpolation(
  File "/home/eumetcast/miniconda3/envs/pytroll/lib/python3.9/site-packages/geotiepoints/viiinterpolator.py", line 139, in tie_points_geo_interpolation
    interp_x, interp_y, interp_z = tie_points_interpolation([x, y, z],
  File "/home/eumetcast/miniconda3/envs/pytroll/lib/python3.9/site-packages/geotiepoints/viiinterpolator.py", line 59, in tie_points_interpolation
    raise ValueError("The number of tie points in the along-route dimension must be a multiple of %d",
ValueError: ('The number of tie points in the along-route dimension must be a multiple of %d', 4)



This *seems* to indicate 'The number of tie points in the along-route dimension must be a multiple of 4' ??

A "ncdump -h" of such a W_XX-EUMETSAT-Darmstad*.nc  (1-Minute segment) shows:
...
  group: measurement_data {
    dimensions:
        zone_size_act = 8 ;
        zone_size_alt = 8 ;
        num_tie_points_act = 394 ;
        num_tie_points_alt = 140 ;
    variables:
        int latitude(num_tie_points_alt, num_tie_points_act) ;
                latitude:_FillValue = -2097152 ;
                string latitude:long_name = "Latitude on world geodetic system 1984 ellipsoid using tie points" ;

...
In any case "num_tie_points_alt = 140" (alt = along track) is a multiple of 4 !!


The code that throws the error is here:
...
    # Check that the number of tie points along track is multiple of the number of tie points per scan
    if n_tie_alt % scan_alt_tie_points != 0:
        raise ValueError("The number of tie points in the along-route dimension must be a multiple of %d",
                         scan_alt_tie_points)
...



Any ideas? What to try next?

Best regards
Ernst


lobsiger...@gmail.com

unread,
Jan 27, 2022, 8:07:04 AMJan 27
to pytroll
Hi,

it's me again. Just before I wanted to test in the code, whether EUMETSAT has changed the order of alt- and act-tie-points I found this:


and indeed it seems they did it. So I will try to change just this order first and then probably have to wait for the PR to make it into Satpy.

Best regards,
Ernst

Andrea Meraner

unread,
Jan 27, 2022, 8:27:53 AMJan 27
to pytroll
Hi Ernst,

thank you for trying out the new test data and readers and reporting this! 
The problems you are encountering are related to the fact that the current reader cannot be used with the new v2 test data. There is already a Satpy PR to update the reader (https://github.com/pytroll/satpy/pull/1979), currently awaiting review.

Cheers, 
Andrea

lobsiger...@gmail.com

unread,
Jan 27, 2022, 11:39:20 AMJan 27
to pytroll
Hi Andrea,

our posts crossed. I adapted 3 lines changing the order of alt versus act and made some first images (sort of).
PyTROLL/Satpy complained a lot but I finally got some rather dark *.png(s) . The problem that remains is that
resampling swath data does not work west of 0° longitude. I'm waiting for the updated EPS 2G VII driver now.

Cheers,
Ernst
vii_668_westminster.png
vii_668_switzerland.png
vii_668_swath.png

Andrea Meraner

unread,
Jan 27, 2022, 11:51:26 AMJan 27
to pytroll
Hi Ernst, 

great to see that you were still able to get some images out. Regarding the data west of the 0 meridian: we identified that issue already, it's enough to comment out these 2 lines in the reader as a quickfix: https://github.com/pytroll/satpy/blob/3e94d59bad6f89306b19306f2e46b73df0e21d7b/satpy/readers/vii_base_nc.py#L106-L107

Cheers, 
Andrea

lobsiger...@gmail.com

unread,
Jan 27, 2022, 2:23:17 PMJan 27
to pytroll
Hi Andrea,

thanks for the hint. Not yet perfect, but much better now ...

Cheers,
Ernst
SGA1-20220127-DAY-0000-vii_668-isleofman.jpg
SGA1-20220127-DAY-0000-vii_668-westminster.jpg
Reply all
Reply to author
Forward
0 new messages