Skip to content

Commit 3a9a703

Browse files
committed
quick script to generate a netcdf file in Oceananigans
1 parent 44fc50c commit 3a9a703

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/make_netcdf.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
using Oceananigans
2+
grid = RectilinearGrid(size=(4, 4, 4), extent=(1, 1, 1));
3+
model = NonhydrostaticModel(; grid)
4+
simulation = Simulation(model; Δt = 1, stop_time=10)
5+
simulation.output_writers[:nc] = NetCDFWriter(model, model.velocities, schedule=IterationInterval(1), filename="uvw.nc", overwrite_existing=true)
6+
run!(simulation)

0 commit comments

Comments
 (0)