Map a grid-location tag (LOC_{H,U,V,Q}) to the field’s 2D
extents on the Arakawa-C grid — u/v faces carry the extra
wall-normal row/column, the corner both. This is the single
place the C-grid extent convention lives; call sites pass loc.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(hgrid_t), | intent(in) | :: | grid | |||
| integer, | intent(in) | :: | loc | |||
| integer, | intent(out) | :: | nx | |||
| integer, | intent(out) | :: | ny |
pure subroutine chksum_loc_extents(grid, loc, nx, ny) !! Map a grid-location tag (`LOC_{H,U,V,Q}`) to the field's 2D !! extents on the Arakawa-C grid — u/v faces carry the extra !! wall-normal row/column, the corner both. This is the single !! place the C-grid extent convention lives; call sites pass `loc`. type(hgrid_t), intent(in) :: grid integer, intent(in) :: loc integer, intent(out) :: nx, ny select case (loc) case (LOC_U) nx = grid%nx_total + 1 ny = grid%ny_total case (LOC_V) nx = grid%nx_total ny = grid%ny_total + 1 case (LOC_Q) nx = grid%nx_total + 1 ny = grid%ny_total + 1 case default ! LOC_H (and any unknown tag) => cell-centre extents. nx = grid%nx_total ny = grid%ny_total end select end subroutine chksum_loc_extents