.true. inside the shelf box. Each of the four bounds is
applied only when it is FINITE in the CAVITY_BOUND_INF sense,
so the namelist defaults (+/-1e30) describe an unbounded shelf
and a user who only wants a calving front in x need not describe
y at all.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x | |||
| real(kind=wp), | intent(in) | :: | y | |||
| real(kind=wp), | intent(in) | :: | x0 | |||
| real(kind=wp), | intent(in) | :: | x1 | |||
| real(kind=wp), | intent(in) | :: | y0 | |||
| real(kind=wp), | intent(in) | :: | y1 |
pure function in_shelf_box(x, y, x0, x1, y0, y1) result(inside) !! `.true.` inside the shelf box. Each of the four bounds is !! applied only when it is FINITE in the `CAVITY_BOUND_INF` sense, !! so the namelist defaults (+/-1e30) describe an unbounded shelf !! and a user who only wants a calving front in x need not describe !! y at all. real(wp), intent(in) :: x, y, x0, x1, y0, y1 logical :: inside inside = .true. if (abs(x0) < CAVITY_BOUND_INF) inside = inside .and. (x >= x0) if (abs(x1) < CAVITY_BOUND_INF) inside = inside .and. (x <= x1) if (abs(y0) < CAVITY_BOUND_INF) inside = inside .and. (y >= y0) if (abs(y1) < CAVITY_BOUND_INF) inside = inside .and. (y <= y1) end function in_shelf_box