Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field should subtype an array type for named axis behaviors? #457

Closed
glwagner opened this issue Oct 10, 2019 · 4 comments
Closed

Field should subtype an array type for named axis behaviors? #457

glwagner opened this issue Oct 10, 2019 · 4 comments
Labels
abstractions 🎨 Whatever that means feature 🌟 Something new and shiny

Comments

@glwagner
Copy link
Member

Our Field type may benefit from subtyping one of the many array types with named/dimensional axes out there in the julia ecosystem. This will permit some desirable behaviors for the manipulation, loading, output, and plotting of fields and slices of fields, and perhaps will also enable some nice behavior for online diagnostics.

A good option could be AbstractDimensionalArray defined by

https://github.com/rafaqz/DimensionalData.jl

We'll have to figure out what functions and such we'd have to define to complete such an implementation.

@ali-ramadhan
Copy link
Member

Could be interesting to explore! @suyashbire1 has looked at this I think

The big concerns are obviously performance, GPU compatibility, and we probably don't want to depend on an immature or abandoned package.

We depend heavily on OffsetArrays.jl but it doesn't really come with any features we use besides the array type itself.

@ali-ramadhan ali-ramadhan added abstractions 🎨 Whatever that means feature 🌟 Something new and shiny labels Oct 13, 2019
@glwagner
Copy link
Member Author

glwagner commented Oct 15, 2019

I am talking about changes to Field, which wraps around OffsetArrays so there is no effect on performance. We currently use OffsetArrays, not Fields, in our kernels.

For the way we currently time-step this would also have no effect on GPU compatibility, because, again, we use OffsetArrays in our kernels, rather than Fields.

@glwagner glwagner changed the title Field should subtype an array typed for named axis behaviors? Field should subtype an array type for named axis behaviors? Oct 22, 2019
@ali-ramadhan
Copy link
Member

I think we've somewhat converged on DimensionalData.jl but I will say I love how AxisKeys.jl looks! https://github.com/mcabbott/AxisKeys.jl

@glwagner
Copy link
Member Author

I'm closing this issue because I'm judging that it's not of current, timely relevance to Oceananigans development. If you would like to make it a higher priority or if you think the issue was closed in error please feel free to re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abstractions 🎨 Whatever that means feature 🌟 Something new and shiny
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants