Changeset 17597
- Timestamp:
- 03/28/14 12:15:43 (11 years ago)
- Location:
- issm/trunk-jpl/src/m/plot
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/plot/processdata.m
r17474 r17597 22 22 end 23 23 24 %special case for mes g2dvertical24 %special case for mesh 2dvertical 25 25 if strcmp(meshtype(md.mesh),'2Dvertical'), 26 26 [data datatype] = processdata(md.mesh,md,data,options); -
issm/trunk-jpl/src/m/plot/processdata.py
r13969 r17597 22 22 23 23 #needed later on 24 if md.mesh.numberofvertices2d:24 if 'numberofvertices2d' in dir(md.mesh): 25 25 numberofvertices2d=md.mesh.numberofvertices2d 26 26 numberofelements2d=md.mesh.numberofelements2d -
issm/trunk-jpl/src/m/plot/processmesh.py
r17581 r17597 1 1 from math import isnan 2 2 import MatlabFuncs as m 3 import numpy as npy 3 4 4 5 def processmesh(md,data,options): … … 22 23 if 'latlon' not in options.getfieldvalue('coord','xy').lower(): #convert to lower case for comparison 23 24 x=md.mesh.x 24 if not isnan(md.mesh.x2d): x2d=md.mesh.x2d25 if 'x2d' in dir(md.mesh): x2d=md.mesh.x2d 25 26 y=md.mesh.y 26 if not isnan(md.mesh.y2d): y2d=md.mesh.y2d27 if 'y2d' in dir(md.mesh): y2d=md.mesh.x2d 27 28 else: 28 29 x=md.mesh.long 29 30 y=md.mesh.lat 30 31 31 z_field=options.getfieldvalue('z',md.mesh.z) 32 #if isinstance(z_field,basestring): # how could z be a string? 33 # z=md.(z_field) 34 if isinstance(z_field,(int,long,float)): # isnumeric 35 z=z_field 32 if 'z' in dir(md.mesh): 33 z=md.mesh.z 36 34 else: 37 z= md.mesh.z35 z=npy.zeros_like(md.mesh.x) 38 36 39 if not isnan(md.mesh.elements2d):37 if 'elements2d' in dir(md.mesh): 40 38 elements2d=md.mesh.elements2d 41 elements2d=elements2d-1 42 # subtract one since python indexes from zero 39 elements2d=elements2d-1 # subtract one since python indexes from zero 43 40 elements=md.mesh.elements 44 41 elements=elements-1
Note:
See TracChangeset
for help on using the changeset viewer.