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


micrometeorology May 13, 2011 09:33 AM

Hi, I am trying to calculate the wind direction from the raw data of a CSAT3. I am comparing my values with a already calculated value from a flux table. In the CRBasic program the wind direction is calculated as follow:

WindVector(1, Uy, Ux, IEEE4, sonic_sidable_F, 0, 1, 2)

This computes the scalar mean wind speed, the vector mean wind speed the wind direction of the sonic and the standard deviation of the wind direction.

Now i am trying to calculate these values from the raw data. For this I was reading in the CR3000 Manual on page 269:

wnd_dir_sonic = arctan(Ux / Uy)
where
Ux = sum(Uei / Ui) / N
Uy = sum(Uni / Ui) / N
where
Ui = (Uei^2 + Uni^2)^(1/2)

My question is now. How do you define Ue and Un. I suppose Ue is Uy and Un is Ux. But with this assumption the calculated values have sometimes an offset of 180 degrees. Do you make any conversion of Ux and Uy before calculating? I mean if you follow the instructions it should be possible to recalculate the values?

Thank you in before for your answer.


IslandMan May 14, 2011 10:22 AM

Ux = sum(UEi / Ui) / N
Uy = sum(UNi / Ui) / N


micrometeorology May 16, 2011 08:36 AM

Hi, thanks for your answer, but i still dont get it.
My code looks like:

UNi = Ux
UEi = Uy

Because from the raw data i get Ux and Uy..

Ui = sqrt(UNi^2 + UEi^2)

Ux = sum(UEi / Ui) / N
Uy = sum(UNi / Ui) / N

wnd_dir = atan(Ux / Uy) * (180 / PI)

When i compute the wnd_dir like this my result have a sometimes a offset of 180 degrees sometimes 0 degrees and sometimes -180 degrees. The pattern of the offset seems randomly.


IslandMan May 16, 2011 10:16 AM

Try this, it was given to me by CSI.
Const PI = 4*ATN(1)

wnd_dir = (ATN2(Ux,Uy)*180/PI+360) MOD 360


micrometeorology May 16, 2011 04:01 PM

Your Ux. Is that a scalar mean or the raw_data? same for Uy..
And what is atan2()??


IslandMan May 17, 2011 10:33 AM

I'm not an expert on the CSAT3 but, I'm assuming you have raw data from the CSAT3 and want to calculate the instantaneous data on the fly. If you use the program example in the CSAT3 manual, you have wind_east and wind_north variables.

hor_wnd_dir = (ATN2(wind_east,wind_north)*180/PI+360) MOD 360


eddycov1 May 20, 2011 09:18 PM

IslandMan is correct.


micrometeorology May 23, 2011 01:26 PM

Thanks a lot IslandMan.
With your equation i can calculate the correct wind direction. I wanted to calculate the wnd_dir for an half hour. So i had first to calculate the mean for the wind_east and wind_north. Then i get the correct wnd_dir for an half hour..
Thanks you again.. Great help


IslandMan May 24, 2011 12:19 AM

You're welcome. I'm glad you got it working.


userpk Jul 22, 2024 03:15 AM

This post is under review.

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