Skip to content

Add .sel and .isel equivalent that returns all vars on all grids related to the indexers? #200

@willirath

Description

@willirath

I'm working on a project that aims at providing observation-like sampling for Ocean model data living on a C grid. What we aim at is keeping the C grid logic intact as long as possible. For this, something like

ds.xgcm.isel(X=3, Y=5)

returning a full dataset restricted to x_c=3, x_l=3, x_r=3, y_c=5, y_l=5, y_r=5and a correspondingds.xgcm.sel(...)` would be ideal.

A related question is: Which grid points are "related" to a given position?

If we consider the tracer grid of a finite volume model the basis of our selection, then for a complete description of the dynamics of the selection, we'd not only need the vars defined on the faces for one side (per dim), but for both sides of the box.

(Thanks @jbusecke for the chat yesterday. Definitely helped me getting a clearer idea on what I'm looking for.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions