Adds the option --regrid to the aggregator CLI. The value passed will determine the size of a regular grid to regrid the data to after aggregation.
Data is first aggregated by time chunk to the GPIs of the original grid, then for each point in the new grid, the aggregated data from the nearest point in the original grid is taken (if data exists at the nearest point in the original grid - otherwise it is set to NaN).
Output is a single netcdf file for each timechunk, with time, lon, and lat dimensions (raster data). These can be opened together as a datacube using xarray's open_mfdataset with concat_dim="time" and combine="nested".
Might be nice to add an option to write to a single netCDF or even Zarr, rather than several netCDFs?
Adds the option --regrid to the aggregator CLI. The value passed will determine the size of a regular grid to regrid the data to after aggregation.
Data is first aggregated by time chunk to the GPIs of the original grid, then for each point in the new grid, the aggregated data from the nearest point in the original grid is taken (if data exists at the nearest point in the original grid - otherwise it is set to NaN).
Output is a single netcdf file for each timechunk, with
time
,lon
, andlat
dimensions (raster data). These can be opened together as a datacube using xarray'sopen_mfdataset
withconcat_dim="time"
andcombine="nested"
.Might be nice to add an option to write to a single netCDF or even Zarr, rather than several netCDFs?