By grd file, I mean csv like file, with one line by value, like
X1      Y1      Z1
X2      Y1      Z2
X3      Y1      Z3
...
X1      Y2      Zk
X2      Y2      Zk+1
...
Xi      Yj      Zn
this is in geographic format, where there is a repetition in the X values and 
the Y values, because the grid is regular, but not in lambert projection, 
then I can't retrieve the dimensions of the grid.

Le Vendredi 20 Avril 2007 14:54, Jeff Whitaker a écrit :
> 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

-- 
Lionel Roubeyrie - [EMAIL PROTECTED]
Chagé d'études et de maintenance
LIMAIR - la Surveillance de l'Air en Limousin
http://www.limair.asso.fr


-------------------------------------------------------------------------
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