cavity_water_column_impl Subroutine

public pure subroutine cavity_water_column_impl(water, b, z_draft, nx, ny)

water = b - z_draft — the reference water-column thickness the datum, the layer split and the wet-mask seed all work on. Kept as one named routine so the three call sites cannot drift.

Explicit-shape by the house rule; host-only (setup).

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(out) :: water(nx,ny)
real(kind=wp), intent(in) :: b(nx,ny)
real(kind=wp), intent(in) :: z_draft(nx,ny)
integer, intent(in) :: nx
integer, intent(in) :: ny

Called by

proc~~cavity_water_column_impl~~CalledByGraph proc~cavity_water_column_impl cavity_water_column_impl proc~ocean_state_seed_from_cfg ocean_state_seed_from_cfg proc~ocean_state_seed_from_cfg->proc~cavity_water_column_impl 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 proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean proc~rdb_ocean_create_finalize rdb_ocean_create_finalize proc~rdb_ocean_create_finalize->proc~complete_ocean_create proc~rdb_ocean_create_from_string rdb_ocean_create_from_string proc~rdb_ocean_create_from_string->proc~complete_ocean_create

Variables

Type Visibility Attributes Name Initial
integer, private :: i
integer, private :: j

Source Code

   pure subroutine cavity_water_column_impl(water, b, z_draft, nx, ny)
      !! `water = b - z_draft` — the reference water-column thickness the
      !! datum, the layer split and the wet-mask seed all work on.  Kept
      !! as one named routine so the three call sites cannot drift.
      !!
      !! Explicit-shape by the house rule; host-only (setup).
      integer, intent(in) :: nx, ny
      real(wp), intent(out) :: water(nx, ny)
      real(wp), intent(in) :: b(nx, ny)
      real(wp), intent(in) :: z_draft(nx, ny)
      integer :: i, j
      do j = 1, ny
         do i = 1, nx
            water(i, j) = b(i, j) - z_draft(i, j)
         end do
      end do
   end subroutine cavity_water_column_impl