Lat and Lon
Rafael Mundaray
remm69 at GMAIL.COM
Tue May 22 11:12:02 EDT 2007
hi GrADS Users, Anybody here know how i write a file with the coordinates of
my grid...
example:
x y lon lat
1 1 -67.3 3.1
. . . .
. . . .
. . . .
. . . .
n n n n
Can you help me with this???
I know that 'q xy2w x y' corvets the x and y dimension to reals coordinates
(Lon,Lat), but i want that save this in one file with all my points of my
grids... I was trying this (bold type) but didn't function...
'set gxout print'
'set prnopts %1.3f 1 1 u'
'q dims'
rec=sublin(result,2)
Imin=subwrd(rec,11)
Imax=subwrd(rec,13)
say 'Imin 'Imin 'Imax ' Imax
rec=sublin(result,3)
Jmin=subwrd(rec,11)
Jmax=subwrd(rec,13)
say 'Jmin 'Jmin 'Jmax ' Jmax
I = 1
while (I =< Imax)
'q xy2w 'I ' ' J
rec=sublin(result,1)
I=subwrd(rec,3)
J=subwrd(rec,6)
endwhile
while (J =< Jmax)
'q xy2w 'I ' ' J
rec=sublin(result,1)
I=subwrd(rec,3)
J=subwrd(rec,6)
rc = write ('/root/Desktop/LatLon.txt',result)
rc = close ('/root/Desktop/LatLon.txt')
endwhile
--
Ing. Rafael E. Mundaray M.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20070522/7dd712d4/attachment.html
More information about the gradsusr
mailing list