Restarting from a checkpoint with function boundary conditions #1300
-
Hi all! The current problem I am having is with trying to restart a run from a checkpoint where the run uses boundary conditions defined by functions. The documentation warns that there are some complications surrounding this but I was wondering if anyone had any experience. I have rebuilt the boundary conditions as I did in the initial set up of the model and then when I try to run the line below,
the following error is returned
and the stack trace ultimately leads to the function 'extract_boundary_conditions' in src/Models/IncompressibleModels/incompressible_model.jl Am I using the wrong keyword arguments for restore_from_checkpoint? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Hi @sam12396! Glad you're finding the package easy to use! Apologies for the outdated documentation. Checkpointing has been recently refactored (and improved) in PR #1082. So you don't want to use If you've already added a This way you don't have to worry about restoring boundary conditions! |
Beta Was this translation helpful? Give feedback.
Hi @sam12396! Glad you're finding the package easy to use!
Apologies for the outdated documentation. Checkpointing has been recently refactored (and improved) in PR #1082.
So you don't want to use
restore_from_checkpoint
anymore (we should remove this function). Instead, you pickup via thepickup
keyword argument passed torun!
.If you've already added a
Checkpointer
tosimulation.output_writers
you can just dorun!(simulation, pickup=true)
and it'll continue running the simulation from the latest checkpoint. You can also pass a filepath or an iteration number to restore from a specific checkpoint. More details: https://clima.github.io/OceananigansDocumentation/stable/library/#Oceananigan…