-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HydrostaticFreeSurface
model on a grid with Flat z
#2198
Comments
Good idea. Maybe even suggest the user try |
Hmm... we don't support I'm not sure about We might be able to refactor the algorithm to generally support hydrostatic free surface simulations with On a regular Before generalizing anything we could add an error message to the
|
Yes, I agree that |
well, using a314f1f I get julia> using Oceananigans
julia> grid
1×1×1 RectilinearGrid{Float64, Periodic, Bounded, Flat} on CPU with 1×1×0 halo
├── Periodic x ∈ [0.0, 1.0) regularly spaced with Δx=1.0
├── Bounded y ∈ [0.0, 2.0] regularly spaced with Δy=2.0
└── Flat z
julia> model = HydrostaticFreeSurfaceModel(grid=grid)
HydrostaticFreeSurfaceModel{CPU, Float64}(time = 0 seconds, iteration = 0)
├── grid: 1×1×1 RectilinearGrid{Float64, Periodic, Bounded, Flat} on CPU with 1×1×0 halo
├── tracers: (:T, :S)
├── closure: Nothing
├── buoyancy: Buoyancy{SeawaterBuoyancy{Float64, LinearEquationOfState{Float64}, Nothing, Nothing}, Oceananigans.Grids.ZDirection}
└── coriolis: Nothing
julia> simulation = Simulation(model, Δt=1.0, stop_iteration=2)
Simulation{typename(HydrostaticFreeSurfaceModel){typename(CPU), Float64}}
├── Model clock: time = 0 seconds, iteration = 0
├── Next time step: 1 second
├── Elapsed wall time: 0 seconds
├── Stop time: Inf years
├── Stop iteration : 2.0
├── Wall time limit: Inf
├── Callbacks: typename(OrderedCollections.OrderedDict) with 4 entries:
│ ├── stop_time_exceeded => typename(Callback)
│ ├── stop_iteration_exceeded => typename(Callback)
│ ├── wall_time_limit_exceeded => typename(Callback)
│ └── nan_checker => typename(Callback)
├── Output writers: typename(OrderedCollections.OrderedDict) with no entries
└── Diagnostics: typename(OrderedCollections.OrderedDict) with no entries
julia> run!(simulation)
[ Info: Initializing simulation...
[ Info: ... simulation initialization complete (169.437 ms)
[ Info: Executing initial time step...
[ Info: ... initial time step complete (23.728 seconds).
[ Info: Simulation is stopping. Model iteration 2 has hit or exceeded simulation stop iteration 2. so something's running and not complaining!
Same! Runs again no complaining :) julia> using Oceananigans
julia> grid
1×1×1 RectilinearGrid{Float64, Periodic, Bounded, Flat} on CPU with 1×1×0 halo
├── Periodic x ∈ [0.0, 1.0) regularly spaced with Δx=1.0
├── Bounded y ∈ [0.0, 2.0] regularly spaced with Δy=2.0
└── Flat z
julia> model = HydrostaticFreeSurfaceModel(grid=grid, free_surface = ImplicitFreeSurface())
HydrostaticFreeSurfaceModel{CPU, Float64}(time = 0 seconds, iteration = 0)
├── grid: 1×1×1 RectilinearGrid{Float64, Periodic, Bounded, Flat} on CPU with 1×1×0 halo
├── tracers: (:T, :S)
├── closure: Nothing
├── buoyancy: Buoyancy{SeawaterBuoyancy{Float64, LinearEquationOfState{Float64}, Nothing, Nothing}, Oceananigans.Grids.ZDirection}
└── coriolis: Nothing
julia> simulation = Simulation(model, Δt=1.0, stop_iteration=2)
Simulation{typename(HydrostaticFreeSurfaceModel){typename(CPU), Float64}}
├── Model clock: time = 0 seconds, iteration = 0
├── Next time step: 1 second
├── Elapsed wall time: 0 seconds
├── Stop time: Inf years
├── Stop iteration : 2.0
├── Wall time limit: Inf
├── Callbacks: typename(OrderedCollections.OrderedDict) with 4 entries:
│ ├── stop_time_exceeded => typename(Callback)
│ ├── stop_iteration_exceeded => typename(Callback)
│ ├── wall_time_limit_exceeded => typename(Callback)
│ └── nan_checker => typename(Callback)
├── Output writers: typename(OrderedCollections.OrderedDict) with no entries
└── Diagnostics: typename(OrderedCollections.OrderedDict) with no entries
julia> run!(simulation)
[ Info: Initializing simulation...
[ Info: ... simulation initialization complete (198.852 ms)
[ Info: Executing initial time step...
[ Info: ... initial time step complete (1.013 minutes).
[ Info: Simulation is stopping. Model iteration 2 has hit or exceeded simulation stop iteration 2.
yeah! |
Is this closed? |
Wait nevermind, I know that its closed. |
Does this make sense (physically)?
I guess not. Perhaps the
HydrostaticFreeSurfaceModel
should print a warning to users that try to do that?The text was updated successfully, but these errors were encountered: