Thanks for the suggestion to look at the demo, I had missed it in my initial
look through. The quiver_demo seems to be broken up into three sections. The
first section initializes the information for the the two quiver plots
(sections two and three). This seems like the logical place to start for
importing the array information. The information in the quiver demo seems to
make sense, but I do not understand what needs to be modified and what does
not. Is there any location that contains more documentation about the quiver
function, or another demo that I could follow? Anyway, thanks for the help. 
Jon

I have done my best to comment out the first section.

Section 1:
# read in data.
file = open('fcover.dat','r') 
#I assume this section is not needed because because the netcdf file has
already been imported. 
ul=[];vl=[];pl=[]
#this seems to initiate the functions that are going to be imported and
plotted
nlons=73; nlats=73
#Not sure what this does
dellat = 2.5; dellon = 5.
#degrees that are displayed?
for line in file.readlines():
   l = line.replace('\n','').split()
   ul.append(float(l[0]))
   vl.append(float(l[1]))
   pl.append(float(l[2]))
u = np.reshape(np.array(ul,np.float32),(nlats,nlons))
v = np.reshape(np.array(vl,np.float32),(nlats,nlons))
p = np.reshape(np.array(pl,np.float32),(nlats,nlons))
lats1 = -90.+dellat*np.arange(nlats)
lons1 = -180.+dellon*np.arange(nlons)
lons, lats = np.meshgrid(lons1, lats1)



# read in data.
file = open('fcover.dat','r')
ul=[];vl=[];pl=[]
nlons=73; nlats=73
dellat = 2.5; dellon = 5.
for line in file.readlines():
   l = line.replace('\n','').split()
   ul.append(float(l[0]))
   vl.append(float(l[1]))
   pl.append(float(l[2]))
u = np.reshape(np.array(ul,np.float32),(nlats,nlons))
v = np.reshape(np.array(vl,np.float32),(nlats,nlons))
p = np.reshape(np.array(pl,np.float32),(nlats,nlons))
#equations calculating the magnitude of the vectors?
lats1 = -90.+dellat*np.arange(nlats)
lons1 = -180.+dellon*np.arange(nlons)
lons, lats = np.meshgrid(lons1, lats1)

-- 
View this message in context: 
http://www.nabble.com/Quiver-plot-of-a-netcdf-file-tp23986313p24045770.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to