Skip to content
Draft
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
390f24e
First stab at starting to support checkpointing simulations
ali-ramadhan Oct 30, 2025
751072c
Start working on some new tests
ali-ramadhan Oct 30, 2025
bc39dd5
Parameterize a couple of tests
ali-ramadhan Oct 30, 2025
d131070
Replace old tests
ali-ramadhan Oct 30, 2025
ee79883
Fix `archs` for checkpointer tests
ali-ramadhan Oct 30, 2025
30d4ccf
Merge branch 'main' into ali/checkpointing-that-works
ali-ramadhan Oct 30, 2025
0f79241
Merge branch 'main' into ali/checkpointing-that-works
ali-ramadhan Nov 12, 2025
c3838da
Checkpointing output writers
ali-ramadhan Nov 13, 2025
d721d9b
Checkpointing and restoring Lagrangian particles
ali-ramadhan Nov 13, 2025
50cd623
Checkpoint the hydrostatic model
ali-ramadhan Nov 13, 2025
629381f
Merge branch 'ali/checkpointing-that-works' of github.com:CliMA/Ocean…
ali-ramadhan Nov 13, 2025
f6d8bfc
Update src/Models/HydrostaticFreeSurfaceModels/hydrostatic_free_surfa…
ali-ramadhan Nov 13, 2025
e155376
Nonhydrostatic diffusivity fields are now called closure fields
ali-ramadhan Nov 13, 2025
71cffaa
Fix model `prognostic_state`
ali-ramadhan Nov 13, 2025
5a1e461
Checkpointing `MultiRegionObject`
ali-ramadhan Nov 13, 2025
d4c25bd
Checkpointing for free surfaces
ali-ramadhan Nov 13, 2025
1f6814c
Properly checkpoint simulation to not override new stop criteria
ali-ramadhan Nov 13, 2025
0802088
Merge branch 'main' into ali/checkpointing-that-works
ali-ramadhan Nov 14, 2025
3b3eb39
Checkpoint `SplitRungeKutta3TimeStepper`
ali-ramadhan Nov 14, 2025
c512323
Test checkpointing hydrostatic models
ali-ramadhan Nov 14, 2025
4af2871
Merge branch 'ali/checkpointing-that-works' of github.com:CliMA/Ocean…
ali-ramadhan Nov 14, 2025
bf03663
Get rid of checkpointer properties
ali-ramadhan Nov 15, 2025
6a7f654
Checkpoint shallow water models
ali-ramadhan Nov 15, 2025
d2ef109
Test checkpointing shallow water models
ali-ramadhan Nov 15, 2025
3dbf637
Merge branch 'main' into ali/checkpointing-that-works
ali-ramadhan Nov 15, 2025
4437c23
Fix test archs for CI
ali-ramadhan Nov 15, 2025
add807d
Update checkpointing for `ImplicitFreeSurface`
ali-ramadhan Nov 15, 2025
84d3550
Merge branch 'main' into ali/checkpointing-that-works
ali-ramadhan Nov 16, 2025
3f4b6e3
Merge branch 'main' into ali/checkpointing-that-works
ali-ramadhan Nov 18, 2025
ba1686f
Merge branch 'main' into ali/checkpointing-that-works
ali-ramadhan Nov 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/Models/NonhydrostaticModels/nonhydrostatic_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ function prognostic_state(model::NonhydrostaticModel)
velocities = prognostic_state(model.velocities),
tracers = prognostic_state(model.tracers),
pressures = prognostic_state(model.pressures),
diffusivity_fields = prognostic_state(model.diffusivity_fields),
closure_fields = prognostic_state(model.closure_fields),
timestepper = prognostic_state(model.timestepper),
auxiliary_fields = prognostic_state(model.auxiliary_fields),
boundary_mass_fluxes = prognostic_state(model.boundary_mass_fluxes)
Expand All @@ -320,14 +320,16 @@ function restore_prognostic_state!(model::NonhydrostaticModel, state)
restore_prognostic_state!(model.clock, state.clock)
restore_prognostic_state!(model.particles, state.particles)
restore_prognostic_state!(model.velocities, state.velocities)
restore_prognostic_state!(model.pressures, state.pressures)
restore_prognostic_state!(model.timestepper, state.timestepper)

if length(model.tracers) > 0
restore_prognostic_state!(model.tracers, state.tracers)
end
Comment on lines 326 to 328
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might also be possible to catch this with dispatch on ::NamedTuple{} ( I think that's the rigfht way to write empty NamedTuple)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could! And it would make these functions simpler! Will do this soon as well.


restore_prognostic_state!(model.pressures, state.pressures)
restore_prognostic_state!(model.diffusivity_fields, state.diffusivity_fields)
restore_prognostic_state!(model.timestepper, state.timestepper)
if length(model.closure_fields) > 0
restore_prognostic_state!(model.closure_fields, state.closure_fields)
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we handle this with dispatch?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also for dispatch I think this may need to know the closure as well. This is a unique object that is "managed" by the closure but doesn't store much identifying info. We could also change that design, but might want to dedicate / test in a prior PR

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For sure. Right now I'm still working on getting all the existing tests to pass, but once they do I want to start testing checkpointing more and more complex simulations. As part of it, we should also test closures that use model.closure_fields.


if length(model.auxiliary_fields) > 0
restore_prognostic_state!(model.auxiliary_fields, state.auxiliary_fields)
Expand Down