DimensionalData + Oceananigans #2841
tomchor
started this conversation in
Show and tell
Replies: 1 comment
-
It could be interesting to make the selector syntax This is discussed here: #457 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wanted to share here a package that I found called DimensionalData. Maybe people already have been using it and I'm just late to the game, but I found it makes my workflow much easier. I guess the easiest way to explain the package is by saying that it reproduces many of the features of
python-xarray
natively in Julia.Basically it all starts by naming and labeling dimensions/axis of arrays to make it easier to select and slice your data. (So it's similar to AxisArrays, but it appears to be more mature.)
Here's a quick example of how it could work with Oceananigans:
In the last line I selected data value of
u
in the 4-thy
position (indexj=4
) and in thez
index that's theNear
estz=-.25
(which turns out to bez=-.1875
), which I think it's pretty handy.The feature that's helped me the most is the plotting, which it makes super easy. For now it only has recipes for Plots.jl, but they work really well out of the box. For example:
produces this plot:
There are obviously more things (for example the package Rasters.jl understands Oceananigans NetCDF output directly) but I'm curious to hear what people think about it.
Beta Was this translation helpful? Give feedback.
All reactions