One registered checkpoint field. Holds a pointer to the slot’s
host array (or host scalar) plus the interior extents needed to
slice owned cells. Exactly one of p0 / p2 / p3 is associated
(per rank: 0 = host scalar, 2/3 = array).
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | device_mapped | = | .true. |
.true. => write path pulls host-ward via |
|
| logical, | public | :: | found | = | .false. |
PR-2 (bt-rem-from-av-rem review): set by |
|
| integer, | public | :: | ng | = | 0 |
Ghost width (interior starts at ng+1 in x and y). |
|
| integer, | public | :: | nk | = | 0 |
Third-dim extent for rank-3 fields (no vertical ghosts — layers/interfaces are all owned). |
|
| integer, | public | :: | nx_phys | = | 0 |
Owned-cell extents in x, y. |
|
| integer, | public | :: | ny_phys | = | 0 |
Owned-cell extents in x, y. |
|
| logical, | public | :: | optional | = | .false. |
.true. => read path warns-and-seeds if absent. Default .false. => a missing field is FATAL. |
|
| real(kind=wp), | public, | pointer | :: | p0 | => | null() |
Host scalar (rank-0 persistent state, e.g. Chapman eta_old). |
| real(kind=wp), | public, | pointer | :: | p2(:,:) | => | null() |
Host array for rank-2 fields (incl. ghosts). |
| real(kind=wp), | public, | pointer | :: | p3(:,:,:) | => | null() |
Host array for rank-3 fields (incl. ghosts). |
| integer, | public | :: | rank | = | 0 |
0 (host scalar), 2, or 3. |
|
| character(len=64), | public | :: | tag | = | "" |
NetCDF variable name (unique within the file). |
type :: restart_entry_t !! One registered checkpoint field. Holds a pointer to the slot's !! host array (or host scalar) plus the interior extents needed to !! slice owned cells. Exactly one of `p0 / p2 / p3` is associated !! (per `rank`: 0 = host scalar, 2/3 = array). character(len=64) :: tag = "" !! NetCDF variable name (unique within the file). integer :: rank = 0 !! 0 (host scalar), 2, or 3. real(wp), pointer :: p0 => null() !! Host scalar (rank-0 persistent state, e.g. Chapman eta_old). real(wp), pointer :: p2(:, :) => null() !! Host array for rank-2 fields (incl. ghosts). real(wp), pointer :: p3(:, :, :) => null() !! Host array for rank-3 fields (incl. ghosts). integer :: ng = 0 !! Ghost width (interior starts at ng+1 in x and y). integer :: nx_phys = 0, ny_phys = 0 !! Owned-cell extents in x, y. integer :: nk = 0 !! Third-dim extent for rank-3 fields (no vertical ghosts — !! layers/interfaces are all owned). logical :: optional = .false. !! .true. => read path warns-and-seeds if absent. Default !! .false. => a missing field is FATAL. logical :: device_mapped = .true. !! .true. => write path pulls host-ward via `!$acc update self` !! first. Host-only state sets .false. so `update self` is never !! issued on an unmapped array (crashes on GPU). logical :: found = .false. !! PR-2 (bt-rem-from-av-rem review): set by `ocean_restart_read_local` !! when THIS entry's variable was actually present in the file !! being read (always `.false.` before a read, and on a WRITE !! path registry this field is simply never consulted). Lets a !! caller distinguish "optional field restored from the !! checkpoint" from "optional field missing, left at its seeded !! value" for an entry whose downstream setup behaviour must !! differ between the two (see `registry_entry_found`, !! `ocean_vmix_t%kv_from_restart`) — `optional` alone only says !! whether a MISSING entry is fatal, not whether THIS read found !! it. end type restart_entry_t