Windowed read of a 2D variable: start/count (length 2, FORTRAN
dimension order) select the block that lands in data, whose
shape must equal count. The per-rank readers (bathymetry,
supergrid) use it to load only the rows their tile needs.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | ncid | |||
| integer, | intent(in) | :: | varid | |||
| integer, | intent(in) | :: | start(2) | |||
| integer, | intent(in) | :: | count(2) | |||
| real(kind=wp), | intent(inout) | :: | data(:,:) | |||
| integer, | intent(out), | optional | :: | ierr |
Non-zero on failure when present; absent behaves as today
( |
subroutine nc_get_var_slab_2d(ncid, varid, start, count, data, ierr) !! Windowed read of a 2D variable: `start`/`count` (length 2, FORTRAN !! dimension order) select the block that lands in `data`, whose !! shape must equal `count`. The per-rank readers (bathymetry, !! supergrid) use it to load only the rows their tile needs. integer, intent(in) :: ncid, varid integer, intent(in) :: start(2), count(2) real(wp), intent(inout) :: data(:, :) integer, intent(out), optional :: ierr !! Non-zero on failure when present; absent behaves as today !! (`error stop`). call nc_check(nf90_get_var(ncid, varid, data, start=start, count=count), & "reading NetCDF 2D window", ierr) end subroutine nc_get_var_slab_2d