CliMA / Oceananigans.jl

🌊 Julia software for fast, friendly, flexible, ocean-flavored fluid dynamics on CPUs and GPUs
https://clima.github.io/OceananigansDocumentation/stable
MIT License
970 stars 193 forks source link

New Base.axes for AbstractField #3801

Closed glwagner closed 14 hours ago

glwagner commented 1 day ago

Resolves https://github.com/CliMA/Oceananigans.jl/issues/3750

Also supercedes #3794 where some tests are failing, not sure why. But that PR goes a bit further to clean up conditional ops. I think we want that too but let's start with this.

cc @ali-ramadhan

ali-ramadhan commented 1 day ago

Confirming that this PR also resolves #3750 based on the MWE there!

julia> @time minimum(u2)
  0.061013 seconds (659 allocations: 49.336 KiB)
0.0

julia> @time minimum(u2.data)
  0.010983 seconds (3 allocations: 1.562 KiB)
0.0