environmentaltools.spatiotemporal.raster.save_arrays_to_netcdf
- environmentaltools.spatiotemporal.raster.save_arrays_to_netcdf(arrays, info)[source]
Save a list of arrays (per percentile) to a NetCDF file with spatial coordinates and metadata.
This function writes angle and magnitude arrays (per percentile) to a NetCDF file, including CF-Convention metadata and CRS (EPSG:25830 or as specified) for compatibility with QGIS/MDAL. The output includes coordinate variables, grid mapping, and global attributes for spatial reference.
- Parameters:
arrays (list of [angle, magnitude]) – List of [angle, magnitude] arrays for each percentile. Each array should be 2D or 3D (optionally 4D with time).
info (dict) – Configuration dictionary containing coordinate arrays, percentiles, CRS, and output directory.
- Returns:
outpath – Path to the saved NetCDF file.
- Return type:
Path