Apply the compensation sink’s top-layer ratio to one PASSIVE
tracer’s load. Unconditional (scale = 1 off the sink), so
there is no mask branch inside the kernel.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nx |
First dimension. |
||
| integer, | intent(in) | :: | ny |
Second dimension. |
||
| integer, | intent(in) | :: | nz |
Layer count. |
||
| real(kind=wp), | intent(in) | :: | scale(nx,ny) |
|
||
| real(kind=wp), | intent(inout) | :: | hTr(nx,ny,nz) |
The tracer’s |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | i | ||||
| integer, | private | :: | j |
pure subroutine cavity_comp_scale_tracer_impl(nx, ny, nz, scale, hTr) !! Apply the compensation sink's top-layer ratio to one PASSIVE !! tracer's load. Unconditional (`scale = 1` off the sink), so !! there is no mask branch inside the kernel. integer, intent(in) :: nx !! First dimension. integer, intent(in) :: ny !! Second dimension. integer, intent(in) :: nz !! Layer count. real(wp), intent(in) :: scale(nx, ny) !! `h_new/h_old` from `cavity_comp_apply_impl`. real(wp), intent(inout) :: hTr(nx, ny, nz) !! The tracer's `h*C`. integer :: i, j do concurrent(j=1:ny, i=1:nx) hTr(i, j, nz) = hTr(i, j, nz)*scale(i, j) end do end subroutine cavity_comp_scale_tracer_impl