seviri_l2_grib

180 views
Skip to first unread message

Ty Buckingham

unread,
Feb 24, 2021, 12:45:40 PM2/24/21
to pytroll
Hi all,

Just a quick question as to the timeline for when the seviri_l2_grib reader is going to be implemented? I'm eager to get digging some cloud mask data.

Thanks,
Ty

Raspaud Martin

unread,
Feb 25, 2021, 10:48:29 AM2/25/21
to pyt...@googlegroups.com
Hi,

I'm no expert on the matter, I will ask someone to answer you properly
:)

Best regards,
Martin

cduff65

unread,
Feb 25, 2021, 11:10:07 AM2/25/21
to pytroll

hi Ty,
the seviri_l2_grib reader has already been implemented. Its in the latest version of satpy

any problems then please let me know

Colin Duff

Ty Buckingham

unread,
Mar 11, 2021, 6:54:21 AM3/11/21
to pyt...@googlegroups.com
Hi again,

Thanks for the input so far, but unfortunately I'm still running into a few issues.

First, the seviri_l2_grib reader does not appear in the available_readers() output. I did some digging around the files and found the .yaml file exists but for whatever reason is not being accessed. Is it because I'm on Satpy 0.25.1? Do I need to be on the 0.25.2dev? 

Second, of interest, attempting to load a scene with the reader appears to work, yet the cloud mask data input is not recognised returning 'No supported files found'. However, the cloud mask was downloaded straight through the API and the file name/formatting was unchanged, for example:

MSG1-SEVI-MSGCLMK-0100-0100-20201205120000.000000000Z-NA.grb

I can open the file using xarray and manipulate it from there but ideally loading it as a scene would be better.

Any ideas?

Thanks!
Ty


--
You received this message because you are subscribed to a topic in the Google Groups "pytroll" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pytroll/ly0UWpBcNlw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pytroll+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pytroll/f54b4bd1-24ba-4648-8d2b-34f3e194b022n%40googlegroups.com.

cduff65

unread,
Mar 11, 2021, 7:36:02 AM3/11/21
to pytroll
quick question Ty
do you have the python-eccodes module installed in your virtual or conda environment. this module is not part of the standard satpy installation i believe

Colin

Ty Buckingham

unread,
Mar 11, 2021, 8:44:12 AM3/11/21
to pyt...@googlegroups.com
Aha, that solved the available reader issues. seviri_l2_grib is now showing.

... However, the file still isn't being recognised. 

Thanks,
Ty

cduff65

unread,
Mar 11, 2021, 10:46:44 AM3/11/21
to pytroll
hi

so i am using  0.25.2dev and was able to load, view a MSG CLM grib file with filename convention
 MSG4-SEVI-MSGCLMK-0100-0100-20201216120000.000000000Z-NA.grb
which matches your filename
 MSG1-SEVI-MSGCLMK-0100-0100-20201205120000.000000000Z-NA.grb

so it should work, , i had this working from version 0.23  though.

also post the code you are using to create the scene

Colin

cduff65

unread,
Mar 11, 2021, 10:52:02 AM3/11/21
to pytroll
ah also check , do you have eccodes installed also - there are 2 modules python-eccodes and eccodes 

confusing i now

Colin

Ty Buckingham

unread,
Mar 11, 2021, 1:34:34 PM3/11/21
to pyt...@googlegroups.com
Hi Colin,

Yep, I have both eccodes and python-eccodes installed. The code is as simple as it comes:

import os
import glob
from satpy.scene import Scene

fp = '/path/to/grib/data/'
os.chdir(fp)

grb_fnames = glob.glob('*.grb')

scn_grb = Scene(reader = 'seviri_l2_grib',
                filenames = grb_fnames)

All is good when opening .nat files, it's just the grib I'm having issues with.

Thanks,
Ty

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/fbf7782d-03bb-4914-b06e-2d098aa0620bn%40googlegroups.com.

Ty Buckingham

unread,
Mar 11, 2021, 1:53:08 PM3/11/21
to pyt...@googlegroups.com
Just to add to the mystery, created a fresh environment and when installing Satpy received this warning.

SafetyError: The package for satpy located at /Users/TyBuckingham/opt/anaconda3/pkgs/satpy-0.25.1-pyhd8ed1ab_0

appears to be corrupted. The path 'site-packages/satpy/etc/readers/seviri_l2_grib.yaml'

has an incorrect size.

  reported size: 5188 bytes

  actual size: 5196 bytes


Any ideas?

Thanks,
Ty

Ty Buckingham

unread,
Mar 11, 2021, 2:12:21 PM3/11/21
to pyt...@googlegroups.com
And the full traceback when trying to use the reader, if it helps:

No filenames found for reader: seviri_l2_grib
Don't know how to open the following files: {'MSG1-SEVI-MSGCLMK-0100-0100-20201205120000.000000000Z-NA.grb'}
Traceback (most recent call last):

  File "<ipython-input-5-c403c23ff6b2>", line 1, in <module>
    scn_grb = Scene(reader='seviri_l2_grib',

  File "/Users/TyBuckingham/opt/anaconda3/envs/msg/lib/python3.8/site-packages/satpy/scene.py", line 156, in __init__
    self._readers = self._create_reader_instances(filenames=filenames,

  File "/Users/TyBuckingham/opt/anaconda3/envs/msg/lib/python3.8/site-packages/satpy/scene.py", line 205, in _create_reader_instances
    return load_readers(filenames=filenames,

  File "/Users/TyBuckingham/opt/anaconda3/envs/msg/lib/python3.8/site-packages/satpy/readers/__init__.py", line 514, in load_readers
    raise ValueError("No supported files found")

ValueError: No supported files found

Colin

unread,
Mar 15, 2021, 7:05:18 AM3/15/21
to pyt...@googlegroups.com
hi Ty

yes i see what the problem is now

 the latest release of satpy, 0.25.1,  doesnt contain the file matching string for products containing NA

see satpy/satpy/etc/readers/seviri_l2_grib.yaml

0.25.1
file_patterns:
        - 'CLMEncProd_{start_time:%Y%m%d%H%M%S}Z_00_{server:8s}_{spacecraft:5s}_{scan_mode:3s}_{sub_sat:5s}'
        - '{spacecraft:4s}-SEVI-MSGCLMK-0100-0100-{start_time:%Y%m%d%H%M%S}.000000000Z-{product_creation_time:%Y%m%d%H%M%S}-{ord_num:7s}'
        - '{spacecraft:4s}-SEVI-MSGCLMK-0100-0100-{start_time:%Y%m%d%H%M%S}.000000000Z-{product_creation_time:%Y%m%d%H%M%S}-{ord_num:7s}.grb'

master version, file_patterns: 0.25.2dev
     file_patterns:
        - 'CLMEncProd_{start_time:%Y%m%d%H%M%S}Z_00_{server:8s}_{spacecraft:5s}_{scan_mode:3s}_{sub_sat:5s}'
        - '{spacecraft:4s}-SEVI-MSGCLMK-{id1:4s}-{id2:4s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{product_creation_time:%Y%m%d%H%M%S}-{ord_num:7s}'
        - '{spacecraft:4s}-SEVI-MSGCLMK-{id1:4s}-{id2:4s}-{start_time:%Y%m%d%H%M%S}.000000000Z-{product_creation_time:%Y%m%d%H%M%S}-{ord_num:7s}.grb'
        - '{spacecraft:4s}-SEVI-MSGCLMK-{id1:4s}-{id2:4s}-{start_time:%Y%m%d%H%M%S}.000000000Z-NA.grb'  



so use the master branch  or if you wish you can add this filename pattern to the yaml  if it is urgent

Colin







Ty Buckingham

unread,
Mar 15, 2021, 12:32:56 PM3/15/21
to pyt...@googlegroups.com
Downloading the master branch did the trick! Thanks for all the help.

Ty

Colin

unread,
Mar 15, 2021, 12:53:51 PM3/15/21
to pyt...@googlegroups.com
great news

apologies , should have spotted that sooner

cheers

Colin


Raspaud Martin

unread,
Mar 16, 2021, 3:21:16 AM3/16/21
to pyt...@googlegroups.com
Hi Ty,

Just to let you know that we release satpy 0.26.0 yesterday, the
changes you need should be there.

Best regards,
Martin
> > > > > > > > > https://groups.google.com/d/msgid/pytroll/aa4edeac-91eb-4461-a7dd-5f877e1e1280n%40googlegroups.com
> > > > > > > > > .
> > > > > >
> > > > > > --
> > > > > > 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/fbf7782d-03bb-4914-b06e-2d098aa0620bn%40googlegroups.com
> > > > > > .
> > >
> > > --
> > > 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/CAJmK%3Dc0f7ojDToOS65YB%2BifqexK0i-kbtD0c%2BP7t3tCjRhrcyg%40mail.gmail.com
> > > .
> >
> > --
> > You received this message because you are subscribed to a topic in
> > the Google Groups "pytroll" group.
> > To unsubscribe from this topic, visit
> > https://groups.google.com/d/topic/pytroll/ly0UWpBcNlw/unsubscribe.
> > To unsubscribe from this group and all its topics, send an email to
> > pytroll+u...@googlegroups.com.
> > To view this discussion on the web, visit
> > https://groups.google.com/d/msgid/pytroll/CAA90Ri2U2LMGDzJrJ5%3DB8tZGeJzN%3Dq3ibyfOkO9Cdk7uiQFLnA%40mail.gmail.com
> > .
Reply all
Reply to author
Forward
0 new messages