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

Mesoscale Simulations in Library #133

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

Conversation

sandreza
Copy link
Collaborator

This PR adds idealized mesoscale resolving zonally re-entrant channels to the library. The first stage is to define a function whose input is a few control parameters and whose output can be used for informing parameterization development. There are two main classes of simulations being added: flat bottom and hilly

@sandreza
Copy link
Collaborator Author

Tentative to-do list

  • Surface Buoyancy Relaxation
  • Quadratic Drag
  • Check output in simple case

@glwagner
Copy link
Member

glwagner commented Mar 20, 2022

Do you mind if I commit to this PR?

TODO:

@@ -218,9 +218,8 @@ function eddying_channel_simulation(;
simulation = Simulation(model; Δt=initial_Δt, stop_time)

# add timestep wizard callback
wizard = TimeStepWizard(; cfl = 0.1, max_change = 1.01, max_Δt)
wizard = TimeStepWizard(; cfl = 0.2, max_change = 1.01, max_Δt)
Copy link
Contributor

Choose a reason for hiding this comment

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

max_change = 1.01?
Is this required?

Copy link
Member

Choose a reason for hiding this comment

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

It's helpful when experimenting with very small initial time-steps for CATKE

@@ -27,8 +27,6 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
Copy link
Contributor

@navidcy navidcy Mar 22, 2022

Choose a reason for hiding this comment

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

Suggested change
[compat]
[compat]
Oceananigans = "0.73.2"

why not?

@glwagner
Copy link
Member

glwagner commented Mar 22, 2022

A few results. I added biharmonic dissipation and removed the Laplacian diffusion, which wasn't having any effect (dissipation was dominated by WENO I guess). With a coefficient Δx^4 / 15days, we get smooth solutions after 1 year of simulation:

image

Constrast this with

image

a bit noisier.

With a biharmonic coefficient Δx^4 / 10days we suppress the growth rate of the baroclinic instability, so that after a year we are just about to go unstable:

image

@glwagner
Copy link
Member

glwagner commented Mar 22, 2022

Ok, I've also implemented an initial buoyancy distribution that matches the relaxation profile. Here's what we get after a year with Δx^4 / 20days

image

The simulations also complete faster because we don't get large vertical velocities early on, perhaps because the initial turbulent motions are a bit larger scale?

@glwagner
Copy link
Member

glwagner commented Mar 22, 2022

Note: we'll have to implement some tracer forcing if we want it to be useful for this equilibrated case. Something for the future.

@@ -17,7 +17,7 @@ Random.seed!(1234)
arch = GPU()
with_ridge = false

filename = "new_simulation"
filename = "please_dont_crash"
Copy link
Member

Choose a reason for hiding this comment

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

:-O

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.

3 participants