Replies: 1 comment
-
2D models cannot have surface stress because there are no z-derivatives in a 2D model. A surface stress is a vertical flux across the top grid cell. To describe concisely what happens consider a simplified version of the x-momentum equation: where where A two-dimensional model has vertical direction and therefore no vertical flux of anything. There is no way to add a surface stress. Often times we think of two-dimensional models as idealizing the evolution of the vertical average or something. So we can derive a two-dimensional momentum equation for example by taking the vertical average of the equation I wrote above, but over an entire dimension, say an ocean of depth where So one can think of "surface forcing" as being a body force acting on the vertically-averaged equations, which are integrated in But even in this case I strongly recommend to refer to the physical effect as a body force in 2D, rather than a "surface stress". It's not a surface stress, because a 2D model has no surface. We've developed the code intentionally to help users (but also people who read user's code) understand clearly the physics that are being applied. In particular, a 2D model has no grid spacing in the vertical direction (it's not easy to think of this as a model with just 1 grid point in the vertical direction, which is usually the way that people simplify 3D to 2D). So we can't apply a surface stress to the "top" grid cell, there is no In summary, surface or bottom boundary conditions cannot be applied to models that are 2D in x, y. However, it is likely that the effect one is trying to achieve would use a body |
Beta Was this translation helpful? Give feedback.
-
I am just learning Oceananigans.jl and Julia. To get acquainted with the framework i'm tryig to advect around a passive tracer on a 2D field. Basically integrate forward the advection diffusion equation. I tried modifying the wind stress example in the docs to work with a (Periodic, Periodic, Flat) topology (i.e. a torus). But I am learning you can't apply a
FluxBoundaryCondition
in theFlat
direction. Any guidance would be appreciated. Thanks! Here is my code so far:For what it's worth, here the complete error code:
Beta Was this translation helpful? Give feedback.
All reactions