-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MODIS Satpy scene Don't know how to open the following files: {'MOD021KM.A2017131.1325.061.2017314123114.hdf'} #2723
Comments
What happens if you change: Also note that you have a rogue |
I downloaded the MODIS files with wget over Laads... so the first option I already checkt (corruped file) should be the problem... Then I get: |
@SamothKoc That's still a typo. It should be |
Finally it works :D Edit: Is there a (easy) way with satpy to combine multiple MODIS dataset? I want to plot the complete Track during one day over my region. Edit 2: I tried this:
and then:
and get a complete grey image :D |
Passing multiple granules to the Scene object should merge them together just fine. Doing them per-orbit (or half-orbit or even smaller) would be a good idea just for processing times and avoiding resampling artifacts. Does your code produce an expected image for a single set of files (a single granule)? An all grey image sounds like your input data does not overlap/cover your area that you are resampling to. |
Hi, x_size = 3089
y_size = 3320
area_extent = (W, E, N, S)
projection = '+proj=laea +lat_0=37.5 +lon_0=-122.0 +ellps=WGS84'
description = "area"
proj_id = 'laea_37.5_-122.0'
areadef = get_area_def(area_id, description, proj_id, projection,x_size, y_size, area_extent) but if i have a list of hdf... that isn't the way. because i have to do it manually |
If you have multiple time steps, you should process them sequentially. |
and if i only know the name... so i can crop the coordinate? Currently I have a big ? in my brain :D there is a coord2area_def.py but even then i need the coordinate befor. |
I'm a little lost now. What Martin said is true and is what I was trying to say. If you have multiple orbits (multiple separate passes of the satellite) then those should really be processed separately (separate Scene objects). If they are contiguous/connected granules then that is probably fine for a couple MODIS granules to pass all those files together...although now that I say that I'm not sure I've actually ever done that.
Have to do what manually? Know the "name" of what? |
Done. :D it was easier the expected .
|
Glad you got something working. |
Just for reference, Dave, I have often processed multiple contiguous modis granules, up to half an orbit, and it works fine. |
Describe the bug
Hi,...
A want to plot Modis of one overfly during one day and get the following error:
Scene(filenames = [file_nam], reader="modis_l1b")
Don't know how to open the following files: {'/home/MODIS_DATA/MOD021KM.A2017131.1325.061.2017314123114.hdf'}
Actual results
In [57]: Scene(filenames = [file_nam], reader="modis_l1b")
Don't know how to open the following files: {'/home/MODIS_DATA/MOD021KM.A2017131.1325.061.2017314123114.hdf'}
ValueError Traceback (most recent call last)
Cell In[57], line 1
----> 1 Scene(filenames = [file_nam], reader="modis_l1b")
File /shared/apps/gcc-11.4.0/miniconda/3.11/envs/satpy_env/lib/python3.8/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 /shared/apps/gcc-11.4.0/miniconda/3.11/envs/satpy_env/lib/python3.8/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,
156 reader_kwargs=reader_kwargs)
File /shared/apps/gcc-11.4.0/miniconda/3.11/envs/satpy_env/lib/python3.8/site-packages/satpy/readers/init.py:584, in load_readers(filenames, reader, reader_kwargs)
581 break
583 _check_remaining_files(remaining_filenames)
--> 584 _check_reader_instances(reader_instances)
585 return reader_instances
File /shared/apps/gcc-11.4.0/miniconda/3.11/envs/satpy_env/lib/python3.8/site-packages/satpy/readers/init.py:623, in _check_reader_instances(reader_instances)
621 def _check_reader_instances(reader_instances):
622 if not reader_instances:
--> 623 raise ValueError("No supported files found")
624 if not any(list(r.available_dataset_ids) for r in reader_instances.values()):
625 raise ValueError("No dataset could be loaded. Either missing "
626 "requirements (such as Epilog, Prolog) or none of the "
627 "provided files match the filter parameters.")
ValueError: No supported files found
In [58]: filenames
NameError Traceback (most recent call last)
Cell In[58], line 1
----> 1 filenames
NameError: name 'filenames' is not defined
In [59]: Scene(filenames = [file_nam],reader="modis_l1b")
Don't know how to open the following files: {'/home/MODIS_DATA/MOD021KM.A2017131.1325.061.2017314123114.hdf'}
ValueError Traceback (most recent call last)
Cell In[59], line 1
----> 1 Scene(filenames = [file_nam],reader="modis_l1b")
File /shared/apps/gcc-11.4.0/miniconda/3.11/envs/satpy_env/lib/python3.8/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 /shared/apps/gcc-11.4.0/miniconda/3.11/envs/satpy_env/lib/python3.8/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,
156 reader_kwargs=reader_kwargs)
File /shared/apps/gcc-11.4.0/miniconda/3.11/envs/satpy_env/lib/python3.8/site-packages/satpy/readers/init.py:584, in load_readers(filenames, reader, reader_kwargs)
581 break
583 _check_remaining_files(remaining_filenames)
--> 584 _check_reader_instances(reader_instances)
585 return reader_instances
File /shared/apps/gcc-11.4.0/miniconda/3.11/envs/satpy_env/lib/python3.8/site-packages/satpy/readers/init.py:623, in _check_reader_instances(reader_instances)
621 def _check_reader_instances(reader_instances):
622 if not reader_instances:
--> 623 raise ValueError("No supported files found")
624 if not any(list(r.available_dataset_ids) for r in reader_instances.values()):
625 raise ValueError("No dataset could be loaded. Either missing "
626 "requirements (such as Epilog, Prolog) or none of the "
627 "provided files match the filter parameters.")
The text was updated successfully, but these errors were encountered: