Skip to content

Commit

Permalink
Return delayed object when saving to netcdf without computing
Browse files Browse the repository at this point in the history
  • Loading branch information
mraspaud committed Dec 6, 2018
1 parent aa48f44 commit 5f9d083
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions satpy/writers/cf_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ def save_datasets(self, datasets, filename=None, **kwargs):
logger.info('Saving datasets to NetCDF4/CF.')
# XXX: Should we combine the info of all datasets?
filename = filename or self.get_filename(**datasets[0].attrs)

datas, start_times, end_times = self._collect_datasets(datasets, kwargs)

dataset = xr.Dataset(datas)
Expand All @@ -254,4 +253,4 @@ def save_datasets(self, datasets, filename=None, **kwargs):
for key in list(kwargs.keys()):
if key not in ['mode', 'format', 'group', 'encoding', 'unlimited_dims', 'compute']:
kwargs.pop(key, None)
dataset.to_netcdf(filename, engine=engine, **kwargs)
return dataset.to_netcdf(filename, engine=engine, **kwargs)

0 comments on commit 5f9d083

Please sign in to comment.