Register a 2-D time-varying field f(x, y, t). Opens the file
now and keeps the handle for the run. See the module docstring
for the destination-offset contract.
nx_extra/ny_extra (default 0) widen this rank’s slab by that
many values in x/y. They exist for C-grid FACE fields: an
x-face array spans nx_phys + 1 faces, not nx_phys, and the
trailing face is OWNED by this rank (the west/south-owns-the-seam
rule), so no exchange can supply it — it has to come from the
file. A cell-centred field leaves both at 0.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ocean_data_input_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | file | |||
| character(len=*), | intent(in) | :: | var | |||
| type(hgrid_t), | intent(in) | :: | grid | |||
| integer, | intent(in) | :: | dest_n1 | |||
| integer, | intent(in) | :: | dest_n2 | |||
| integer, | intent(in) | :: | dest_i0 | |||
| integer, | intent(in) | :: | dest_j0 | |||
| integer, | intent(out) | :: | id | |||
| character(len=*), | intent(in), | optional | :: | time_mode | ||
| real(kind=wp), | intent(in), | optional | :: | cycle_period | ||
| real(kind=wp), | intent(in), | optional | :: | t_offset | ||
| real(kind=wp), | intent(in), | optional | :: | t_scale | ||
| real(kind=wp), | intent(in), | optional | :: | scale | ||
| real(kind=wp), | intent(in), | optional | :: | add_offset | ||
| integer, | intent(in), | optional | :: | oor | ||
| integer, | intent(in), | optional | :: | nx_extra | ||
| integer, | intent(in), | optional | :: | ny_extra | ||
| integer, | intent(out), | optional | :: | ierr |
Non-zero ( |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | nxe | ||||
| integer, | private | :: | nye |
subroutine ocean_data_input_register_2d(this, file, var, grid, dest_n1, dest_n2, & dest_i0, dest_j0, id, time_mode, cycle_period, & t_offset, t_scale, scale, add_offset, oor, & nx_extra, ny_extra, ierr) !! Register a 2-D time-varying field `f(x, y, t)`. Opens the file !! now and keeps the handle for the run. See the module docstring !! for the destination-offset contract. !! !! `nx_extra`/`ny_extra` (default 0) widen this rank's slab by that !! many values in x/y. They exist for C-grid FACE fields: an !! x-face array spans `nx_phys + 1` faces, not `nx_phys`, and the !! trailing face is OWNED by this rank (the west/south-owns-the-seam !! rule), so no exchange can supply it — it has to come from the !! file. A cell-centred field leaves both at 0. class(ocean_data_input_t), intent(inout) :: this character(len=*), intent(in) :: file, var type(hgrid_t), intent(in) :: grid integer, intent(in) :: dest_n1, dest_n2, dest_i0, dest_j0 integer, intent(out) :: id character(len=*), intent(in), optional :: time_mode real(wp), intent(in), optional :: cycle_period, t_offset, t_scale, scale, add_offset integer, intent(in), optional :: oor integer, intent(in), optional :: nx_extra, ny_extra integer, intent(out), optional :: ierr !! Non-zero (`OCEAN_STATUS_ERR_SETUP`/`OCEAN_STATUS_ERR_IO`) on a !! registry/file/dimension failure when present; absent behaves !! as today (`error stop`). integer :: nxe, nye nxe = 0 if (present(nx_extra)) nxe = nx_extra nye = 0 if (present(ny_extra)) nye = ny_extra call register_common(this, file, var, .false., & grid%i_offset_global + 1, grid%j_offset_global + 1, & grid%nx_phys + nxe, grid%ny_phys + nye, 1, & dest_i0, dest_j0, dest_n1, dest_n2, 1, & time_mode, cycle_period, t_offset, t_scale, scale, add_offset, oor, id, & ierr=ierr) end subroutine ocean_data_input_register_2d