Commit 7fd55120 authored by Pierre Cazenave's avatar Pierre Cazenave

Fix bug whereby the variables which do not require interpolation were not...

Fix bug whereby the variables which do not require interpolation were not being correctly transferred
parent 3199d9a5
......@@ -89,11 +89,11 @@ end
for vv=1:length(vars)
if strcmpi(vars{vv}, 'time')
fprintf('transferring variable %s as is\n', vars{vv})
fvcom.(vars{vv}) = data.(vars{1});
fvcom.(vars{vv}) = data.(vars{vv});
continue
elseif strcmpi(vars{vv}, 'lat') || strcmpi(vars{vv}, 'lon') || strcmpi(vars{vv}, 'x') || strcmpi(vars{vv}, 'y')
fprintf('reassigning variable %s from unstructured grid\n', vars{vv})
fvcom.(vars{vv}) = Mobj.(vars{1});
fvcom.(vars{vv}) = Mobj.(vars{vv});
else
% Preallocate the output arrays
fvcom.(vars{vv}).data = zeros(nElems,ntimes);
......
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