Skip to content

Commit c75a112

Browse files
glwagnernavidcysimone-silvestri
authored
Add a new tutorial for Models (#4790)
* Add tutorial for models * updates * Update docs/Project.toml Co-authored-by: Navid C. Constantinou <[email protected]> * Update docs/src/model_setup/overview.md Co-authored-by: Navid C. Constantinou <[email protected]> * Update docs/src/model_setup/overview.md Co-authored-by: Navid C. Constantinou <[email protected]> * add id * tweaks + add link to QuickStart * more links to other sections * remove compats from Oceananigans deps and rely on Oceananigans compats * add id * incorporate IC in model/overview * Restore examples and update documentation pages Re-enable examples and organize documentation structure. * Update make.jl * Log execution of examples with process count Add info log for executing examples with processes * Uncomment model setup pages in make.jl * Remove 'Setting initial conditions' from model setup * Remove OceananigansXESMFExt from documentation build * fix doctests * fix doctests * fix doctests * reorder examples * point to docstrings; don't reproduce them * section title --------- Co-authored-by: Navid C. Constantinou <[email protected]> Co-authored-by: Simone Silvestri <[email protected]>
1 parent ddbca8b commit c75a112

15 files changed

+339
-442
lines changed

docs/Project.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
77
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
88
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
99
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
10-
Measures = "442fdcdd-2543-5da2-b0f3-8c86c306513e"
1110
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
1211
Polynomials = "f27b6e38-b328-58d1-80ce-0feddd5e7a45"
1312
Rotations = "6038ab10-8711-5258-84ad-4b1120ba62dc"
@@ -20,10 +19,5 @@ CUDA = "5.4 - 5.8.2"
2019
CairoMakie = "0.11, 0.12, 0.13, 0.14"
2120
Documenter = "1"
2221
DocumenterCitations = "1"
23-
JLD2 = "0.4, 0,5"
2422
Literate = "2.9"
25-
NCDatasets = "0.12.10, 0.13.1, 0.14"
2623
Polynomials = "4"
27-
Rotations = "1.0"
28-
SeawaterPolynomials = "0.3.9"
29-
StructArrays = "0.4, 0.5, 0.6, 0.7"

docs/make.jl

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ Distributed.addprocs(2)
3636
# docs built which extra workers is as efficient as possible.
3737
example_scripts = [
3838
"internal_tide.jl",
39+
"langmuir_turbulence.jl",
3940
"shallow_water_Bickley_jet.jl",
41+
"ocean_wind_mixing_and_convection.jl",
4042
"kelvin_helmholtz_instability.jl",
4143
"horizontal_convection.jl",
42-
"langmuir_turbulence.jl",
4344
"baroclinic_adjustment.jl",
4445
"tilted_bottom_boundary_layer.jl",
4546
"convecting_plankton.jl",
46-
"ocean_wind_mixing_and_convection.jl",
4747
"two_dimensional_turbulence.jl",
4848
"one_dimensional_diffusion.jl",
4949
"internal_wave.jl",
@@ -87,20 +87,13 @@ example_pages = [
8787

8888
model_setup_pages = [
8989
"Overview" => "model_setup/overview.md",
90-
"Setting initial conditions" => "model_setup/setting_initial_conditions.md",
91-
"Architecture" => "model_setup/architecture.md",
92-
"Number type" => "model_setup/number_type.md",
93-
"Grid" => "model_setup/legacy_grids.md",
94-
"Clock" => "model_setup/clock.md",
9590
"Coriolis (rotation)" => "model_setup/coriolis.md",
96-
"Tracers" => "model_setup/tracers.md",
9791
"Buoyancy models and equation of state" => "model_setup/buoyancy_and_equation_of_state.md",
9892
"Boundary conditions" => "model_setup/boundary_conditions.md",
9993
"Forcing functions" => "model_setup/forcing_functions.md",
10094
"Background fields" => "model_setup/background_fields.md",
10195
"Turbulent diffusivity closures and LES models" => "model_setup/turbulent_diffusivity_closures_and_les_models.md",
10296
"Lagrangian particles" => "model_setup/lagrangian_particles.md",
103-
"Diagnostics" => "model_setup/diagnostics.md",
10497
"Callbacks" => "model_setup/callbacks.md",
10598
"Output writers" => "model_setup/output_writers.md",
10699
"Checkpointing" => "model_setup/checkpointing.md",
@@ -158,7 +151,7 @@ pages = [
158151
# "Averages, integrals, and cumulative integrals" => "reductions_and_accumulations.md",
159152
# "Simulations" => simulations.md,
160153
# "FieldTimeSeries and post-processing" => field_time_series.md,
161-
"Model setup (legacy)" => model_setup_pages,
154+
"Models" => model_setup_pages,
162155
"Physics" => physics_pages,
163156
"Numerical implementation" => numerical_pages,
164157
"Simulation tips" => "simulation_tips.md",
@@ -180,13 +173,18 @@ format = Documenter.HTML(collapselevel = 1,
180173

181174
DocMeta.setdocmeta!(Oceananigans, :DocTestSetup, :(using Oceananigans); recursive=true)
182175

176+
OceananigansNCDatasetsExt = if isdefined(Base, :get_extension)
177+
Base.get_extension(Oceananigans, :OceananigansNCDatasetsExt)
178+
else
179+
Oceananigans.OceananigansNCDatasetsExt
180+
end
181+
183182
makedocs(sitename = "Oceananigans.jl",
184183
authors = "Climate Modeling Alliance and contributors",
185184
format = format,
186185
pages = pages,
187186
plugins = [bib],
188-
modules = [Oceananigans,
189-
isdefined(Base, :get_extension) ? Base.get_extension(Oceananigans, :OceananigansNCDatasetsExt) : Oceananigans.OceananigansNCDatasetsExt],
187+
modules = [Oceananigans, OceananigansNCDatasetsExt],
190188
warnonly = [:cross_references],
191189
draft = false, # set to true to speed things up
192190
doctest = true, # set to false to speed things up

docs/src/grids.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ To obtain a discretization with a certain minimum spacing we need to play around
713713
and the number of cells.
714714

715715

716-
### Constant-to-stretched-spacing discretization
716+
### Reference-to-stretched-spacing discretization
717717

718718
[`ReferenceToStretchedDiscretization`](@ref) returns a discretization with a constant reference spacing over
719719
some extent and beyond which the spacing increases with a prescribed stretching law; this allows a tighter

docs/src/model_setup/architecture.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/src/model_setup/clock.md

Lines changed: 0 additions & 50 deletions
This file was deleted.

docs/src/model_setup/diagnostics.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

docs/src/model_setup/forcing_functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Forcing functions
1+
# [Forcing functions](@id forcing_functions)
22

33
"Forcings" are user-defined terms appended to right-hand side of
44
the momentum or tracer evolution equations. In `Oceananigans`, momentum

docs/src/model_setup/legacy_grids.md

Lines changed: 0 additions & 186 deletions
This file was deleted.

docs/src/model_setup/number_type.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)