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.

How to output Wind Direction and Speed Averages from CSAT-3


ganzlin Oct 23, 2015 03:25 PM

Hello,

I run several EC systems using LI-7500As and the CSAT-3 (100mSec scan interval). In addition to the 30minute eddy covariance output, I have a 15 minute data table outputting met data for a long-term network.

I am having trouble trying to get 15 minute averages of wind speed and direction for this table from the CSAT-3. I have done some reading on the WindVector command but the help files are geared towards polar (non-sonic) anaemometers. I have tried to piece apart the command in the Campbell EC program that outputs 30min wind speed and direction but cannot seem to replicate it for a 15min average.

Anyone know a simple/efficient way to output wind speed/compass direction from the CSAT-3 in this manner?

I have used the following script to no avail (mind you it is just the pieces from the main program pertaining to getting this 15 min average)

'CR5000 Series Datalogger
'To create a different opening program template, type in new
'instructions and select Template | Save as Default Template
'date:
'program author:

'Declare Other Variables
Dim wind_east 'East wind in compass coordinate system.
Dim wind_north 'North wind in compass coordinate system.

Public aligned_data(10)
Alias aligned_data(1) = panel_temp
Alias aligned_data(2) = Ux
Alias aligned_data(3) = Uy
Alias aligned_data(4) = Uz
Alias aligned_data(5) = Ts
Alias aligned_data(6) = diag_csat
Alias aligned_data(7) = co2
Alias aligned_data(8) = h2o
Alias aligned_data(9) = press
Alias aligned_data(10) = diag_irga
Units panel_temp = C
Units Ux = m/s
Units Uy = m/s
Units Uz = m/s
Units Ts = C
Units diag_csat = unitless

Dim disable_flag_on(4) AS Boolean
'Intermediate processing disable flags.
'disable_flag_on(1)
'TRUE when CSAT3 diagnostic warning flags are on or CSAT3 has no data.
'disable_flag_on(2) 'TRUE when LI-7500 diagnostic warning flags are on or LI-7500 failed to send data.
'disable_flag_on(3)
'TRUE when CSAT3 diagnostic warning flags are on.
' Used to filter the sum of CSAT3 diagnostic warning flags.
'disable_flag_on(4)
'TRUE when LI-7500 diagnostic warning flags are on.
'Used to filter the sum of LI-7500 diagnostic warning flags.

Dim cov_disable_flag As Boolean 'TRUE when CSAT3 or LI-7500 reports bad data.

Dim Wind(8)
'Alias Wind(1)=Wind_Speed
'Alias Wind(2)=Resultant_Wind_Speed
Alias Wind(3)=Wind_Direction_Compass
'Alias Wind(4)=StDev_Wind_Direction
Alias Wind(5)=Wind_Speed
Alias Wind(6)=Resultant_Wind_Speed
Alias Wind(7)=Wind_Direction_CSAT3
Alias Wind(8)=StDev_Wind_Direction

Units Wind_Direction_Compass=degrees
Units Wind_Speed=m/s
Units Resultant_Wind_Speed=m/s
Units Wind_Direction_CSAT3=degrees
Units StDev_Wind_Direction=degrees

Public WindSpeed
Public WindDirection
Units WindSpeed=m/s
Units WindDirection=degrees

'Define Data Tables.

DataTable(WindSpDir,TRUE,1)
DataInterval(0,15,Min,1)

WindVector(1,wind_east,wind_north,IEEE4,disable_flag_on(1),0,1,2)
WindVector (1,Uy,Ux,IEEE4,disable_flag_on(1),0,1,2)
EndTable

DataTable(Met,TRUE,1)
DataInterval(0,15,Min,1)
Average(1,WindDirection,IEEE4,False)
Average(1,WindSpeed,IEEE4,False)
EndTable

'Main Program
PipeLineMode
BeginProg
Scan (100,mSec,0,0)
WindSpeed=Wind_Speed
WindDirection=Wind_Direction_Compass
'Copy and convert CSAT3 for compass wind vector computation.
wind_east = -1*Uy
wind_north = Ux

CallTable WindSpDir
If ( WindSpDir.Output(1,1) ) Then
GetRecord (Wind(8),WindSpDir,1)
EndIf

CallTable Met
NextScan
EndProg

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