pure subroutine build_ts_concentration(nx, ny, nz, h_old, hTr_T, hTr_S, conc_t, conc_s)
!! Build layer-mean T/S concentrations (c = hTr/h) from extensive tracer
!! content + pre-remap thicknesses, for the VCOORD_RHO density inversion.
!! Per-layer `rdb_vl_conc` (a filler reads `hTr/h`, its donor's
!! concentration by I1′; a zero-thickness layer reads 0). Flat-impl,
!! explicit-shape; one cadence-bounded launch per remap.
integer, intent(in) :: nx, ny, nz
real(wp), intent(in) :: h_old(nx, ny, nz)
real(wp), intent(in) :: hTr_T(nx, ny, nz)
real(wp), intent(in) :: hTr_S(nx, ny, nz)
real(wp), intent(out) :: conc_t(nx, ny, nz)
real(wp), intent(out) :: conc_s(nx, ny, nz)
integer :: i, j, k
do concurrent(k=1:nz, j=1:ny, i=1:nx)
conc_t(i, j, k) = rdb_vl_conc(hTr_T(i, j, k), h_old(i, j, k))
conc_s(i, j, k) = rdb_vl_conc(hTr_S(i, j, k), h_old(i, j, k))
end do
end subroutine build_ts_concentration