pyspectral - offline usage

50 views
Skip to first unread message

B. Schitter

unread,
Oct 8, 2024, 4:01:21 AM10/8/24
to pytroll
Hello,

I tried to use pysectral in our office but there I don't have an internet connection.

As I have seen, pyspectral want's to connect to zenodo.org  to get some files (pyspectral_rsr_data.tgz, pyspectral_tm_correction_luts).

Is there a possibility to make a "local config"?

Best regards,
Bernhard

Adam Dybbroe

unread,
Oct 8, 2024, 4:06:30 AM10/8/24
to pyt...@googlegroups.com, adam.d...@smhi.se

Hi Bernhard,

Did you already check the documentation?

https://pyspectral.readthedocs.io/en/latest/installation.html#configuration-file


We run Pyspectral in routine production without accessing the internet, by invoking our own local configuration (using "download_from_internet: False")

Tell me if that is not enough?

-Adam

--
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/a1b8f354-f47e-4240-ac08-f7d8a87f7439n%40googlegroups.com.
-- 
Adam Dybbroe,
Satellite Remote Sensing Scientist
Research lead - Nowcasting and Remote Sensing
Meteorological Research unit, Research and Development
Swedish Meteorological and Hydrological Institute (SMHI)
www.pytroll.org
nwcsaf.smhi.se
www.smhi.se
Message has been deleted

B. Schitter

unread,
Oct 11, 2024, 2:18:16 AM10/11/24
to pytroll
Dear Adam,

thank you for your anwer. Now I use local configuration for pyspectral.

I tried a really simple script (see attachment), but I get an error (see also attachment). Can you tell me what's wrong with the script?

Best regards,
Bernhard

MTG_test.py
MTG_test_output.txt

Panu Lahtinen

unread,
Oct 11, 2024, 2:51:30 AM10/11/24
to pyt...@googlegroups.com
It seems you have data from multiple different time slots in the
directory. Try modifying the glob to

files= glob("/daten/EumetCast/MTG-FCI/data/*OPER_2024101105*C_0034*")

to select only data from one repeat cycle (the number after "C_" above).


P

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

B. Schitter

unread,
Oct 11, 2024, 3:11:20 AM10/11/24
to pytroll
Dear Panu,

thank you for the hint - your were right.

Now I get another error - see attachment MTG_test_output.txt.

Best regards,
Bernhard

MTG_test_output2.txt

Panu Lahtinen

unread,
Oct 11, 2024, 3:15:19 AM10/11/24
to pyt...@googlegroups.com
On 11.10.2024 10.11, B. Schitter wrote:
> Dear Panu,
>
> thank you for the hint - your were right.
>
> Now I get another error - see attachment MTG_test_output.txt.

Hi,

You need to install either FCIDECOMP or hdf5plugin library so that the
HDF5 library can decompress the data. I've been using hdf5plugin. So
install it and add

import hdf5plugin

before importing Satpy. See also the Note just above
https://satpy.readthedocs.io/en/stable/api/satpy.readers.fci_l1c_nc.html#satpy.readers.fci_l1c_nc.FCIL1cNCFileHandler

B. Schitter

unread,
Oct 11, 2024, 3:21:27 AM10/11/24
to pytroll
Dear Panu,

thank you - now it works.

I had installed hdf5plugins already, but I didn't import it.

Best regards,
Bernhard

B. Schitter

unread,
Oct 14, 2024, 4:00:16 PM10/14/24
to pytroll
Hello again,

now I have a new "problem".

When I update the h5py module from 3.11.0 to 3.12.1 I get the NetCDF Error again - have you seen this too? After downgrading again it works without problems.

Best regards,
Bernhard

Reply all
Reply to author
Forward
0 new messages