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

Antarctic slope current example #8

Open
wants to merge 50 commits into
base: main
Choose a base branch
from
Open

Antarctic slope current example #8

wants to merge 50 commits into from

Conversation

jlk9
Copy link
Collaborator

@jlk9 jlk9 commented Jul 7, 2023

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:

  • More thoroughly replicate the Eisenman paper's model conditions: boundary conditions, surface flux terms, troughs in the Antarctic slope, forcings, etc.
  • Run this model in the desired time frame (currently it's on a much shorter run)

@glwagner glwagner changed the title Asc model example Antarctic slope current example Jul 7, 2023
Comment on lines 18 to 20
Nx = 400
Ny = 450
Nz = 70 # TODO: modify spacing if needed, 10 m at surface, 100m at seafloor
Copy link
Member

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
Copy link
Member

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)
Copy link
Member

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

Comment on lines 121 to 124
velocities = nothing,
pressure = nothing,
diffusivity_fields = nothing,
#auxiliary_fields = nothing, # NamedTuple(),
Copy link
Member

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

Comment on lines 121 to 124
velocities = nothing,
pressure = nothing,
diffusivity_fields = nothing,
#auxiliary_fields = nothing, # NamedTuple(),
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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(),
Copy link
Member

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),
Copy link
Member

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.

Comment on lines 104 to 107
# 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)
Copy link
Member

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)
Copy link
Member

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)

Comment on lines 92 to 96
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)
Copy link
Member

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)
Copy link
Member

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

@glwagner
Copy link
Member

glwagner commented Jul 7, 2023

Remember to prepend branch names with initials in the future, eg jlk/asc-model-example

@codecov
Copy link

codecov bot commented Aug 21, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (4649a29) 22.80% compared to head (64aa547) 22.72%.

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     
Files Coverage Δ
src/SlabSeaIceModels/slab_sea_ice_model.jl 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -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
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
architecture
architecture :: Arch

This needs a type parameter to be concrete

but you should be able to get the architecture from the grid?

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.

2 participants