You don't have to bother with the subtracting from pi/2 bit ... just assume the
cartesian complex values are (y,x) instead of (x,y).
On May 13, 2023 1:38:51 PM PDT, Bill Dunlap wrote:
>I think that using complex numbers to represent the wind velocity makes
>this simpler. You would need to write
I think that using complex numbers to represent the wind velocity makes
this simpler. You would need to write some simple conversion functions
since wind directions are typically measured clockwise from north and the
argument of a complex number is measured counterclockwise from east. E.g.,
wind
Sorry Rui; if you run your code you will get:
Error in FUN(X[[i]], ...) : object 'ws' not found
Moreover, even if you did this:
aggregate(wd ~ day + month, data=df, FUN = my_fun, ws1 = df$ws)
the answer would be wrong is you need to include only the subsets of ws1
corresponding to the split defin
Dear Eric thanks for your code,
Dear R-experts,
Here below my R code, still the same error message at the end while trying to
tune the parameters!
Any hints to make it work would be appreciated.
Best,
# Create features a
Às 15:51 de 13/05/2023, Stefano Sofia escreveu:
Dear list users,
I have to aggregate wind direction data (wd) using a function that requires
also a second input variable, wind speed (ws).
This is the function that I need to use:
my_fun <- function(wd1, ws1){
u_component <- -ws1*sin(2*pi*
Dear list users,
I have to aggregate wind direction data (wd) using a function that requires
also a second input variable, wind speed (ws).
This is the function that I need to use:
my_fun <- function(wd1, ws1){
u_component <- -ws1*sin(2*pi*wd1/360)
v_component <- -ws1*cos(2*pi*wd1/360)
6 matches
Mail list logo