-
Notifications
You must be signed in to change notification settings - Fork 274
Closed
Description
I seem to get an error whenever I try to pickup a simulation using PerturbationAdvection. Here's a MWE:
using Oceananigans
grid = RectilinearGrid(size = (8, 8, 8), extent = (1, 1, 1))
w_bc = FieldBoundaryConditions(bottom=OpenBoundaryCondition(0; scheme = PerturbationAdvection()))
model = NonhydrostaticModel(grid, boundary_conditions = (w=w_bc,))
simulation = Simulation(model, Δt = 1, wall_time_limit = 1)
simulation.output_writers[:ckpt_writer] = Checkpointer(model;
schedule = TimeInterval(10),
overwrite_existing = true,
cleanup = true)
run!(simulation, pickup=false, checkpoint_at_end=true) # Run fresh simulation
run!(simulation, pickup=true) # Pickup simulationOn main this produces this error:
ERROR: MethodError: no method matching restore_prognostic_state!(::Float64, ::Float64)
The function `restore_prognostic_state!` exists, but no method is defined for this combination of argument types.
Closest candidates are:
restore_prognostic_state!(::ZStarCoordinate, ::Any, ::Any)
@ Oceananigans ~/repos/Oceananigans.jl/src/Models/HydrostaticFreeSurfaceModels/z_star_coordinate.jl:206
restore_prognostic_state!(::Nothing, ::Any)
@ Oceananigans ~/repos/Oceananigans.jl/src/OutputWriters/checkpointer.jl:209
restore_prognostic_state!(::ZCoordinate, ::Any, ::Nothing)
@ Oceananigans ~/repos/Oceananigans.jl/src/Models/HydrostaticFreeSurfaceModels/z_star_coordinate.jl:194
...
Stacktrace:
[1] restore_prognostic_state!(restored::@NamedTuple{…}, from::@NamedTuple{…})
@ Oceananigans.OutputWriters ~/repos/Oceananigans.jl/src/OutputWriters/checkpointer.jl:234
[2] restore_prognostic_state!(restored::NonhydrostaticModel{…}, from::@NamedTuple{…})
@ Oceananigans.Models.NonhydrostaticModels ~/repos/Oceananigans.jl/src/Models/NonhydrostaticModels/nonhydrostatic_model.jl:361
[3] restore_prognostic_state!(restored::Simulation{…}, from::@NamedTuple{…})
@ Oceananigans.Simulations ~/repos/Oceananigans.jl/src/Simulations/simulation.jl:299
[4] set!(sim::Simulation{…}; checkpoint::Symbol, iteration::Nothing)
@ Oceananigans.Simulations ~/repos/Oceananigans.jl/src/Simulations/run.jl:99
[5] set!
@ ~/repos/Oceananigans.jl/src/Simulations/run.jl:82 [inlined]
[6] run!(sim::Simulation{…}; pickup::Bool, checkpoint_at_end::Bool)
@ Oceananigans.Simulations ~/repos/Oceananigans.jl/src/Simulations/run.jl:141
This seems to be related to different types for boundary_mass_flux elements in the restored model than the from model when restoring.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels