Skip to content
Snippets Groups Projects
Commit 543180d1 authored by Frisinghelli Daniel's avatar Frisinghelli Daniel
Browse files

Reproject and resample to target grid.

parent 29bcffde
No related branches found
No related tags found
No related merge requests found
......@@ -95,12 +95,15 @@ if __name__ == '__main__':
var.encoding['complevel'] = 5
# save aggregated netcdf file
tmp = filename.parent.joinpath(filename.name.replace('.nc',
'_tmp.nc'))
LOGGER.info('Compressing NetCDF: {}'.format(filename))
ds.to_netcdf(filename, engine='h5netcdf')
ds.to_netcdf(tmp, engine='h5netcdf')
# reproject and resample to target grid
reproject_cdo(args.grid, filename, filename, mode=args.mode,
reproject_cdo(args.grid, tmp, filename, mode=args.mode,
overwrite=args.overwrite)
tmp.unlink()
else:
LOGGER.info('{} does not exist.'.format(str(args.source)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment