-
Notifications
You must be signed in to change notification settings - Fork 191
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
Momentum dynamics validation on the CubedSphere #3306
base: main
Are you sure you want to change the base?
Conversation
it blows up at some point... cubed_sphere_momentum_dynamics.mp4I even reduced the tilmestep but not sure if it's that or corner-related artifacts |
Might help to plot vorticity. Are we using WENO or second order momentum advection? |
I didn't prescribe anything so probably 2nd order. |
Could be the culprit if we don't have viscosity, how about with viscosity or WENO? |
@siddharthabishnu, can you commit the steady-state validation script in this PR from #3302? We were trying to ensure that double halo passing occurs for velocities etc and these are probably also needed for #3302 so let's have both validation scripts in one place so we don't do double job? |
Done. 😊 |
Any progress visualizing vorticity? |
Yes. I'll post a script. But it once again demonstrated that halos are not filled properly for face-face fields so I'm trying to deal with #3280 first! |
Why do we need to fill halos for face-face? |
src/Models/HydrostaticFreeSurfaceModels/pcg_implicit_free_surface_solver.jl
Outdated
Show resolved
Hide resolved
if size(data)[3] == 1 && first.(axes(data))[3] == grid.Nz + 1 # take ssh into consideration | ||
parent_indices = collect(parent_indices) | ||
parent_indices[3] = 1:1 | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this reads like a hack..
also, what's "ssh" mentioned in the comment?
what if size(data)[2] == 1
... then nothing needs to happen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is a temporary hack. I have outlined the issue arising in the absence of this hack in issue #3572 and created PR #3573 to resolve it. In the comment, ssh
refers to fields like ssh defined on the xy
plane, for which the parent array takes the z-halo into consideration even though it does not exist. In case of a field like the meridional average of a scalar quantity which is defined on the xz
plane, the same issue arises without an equivalent hack.
#- for Forward-Backward+AB2 hack to work: | ||
fill_halo_regions!(model.free_surface.η) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if model
doesn't have a free surface?
end | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
end | |
end | |
end | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
end | |
end | |
693d933
to
43e970a
Compare
28d44f6
to
2ea3bbd
Compare
Remove all definitions and instances of the replace_horizontal_vector_halos! function.
src/Operators/vorticity_operators.jl
Outdated
#= | ||
@inline Γᶠᶠᶜ(i, j, k, grid::OrthogonalSphericalShellGrid, u, v) = | ||
ifelse(on_south_west_corner(i, j, grid) | on_north_west_corner(i, j, grid), | ||
Δy_qᶜᶠᶜ(i, j, k, grid, v) - Δx_qᶠᶜᶜ(i, j, k, grid, u) + Δx_qᶠᶜᶜ(i, j-1, k, grid, u), | ||
ifelse(on_south_east_corner(i, j, grid) | on_north_east_corner(i, j, grid), | ||
- Δy_qᶜᶠᶜ(i-1, j, k, grid, v) - Δx_qᶠᶜᶜ(i, j, k, grid, u) + Δx_qᶠᶜᶜ(i, j-1, k, grid, u), | ||
δxᶠᶜᶜ(i, j, k, grid, Δy_qᶜᶠᶜ, v) - δyᶜᶠᶜ(i, j, k, grid, Δx_qᶠᶜᶜ, u))) | ||
=# | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this old/deprecated code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I will delete it.
3d58ab7
to
6868203
Compare
03aae73
to
f66153b
Compare
c36d39b
to
659b1b2
Compare
with @glwagner
Closes #3265