Copy the bed depth b (m, positive down, (nx_total, ny_total)
incl. ghosts) into this%bathy on the host. Call it with the
WRAPPED + halo-exchanged barotropic%b (the seam faces read the
ghosts) and BEFORE enter_data (the device copy is taken from
the host values); to refresh after enter_data the caller issues
!$acc update device(this%bathy) itself. No-op on an
uninitialised slot.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ocean_slopes_t), | intent(inout) | :: | this | |||
| real(kind=wp), | intent(in) | :: | b(:,:) |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | i | ||||
| integer, | private | :: | j |
subroutine ocean_slopes_set_bathymetry(this, b) !! Copy the bed depth `b` (m, positive down, `(nx_total, ny_total)` !! incl. ghosts) into `this%bathy` on the host. Call it with the !! WRAPPED + halo-exchanged `barotropic%b` (the seam faces read the !! ghosts) and BEFORE `enter_data` (the device copy is taken from !! the host values); to refresh after `enter_data` the caller issues !! `!$acc update device(this%bathy)` itself. No-op on an !! uninitialised slot. class(ocean_slopes_t), intent(inout) :: this real(wp), intent(in) :: b(:, :) integer :: i, j if (.not. this%is_init) return if (size(b, 1) /= this%nx_total .or. size(b, 2) /= this%ny_total) then error stop "ocean_slopes_set_bathymetry: shape mismatch" end if do j = 1, this%ny_total do i = 1, this%nx_total this%bathy(i, j) = b(i, j) end do end do this%bathy_set = .true. end subroutine ocean_slopes_set_bathymetry