You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are some example codes that calculate buoyancy budget terms in Oceananigans. Starting from here, we can implement tracer budget diagnostics in the future.
using Oceananigans.TurbulenceClosures: ∇_dot_qᶜ
using Oceananigans.Models.NonhydrostaticModels: tracer_tendency
using Oceananigans.Utils: SumOfArrays
grid = model.grid
advection = model.advection
u, v, w = velocities = model.velocities
b = model.tracers.b
total_velocities = (u =SumOfArrays{2}(u, model.background_fields.velocities.u),
v =SumOfArrays{2}(v, model.background_fields.velocities.v),
w =SumOfArrays{2}(w, model.background_fields.velocities.w))
ADVb =-KernelFunctionOperation{Center, Center, Center}(div_Uc, grid, advection, total_velocities, b)
ADVB =-KernelFunctionOperation{Center, Center, Center}(div_Uc, grid, advection, velocities, model.background_fields.tracers.b)
DIFb =-KernelFunctionOperation{Center, Center, Center}(∇_dot_qᶜ, grid, model.closure, model.diffusivity_fields, Val(1), b,
model.clock, fields(model), model.buoyancy)
∂ₜb =KernelFunctionOperation{Center, Center, Center}(tracer_tendency, grid, Val(1), Val(:b), advection, model.closure,
b.boundary_conditions.immersed, model.buoyancy, model.biogeochemistry,
model.background_fields, velocities, model.tracers, model.auxiliary_fields,
model.diffusivity_fields, model.forcing.b, model.clock)
The text was updated successfully, but these errors were encountered:
Here are some example codes that calculate buoyancy budget terms in Oceananigans. Starting from here, we can implement tracer budget diagnostics in the future.
The text was updated successfully, but these errors were encountered: