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.Model — TypeModel(;
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 whichmodelis solved.architecture:CPU()orGPU(). The computer architecture used to time-stepmodel.float_type:Float32orFloat64. The floating point type used formodeldata.closure: The turbulence closure formodel. SeeTurbulenceClosures.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 eitherSolutionBoundaryConditionsorModelBoundaryConditions. SeeBoundaryConditions,HorizontallyPeriodicSolutionBCs, andChannelSolutionBCs.parameters: User-defined parameters for use in user-defined forcing functions and boundary condition functions.