Xarray Metadata¶
Header file: <libs/zarr/xarray_metadata.hpp>
[source]
-
template<typename T>
std::string xarray_metadata(const std::string_view units, const double scale_factor, const std::vector<std::string> &dimnames)¶ Make string of array attributes metadata for .zattrs json which is used to make zarr array compatible with Xarray and NetCDF for a certain data type, T.
- Template Parameters:
T – The data type of the array.
- Parameters:
units – The units of the array’s coordinates.
scale_factor – The scale factor of data.
dimnames – The names of each dimension of the array.
- Returns:
A string representing the metadata.
-
template<typename T>
std::string xarray_metadata(const std::string_view units, const double scale_factor, const std::vector<std::string> &dimnames, const std::string_view sampledimname)¶ Make string of array attributes metadata for .zattrs json which is used to make array for a raggedcount variable in Zarr compatible with Xarray and NetCDF for a certain data type, T.
- Template Parameters:
T – The data type of the array.
- Parameters:
units – The units of the array’s coordinates.
scale_factor – The scale factor of data.
dimnames – The names of each dimension of the array.
sampledimname – The name of the dimension the ragged count samples.
- Returns:
A string representing the metadata.