in_shelf_box Function

private 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.

Arguments

Type IntentOptional 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

Return Value logical


Called by

proc~~in_shelf_box~~CalledByGraph proc~in_shelf_box in_shelf_box proc~set_draft_flat set_draft_flat proc~set_draft_flat->proc~in_shelf_box proc~set_draft_linear set_draft_linear proc~set_draft_linear->proc~in_shelf_box proc~seed_cavity_draft seed_cavity_draft proc~seed_cavity_draft->proc~set_draft_flat proc~seed_cavity_draft->proc~set_draft_linear proc~ocean_state_seed_from_cfg ocean_state_seed_from_cfg proc~ocean_state_seed_from_cfg->proc~seed_cavity_draft proc~engine_setup engine_setup proc~engine_setup->proc~ocean_state_seed_from_cfg proc~complete_ocean_create complete_ocean_create proc~complete_ocean_create->proc~engine_setup proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_setup proc~driver_validate driver_validate proc~driver_validate->proc~engine_setup

Source Code

   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