Open simone-silvestri opened 2 weeks ago
What happens if you use with_halos=true
? This might be a problem of trying to restrict to the interior.
Indeed:
julia> JLD2OutputWriter(model, (; c), filename = "test3", schedule = IterationInterval(1), with_halos = true)
JLD2OutputWriter scheduled on IterationInterval(1):
├── filepath: ./test3.jld2
├── 1 outputs: c
├── array type: Array{Float64}
├── including: [:grid, :coriolis, :buoyancy, :closure]
├── file_splitting: NoFileSplitting
└── file size: 20.3 KiB
julia> JLD2OutputWriter(model, (; c, d), filename = "test4", schedule = IterationInterval(1), with_halos = true)
JLD2OutputWriter scheduled on IterationInterval(1):
├── filepath: ./test4.jld2
├── 2 outputs: (c, d)
├── array type: Array{Float64}
├── including: [:grid, :coriolis, :buoyancy, :closure]
├── file_splitting: NoFileSplitting
└── file size: 25.9 KiB
I ll take a look at the restrict_to_interior
function
It's trying to use the wrong indices:
ERROR: ArgumentError: view indices (1:5, 1:5, 1:5) do not intersect field indices (Colon(), Colon(), 5:5)
It should be trying to view with indices (1:5, 1:5, 5:5)
.
MWE
fails with
It looks like there are problems also if trying to save the windowed field by itself
However, by specifying the indices it works