P2.5: stage Oceananigans-style grid topology (per-dimension
periodicity — “the grid owns periodicity”, not the per-edge
&ocean_bc_nml tags) on the PENDING handle c_handle. Consumed
inside rdb_ocean_create_finalize via
ocean_bc_state_set_topology, run AFTER the namelist edge tags
are parsed and OVERRIDING whatever they derived for
periodic_x/periodic_y (an axis NOT marked periodic here keeps
whatever physical BC the namelist gave it).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | intent(in), | value | :: | c_handle | ||
| integer(kind=c_int), | intent(in), | value | :: | periodic_x |
Nonzero = periodic on that axis. |
|
| integer(kind=c_int), | intent(in), | value | :: | periodic_y |
Nonzero = periodic on that axis. |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(ocean_handle_t), | private, | pointer | :: | h |
function rdb_ocean_stage_topology(c_handle, periodic_x, periodic_y) & result(status) bind(c, name="rdb_ocean_stage_topology") !! P2.5: stage Oceananigans-style grid topology (per-dimension !! periodicity — "the grid owns periodicity", not the per-edge !! `&ocean_bc_nml` tags) on the PENDING handle `c_handle`. Consumed !! inside `rdb_ocean_create_finalize` via !! `ocean_bc_state_set_topology`, run AFTER the namelist edge tags !! are parsed and OVERRIDING whatever they derived for !! `periodic_x`/`periodic_y` (an axis NOT marked periodic here keeps !! whatever physical BC the namelist gave it). type(c_ptr), intent(in), value :: c_handle integer(c_int), intent(in), value :: periodic_x, periodic_y !! Nonzero = periodic on that axis. integer(c_int) :: status type(ocean_handle_t), pointer :: h status = resolve_ocean_pending(c_handle, h) if (status /= OCEAN_STATUS_OK) return h%engine%staged_periodic_x = (periodic_x /= 0_c_int) h%engine%staged_periodic_y = (periodic_y /= 0_c_int) h%engine%has_staged_topology = .true. status = int(OCEAN_STATUS_OK, c_int) end function rdb_ocean_stage_topology