Changeset 17713
- Timestamp:
- 04/11/14 10:59:25 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/interp/interp.py
r17711 r17713 61 61 ind=npy.nonzero(mask)[0] 62 62 if len(ind) and fill_nans: 63 print " WARNING: filling nans using spline fit through good data points, which may or may not be appropriate. Check results carefully."63 print " WARNING: filling nans using spline fit through good data points, which may or may not be appropriate. Check results carefully." 64 64 subdata=npy.delete(subdata,ind) 65 65 points=npy.delete(points,ind,axis=0) … … 131 131 # create points array and flattened data array 132 132 if len(x)==data.shape[1] and len(y)==data.shape[0]: 133 print ' x,y taken to define the center of data grid cells'133 print ' x,y taken to define the center of data grid cells' 134 134 xind=npy.nonzero(npy.logical_and(x>xlim[0],x<xlim[1]))[0] 135 135 yind=npy.nonzero(npy.logical_and(y>ylim[0],y<ylim[1]))[0] … … 137 137 subdata=data[yind[0]:yind[-1]+1,xind[0]:xind[-1]+1] 138 138 elif len(x)==data.shape[1]+1 and len(y)==data.shape[0]+1: 139 print ' x,y taken to define the corners of data grid cells'139 print ' x,y taken to define the corners of data grid cells' 140 140 xcenter=npy.fromiter(((x[i]+x[i+1])/2 for i in range(len(x)-1)),npy.float) 141 141 ycenter=npy.fromiter(((y[i]+y[i+1])/2 for i in range(len(y)-1)),npy.float) … … 159 159 ind=npy.nonzero(mask)[0] 160 160 if len(ind) and fill_nans: 161 print " WARNING: filling nans using spline fit through good data points, which may or may not be appropriate. Check results carefully."161 print " WARNING: filling nans using spline fit through good data points, which may or may not be appropriate. Check results carefully." 162 162 goodsubdata=npy.delete(flatsubdata,ind) 163 163 goodpoints=npy.delete(points,ind,axis=0)
Note:
See TracChangeset
for help on using the changeset viewer.