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

Fixes flat extrapolaiton open boundary condition #3937

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ end

const c = Center()

@inline function _fill_west_open_halo!(j, k, grid, ϕ, bc::FEOBC, loc, clock, model_fields)
@inline function _fill_west_halo!(j, k, grid, ϕ, bc::FEOBC, loc, clock, model_fields)
Δx₁ = xspacing(1, j, k, grid, c, c, c)
Copy link
Collaborator

@simone-silvestri simone-silvestri Nov 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Δx₁ = xspacing(1, j, k, grid, c, c, c)
Δx₁ = Δxᶜᶜᶜ(1, j, k, grid)

Probably better to use the pointwise operators from here (and in the rest of this file)

Δx₂ = xspacing(2, j, k, grid, c, c, c)
Δx₃ = xspacing(3, j, k, grid, c, c, c)
Expand All @@ -75,7 +75,7 @@ const c = Center()
return nothing
end

@inline function _fill_east_open_halo!(j, k, grid, ϕ, bc::FEOBC, loc, clock, model_fields)
@inline function _fill_east_halo!(j, k, grid, ϕ, bc::FEOBC, loc, clock, model_fields)
i = grid.Nx + 1

Δx₁ = xspacing(i-1, j, k, grid, c, c, c)
Expand All @@ -91,7 +91,7 @@ end
return nothing
end

@inline function _fill_south_open_halo!(i, k, grid, ϕ, bc::FEOBC, loc, clock, model_fields)
@inline function _fill_south_halo!(i, k, grid, ϕ, bc::FEOBC, loc, clock, model_fields)
Δy₁ = yspacing(i, 1, k, grid, c, c, c)
Δy₂ = yspacing(i, 2, k, grid, c, c, c)
Δy₃ = yspacing(i, 3, k, grid, c, c, c)
Expand All @@ -105,7 +105,7 @@ end
return nothing
end

@inline function _fill_north_open_halo!(i, k, grid, ϕ, bc::FEOBC, loc, clock, model_fields)
@inline function _fill_north_halo!(i, k, grid, ϕ, bc::FEOBC, loc, clock, model_fields)
j = grid.Ny + 1

Δy₁ = yspacing(i, j-1, k, grid, c, c, c)
Expand All @@ -121,7 +121,7 @@ end
return nothing
end

@inline function _fill_bottom_open_halo!(i, j, grid, ϕ, bc::FEOBC, loc, clock, model_fields)
@inline function _fill_bottom_halo!(i, j, grid, ϕ, bc::FEOBC, loc, clock, model_fields)
Δz₁ = zspacing(i, j, 1, grid, c, c, c)
Δz₂ = zspacing(i, j, 2, grid, c, c, c)
Δz₃ = zspacing(i, j, 3, grid, c, c, c)
Expand All @@ -135,7 +135,7 @@ end
return nothing
end

@inline function _fill_top_open_halo!(i, j, grid, ϕ, bc::FEOBC, loc, clock, model_fields)
@inline function _fill_top_halo!(i, j, grid, ϕ, bc::FEOBC, loc, clock, model_fields)
k = grid.Nz + 1

Δz₁ = zspacing(i, j, k-1, grid, c, c, c)
Expand Down