harphub / meteogrid

R package for working with gridded meteorological data
https://harphub.github.io/meteogrid/
Other
0 stars 6 forks source link

Rotating u and v wind components to true n/E axis prior to calculating wind direction using wind.dirspeed #18

Open gtyree01 opened 5 months ago

gtyree01 commented 5 months ago

Hello,

I want to use meteogrid::wind.dirspeed() to calculate wind direction. Does the meteogrid package have a function that will rotate the u and v wind components to a true n/E axis before calculating wind direction? If not, then do the package developers have a suggestion for how to do this in R? I am looking for a function in R that is equivalent to matplotlib.basemap.rotate_vector() in Python.

andrew-MET commented 5 months ago

Set rotate_wind = TRUE in the call to wind.dirspeed(). Or you can use geowind to calculate the rotated u and v first. @adeckmyn Would you be able to add documentation for the rotate_wind argument to wind.dirspeed()?

gtyree01 commented 5 months ago

@andrew-MET Thank you for the guidance!