DimensionalData.jl icon indicating copy to clipboard operation
DimensionalData.jl copied to clipboard

non-dimension coordinates

Open Beforerr opened this issue 4 months ago • 9 comments

In Python Xarray, we can have non-dimension coordinates that contain coordinate data, but are not a dimension coordinate (see https://docs.xarray.dev/en/stable/user-guide/data-structures.html#coordinates) .

I'm just wondering if there is any similar support for this in the ecosystem. Actually this idea is kinda of useful for working with multidimensional coordinates.

Beforerr avatar Aug 20 '25 18:08 Beforerr

Have been thinking about something like this in Rasters as CF standards allow having multiple lookup coordinates for a single dimension. Is that what you mean?

My current idea is to allow dimensions/lookup nesting, so a dimension can have alternative names and associated lookups. Then e.g. X=At(100) may be in metres but you can use Lon=At(100) and that's degrees. The Lon dimensions would be a field of the X dimensions lookup array, and used as a fallback when Lon is not found in the normal top level Tuple of dims.

rafaqz avatar Aug 20 '25 23:08 rafaqz

I am more thinking about multidimensional coordinates. You can check the draft PR here #1086 . I am not sure it's a good idea to put the type in this package or just split it into a new package.

Beforerr avatar Aug 21 '25 00:08 Beforerr

Ah so you want to mix the dimensions of the dimensions and coordinates? So X and Y can be 1D regular but there is also a 2D lon and 2D lat associated.

asinghvi17 avatar Aug 21 '25 00:08 asinghvi17

Right. Something Like that, I think it would be beneficial to differentiate between coordinate and dimension.

Beforerr avatar Aug 21 '25 00:08 Beforerr

Try to avoid starting a new package

This functionality is planned for our overhaul of CF standards in Rasters.jl. DD lookups will be able to represent any CF object which includes single and multidimensional co-ordinate variables. Without changing the dims interface ;)

But it will be a few months.

rafaqz avatar Aug 21 '25 01:08 rafaqz

Thanks for clarifying! That sounds great. A few months is no problem—I can work around it in the meantime. Looking forward to the overhaul and the DD lookups supporting full CF objects.

Beforerr avatar Aug 22 '25 03:08 Beforerr

Great! can I ping you for reviews?

rafaqz avatar Aug 22 '25 03:08 rafaqz

Absolutely, one is glad to be of service

Beforerr avatar Aug 22 '25 17:08 Beforerr

I would also like this 👀 Happy to test it out when ready.

JamesWrigley avatar Sep 10 '25 10:09 JamesWrigley