-
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
MIMIC reader available_dataset_names returns 1d lat/lon fields #1371
Comments
I agree this is not expected and would consider this a bug in the reader. For the odd What are the names of the 2D lon/lat variables? I think the reader needs to be updated to either:
|
I am sorry, I was mistaken, the error occurs with/without debug_on 1.) fine
2.) coarse
|
After skimming through the reader, I think the reader should not advertise the lon/lat arrays. The reader is taking the lon/lat arrays and then making an |
@djhoese There are going to be a few more updates in this pull when it is ready. One thing is leading to another and I have found that ideally, in order for the process |
Describe the bug
A mimic dataset loaded into the Scene object will include the data field (TPWGrid at the least) and the 1-D latitude and longitude fields. The latitude and longitude fields are 1-D versus the 2-D.
To Reproduce
Expected behavior
I am thinking that any dataset available from the available_dataset_names should load without error, or it should not be returned in the list of available_dataset_names. True?
Actual results
Odd, when debug_on is not set, there is an error with the load command, but not with debug_on.
Could not load dataset 'DatasetID(name='latitude', wavelength=None, resolution=None, polarization=None, calibration=None, level=None, modifiers=())': different number of dimensions on data and dims: 1 vs 2
Traceback (most recent call last):
File "/home/joleenf/miniconda3/envs/satpy/lib/python3.8/site-packages/satpy/readers/yaml_reader.py", line 782, in _load_dataset_with_area
ds = self._load_dataset_data(file_handlers, dsid, **kwargs)
File "/home/joleenf/miniconda3/envs/satpy/lib/python3.8/site-packages/satpy/readers/yaml_reader.py", line 667, in _load_dataset_data
proj = self._load_dataset(dsid, ds_info, file_handlers, **kwargs)
File "/home/joleenf/miniconda3/envs/satpy/lib/python3.8/site-packages/satpy/readers/yaml_reader.py", line 643, in _load_dataset
projectable = fh.get_dataset(dsid, ds_info)
File "/home/joleenf/miniconda3/envs/satpy/lib/python3.8/site-packages/satpy/readers/mimic_TPW2_nc.py", line 109, in get_dataset
data = xr.DataArray(data, dims=['y', 'x'])
File "/home/joleenf/miniconda3/envs/satpy/lib/python3.8/site-packages/xarray/core/dataarray.py", line 344, in init
coords, dims = _infer_coords_and_dims(data.shape, coords, dims)
File "/home/joleenf/miniconda3/envs/satpy/lib/python3.8/site-packages/xarray/core/dataarray.py", line 121, in _infer_coords_and_dims
raise ValueError(
ValueError: different number of dimensions on data and dims: 1 vs 2
The following datasets were not created and may require resampling to be generated: DatasetID(name='longitude', wavelength=None, resolution=None, polarization=None, calibration=None, level=None, modifiers=()), DatasetID(name='latitude', wavelength=None, resolution=None, polarization=None, calibration=None, level=None, modifiers=())
However, with debug_on, no error is created with the load, the error occurs in the save_datasets step:
----> 1 scn.save_datasets(filename="{name}_{start_time:%Y%m%d%H%M%S}.tif")
~/miniconda3/envs/satpy/lib/python3.8/site-packages/satpy/scene.py in save_datasets(self, writer, filename, datasets, compute, **kwargs)
1347 datasets = [ds for ds in datasets if ds is not None]
1348 if not datasets:
-> 1349 raise RuntimeError("None of the requested datasets have been "
1350 "generated or could not be loaded. Requested "
1351 "composite inputs may need to have matching "
RuntimeError: None of the requested datasets have been generated or could not be loaded. Requested composite inputs may need to have matching dimensions (eg. through resampling).
Environment Info:
The text was updated successfully, but these errors were encountered: