Commit 478701dd authored by Pierre Cazenave's avatar Pierre Cazenave

Fix the vertical interpolation of POLCOMS derived temperature and salinity...

Fix the vertical interpolation of POLCOMS derived temperature and salinity profiles. This is because POLCOMS starts its vertical layers from the seabed whilst FVCOM from the sea surface
parent ac8c9577
......@@ -275,9 +275,12 @@ for xi = 1:nx
% Now get the POLCOMS depth at this node for the time index
% identified above.
tpz = xdepth(yi, :);
ytemp(yi, :) = interp1(tpz, xtemp(yi, :), tfz, 'linear', 'extrap');
% POLCOMS starts its vertical layers from the seabed, FVCOM
% from the surface. Flip the POLCOMS data to match FVCOM's
% scheme.
ytemp(yi, :) = interp1(tpz, fliplr(xtemp(yi, :)), tfz, 'linear', 'extrap');
ysalt(yi, :) = interp1(tpz, xsalt(yi, :), tfz, 'linear', 'extrap');
ysalt(yi, :) = interp1(tpz, fliplr(xsalt(yi, :)), tfz, 'linear', 'extrap');
end
end
pctempz(xi, :, :) = ytemp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment