zarr-developers / geozarr-spec

This document aims to provides a geospatial extension to the Zarr specification. Zarr specifies a protocol and format used for storing Zarr arrays, while the present extension defines conventions and recommendations for storing multidimensional georeferenced grid of geospatial observations (including rasters).
106 stars 10 forks source link

GeoZarr Auxiliary Data (explicit attribute) #16

Closed samsammurphy closed 10 months ago

samsammurphy commented 1 year ago

"GeoZarr Auxiliary variable MUST include the attribute _ARRAY_DIMENSIONS set as an empty array"

I am wondering if we should be more explicit?.. something like..

_GeoZarr Auxiliary variable MUST include the attribute _IS_AUXILIARY set to True_

christophenoel commented 1 year ago

This is (for now!) a pure mapping from the xarray conventions

Xarray’s terminology differs from the CF terminology, where the “dimension coordinates” are called “coordinate variables”, and the “non-dimension coordinates” are called “auxiliary coordinate variables” (see GH1295 for more details).

See more: https://github.com/pydata/xarray/issues/1295

However, we might generalise this for any other class:

_GEOZARR_CLASS: data | coordinate | auxiliary | dataset

dblodgett-usgs commented 1 year ago

Over in #17 I misused GeoZarr Auxiliary variable assuming it was the name we were using for any variable that is merely a container for non-global for attributes, such as is used for a grid_mapping. What is the use case for Auxiliary variables?

Maybe using an attribute that avoids the confusion or is more specific with regard to the purpose of the attribute would be helpful?

christophenoel commented 1 year ago

I think I have introduced ambiguity --> "GeoZarr Auxiliary variable" maps to the definition of "non-dimension coordinates" = CF "auxliary coordinate variable". You're also right that it is used for grid_mapping.

non-dimension coordinates are variables that contain coordinate data, but are not a dimension coordinate. They can be multidimensional (see Working with Multidimensional Coordinates), and there is no relationship between the name of a non-dimension coordinate and the name(s) of its dimension(s). Non-dimension coordinates can be useful for indexing or plotting; otherwise, xarray does not make any direct use of the values associated with them. They are not used for alignment or automatic indexing, nor are they required to match when doing arithmetic (see Coordinates).