Commit 22794a72 authored by Simon Waldman's avatar Simon Waldman

read_sms_mesh.m : bug fix : if we have both xy and lon/lat coords in the...

read_sms_mesh.m : bug fix : if we have both xy and lon/lat coords in the output stage, don't replace the lon/lat ones with zeros.
parent 9be98010
......@@ -338,8 +338,10 @@ if have_lonlat
Mobj.have_lonlat = have_lonlat;
Mobj.lon = lon;
Mobj.lat = lat;
Mobj.x = zeros(size(lon));
Mobj.y = zeros(size(lat));
if ~have_xy
Mobj.x = zeros(size(lon));
Mobj.y = zeros(size(lat));
end
% Add element spherical coordinates too.
Mobj.lonc = nodes2elems(lon, Mobj);
Mobj.latc = nodes2elems(lat, Mobj);
......@@ -348,8 +350,10 @@ if have_xy
Mobj.have_xy = have_xy;
Mobj.x = x;
Mobj.y = y;
Mobj.lon = zeros(size(x));
Mobj.lat = zeros(size(y));
if ~have_lonlat
Mobj.lon = zeros(size(x));
Mobj.lat = zeros(size(y));
end
% Add element cartesian coordinates too.
Mobj.xc = nodes2elems(x, Mobj);
Mobj.yc = nodes2elems(y, Mobj);
......
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