From: John <was...@gm...> - 2007-10-31 20:19:58
|
Shoot, still getting the error discussed above: ValueError: shape mismatch: objects cannot be broadcast to a single shapeFile "c:\07_jfb\Programming\Python\mod_flexpart\plotPickle.py", line 30, in <module> fp_plot(z); File "c:\07_jfb\Programming\Python\mod_flexpart\plotflex.py", line 55, in fp_plot cs = m.contourf(x,y,zdat) File "c:\Python25\Lib\site-packages\matplotlib\toolkits\basemap\basemap.py", line 2439, in contourf mask = NX.logical_or(ma.getmaskarray(data),xymask) What seems strange, is that after following your instructions: nx = int((m.xmax-m.xmin)/20000.)+1; ny = int((m.ymax-m.ymin)/20000.)+1 zdat,x,y = m.transform_scalar(Zdat,lons,lats,nx,ny,returnxy=True) lons, lats = N.meshgrid(lons, lats) x, y = m(lons, lats) # map is the Basemap instance cs = m.contourf(x,y,zdat) The shape of my zdat no longer fits?? >>> print [N.shape(i) for i in [x,y,zdat]] [(180, 360), (180, 360), (596, 596)] |