Revision: 8973
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8973&view=rev
Author:   jswhit
Date:     2011-02-11 21:04:16 +0000 (Fri, 11 Feb 2011)

Log Message:
-----------
no regridding

Modified Paths:
--------------
    trunk/toolkits/basemap/examples/lic_demo.py

Modified: trunk/toolkits/basemap/examples/lic_demo.py
===================================================================
--- trunk/toolkits/basemap/examples/lic_demo.py 2011-02-11 20:52:28 UTC (rev 
8972)
+++ trunk/toolkits/basemap/examples/lic_demo.py 2011-02-11 21:04:16 UTC (rev 
8973)
@@ -15,27 +15,26 @@
 
 # H*wind data from http://www.aoml.noaa.gov/hrd/data_sub/wind.html
 ncfile = NetCDFFile('rita.nc')
-u = ncfile.variables['sfc_u'][0,:,:]
-v = ncfile.variables['sfc_v'][0,:,:]
+udat = ncfile.variables['sfc_u'][0,:,:]
+vdat = ncfile.variables['sfc_v'][0,:,:]
 lons1 = ncfile.variables['longitude'][:]
 lats1 = ncfile.variables['latitude'][:]
 lat0 = lats1[len(lats1)/2]; lon0 = lons1[len(lons1)/2]
-print lat0,lon0
 lons, lats = np.meshgrid(lons1,lats1)
 ncfile.close()
 
+
 fig = plt.figure(figsize=(8,8))
-m = 
Basemap(projection='stere',lat_0=lat0,lon_0=lon0,width=1.e6,height=1.e6,resolution='i')
-nxv = 301; nyv = 301; kernellen=41
-udat, vdat, xv, yv = m.transform_vector(u,v,lons1,lats1,nxv,nyv,returnxy=True)
+m = 
Basemap(projection='cyl',llcrnrlat=lats1[0],llcrnrlon=lons1[0],urcrnrlat=lats1[-1],urcrnrlon=lons1[-1],resolution='i')
+kernellen=31
 texture = np.random.rand(udat.shape[0],udat.shape[1]).astype(np.float32)
 kernel = np.sin(np.arange(kernellen)*np.pi/kernellen).astype(np.float32)
 image = lic_internal.line_integral_convolution(udat.astype(np.float32),\
         vdat.astype(np.float32), texture, kernel)
 im = m.imshow(image,plt.cm.gist_stern)
 m.drawcoastlines()
-m.drawmeridians(np.arange(0,360,2),labels=[0,0,0,1])
-m.drawparallels(np.arange(-30,30,2),labels=[1,0,0,0])
+m.drawmeridians(np.arange(-120,-60,2),labels=[0,0,0,1])
+m.drawparallels(np.arange(0,30,2),labels=[1,0,0,0])
 plt.title('Hurricane Rita flow field visualized with Line Integral 
Convolution',\
         fontsize=13)
 plt.show()


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to