Skip to content
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

Fix handling of modifiers in satpy-cf reader #1447

Merged
merged 1 commit into from Nov 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions satpy/readers/satpy_cf_nc.py
Expand Up @@ -263,6 +263,7 @@ def _coordinate_datasets(self, configured_datasets=None):
ds_info = dict(val.attrs)
ds_info['file_type'] = self.filetype_info['file_type']
ds_info['name'] = var_name
self.fix_modifier_attr(ds_info)
yield True, ds_info

def get_dataset(self, ds_id, ds_info):
Expand Down
6 changes: 4 additions & 2 deletions satpy/tests/reader_tests/test_satpy_cf_nc.py
Expand Up @@ -64,12 +64,14 @@ def setUp(self):
dims=('y', 'x'),
coords={'y': y_visir, 'x': x_visir},
attrs={'name': 'lat',
'standard_name': 'latitude'})
'standard_name': 'latitude',
'modifiers': np.array([])})
mraspaud marked this conversation as resolved.
Show resolved Hide resolved
lon = xr.DataArray(lon,
dims=('y', 'x'),
coords={'y': y_visir, 'x': x_visir},
attrs={'name': 'lon',
'standard_name': 'longitude'})
'standard_name': 'longitude',
'modifiers': np.array([])})
self.scene = Scene()
self.scene.attrs['sensor'] = ['avhrr-1', 'avhrr-2', 'avhrr-3']
scene_dict = {'image0': vis006,
Expand Down