Model setup

This section describes all the options and features that can be used to set up a model. For more detailed information consult the API documentation.

Each structure covered in this section can be constructed and passed to the models' constructors. For examples of model construction, see the examples. The validation experiments provide more advanced examples.

For reference, here are all the option or keyword arguments that can be passed to the models currently implemented in Oceananigans.jl. See the different sections on the sidebar for more details and examples for each keyword argument.

NonhydrostaticModel

Oceananigans.Models.NonhydrostaticModels.NonhydrostaticModelType
NonhydrostaticModel(;
               grid,
       architecture = CPU(),
              clock = Clock{eltype(grid)}(0, 0, 1),
          advection = CenteredSecondOrder(),
           buoyancy = Buoyancy(SeawaterBuoyancy(eltype(grid))),
           coriolis = nothing,
       stokes_drift = nothing,
            forcing = NamedTuple(),
            closure = nothing,
boundary_conditions = NamedTuple(),
            tracers = (:T, :S),
        timestepper = :QuasiAdamsBashforth2,
  background_fields = NamedTuple(),
          particles = nothing,
         velocities = nothing,
          pressures = nothing,
 diffusivity_fields = nothing,
    pressure_solver = nothing,
  immersed_boundary = nothing,
   auxiliary_fields = NamedTuple(),
)

Construct a model for a non-hydrostatic, incompressible fluid, using the Boussinesq approximation when buoyancy != nothing. By default, all Bounded directions are rigid and impenetrable.

Keyword arguments

- `grid`: (required) The resolution and discrete geometry on which `model` is solved.
- `architecture`: `CPU()` or `GPU()`. The computer architecture used to time-step `model`.
- `advection`: The scheme that advects velocities and tracers. See `Oceananigans.Advection`.
- `buoyancy`: The buoyancy model. See `Oceananigans.BuoyancyModels`.
- `closure`: The turbulence closure for `model`. See `Oceananigans.TurbulenceClosures`.
- `coriolis`: Parameters for the background rotation rate of the model.
- `forcing`: `NamedTuple` of user-defined forcing functions that contribute to solution tendencies.
- `boundary_conditions`: `NamedTuple` containing field boundary conditions.
- `tracers`: A tuple of symbols defining the names of the modeled tracers, or a `NamedTuple` of
             preallocated `CenterField`s.
- `timestepper`: A symbol that specifies the time-stepping method. Either `:QuasiAdamsBashforth2` or
                 `:RungeKutta3`.
source

HydrostaticFreeSurfaceModel

Oceananigans.Models.HydrostaticFreeSurfaceModels.HydrostaticFreeSurfaceModelType
HydrostaticFreeSurfaceModel(;
               grid,
       architecture = CPU(),
              clock = Clock{eltype(grid)}(0, 0, 1),
 momentum_advection = CenteredSecondOrder(),
   tracer_advection = CenteredSecondOrder(),
           buoyancy = SeawaterBuoyancy(eltype(grid)),
           coriolis = nothing,
            forcing = NamedTuple(),
            closure = IsotropicDiffusivity(eltype(grid), ν=ν₀, κ=κ₀),
boundary_conditions = NamedTuple(),
            tracers = (:T, :S),
          particles = nothing,
         velocities = nothing,
           pressure = nothing,
 diffusivity_fields = nothing,
   auxiliary_fields = NamedTuple(),
)

Construct an hydrostatic Oceananigans.jl model with a free surface on grid.

Keyword arguments

- `grid`: (required) The resolution and discrete geometry on which `model` is solved.
- `architecture`: `CPU()` or `GPU()`. The computer architecture used to time-step `model`.
- `gravitational_acceleration`: The gravitational acceleration applied to the free surface
- `advection`: The scheme that advects velocities and tracers. See `Oceananigans.Advection`.
- `buoyancy`: The buoyancy model. See `Oceananigans.BuoyancyModels`.
- `closure`: The turbulence closure for `model`. See `Oceananigans.TurbulenceClosures`.
- `coriolis`: Parameters for the background rotation rate of the model.
- `forcing`: `NamedTuple` of user-defined forcing functions that contribute to solution tendencies.
- `boundary_conditions`: `NamedTuple` containing field boundary conditions.
- `tracers`: A tuple of symbols defining the names of the modeled tracers, or a `NamedTuple` of
             preallocated `CenterField`s.
source

ShallowWaterModel

Oceananigans.Models.ShallowWaterModels.ShallowWaterModelType
ShallowWaterModel(;
                           grid,
                           gravitational_acceleration,
  architecture::AbstractArchitecture = CPU(),
                               clock = Clock{eltype(grid)}(0, 0, 1),
                           advection = UpwindBiasedFifthOrder(),
                            coriolis = nothing,
                 forcing::NamedTuple = NamedTuple(),
                             closure = nothing,
                          bathymetry = nothing,
                             tracers = (),
                  diffusivity_fields = nothing,
     boundary_conditions::NamedTuple = NamedTuple(),
                 timestepper::Symbol = :RungeKutta3)

Construct a shallow water Oceananigans.jl model on grid with gravitational_acceleration constant.

Keyword arguments

- `grid`: (required) The resolution and discrete geometry on which `model` is solved.
- `gravitational_acceleration`: (required) The gravitational accelaration constant.
- `architecture`: `CPU()` or `GPU()`. The computer architecture used to time-step `model`.
- `clock`: The `clock` for the model
- `advection`: The scheme that advects velocities and tracers. See `Oceananigans.Advection`.
- `coriolis`: Parameters for the background rotation rate of the model.
- `forcing`: `NamedTuple` of user-defined forcing functions that contribute to solution tendencies.
- `bathymetry`: The bottom bathymetry.
- `tracers`: A tuple of symbols defining the names of the modeled tracers, or a `NamedTuple` of
             preallocated `CenterField`s.
- `diffusivity_fields`: Stores diffusivity fields when the closures require a diffusivity to be
                        calculated at each timestep.
- `boundary_conditions`: `NamedTuple` containing field boundary conditions.
- `timestepper`: A symbol that specifies the time-stepping method. Either `:QuasiAdamsBashforth2`,
                 `:RungeKutta3`.
source