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

Show method for HydrostaticFreeSurfaceModel summarizes advection schemes #3504

Merged
merged 2 commits into from
Mar 11, 2024

Conversation

navidcy
Copy link
Collaborator

@navidcy navidcy commented Mar 11, 2024

Closes #3197

julia> using Oceananigans

julia> grid = RectilinearGrid(size=(2, 2, 2), extent=(1, 1, 1))
2×2×2 RectilinearGrid{Float64, Periodic, Periodic, Bounded} on CPU with 3×3×3 halo
├── Periodic x  [0.0, 1.0)  regularly spaced with Δx=0.5
├── Periodic y  [0.0, 1.0)  regularly spaced with Δy=0.5
└── Bounded  z  [-1.0, 0.0] regularly spaced with Δz=0.5

julia> model = HydrostaticFreeSurfaceModel(; grid, momentum_advection=nothing, tracer_advection=nothing, tracers=nothing, buoyancy=nothing)
HydrostaticFreeSurfaceModel{CPU, RectilinearGrid}(time = 0 seconds, iteration = 0)
├── grid: 2×2×2 RectilinearGrid{Float64, Periodic, Periodic, Bounded} on CPU with 3×3×3 halo
├── timestepper: QuasiAdamsBashforth2TimeStepper
├── tracers: ()
├── closure: Nothing
├── buoyancy: Nothing
├── free surface: ImplicitFreeSurface with gravitational acceleration 9.80665 m s⁻²
│   └── solver: FFTImplicitFreeSurfaceSolver
├── advection scheme:
│   └── momentum: Nothing
└── coriolis: Nothing

julia> model = HydrostaticFreeSurfaceModel(; grid)
HydrostaticFreeSurfaceModel{CPU, RectilinearGrid}(time = 0 seconds, iteration = 0)
├── grid: 2×2×2 RectilinearGrid{Float64, Periodic, Periodic, Bounded} on CPU with 3×3×3 halo
├── timestepper: QuasiAdamsBashforth2TimeStepper
├── tracers: (T, S)
├── closure: Nothing
├── buoyancy: SeawaterBuoyancy with g=9.80665 and LinearEquationOfState(thermal_expansion=0.000167, haline_contraction=0.00078) with ĝ = NegativeZDirection()
├── free surface: ImplicitFreeSurface with gravitational acceleration 9.80665 m s⁻²
│   └── solver: FFTImplicitFreeSurfaceSolver
├── advection scheme:
│   ├── momentum: Centered reconstruction order 2
│   ├── T: Centered reconstruction order 2
│   └── S: Centered reconstruction order 2
└── coriolis: Nothing

@francispoulin
Copy link
Collaborator

I am so glad you did this. It's very helpful!

Copy link
Collaborator

@francispoulin francispoulin left a comment

Choose a reason for hiding this comment

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

Looks good and a step forward!

@navidcy navidcy merged commit b69b1d9 into main Mar 11, 2024
48 checks passed
@navidcy navidcy deleted the ncc/show-advection-scheme branch March 11, 2024 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

show method for HydrostaticFreeSurfaceModel does not show the advection scheme
3 participants