Read a full 3D array. Mirrors nc_get_var_2d; the target’s
shape must match the file variable’s Fortran storage order
(the caller handles any C/Fortran dimension reversal, as
rdb_bathymetry does for 2D).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | ncid | |||
| integer, | intent(in) | :: | varid | |||
| 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_3d(ncid, varid, data, ierr) !! Read a full 3D array. Mirrors `nc_get_var_2d`; the target's !! shape must match the file variable's Fortran storage order !! (the caller handles any C/Fortran dimension reversal, as !! `rdb_bathymetry` does for 2D). integer, intent(in) :: ncid integer, intent(in) :: varid 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), "reading 3D variable", ierr) end subroutine nc_get_var_3d