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
Call compute! in constructor for ComputedField (#4531)
* Update computed_field.jl
* Update oceananigans.bib
* remove obsolete compute statement
* add `compute` kw and retain original behavior in output_construction
* fix test plus docstrings
* Update src/OutputWriters/output_construction.jl
* fix doctests in operations.md
* fix doctest in seawater_density
* no need to compute
* no need to compute!
* fix docstrings
---------
Co-authored-by: Navid C. Constantinou <[email protected]>
Co-authored-by: tomaschor <[email protected]>
A few remarks: note that the `∫c` has locations `Nothing, Nothing, Center`; this is because we have integrated in the first two dimensions and thus it's `reduced over dims = (1, 2)`.
252
-
Further note that `∫c` is full of zeros; its max, min, and mean values are all 0.
253
-
No computation has been done yet.
254
-
To compute `∫c`, we call [`compute!`](@ref),
255
-
256
-
```jldoctest operations_avg_int
257
-
compute!(∫c)
258
-
259
-
# output
260
-
1×1×5 Field{Nothing, Nothing, Center} reduced over dims = (1, 2) on LatitudeLongitudeGrid on CPU
├── operand: Integral of ConditionalOperation of BinaryOperation at (Center, Center, Center) with condition cond (generic function with 1 method) over dims (1, 2)
297
281
├── status: time=0.0
298
282
└── data: 1×1×11 OffsetArray(::Array{Float64, 3}, 1:1, 1:1, -2:8) with eltype Float64 with indices 1:1×1:1×-2:8
0 commit comments