Skip to content

Commit

Permalink
Merge pull request #1447 from sfinkens/fix-satpy-cf-modifier-handling
Browse files Browse the repository at this point in the history
Fix handling of modifiers in satpy-cf reader
  • Loading branch information
mraspaud authored Nov 23, 2020
2 parents bfc7bfb + 1ce23a5 commit a18b6e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions satpy/readers/satpy_cf_nc.py
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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([])})
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

0 comments on commit a18b6e2

Please sign in to comment.