Closed yhyxzx closed 2 years ago
My satpy version is 0.37.1
If you don't already, try installing the pyhdf package and see if that fixes things. It is an optional dependency for satpy, but required for MODIS readers.
The problem has been solved perfectly.Thank you very much! But how can I get optional dependency information for every reader? I am a green hand and I haven't seen information about this in Satpy’s Documentation. @djhoese
The second note in this installation section:
https://satpy.readthedocs.io/en/stable/install.html#in-an-existing-environment
describes the issue and references the check_satpy
function:
https://satpy.readthedocs.io/en/stable/quickstart.html#troubleshooting
which will tell you what dependencies might be missing for certain readers. If you installed Satpy from conda-forge then it likely already has NetCDF4 installed which covers quite a few readers. Other readers depend on pyhdf or h5py and a few others have some more unique dependencies. There is currently no way with the conda-forge package to request "install all dependencies for readers A, B, and C".
I see.Thank you again!
from satpy import Scene import satpy print(satpy.available_readers()) filename = "MOD021KM.A2022091.1315.061.2022092021252.hdf" scene = Scene(filenames=[filename], reader='modis_l1b')
D:\anaconda3\envs\my_satpy_env\python.exe` "D:\Pycharm workspace\mySSTSR\testMODIS.py" ['abi_l1b', 'abi_l1b_scmi', 'abi_l2_nc', 'acspo', 'agri_l1', 'ahi_hrit', 'ahi_hsd', 'ahi_l1b_gridded_bin', 'ami_l1b', 'amsr2_l1b', 'amsr2_l2', 'amsr2_l2_gaasp', 'amsub_l1c_aapp', 'avhrr_l1b_aapp', 'avhrr_l1b_eps', 'avhrr_l1b_hrpt', 'avhrr_l1c_eum_gac_fdr_nc', 'cmsaf-claas2_l2_nc', 'electrol_hrit', 'fci_l1c_nc', 'fci_l2_nc', 'generic_image', 'geocat', 'ghrsst_l2', 'glm_l2', 'goes-imager_hrit', 'goes-imager_nc', 'gpm_imerg', 'hy2_scat_l2b_h5', 'iasi_l2', 'jami_hrit', 'maia', 'mersi2_l1b', 'mhs_l1c_aapp', 'mimicTPW2_comp', 'mirs', 'msu_gsa_l1b', 'mtsat2-imager_hrit', 'mviri_l1b_fiduceo_nc', 'nucaps', 'nwcsaf-geo', 'nwcsaf-msg2013-hdf5', 'nwcsaf-pps_nc', 'oceancolorcci_l3_nc', 'olci_l1b', 'olci_l2', 'omps_edr', 'safe_sar_l2_ocn', 'satpy_cf_nc', 'seviri_l1b_hrit', 'seviri_l1b_native', 'seviri_l1b_nc', 'slstr_l1b', 'smos_l2_wind', 'tropomi_l2', 'vaisala_gld360', 'vii_l1b_nc', 'vii_l2_nc', 'viirs_compact', 'viirs_edr_active_fires', 'viirs_l1b', 'viirs_sdr', 'virr_l1b'] INFO:satpy.readers:Cannot use ['D:\anaconda3\envs\my_satpy_env\Lib\site-packages\satpy\etc\readers\modis_l1b.yaml'] WARNING:satpy.readers:Don't know how to open the following files: {'MOD021KM.A2022091.1315.061.2022092021252.hdf'} Traceback (most recent call last): File "D:\Pycharm workspace\mySSTSR\testMODIS.py", line 5, in
scene = Scene(filenames=[filename],
File "D:\anaconda3\envs\my_satpy_env\lib\site-packages\satpy\scene.py", line 133, in init
self._readers = self._create_reader_instances(filenames=filenames,
File "D:\anaconda3\envs\my_satpy_env\lib\site-packages\satpy\scene.py", line 154, in _create_reader_instances
return load_readers(filenames=filenames,
File "D:\anaconda3\envs\my_satpy_env\lib\site-packages\satpy\readers__init__.py", line 581, in load_readers
_check_reader_instances(reader_instances)
File "D:\anaconda3\envs\my_satpy_env\lib\site-packages\satpy\readers__init__.py", line 620, in _check_reader_instances
raise ValueError("No supported files found")
ValueError: No supported files found