-
Notifications
You must be signed in to change notification settings - Fork 254
Checkpointing simulations #4892
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
390f24e
751072c
bc39dd5
d131070
ee79883
30d4ccf
0f79241
c3838da
d721d9b
50cd623
629381f
f6d8bfc
e155376
71cffaa
5a1e461
d4c25bd
1f6814c
0802088
3b3eb39
c512323
4af2871
bf03663
6a7f654
d2ef109
3dbf637
4437c23
add807d
84d3550
3f4b6e3
ba1686f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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) | ||
|
|
@@ -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 | ||
|
|
||
| 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 | ||
|
||
|
|
||
| if length(model.auxiliary_fields) > 0 | ||
| restore_prognostic_state!(model.auxiliary_fields, state.auxiliary_fields) | ||
|
|
||
There was a problem hiding this comment.
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)There was a problem hiding this comment.
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.