Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

WindVector NANs


bonilt May 17, 2011 03:00 PM

Hi,

I'm using the WindVector instruction (output option 2) in a one-minute interval data table for calculating the averages of 1 sample per second wind data. There are certain situations in which one of the wind speed/direction one-second values are NANs within an interval. According to the documentation of the instruction, "NANs are ignored for the standard deviation of the WindVector and for Output option 2". However, when I have one sample in which my speed and direction are NANs, the one-minute WindVector output becomes NAN for the mean horizontal wind speed and wind speed average and 0 for the wind direction average and standard deviation for that specific one-minute interval. What I would like is for the instruction to ignore the samples containing NANs within that interval and calculate the averages with the good samples. I don't want to call the table conditionally as I have other measurements being reported as part of the same table. According to the documentation, option 2 should be able to ignore NANs which is what I need so I'm not sure if this is a bug, documentation error or perhaps I'm not understanding how the instruction works. Any help would be appreciated.

This is how my table definition looks.

DataTable(Average_OneMin,True,-1)
DataInterval(0,1,Min,25)
CardOut (0,-1)
WindVector (1,WindSpeed,WindDirection,IEEE4,False,0,0,2) FieldNames("MeanHZWS,WindSpeed_Avg,WindDirection_Avg,StdDevWS")
Maximum (1,WindSpeed,IEEE4,False,False)
SampleMaxMin (1,WindDirection,IEEE4,False)
Average (1,AirTemp,IEEE4,False)
Average (1,RH,IEEE4,False)
EndTable

Thanks,

T. Bonilla


IslandMan May 17, 2011 09:25 PM

Change the wind vector instruction to read:
WindVector (1,WindSpeed,WindDirection,IEEE4,WindSpeed=NAN OR WindDirection=NAN,0,0,2)

This will cause the WindVector to ignore the NAN's.

I can't recall exactly but I'm pretty sure you need the OR.
You should really figure out why the WindSpeed and WindDirection are giving you NAN in the 1st place.


bonilt May 18, 2011 01:14 PM

Thanks Dave. I'll try that and see if that works.

I am actually assigning the NANs intentionally during certain situations.

Log in or register to post/reply in the forum.