From 7a18bb0aea88f2ddf96aab3f4f9426360cb4ff94 Mon Sep 17 00:00:00 2001 From: Gregory Wagner Date: Sat, 5 Oct 2024 10:53:20 -0400 Subject: [PATCH 1/3] Temporary support for OrthogonalSphericalShellGrid --- ext/OceananigansMakieExt.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/OceananigansMakieExt.jl b/ext/OceananigansMakieExt.jl index 9c8fe12bad..f5d571aaff 100644 --- a/ext/OceananigansMakieExt.jl +++ b/ext/OceananigansMakieExt.jl @@ -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! @@ -123,6 +124,11 @@ 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 +const OSSGField = Field{<:Any, <:Any, <:Any, <:Any, <:OrthogonalSphericalShellGrid} +convert_field_argument(f::OSSGField) = return make_plottable_array(f) + ##### ##### When nodes are provided ##### From 078d7f038622ad4565b7938d63c14ccc9b92ebb2 Mon Sep 17 00:00:00 2001 From: Gregory Wagner Date: Sat, 5 Oct 2024 10:55:16 -0400 Subject: [PATCH 2/3] Add link to Imaginocean --- ext/OceananigansMakieExt.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/OceananigansMakieExt.jl b/ext/OceananigansMakieExt.jl index f5d571aaff..4e6d138686 100644 --- a/ext/OceananigansMakieExt.jl +++ b/ext/OceananigansMakieExt.jl @@ -126,6 +126,8 @@ 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) = return make_plottable_array(f) From 607e72026e11dce7fd80b0f38b293edfbe7ae857 Mon Sep 17 00:00:00 2001 From: "Gregory L. Wagner" Date: Sat, 5 Oct 2024 10:56:49 -0400 Subject: [PATCH 3/3] Update OceananigansMakieExt.jl --- ext/OceananigansMakieExt.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/OceananigansMakieExt.jl b/ext/OceananigansMakieExt.jl index 4e6d138686..d214b8281c 100644 --- a/ext/OceananigansMakieExt.jl +++ b/ext/OceananigansMakieExt.jl @@ -129,7 +129,7 @@ end # 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) = return make_plottable_array(f) +convert_field_argument(f::OSSGField) = make_plottable_array(f) ##### ##### When nodes are provided