- Timestamp:
- 09/20/20 16:36:58 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/branches/trunk-larour-SLPS2020/src/m/plot/processmesh.m
r25163 r25587 24 24 if strcmp(domaintype(md.mesh),'3Dsurface'), 25 25 [x y z elements is2d isplanet] = processmesh(md.mesh,options); 26 if strcmpi(getfieldvalue(options,'coord','xy'),'latlon'), 27 x=md.mesh.long; 28 y=md.mesh.lat; 26 if strcmpi(getfieldvalue(options,'coord','xy'),'latlon') | strcmpi(getfieldvalue(options,'coord','xy'),'latlong'), 27 x0=md.mesh.long; 28 y0=md.mesh.lat; 29 %add row at lat=90 and lat=-90 30 add=[(-180:.1:-1e-5)';(1e-5:.1:180)']; 31 nadd=length(add); 32 xextra=[add;add]; 33 yextra=[90*ones(nadd,1); -90*ones(nadd,1)]; 34 x=[x0;xextra]; 35 y=[y0;yextra]; 36 37 if strcmpi(getfieldvalue(options,'coordcent','atlantic'),'pacific'), 38 pos=find(x>0); x(pos)=-360+x(pos); 39 end 29 40 elements=delaunay(x,y); 30 z= md.mesh.lat; z(:)=0;41 z=x; z(:)=0; 31 42 end 32 43 return; … … 42 53 else 43 54 elements=md.mesh.elements; 44 if ~strcmpi(getfieldvalue(options,'coord','xy'),'latlon') ,55 if ~strcmpi(getfieldvalue(options,'coord','xy'),'latlon') & ~strcmpi(getfieldvalue(options,'coord','xy'),'latlong') , 45 56 x=md.mesh.x; 46 57 if isprop(md.mesh,'x2d'), x2d=md.mesh.x2d; end … … 50 61 x=md.mesh.long; 51 62 y=md.mesh.lat; 63 if strcmpi(getfieldvalue(options,'coordcent','atlantic'),'pacific'), 64 pos=find(x>0); x(pos)-360+x(pos); 65 end 52 66 end 53 67 end
Note:
See TracChangeset
for help on using the changeset viewer.