PDA

View Full Version : plot wind profiler data

aarchibald
03-17-2008, 04:09 AM

I am a real newbie to using Wave. I bought a studet license to have a play with but have never really got round to using it much, hence this may be a very silly question.

I have data from a wind profiler that is sorted into 3 columns, time, altitude and variablex. I Just want to simply plot this data with a flat projection so that time is along the x-axis altitude the y-axis and a gardient of colour is used to represent the intensity of variablex.

I have managed to do this with gnuplot but I dont like the output much and wondered if any body would be kind enough to make a suggestion on how to do this in wave.

I have attached the data file if that helps.

kind regards,

alex

rwagner
03-17-2008, 08:34 AM
Hi,
I can't seem to download the file. Can you email it to support?

support@vni.com

Thanks,
Ryan

aarchibald
03-17-2008, 08:56 AM
Sure, sorry here is the data file

rwagner
03-17-2008, 12:58 PM
pro aber

;Change this line if your data file changes
n_rows = 234
t1 = strarr(n_rows)
t2 = strarr(n_rows)
elev = dblarr(n_rows)
varx1 = dblarr(n_rows)
varx2 = dblarr(n_rows)
varx3 = dblarr(n_rows)
varx4 = dblarr(n_rows)
varx5 = dblarr(n_rows)
varx6 = dblarr(n_rows)

s = dc_read_free('aber-time-data-samp.txt', t1, t2, elev, varx1, varx2, varx3, varx4, varx5, varx6, /column, delim=[':',' '])
time = 60*long(t1) + long(t2)
x = UNIQUE(time)
y = UNIQUE(elev)

;To change which variable we're looking at, simply change varx1 to varxn in the following command.
z = REFORM(varx1, n_elements(x), n_elements(y))

;The shades keyword allows for shading by intensities of the data (varx)

; You might also want to check out this interactive widget tool that lets you change the rotation and shading options. Once you find a view you like, put the rotation values in the above call to shade_surf in the ax and az keywords.
WGSURFACETOOL, z

;Also--- take note that you can view the z values of one variable, and shade it with another variable to see interaction between the variables... this can be considered a form of 4D visualization
z2 = REFORM(varx2, n_elements(x), n_elements(y))

;One more point of interest here... I see that you have several 0.0000 values which kind of mess up the surface. If these are datapoints that you are missing, you can try gridding the data to interpolate the missing values.
points = [x(0), y(0), z(0,0)]

FOR i = 1, n_elements(x)-1 DO BEGIN
FOR j = 1, n_elements(y)-1 DO BEGIN
IF z(i,j) GT 0 THEN points = [points, x(i), y(j), z(i,j)]
ENDFOR
ENDFOR

;print, points
points = REFORM(points, 3, N_ELEMENTS(points) / 3)

r = FAST_GRID3( points, n_elements(x), n_elements(y))

end

aarchibald
03-19-2008, 02:01 AM
Hi rwanger,

Thank you very very much for the code. I have tried it and I will have a play with it to tweak it but it looks great already!

Cheers!

aarchibald
03-28-2008, 04:10 AM
Hi,

Sorry to open up this thread again and thanks for your help previously. I just wondered how I may be able to change the code you provided so that I could create a 2-D contour plot of the 3-D data. I have managed to do this in Sigma Plot but it took a lot of tinkering about and I have many files to analyze so I would rather do it with PV-Wave if possible.

I have attached a plot from my attempt with Sigma Plot but if you have any suggestions on how I can make a similar plot using PV-Wave I would be most grateful.

Cheers!