Legacy Data Export
The climakitae.core.data_export module provides the legacy multi-format
export helpers used to persist retrieved data to disk or cloud storage.
Warning
This page documents a legacy support module. It is kept for backward
compatibility. New code should prefer the
export processor in the
modern interface.
What this module does
The legacy export layer writes an in-memory or lazily loaded xarray object to one of several formats:
| Format | Typical use |
|---|---|
| NetCDF | Standard climate-data format with full metadata (CF conventions). |
| CSV | Tabular export for time series or single-location data. |
| Zarr | Cloud-optimized chunked storage for large datasets. |
| GeoTIFF | Geographic raster for a single time slice, for use in GIS tools. |
Public API
The single public entry point is export(). TMY/EPW export is reached through
export() rather than a separate function.
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:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
DataArray | Dataset
|
Data to export, as output by e.g. |
required |
filename
|
str
|
Output file name (without file extension, i.e. "my_filename" instead of "my_filename.nc"). The default is "dataexport". |
'dataexport'
|
format
|
str
|
File format ("Zarr", "NetCDF", "CSV"). The default is "NetCDF". |
'NetCDF'
|
mode
|
str
|
Save location logic for Zarr file ("local", "s3"). The default is "local" |
'local'
|
Returns:
| Type | Description |
|---|---|
None
|
|