Open
Description
The calculation of the sparse intersection weights via calc_intersect_weights
is fairly slow (approx. 4 minutes for 4000 CMLs and the 900x900 RADOLAN grid) and the resulting weight matrix would be large in dense format. Hence, it is often required to write the sparse intersection weights to disk and read them back in later to reuse them. Writing sparse data to a file e.g. in COO format is possible, but we want to keep the linkage to the indices that we have in the xarray.DataArray
of the sparse weights matrix.
What we need is a function to read and write a xarray.DataArray
, containing a sparse matrix, to NetCDF or zarr.