jdiasn/lidarwind

wrong sign convention for U and V wind components, but easy to fix

Closed this issue · 1 comments

  • LIDAR Suit version: old version
  • Python version: 3.8
  • Operating System: Windows and Linux

Description

I found out that the U and V component that can be retrieved from class “getWindProperties5Beam” has the wrong sign convention. For southwesterly wind it gave negative values for both U and V, while the common convention is: "positive U is for wind from the west, a positive V is for wind from the south”. The wind direction from "“getWindProperties5Beam” is correct.

What I Did

Two adjustments need to be made inside the class “getWindProperties5Beam”.

(1) A sign change in the lines in which compU and compV are created in the calcHorWindComp_single_dbs and calcHorWindComp_continuous modules.

In calcHorWindComp_single_dbs

change:
self.compV =- (compVN - compVS)
self.compU =- (compUE - compUW)
to:
self.compV = (compVN - compVS)
self.compU = (compUE - compUW)

In calcHorWindComp_continuous

change:
self.compV = - (self.compVN - compVS)
self.compU = - (self.compUE - compUW)
to:
self.compV = (self.compVN - compVS)
self.compU = (self.compUE - compUW)

(2) In order to still have the correct wind direction, also the signs in the module calcHorWindDir has to be adjusted:

Change windDir = 180 + np.rad2deg(np.arctan2(-self.compU, -self.compV)) to windDir = 180 + np.rad2deg(np.arctan2(self.compU, self.compV))

Thank you, @StevenKnoopKNMI. I am implementing your suggestion.