Append-only registry of checkpoint fields. Slots call
register_2d / register_3d from their (or the state’s) init.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(restart_entry_t), | public | :: | entries(MAX_RESTART_ENTRIES) | ||||
| integer, | public | :: | n | = | 0 |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(restart_registry_t), | intent(inout) | :: | this |
Was tag actually present in the file the last time this
registry was passed to ocean_restart_read_local? .false.
before any read, and .false. for an unknown tag (a caller
typo is a silent cold-seed, not a crash — callers that care
should assert the tag exists via a successful register_*
first). See restart_entry_t%found’s docstring for why this is
not the same question as optional.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(restart_registry_t), | intent(in) | :: | this | |||
| character(len=*), | intent(in) | :: | tag |
Register a rank-2 owned field. arr is the full (ghosted)
host array; the owned slice is (ng+1:ng+nx_phys, ng+1:ng+ny_phys).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(restart_registry_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | tag | |||
| real(kind=wp), | intent(in), | target | :: | arr(:,:) | ||
| integer, | intent(in) | :: | ng | |||
| integer, | intent(in) | :: | nx_phys | |||
| integer, | intent(in) | :: | ny_phys | |||
| logical, | intent(in), | optional | :: | optional | ||
| logical, | intent(in), | optional | :: | device_mapped |
Register a rank-3 owned field. The vertical extent is taken
from size(arr,3) (layers or interfaces — both fully owned).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(restart_registry_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | tag | |||
| real(kind=wp), | intent(in), | target | :: | arr(:,:,:) | ||
| integer, | intent(in) | :: | ng | |||
| integer, | intent(in) | :: | nx_phys | |||
| integer, | intent(in) | :: | ny_phys | |||
| logical, | intent(in), | optional | :: | optional | ||
| logical, | intent(in), | optional | :: | device_mapped |
Register a host scalar (rank-0 persistent state, e.g. the Chapman
eta_old_chapman_* corner values). Host-only — never device-
mapped, so the write path skips update self for it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(restart_registry_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | tag | |||
| real(kind=wp), | intent(in), | target | :: | scal | ||
| logical, | intent(in), | optional | :: | optional |
type :: restart_registry_t !! Append-only registry of checkpoint fields. Slots call !! `register_2d` / `register_3d` from their (or the state's) init. integer :: n = 0 type(restart_entry_t) :: entries(MAX_RESTART_ENTRIES) contains procedure, non_overridable :: register_scalar => registry_register_scalar procedure, non_overridable :: register_2d => registry_register_2d procedure, non_overridable :: register_3d => registry_register_3d procedure, non_overridable :: clear => registry_clear procedure, non_overridable :: entry_found => registry_entry_found end type restart_registry_t