Equation (4) implictly assumes that layer boundaries
do not occur between time/depth pairs. The code does not make this
assumptions: layer boundaries can occur anywhere in time, and are
completely independent of the time/depth pairs. When a layer boundary
lies between time/depth pairs p and p+1, the integral has two
parts: depth contribution from above and below the layer boundary.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.