Hi Mantas, try with this, is a script that i made for obtain data in .txt format of a display...<br>Look the bold types... You must change those... <br>The script ask level and time that you need values...<br>Well, script is in Spanish but it easy reading...
<br>Remenber you change the display 'd rhprs' for your variable 'd WIND DIRECTION'<br>and change path and name of the file that you want that the datas be saved...<br>.................................................................................................................................................
<br><br>'q dims'<br>rec=sublin(result,2)<br>lonmin=subwrd(rec,6)<br>lonmax=subwrd(rec,8)<br> say 'lonmin 'lonmin 'lonmax 'lonmax<br>rec=sublin(result,3)<br>latmin=subwrd(rec,6)<br>latmax=subwrd(rec,8)
<br> say 'latmin 'latmin 'latmax 'latmax<br>rec=sublin(result,2)<br>Imin=subwrd(rec,11)<br> say 'Imin 'Imin <br>rec=sublin(result,2)<br>Imax=subwrd(rec,13)<br> say 'Imax 'Imax <br>
rec=sublin(result,3)<br>Jmin=subwrd(rec,11)<br> say 'Jmin 'Jmin <br>rec=sublin(result,3)<br>Jmax=subwrd(rec,13)<br> say 'Jmax 'Jmax <br>'set gxout shaded'<br><br>'q ctlinfo'<br>rec=sublin(result,6)
<br>LEVELsfc=subwrd(rec,4)<br>say 'Nivel en Superficie es= 'LEVELsfc<br>rec=sublin(result,10)<br>LEVELtop=subwrd(rec,3)<br>say 'Nivel Tope es= 'LEVELtop<br>say 'Debe Introducir el Nivel de la Variable'
<br>say 'Los Niveles Deben Estar Entre= 'LEVELsfc ' y ' LEVELtop<br>say 'INTRODUZCA EL NIVEL QUE DESEA'<br>pull level<br>'set lev 'level<br>if (level>LEVELsfc)<br> say 'Su Nivel Esta Por Debajo del Nivel de Superficie'
<br> say 'Reinicie el Programa'<br> return<br>else<br> if (level<LEVELtop)<br> say 'Su Nivel Esta Por Encima del Nivel Tope'<br> say 'Reinicie el Programa' <br> return
<br> endif<br>endif<br><br>rec=sublin(result,3)<br>Indefinida=subwrd(rec,2)<br> say 'Valor Indeterminado es= 'Indefinida<br><br>'q file'<br>rec=sublin(result,5)<br>Tsize=subwrd(rec,12)<br>say 'Numero de Tiempos Contenidos en el Archivo = 'Tsize
<br><br>'q time'<br>rec=sublin(result,1)<br>StartTIME=subwrd(rec,3)<br>say 'La Hora de INICIO del Archivo Es = 'StartTIME<br>'set t 'Tsize<br>'q time'<br>rec=sublin(result,1)<br>EndTIME=subwrd(rec,3)
<br>say 'La Hora FINAL del Archivo Es = 'EndTIME<br>say 'Debe Introducir un Tiempo Entre= 'StartTIME' y 'EndTIME<br>say 'INTRODUZCA EL TIEMPO EN QUE DESEA QUE SE GENERE EL ARCHIVO .TXT'<br>
pull time<br>'set t 'time<br>'q time'<br>rec=sublin(result,1)<br>SELECThour=subwrd(rec,3)<br>say 'Tiempo Seleccionado Es = 'SELECThour<br>say 'Esta seguro que desea este tiempo 1=yes 0=no'<br>
pull RES<br>if (RES = 0)<br> say 'Vuelva a Correr el Script y Seleccione el Tiempo que Desea'<br> return<br>endif<br><br>'d <span style="font-weight: bold;">rhprs</span>'<br><br>'q gr2w 'Imin' 'Jmin
<br>rec=sublin(result,1)<br>XminW=subwrd(rec,3)<br>YminW=subwrd(rec,6)<br> say 'Longitud y Latitud Minima Son= 'XminW' 'YminW<br><br>'q gr2w 'Imax' 'Jmax<br>rec=sublin(result,1)<br>XmaxW=subwrd(rec,3)
<br>YmaxW=subwrd(rec,6)<br> say 'Longitud y Latitud Maxima Son= 'XmaxW' 'YmaxW<br><br>dLon = (math_abs(lonmin)-math_abs(lonmax))/Imax<br>dLat = math_abs(math_abs(latmin)-math_abs(latmax))/Jmax<br> say 'dLon 'dLon 'dLat 'dLat
<br>lon=lonmin<br><br>rc = write('<span style="font-weight: bold;">/home/Rafael/Desktop/txt/RH_'SELECThour'.txt</span>','Tiempo del Archivo Generado= 'SELECThour'')<br>rc = write('<span style="font-weight: bold;">
/home/Rafael/Desktop/txt/RH_'SELECThour'.txt'</span>,'Nivel Seleccionado es= 'level'')<br>rc = write('<span style="font-weight: bold;">/home/Rafael/Desktop/txt/RH_'SELECThour'.txt</span>
','Punto ('Imin','Jmin') = ('XminW','YminW')')<br>rc = write('<span style="font-weight: bold;">/home/Rafael/Desktop/txt/RH_'SELECThour'.txt</span>','Punto ('Imin','Jmax') = ('XminW','YmaxW')')
<br>rc = write('<span style="font-weight: bold;">/home/Rafael/Desktop/txt/RH_'SELECThour</span>'.txt','Punto ('Imax','Jmin') = ('XmaxW','YminW')')<br>rc = write('
<span style="font-weight: bold;">/home/Rafael/Desktop/txt/RH_'SELECThour'.txt</span>','Punto ('Imax','Jmax') = ('XmaxW','YmaxW')')<br>rc = write('<span style="font-weight: bold;">
/home/Rafael/Desktop/txt/RH_'SELECThour'.txt</span>','X = 'Imin' a 'Imax' and Y = 'Jmin' a 'Jmax'')<br>rc = write('/<span style="font-weight: bold;">home/Rafael/Desktop/txt/RH_'SELECThour'.txt
</span>','Valor Indeterminado = 'Indefinida'')<br>rc = write('<span style="font-weight: bold;">/home/Rafael/Desktop/txt/RH_'SELECThour'.txt</span>','Latitud Longitud Variable')<br>
<br> while (lon <= lonmax+dLon)<br> lat=latmin<br> while (lat <= latmax)<br> 'set lat 'lat<br> 'set lon 'lon<br> '<span style="font-weight: bold;">
d rhprs</span>'<br> var = subwrd(result,4)<br> lonval = math_format('%6.3f',lon)<br> latval = math_format('%6.3f',lat)<br> valor = math_format('%4.1f',var)
<br> say 'Latval 'latval 'Lonval 'lonval 'Variable 'valor<br> <span style="font-weight: bold;">rc = write('/home/Rafael/Desktop/txt/RH_'SELECThour'.txt',''latval' 'lonval' 'valor'')
</span><br> 'clear'<br> lat=lat+dLat<br> endwhile<br> lon=lon+dLon<br> endwhile<br>say 'Hora Seleccionada Fue = 'SELECThour<br><span style="font-weight: bold;">
rc = close('/home/Rafael/Desktop/txt/RH_'SELECThour'.txt') </span><br style="font-weight: bold;"><br clear="all"><br>-- <br>Ing. Rafael E. Mundaray M.