TUW-GEO / ascat

Read and visualize data from the Advanced Scatterometer (ASCAT) on-board the series of Metop satellites
https://ascat.readthedocs.io/
MIT License
23 stars 16 forks source link

Aggregator regrid option #63

Closed claytharrison closed 4 months ago

claytharrison commented 6 months ago

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?

claytharrison commented 6 months ago

Converting to draft briefly while I add the second CLI - I'm going to restructure what I've done here a bit more.