You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (is.vector(wspeed)) return(data.frame(U=u,V=v))
elsereturn(list(U=u,V=v))
}
The cos and sin directly use the direction as angle.
But this is the direction the wind is blowing from (meteorological convection).
The true angle to be used for the cos and sin function should be: 270 - direction (rotate wind 180 degrees + 90 degrees to account for the fact that the N/S axis is used as reference in stead of E/W axis)
As it is now, if you apply wind.dirspeed and then again wind.uv the original u an v are swapped and have the opposite sign.
Michiel
The text was updated successfully, but these errors were encountered:
Indeed, that is an error (or at the very least an inconsistency). The function is rarely used (I think), so it has been there for many years. Which of course means that changing this "long time behaviour" may actually cause a problem for a few users...
Hi,
I think there is a mistake in the calculation of the wind u- and v-components from wind speed and direction:
meteogrid/R/geowind.R
Lines 49 to 63 in 9da2345
The
cos
andsin
directly use thedirection
as angle.But this is the direction the wind is blowing from (meteorological convection).
The true angle to be used for the
cos
andsin
function should be:270 - direction
(rotate wind 180 degrees + 90 degrees to account for the fact that the N/S axis is used as reference in stead of E/W axis)As it is now, if you apply
wind.dirspeed
and then againwind.uv
the originalu
anv
are swapped and have the opposite sign.Michiel
The text was updated successfully, but these errors were encountered: