ocean_bc_state_exit_data Subroutine

public subroutine ocean_bc_state_exit_data(this)

GPU unmapping — components first, parent last (reverse of enter_data).

Arguments

Type IntentOptional Attributes Name
type(ocean_bc_state_t), intent(inout) :: this

Called by

proc~~ocean_bc_state_exit_data~~CalledByGraph proc~ocean_bc_state_exit_data ocean_bc_state_exit_data proc~ocean_state_exit_data ocean_state_exit_data proc~ocean_state_exit_data->proc~ocean_bc_state_exit_data proc~engine_exit_data engine_exit_data proc~engine_exit_data->proc~ocean_state_exit_data proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_exit_data proc~rdb_ocean_destroy rdb_ocean_destroy proc~rdb_ocean_destroy->proc~engine_exit_data proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean

Source Code

   subroutine ocean_bc_state_exit_data(this)
      !! GPU unmapping — components first, parent last (reverse of enter_data).
      type(ocean_bc_state_t), intent(inout) :: this
      if (.not. this%is_init) return
      ! Orlanski arrays (§2, v2) — reverse allocation order.
      if (allocated(this%u_prev_north)) then
         !$acc exit data delete(this%u_prev_north)
      end if
      if (allocated(this%u_prev_south)) then
         !$acc exit data delete(this%u_prev_south)
      end if
      if (allocated(this%u_prev_east)) then
         !$acc exit data delete(this%u_prev_east)
      end if
      if (allocated(this%u_prev_west)) then
         !$acc exit data delete(this%u_prev_west)
      end if
      if (allocated(this%rx_north)) then
         !$acc exit data delete(this%rx_north)
      end if
      if (allocated(this%rx_south)) then
         !$acc exit data delete(this%rx_south)
      end if
      if (allocated(this%rx_east)) then
         !$acc exit data delete(this%rx_east)
      end if
      if (allocated(this%rx_west)) then
         !$acc exit data delete(this%rx_west)
      end if
      ! Reservoir arrays (§1, v2).
      if (allocated(this%tres_north)) then
         !$acc exit data delete(this%tres_north)
      end if
      if (allocated(this%tres_south)) then
         !$acc exit data delete(this%tres_south)
      end if
      if (allocated(this%tres_east)) then
         !$acc exit data delete(this%tres_east)
      end if
      if (allocated(this%tres_west)) then
         !$acc exit data delete(this%tres_west)
      end if
      !$acc exit data delete(this)
   end subroutine ocean_bc_state_exit_data