how to output the free-surface
#2977
Replies: 5 comments 8 replies
-
@simone-silvestri how do you do it? |
Beta Was this translation helpful? Give feedback.
-
In case it is helpful to see what we tried, and did not work, here is our attempt that follows the examples.
|
Beta Was this translation helpful? Give feedback.
-
Here is a minumum working example. Sorry it took me a while to post it. using Oceananigans
using NCDatasets
grid = RectilinearGrid(CPU(),
size=(4, 4, 4), halo=(3, 3, 3),
x = (0, 1), y = (0, 1), z = (-1, 0),
topology=(Periodic, Periodic, Bounded)
)
model = HydrostaticFreeSurfaceModel(; grid)
simulation = Simulation(model, Δt=0.1, stop_time=0.2)
outputs = merge(model.velocities, (eta=model.free_surface.η,))
simulation.output_writers[:fields] = NetCDFOutputWriter(
model, outputs;
filename = "tmp",
schedule = TimeInterval(1),
with_halos = true,
overwrite_existing = true
)
run!(simulation) When I try
When I try `with-halos=false', I get the error that I mentioned before,
Any advice on how to fix this? |
Beta Was this translation helpful? Give feedback.
-
I tried a similar example using
|
Beta Was this translation helpful? Give feedback.
-
Has anyone been able to output the free surface using the
Following the suggestions above, I tried the following:
The lines above execute without errors - they return:
However, when I run the simulation
I encounter the following error:
I can provide the full stack trace if that would help. I'm interested in trying something like this:
Is there a simple way to adapt this function when using |
Beta Was this translation helpful? Give feedback.
-
I have modified an example to try and output the free-surface height, but unfortunately it gives the error that "Error accessing eta at index 4", which I guess occur because eta is a 2D field.
What is the proper syntax to include eta as an output variable?
Beta Was this translation helpful? Give feedback.
All reactions