io

Input/output functions for reading and writing velocity data

IceAdvect.io.open_dataset(filename: str, mapping: dict | None = None, chunks: int | dict | str | None = None, format: str | None = None, **kwargs) Dataset[source]

Open a file as an xarray Dataset

Parameters:
filename: str

Path to file

mapping: dict or None, default None

Dictionary mapping standard variable names to those in the file

chunks: int, dict, str, or None, default None

variable chunk sizes for dask (see xarray.open_dataset)

format: str or None, default None

File format for xarray to use when opening the dataset

  • 'netCDF4': netCDF4 file

  • 'geotiff': geoTIFF file

  • None: infer from file extension

kwargs: dict

additional keyword arguments for opening files

Returns:
ds: xr.Dataset

xarray Dataset