climakitae package#

Subpackages#

Module contents#

climakitae.export(data: DataArray | Dataset, filename: str = 'dataexport', format: str = 'NetCDF', mode: str = 'local')#

Save xarray data as NetCDF, Zarr, or CSV in the current working directory, or if Zarr optionally stream the export file to an AWS S3 scratch bucket and give download URL. NetCDF can only be written to the HUB user partition if it will fit. Zarr can either be written to the HUB user partition or to S3 scratch bucket using the mode option.

Parameters:
  • data (xr.DataArray | xr.Dataset) – Data to export, as output by e.g. DataParameters.retrieve().

  • filename (str, optional) – Output file name (without file extension, i.e. “my_filename” instead of “my_filename.nc”). The default is “dataexport”.

  • format (str, optional) – File format (“Zarr”, “NetCDF”, “CSV”). The default is “NetCDF”.

  • mode (str, optional) – Save location logic for Zarr file (“local”, “s3”). The default is “local”

Returns:

None

climakitae.load(xr_da: DataArray, progress_bar: bool = False) DataArray#

Read lazily loaded dask array into memory for faster access

Parameters:
Returns:

da_computed (DataArray)

climakitae.remove_zarr(filename: str)#

Remove Zarr directory structure helper function. As Zarr format is a directory tree it is not easily removed using JupyterHUB GUI. This function simply deletes an entire directory tree.

Parameters:

filename (str) – Output Zarr file name (without file extension, i.e. “my_filename” instead of “my_filename.zarr”).