asascience-open / xarray-subset-grid

Subset Xarray datasets in space
https://xarray-subset-grid.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

Add "other variables" #25

Closed ChrisBarker-NOAA closed 3 months ago

ChrisBarker-NOAA commented 3 months ago

We now have the concepts of:

"grid variables" -- the variables used to define the grid.

"data variables" -- the variables that are defined "on the grid"

But then there are an arbitrary collection of other variables in dataset. Perhaps we should also have. "Other variables" (better name?) -- or maybe any variable that isn't one of the above is an other variable.

Now that I think about it, the implementation of other variables is easy -- take the set of all variables, and remove the ones that are grid or data variables. So why not provide that utility?

mpiannucci commented 3 months ago

Only because its not immediately useful. Usually the only variables you care about most of the time are the data varrables and their coordinates (grid variables). Its rare to care about the others.

It could be a feature but definitely not a priority

ChrisBarker-NOAA commented 3 months ago

well -- we do need to do something with those other variables -- drop them, pass them all through, etc.

So an API to find out something about them seems worth doing.

A small lift, too -- maybe I'll plop that in.

ChrisBarker-NOAA commented 3 months ago

Done -- maybe not fully robust, but it's there.

See Grid.extra_vars()