Full-array overwrite (including ghosts — they get
Q_salt_const + 0, the same value the configure-time seed
already gave them, so this is a no-op there). Explicit-shape
dummies + decl-order (integer dims before the arrays that use
them) so NVHPC stdpar compiles a device kernel against static
bounds. Runs on the device-resident Q_salt (mapped by
sf%enter_data) and salt_flux_diag (mapped by ice%enter_data).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(inout) | :: | Q_salt(nx,ny) | |||
| real(kind=wp), | intent(in) | :: | salt_flux_diag(nx,ny) | |||
| real(kind=wp), | intent(in) | :: | Q_salt_const | |||
| integer, | intent(in) | :: | nx | |||
| integer, | intent(in) | :: | ny |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | i | ||||
| integer, | private | :: | j |
pure subroutine ice_ocean_brine_flux_impl(Q_salt, salt_flux_diag, Q_salt_const, nx, ny) !! Full-array overwrite (including ghosts — they get !! `Q_salt_const + 0`, the same value the configure-time seed !! already gave them, so this is a no-op there). Explicit-shape !! dummies + decl-order (integer dims before the arrays that use !! them) so NVHPC stdpar compiles a device kernel against static !! bounds. Runs on the device-resident `Q_salt` (mapped by !! `sf%enter_data`) and `salt_flux_diag` (mapped by `ice%enter_data`). integer, intent(in) :: nx, ny real(wp), intent(inout) :: Q_salt(nx, ny) real(wp), intent(in) :: salt_flux_diag(nx, ny) real(wp), intent(in) :: Q_salt_const integer :: i, j do concurrent(j=1:ny, i=1:nx) Q_salt(i, j) = Q_salt_const + salt_flux_diag(i, j) end do end subroutine ice_ocean_brine_flux_impl