Skip to content

How to get all variables with the same standard name? #109

@malmans2

Description

@malmans2

A few times I needed to get the name of all coordinates with the same standard name.
Did I miss a public way to do this? Otherwise, the easiest thing I could come up with is this:

cf_xarray.accessor.apply_mapper(cf_xarray.accessor._get_axis_coord, ds, standard_name)

If there isn't a public function to do this already, maybe it could be helpful. For regular variables it seems easier, as it can be done through xarray:

ds.cf[[standard_name]].data_vars

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions