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 Model constructor. For examples of model construction, see the examples. The verification experiments provide more advanced examples.

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

Oceananigans.ModelType
Model(;
               grid,
       architecture = CPU(),
         float_type = Float64,
            tracers = (:T, :S),
            closure = ConstantIsotropicDiffusivity(float_type, ν=ν₀, κ=κ₀),
              clock = Clock{float_type}(0, 0),
           buoyancy = SeawaterBuoyancy(float_type),
           coriolis = nothing,
      surface_waves = nothing,
            forcing = ModelForcing(),
boundary_conditions = HorizontallyPeriodicSolutionBCs(),
     output_writers = OrderedDict{Symbol, AbstractOutputWriter}(),
        diagnostics = OrderedDict{Symbol, AbstractDiagnostic}(),
         parameters = nothing,
         velocities = VelocityFields(architecture, grid),
          pressures = PressureFields(architecture, grid),
      diffusivities = TurbulentDiffusivities(architecture, grid, tracernames(tracers), closure),
        timestepper = :AdamsBashforth,
     poisson_solver = PoissonSolver(architecture, PoissonBCs(boundary_conditions), grid)
)

Construct an Oceananigans.jl model 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.
  • float_type: Float32 or Float64. The floating point type used for model data.
  • closure: The turbulence closure for model. See TurbulenceClosures.
  • buoyancy: Buoyancy model parameters.
  • coriolis: Parameters for the background rotation rate of the model.
  • forcing: User-defined forcing functions that contribute to solution tendencies.
  • boundary_conditions: User-defined boundary conditions for model fields. Can be eitherSolutionBoundaryConditions or ModelBoundaryConditions. See BoundaryConditions, HorizontallyPeriodicSolutionBCs, and ChannelSolutionBCs.
  • parameters: User-defined parameters for use in user-defined forcing functions and boundary condition functions.
source