hi GrADS Users, Anybody here know how i write a file with the coordinates of my grid...<br>example: <br>x y lon lat<br>1 1 -67.3 3.1<br>. . . .<br>. . . .<br>. . . .<br>. . . .
<br>n n n n<br clear="all"><br>Can you help me with this???<br>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 (
<span style="font-weight: bold;">bold type</span>) but didn't function...<br><span style="font-weight: bold;"><span style="font-weight: bold;"><br></span>'set gxout print'</span><br style="font-weight: bold;">
<span style="font-weight: bold;">'set prnopts %1.3f 1 1 u'</span><br style="font-weight: bold;"><br style="font-weight: bold;"><span style="font-weight: bold;">'q dims'</span><br style="font-weight: bold;">
<br style="font-weight: bold;"><span style="font-weight: bold;">rec=sublin(result,2)</span><br style="font-weight: bold;"><span style="font-weight: bold;">Imin=subwrd(rec,11)</span><br style="font-weight: bold;"><span style="font-weight: bold;">
Imax=subwrd(rec,13)</span><br style="font-weight: bold;"><span style="font-weight: bold;">say 'Imin 'Imin 'Imax ' Imax</span><br style="font-weight: bold;"><span style="font-weight: bold;">rec=sublin(result,3)
</span><br style="font-weight: bold;"><span style="font-weight: bold;">Jmin=subwrd(rec,11)</span><br style="font-weight: bold;"><span style="font-weight: bold;">Jmax=subwrd(rec,13)</span><br style="font-weight: bold;"><span style="font-weight: bold;">
say 'Jmin 'Jmin 'Jmax ' Jmax</span><br style="font-weight: bold;"><br style="font-weight: bold;"><span style="font-weight: bold;">I = 1</span><br style="font-weight: bold;"><span style="font-weight: bold;">
while (I =< Imax)</span><br style="font-weight: bold;"><span style="font-weight: bold;">'q xy2w 'I ' ' J</span><br style="font-weight: bold;"><span style="font-weight: bold;">rec=sublin(result,1)</span>
<br style="font-weight: bold;"><span style="font-weight: bold;">I=subwrd(rec,3)</span><br style="font-weight: bold;"><span style="font-weight: bold;">J=subwrd(rec,6)</span><br style="font-weight: bold;"><span style="font-weight: bold;">
endwhile </span><br style="font-weight: bold;"><span style="font-weight: bold;"> while (J =< Jmax)</span><br style="font-weight: bold;"><span style="font-weight: bold;"> 'q xy2w 'I ' ' J</span><br style="font-weight: bold;">
<span style="font-weight: bold;"> rec=sublin(result,1)</span><br style="font-weight: bold;"><span style="font-weight: bold;"> I=subwrd(rec,3)</span><br style="font-weight: bold;"><span style="font-weight: bold;"> J=subwrd(rec,6)
</span><br style="font-weight: bold;"><span style="font-weight: bold;">rc = write ('/root/Desktop/LatLon.txt',result)</span><br style="font-weight: bold;"><span style="font-weight: bold;">rc = close ('/root/Desktop/LatLon.txt')
</span><br style="font-weight: bold;"><span style="font-weight: bold;">endwhile</span><br>-- <br>Ing. Rafael E. Mundaray M.