In clmain, u1lay and v1lay do not depend on the subsurface. So output values of zu1 and zv1 are simply u(:, 1) and v(:, 1). Just remove the corresponding computations from clmain and define yu1 and yv1 in physiq.