From 6008ac5e0ae53161bc0e38ddf176f4ff83f871e6 Mon Sep 17 00:00:00 2001 From: "Navid C. Constantinou" Date: Mon, 11 Mar 2024 19:41:41 +0200 Subject: [PATCH 1/2] show(io, ::HydrostaticFreeSurfaceModel) summarizes advection schemes --- .../show_hydrostatic_free_surface_model.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Models/HydrostaticFreeSurfaceModels/show_hydrostatic_free_surface_model.jl b/src/Models/HydrostaticFreeSurfaceModels/show_hydrostatic_free_surface_model.jl index d46b919028..a423ea83f8 100644 --- a/src/Models/HydrostaticFreeSurfaceModels/show_hydrostatic_free_surface_model.jl +++ b/src/Models/HydrostaticFreeSurfaceModels/show_hydrostatic_free_surface_model.jl @@ -31,6 +31,16 @@ function Base.show(io::IO, model::HydrostaticFreeSurfaceModel) end end + if model.advection !== nothing + print(io, "├── advection scheme: ", "\n") + names = keys(model.advection) + for name in names[1:end-1] + print(io, "│ ├── " * string(name) * ": " * summary(model.advection[name]), "\n") + end + name = names[end] + print(io, "│ └── " * string(name) * ": " * summary(model.advection[name]), "\n") + end + if isnothing(model.particles) print(io, "└── coriolis: $(typeof(model.coriolis))") else From 7f4def0c67b4377a753d7e68afcbd9d2df2b0a9d Mon Sep 17 00:00:00 2001 From: "Navid C. Constantinou" Date: Mon, 11 Mar 2024 22:06:02 +0200 Subject: [PATCH 2/2] fix doctests --- .../model_setup/buoyancy_and_equation_of_state.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/src/model_setup/buoyancy_and_equation_of_state.md b/docs/src/model_setup/buoyancy_and_equation_of_state.md index 8329573b8d..ce9470b11a 100644 --- a/docs/src/model_setup/buoyancy_and_equation_of_state.md +++ b/docs/src/model_setup/buoyancy_and_equation_of_state.md @@ -63,6 +63,8 @@ HydrostaticFreeSurfaceModel{CPU, RectilinearGrid}(time = 0 seconds, iteration = ├── buoyancy: Nothing ├── free surface: ImplicitFreeSurface with gravitational acceleration 9.80665 m s⁻² │ └── solver: FFTImplicitFreeSurfaceSolver +├── advection scheme: +│ └── momentum: Centered reconstruction order 2 └── coriolis: Nothing ``` @@ -94,6 +96,9 @@ HydrostaticFreeSurfaceModel{CPU, RectilinearGrid}(time = 0 seconds, iteration = ├── buoyancy: BuoyancyTracer with ĝ = NegativeZDirection() ├── free surface: ImplicitFreeSurface with gravitational acceleration 9.80665 m s⁻² │ └── solver: FFTImplicitFreeSurfaceSolver +├── advection scheme: +│ ├── momentum: Centered reconstruction order 2 +│ └── b: Centered reconstruction order 2 └── coriolis: Nothing ``` @@ -131,6 +136,10 @@ HydrostaticFreeSurfaceModel{CPU, RectilinearGrid}(time = 0 seconds, iteration = ├── 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 ``` @@ -146,6 +155,10 @@ HydrostaticFreeSurfaceModel{CPU, RectilinearGrid}(time = 0 seconds, iteration = ├── 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 ```