Bug in area operator `Az` and potentially other operators...
bug 🐞
Hi, I am trying to do a simple computation of the surface area of a grid. When I use the existing Oceananigans Operators, I get a very strange surface area. For example:
```Julia
using Oceananigans
using Oceananigans.Operators: Az
Nz = 32
grid = RectilinearGrid(size=(32, 32, Nz), extent=(1, 1, 1))
field_test = Field{Center, Center, Nothing}(grid)
set!(field_test, 1)
area = field_test * Az
tot_area = Integral(area, dims=(1, 2)) |> Field
@show tot_area[1, 1, 1]
```
Gives `tot_area[1, 1, 1]= 0.0009765625` -- when we would expect `1`!
Any ideas what is going on here? cc @navidcy who I was debugging this with.
关闭于 2026-05-22 2 条评论