-
Notifications
You must be signed in to change notification settings - Fork 2
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
Antarctic slope current example #8
base: main
Are you sure you want to change the base?
Conversation
…to setup model itself
…igh order polynomials
Nx = 400 | ||
Ny = 450 | ||
Nz = 70 # TODO: modify spacing if needed, 10 m at surface, 100m at seafloor |
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.
Can we start with a smaller resolution? It'd be nice to test this on our laptops first
|
||
arch = GPU() | ||
|
||
g_Earth = 9.80665 |
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.
It might be simpler to keep the defaults rather than change this. I made a comment though if we want to manually set this
north_mask = GaussianMask{:y}(center=Ly, width=sponge_width) | ||
south_sponge_layer = Relaxation(; rate=damping_rate, mask=south_mask) | ||
north_sponge_layer = Relaxation(; rate=damping_rate, mask=north_mask) | ||
sponge_layers = (south_sponge_layer, north_sponge_layer) |
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.
Let's try running without the sponge layer to start
velocities = nothing, | ||
pressure = nothing, | ||
diffusivity_fields = nothing, | ||
#auxiliary_fields = nothing, # NamedTuple(), |
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.
Let's remove the unused kwargs
velocities = nothing, | ||
pressure = nothing, | ||
diffusivity_fields = nothing, | ||
#auxiliary_fields = nothing, # NamedTuple(), |
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.
velocities = nothing, | |
pressure = nothing, | |
diffusivity_fields = nothing, | |
#auxiliary_fields = nothing, # NamedTuple(), |
free_surface = ImplicitFreeSurface(gravitational_acceleration=g_Earth), | ||
forcing = (u=sponge_layers, v=sponge_layers, w=sponge_layers, T=sponge_layers, S=sponge_layers), # NamedTuple() | ||
closure = (horizontal_closure, vertical_closure), | ||
boundary_conditions = (u=free_slip_surface_bcs, v=free_slip_surface_bcs, w=no_slip_field_bcs), # NamedTuple(), |
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.
Note we can't set boundary conditions on w
in a hydrostatic model.
coriolis = coriolis, | ||
free_surface = ImplicitFreeSurface(gravitational_acceleration=g_Earth), | ||
forcing = (u=sponge_layers, v=sponge_layers, w=sponge_layers, T=sponge_layers, S=sponge_layers), # NamedTuple() | ||
closure = (horizontal_closure, vertical_closure), |
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.
We can rely entirely on WENO for horizontal dissipation. The only closure we need is for vertical mixing.
# Diffusivities as part of closure | ||
# TODO: make sure this works for biharmonic diffusivities as the horizontal, | ||
horizontal_closure = HorizontalScalarDiffusivity(ν=0.1, κ=0.1) | ||
vertical_closure = VerticalScalarDiffusivity(ν=3e-4, κ=1e-5) |
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.
We don't need biharmonic or a background diffusivity if we use WENO + CATKE, so we can eliminate these
eos = TEOS10EquationOfState() | ||
|
||
# Coriolis Effect, using basic f-plane with precribed reference Coriolis parameter | ||
coriolis = FPlane(f=-1.3e14) |
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.
Perhaps insert the reference latitude here? Eg something like
coriolis = FPlane(latitude=-60)
no_slip_bc = ValueBoundaryCondition(0.0) | ||
free_slip_bc = FluxBoundaryCondition(nothing) | ||
|
||
free_slip_surface_bcs = FieldBoundaryConditions(no_slip_bc, top=FluxBoundaryCondition(nothing)) | ||
no_slip_field_bcs = FieldBoundaryConditions(no_slip_bc) |
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.
I don't think we want to impose no slip conditions here (even if it was used in the original Si and Stewart). We just need the momentum fluxes for u
and v
at the surface to start. We can also add bottom drag for u and v but this is a detail we can get to later
filename = filename * ".jld2", | ||
indices = (:, grid.Ny/2, :), | ||
schedule = TimeInterval(1minute), | ||
overwrite_existing = true) |
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.
The most interesting output will be a slice at the surface, eg using
indices = (:, :, grid.Nz)
so make sure to always output that
Remember to prepend branch names with initials in the future, eg |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #8 +/- ##
==========================================
- Coverage 22.80% 22.72% -0.08%
==========================================
Files 11 11
Lines 307 308 +1
==========================================
Hits 70 70
- Misses 237 238 +1
☔ View full report in Codecov by Sentry. |
@@ -46,6 +46,7 @@ struct SlabSeaIceModel{GR, CL, TS, IT, IC, ST, IS, U, STF, TBC, CF, P, MIT, A} < | |||
ice_consolidation_thickness :: MIT | |||
# Numerics | |||
advection :: A | |||
architecture |
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.
architecture | |
architecture :: Arch |
This needs a type parameter to be concrete
but you should be able to get the architecture
from the grid
?
This PR creates an idealized test case to help address issue #1. In particular, it's the beginning of setting up an ocean model based on the Antarctic Slope Current example presented here: http://eisenman.ucsd.edu/papers/Si-Stewart-Eisenman-2022.pdf.
TODO: