Lionel Roubeyrie wrote:
> Hi Jeff,
> yes, lambert is not the problem, you're right. I have some .grd files with 
> x,y,z values, and I want to project z values on maps and interpolate them. I 
> don't have the dimensions of the shape, but with m.scatter(x, y, z), I see 
> that the scatters are displayed in a regular grid. Then is there a way to 
> retrieve the dimensions of the resulting grid, and then I can reshape z to 
> pass it to contourf? 
>   
Lionel:  There should be an attribute or attributes in the netCDF file 
that specify the dimensions of the grid (at least there should be, 
according to the GMT documentation).
> I tried to convert x and y to degrees, hoping removing the duplicated entries 
> (with rouding) gives me the dimensions, but I also have a problem with 
> m(x,y,inverse=True), because the results are not good ( I use m = 
> Basemap(llcrnrlon=0.5, llcrnrlat=44.8, urcrnrlon=2.8, urcrnrlat=46.5, 
> projection='lcc', lat_1=45.89891889,lat_2=47.69601444,lon_0=2.33722917)).
> thanks
>   

You shouldn't need to do that - just pass x,y and the reshaped z to 
contourf.  You do need to know the parameters of the projection though. 

-Jeff

-- 
Jeffrey S. Whitaker         Phone : (303)497-6313
NOAA/OAR/CDC  R/PSD1        FAX   : (303)497-6449
325 Broadway                Boulder, CO, USA 80305-3328


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to