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

Mask ReducedFields accounting the immersed column #3900

Merged
merged 7 commits into from
Nov 11, 2024

Conversation

simone-silvestri
Copy link
Collaborator

From a MWE similar to the one in #3899 (adding some more reduced directions):

using Oceananigans
using GLMakie

grid = RectilinearGrid(size = (10, 10, 10), extent = (10, 10, 10))
bottom(x, y) = - rand() * 5 # Between -5 and 0
grid = ImmersedBoundaryGrid(grid, GridFittedBottom(bottom))

f1 = Field{Center, Center, Nothing}(grid)
f2 = Field{Center, Nothing, Center}(grid)
f3 = Field{Nothing, Center, Center}(grid)
set!(f1, (x, y) -> rand())
set!(f2, (x, y) -> rand())
set!(f3, (x, y) -> rand())

fig = Figure(); ax1 = Axis(fig[1, 1]); ax2 = Axis(fig[1, 2]); ax3 = Axis(fig[1, 3])
heatmap!(ax1, f1)
heatmap!(ax2, f2)
heatmap!(ax3, f3)
Screenshot 2024-11-05 at 12 26 38 PM

Should we add some tests?

closes #3899

@simone-silvestri simone-silvestri merged commit 4619055 into main Nov 11, 2024
46 checks passed
@simone-silvestri simone-silvestri deleted the ss/mask-correct-field branch November 11, 2024 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plotting a reduced field on an ImmersedBoundaryGrid fills in NaNs incorrectly
2 participants