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

Temporary support for OrthogonalSphericalShellGrid for MakieExt #3824

Merged
merged 9 commits into from
Oct 23, 2024
8 changes: 8 additions & 0 deletions ext/OceananigansMakieExt.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module OceananigansMakieExt

using Oceananigans
using Oceananigans.Grids: OrthogonalSphericalShellGrid
using Oceananigans.AbstractOperations: AbstractOperation
using Oceananigans.Architectures: on_architecture
using Oceananigans.ImmersedBoundaries: mask_immersed_field!
Expand Down Expand Up @@ -123,6 +124,13 @@ function convert_field_argument(f::Field)
end
end

# For Fields on OrthogonalSphericalShellGrid, just return the interior without coordinates
# TODO: support plotting in geographic coordinates using mesh
# See for example
# https://github.com/navidcy/Imaginocean.jl/blob/f5cc5f27dd2e99e0af490e8dca5a53daf6837ead/src/Imaginocean.jl#L259
const OSSGField = Field{<:Any, <:Any, <:Any, <:Any, <:OrthogonalSphericalShellGrid}
convert_field_argument(f::OSSGField) = make_plottable_array(f)

#####
##### When nodes are provided
#####
Expand Down