PRO wind_barbTEST ; This script reads in wind speed (in kts) and direction from IEDRO PIBAL rescued data. The ; data is placed in text separate files. Overall result is the visualization of the data in ; the form of conventional wind barbs placed at various measurement heights. The main point ; of this script simply converts ascii data to wind bard output. file_speed = READ_ASCII('C:\speed_TESTB.txt') ; reads in ASCII data speed = file_speed.(0) ; creates variable name for windspeed values file_direction = READ_ASCII('C:\direction_TESTB.txt') direction = file_direction.(0) ; creates variable name for wind direction values speed[WHERE(speed GT 200.)] = 0. ; replaces 999.000 in windspeed data with 0. direction[WHERE(direction GT 400.)] = 0. ; replaces 999.000 in direction data with 0 ; some constants deg2rad=!pi/180. ; multiply degrees by this factor to get radians d2r=!pi/180. x=indgen(5) ; number of sample launches y=indgen(11) ; number of vertical levels v=fltarr(5,11) ; create meridional wind component array u=fltarr(5,11) ; create zonal wind component array FOR i = 0,4 DO BEGIN ; loop to determine barb direction given wind components FOR j= 0,10 DO BEGIN v(i,j)=-cos(direction(i,j)*d2r)*speed(i,j) u(i,j)=-sin(direction(i,j)*d2r)*speed(i,j) ENDFOR ENDFOR XTICKNAMEs=['July 26','July 26','July 27','July 27','July 28'] ; arranges the names of x-ticks graphic = VECTOR( u[*,*], v[*,*], X, Y, direction_convention=2,$ ; plot the data vector_style=1,XTITLE='LAUNCH',YTITLE='LEVEL',$ TITLE='July 26-28, 2004 PIBAL station 57586 Malawi',$ XTICKNAME=xticknames) STOP END