pytroll / satpy

Python package for earth-observing satellite data processing
http://satpy.readthedocs.org/en/latest/
GNU General Public License v3.0
1.06k stars 292 forks source link

seviri_l1b_native reader issue with reading remote files (azure) #2463

Closed simonalbergel closed 1 year ago

simonalbergel commented 1 year ago

Hello, thank for the great work the package is very useful. I am quite new to working with remote storage.

I am currently working with Eumetsat's geostationary imagery, in particular the product : EO_EUM_DAT_MSG_HRSEVIRI.

I have data both in HRIT and native .nat file formats that I read from a remote azure blob storage. Passing in URI for remote reading HRIT files is no issue, but I can't seem to open any .Nat files this way.

hrit_uri_path = [
'azureml://subscriptions/{...}/datastores/cmv_eumetsat/paths/eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__',
'azureml://subscriptions/{...}/datastores/cmv_eumetsat/paths/eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_016___-000002___-202303201200-__',
'azureml://subscriptions/{...}/datastores/cmv_eumetsat/paths/eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_016___-000003___-202303201200-__',
...
]

# Works perfectly
severi_scene = satpy.Scene(
    reader='seviri_l1b_hrit', 
    filenames = hrit_uri_path 
)

---------------

nat_uri_path = ['azureml://subscriptions/{...}/datastores/cmv_eumetsat/paths/eumetsat_nat/EO_EUM_DAT_MSG_HRSEVIRI/20230504074242/MSG3-SEVI-MSG15-0100-NA-20230504074242.069000000Z-NA.nat']

# Does not work, FileNotFoundError, full error below
severi_scene = satpy.Scene(
    reader='seviri_l1b_native', 
    filenames = nat_uri_path 
    )

I am sure the file does exist :

from azureml.fsspec import AzureMachineLearningFileSystem

fs_nat = AzureMachineLearningFileSystem("azureml://subscriptions/{...}/datastores/cmv_eumetsat/paths/eumetsat_nat/")

# returns True
fs_nat.exists('eumetsat_nat/EO_EUM_DAT_MSG_HRSEVIRI/20230504074242/MSG3-SEVI-MSG15-0100-NA-20230504074242.069000000Z-NA.nat')

Downloading and locally read the data works.

Actual results

For HRIT reading (working as expected):

DEBUG:satpy.readers.yaml_reader:Reading ('/home/azureuser/anaconda3/envs/pyaml4/lib/python3.9/site-packages/satpy/etc/readers/seviri_l1b_hrit.yaml',)
[DEBUG: 2023-05-04 13:56:10 : satpy.readers.yaml_reader] Reading ('/home/azureuser/anaconda3/envs/pyaml4/lib/python3.9/site-packages/satpy/etc/readers/seviri_l1b_hrit.yaml',)
DEBUG:satpy.readers.yaml_reader:Assigning to seviri_l1b_hrit: [<FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_016___-000005___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_016___-000006___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_016___-000008___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_016___-000002___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_016___-000003___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_016___-000004___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_016___-000007___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_039___-000002___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_039___-000008___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_039___-000001___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_039___-000004___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_039___-000006___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_039___-000007___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_039___-000003___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_039___-000005___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_087___-000006___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_087___-000008___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_087___-000007___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_087___-000002___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_087___-000003___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_087___-000001___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_087___-000005___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_087___-000004___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_097___-000008___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_097___-000001___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_097___-000006___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_097___-000007___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_097___-000002___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_097___-000004___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_097___-000003___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_097___-000005___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_108___-000003___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_108___-000006___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_108___-000008___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_108___-000004___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_108___-000005___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_108___-000001___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_108___-000007___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_108___-000002___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_120___-000007___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_120___-000004___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_120___-000006___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_120___-000008___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_120___-000001___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_120___-000002___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_120___-000005___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_120___-000003___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_134___-000004___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_134___-000005___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_134___-000002___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_134___-000008___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_134___-000007___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_134___-000006___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_134___-000003___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_134___-000001___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS006___-000004___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS006___-000006___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS006___-000002___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS006___-000001___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS006___-000007___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS006___-000005___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS006___-000008___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS006___-000003___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS008___-000005___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS008___-000002___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS008___-000007___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS008___-000001___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS008___-000008___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS008___-000004___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS008___-000003___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS008___-000006___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_062___-000003___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_062___-000005___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_062___-000008___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_062___-000007___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_062___-000002___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_062___-000006___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_062___-000001___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_062___-000004___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_073___-000008___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_073___-000001___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_073___-000003___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_073___-000007___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_073___-000004___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_073___-000005___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_073___-000006___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_073___-000002___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-_________-PRO______-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-_________-EPI______-202303201200-__">]
[DEBUG: 2023-05-04 13:56:10 : satpy.readers.yaml_reader] Assigning to seviri_l1b_hrit: [<FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_016___-000005___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_016___-000006___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_016___-000008___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_016___-000002___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_016___-000003___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_016___-000004___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_016___-000007___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_039___-000002___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_039___-000008___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_039___-000001___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_039___-000004___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_039___-000006___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_039___-000007___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_039___-000003___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_039___-000005___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_087___-000006___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_087___-000008___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_087___-000007___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_087___-000002___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_087___-000003___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_087___-000001___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_087___-000005___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_087___-000004___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_097___-000008___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_097___-000001___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_097___-000006___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_097___-000007___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_097___-000002___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_097___-000004___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_097___-000003___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_097___-000005___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_108___-000003___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_108___-000006___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_108___-000008___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_108___-000004___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_108___-000005___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_108___-000001___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_108___-000007___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_108___-000002___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_120___-000007___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_120___-000004___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_120___-000006___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_120___-000008___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_120___-000001___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_120___-000002___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_120___-000005___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_120___-000003___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_134___-000004___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_134___-000005___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_134___-000002___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_134___-000008___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_134___-000007___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_134___-000006___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_134___-000003___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-IR_134___-000001___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS006___-000004___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS006___-000006___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS006___-000002___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS006___-000001___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS006___-000007___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS006___-000005___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS006___-000008___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS006___-000003___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS008___-000005___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS008___-000002___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS008___-000007___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS008___-000001___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS008___-000008___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS008___-000004___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS008___-000003___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-VIS008___-000006___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_062___-000003___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_062___-000005___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_062___-000008___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_062___-000007___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_062___-000002___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_062___-000006___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_062___-000001___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_062___-000004___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_073___-000008___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_073___-000001___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_073___-000003___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_073___-000007___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_073___-000004___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_073___-000005___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_073___-000006___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-WV_073___-000002___-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-_________-PRO______-202303201200-__">, <FSFile "eumetsat_hrit/H-000-MSG4__-MSG4________-IR_016___-000001___-202303201200-__/H-000-MSG4__-MSG4________-_________-EPI______-202303201200-__">]
INFO:hrit_msg:No IMPF configuration field found in prologue.
[INFO: 2023-05-04 13:56:12 : hrit_msg] No IMPF configuration field found in prologue.

For native reading, not working as intended:

DEBUG:satpy.readers.yaml_reader:Reading ('/home/azureuser/anaconda3/envs/pyaml4/lib/python3.9/site-packages/satpy/etc/readers/seviri_l1b_native.yaml',)
[DEBUG: 2023-05-04 13:55:13 : satpy.readers.yaml_reader] Reading ('/home/azureuser/anaconda3/envs/pyaml4/lib/python3.9/site-packages/satpy/etc/readers/seviri_l1b_native.yaml',)
DEBUG:satpy.readers.yaml_reader:Assigning to seviri_l1b_native: [<FSFile "eumetsat_nat/EO_EUM_DAT_MSG_HRSEVIRI/20230504074242/MSG3-SEVI-MSG15-0100-NA-20230504074242.069000000Z-NA.nat">]
[DEBUG: 2023-05-04 13:55:13 : satpy.readers.yaml_reader] Assigning to seviri_l1b_native: [<FSFile "eumetsat_nat/EO_EUM_DAT_MSG_HRSEVIRI/20230504074242/MSG3-SEVI-MSG15-0100-NA-20230504074242.069000000Z-NA.nat">]
Output exceeds the [size limit](command:workbench.action.openSettings?%5B%22notebook.output.textLineLimit%22%5D). Open the full output data [in a text editor](command:workbench.action.openLargeOutput?e62a71c0-e202-4c4a-8015-00e7e8619337)---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
Cell In[14], line 1
----> 1 severi_scene = satpy.Scene(
      2     reader='seviri_l1b_native', 
      3     filenames = naturi
      4     )

File [~/anaconda3/envs/pyaml4/lib/python3.9/site-packages/satpy/scene.py:133](https://vscode-remote+amlext-002b2f737562736372697074696f6e732f65653931356665302d343936352d343961342d383238662d3735383266313833323361352f7265736f7572636547726f7570732f656d702d6465762f70726f7669646572732f4d6963726f736f66742e4d616368696e654c6561726e696e6753657276696365732f776f726b7370616365732f656d702d6465762d6d6c2f636f6d70757465732f73612d736f6c61722d636d76.vscode-resource.vscode-cdn.net/home/azureuser/cloudfiles/code/Users/Simon.Albergel/ds-solar-cmv-datascience/notebooks/~/anaconda3/envs/pyaml4/lib/python3.9/site-packages/satpy/scene.py:133), in Scene.__init__(self, filenames, reader, filter_parameters, reader_kwargs)
    130 if filenames:
    131     filenames = convert_remote_files_to_fsspec(filenames, storage_options)
--> 133 self._readers = self._create_reader_instances(filenames=filenames,
    134                                               reader=reader,
    135                                               reader_kwargs=cleaned_reader_kwargs)
    136 self._datasets = DatasetDict()
    137 self._wishlist = set()

File [~/anaconda3/envs/pyaml4/lib/python3.9/site-packages/satpy/scene.py:154](https://vscode-remote+amlext-002b2f737562736372697074696f6e732f65653931356665302d343936352d343961342d383238662d3735383266313833323361352f7265736f7572636547726f7570732f656d702d6465762f70726f7669646572732f4d6963726f736f66742e4d616368696e654c6561726e696e6753657276696365732f776f726b7370616365732f656d702d6465762d6d6c2f636f6d70757465732f73612d736f6c61722d636d76.vscode-resource.vscode-cdn.net/home/azureuser/cloudfiles/code/Users/Simon.Albergel/ds-solar-cmv-datascience/notebooks/~/anaconda3/envs/pyaml4/lib/python3.9/site-packages/satpy/scene.py:154), in Scene._create_reader_instances(self, filenames, reader, reader_kwargs)
    149 def _create_reader_instances(self,
    150                              filenames=None,
    151                              reader=None,
    152                              reader_kwargs=None):
    153     """Find readers and return their instances."""
--> 154     return load_readers(filenames=filenames,
    155                         reader=reader,
...
    125 ascii_startswith = b'FormatName                  : NATIVE'
--> 126 with open(self.filename, mode='rb') as istream:
    127     return istream.read(36) == ascii_startswith

FileNotFoundError: [Errno 2] No such file or directory: 'eumetsat_nat/EO_EUM_DAT_MSG_HRSEVIRI/20230504074242/MSG3-SEVI-MSG15-0100-NA-20230504074242.069000000Z-NA.nat'

Thank you in advance and sorry if I wasn't clear enough in my question.

Environment Info:

Writers

awips_tiled: ok cf: cannot find module 'satpy.writers.cf_writer' (Ensure that the netCDF4 or h5netcdf package is installed.) geotiff: ok mitiff: ok ninjogeotiff: ok ninjotiff: cannot find module 'satpy.writers.ninjotiff' (No module named 'pyninjotiff') simple_image: ok

Extras

cartopy: No module named 'cartopy' geoviews: No module named 'geoviews'

simonalbergel commented 1 year ago

Hello again, after investigation on my side, remote streaming is simply not implemented for SEVIRI l1b native reader, sorry for mistaking it with a bug.

Here I am sharing the work around I have found working for my usage. It is not equivalent, as with this solution I don't stream the data but store it to a temporary local file util I am done initializing the Scene object. Thank you again for the very useful package.

import os
import tempfile
import shutil

from satpy import Scene
from satpy.readers.utils import generic_open
from satpy.utils import convert_remote_files_to_fsspec

def read_native_remotely(uri_file):
    """Remotely reads native files, by creating a temporary local file to read from.
    Temporary file is deleted as soon as it is not needed anymore.

    Args:
        - uri_file, str

    Returns:
        - seviri_scene, satpy.scene.Scene
    """
    fsfile = convert_remote_files_to_fsspec([uri_file])[0]

    with tempfile.TemporaryDirectory() as tmp_dir:
        tmp_destination_path = os.path.join(tmp_dir, fsfile._file)
        os.makedirs(os.path.dirname(tmp_destination_path), exist_ok=True)

        with open(tmp_destination_path, "wb") as tmp_destination:
            with generic_open(fsfile, "rb") as remote_source:
                shutil.copyfileobj(remote_source, tmp_destination)

        seviri_scene = Scene(
            reader="seviri_l1b_native",
            filenames=[tmp_destination_path],
            reader_kwargs={"fill_disk": True},
        )

    return seviri_scene