Skip to content

Add support for Discrete Sampling Geometry datasets. #122

@malmans2

Description

@malmans2

I ran into this while trying to set up a dataset with a collection of vertical profiles (i.e., a transect).

I think we should consider adding a new axis named "discrete": http://cfconventions.org/cf-conventions/cf-conventions.html#discrete-axis
The dimensions of the discrete axis would then be defined by an attribute named "instance_dimension": http://cfconventions.org/cf-conventions/cf-conventions.html#collections-instances-elements
The "instance_dimension" attribute is assigned to all "index_variables", which are 1D coordinates.

This is an example where I've extracted a transect from a C-grid model. After extraction I've removed the "axis" attributes from all X and Y variables, and I've added the attribute da.attrs["instance_dimension"] = "station" to all 1D variables with dimension "station".

discrete

In this scenario, I think the axes should be "Z", "T", and "discrete", where ds.axes["discrete"] = ["station"]. Then we should probably also add ds.cf.index_variables, which returns all index variables (e.g., lon, lat, label, indexes on the original grid, ....).

There is a global attribute named "featureType": http://cfconventions.org/cf-conventions/cf-conventions.html#_features_and_feature_types
Not sure whether it would be preferable to add ds.cf["discrete"] and ds.cf.index_variables only if the attribute is present, and maybe axes ["X", "Y"] and "discrete" should be mutually exclusive?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions