Wind components #3792
Wind components
#3792
Replies: 1 comment
-
|
Seems like the code is converting degrees to radians and then applying the formula. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am trying to understand how eastward and northward wind components are being calculated. As per the formula in the code
https://github.com/Unidata/MetPy/blob/v1.6.3/src/metpy/calc/basic.py#L128-L167
u = -speed * np.sin(wind_direction)
v = -speed * np.cos(wind_direction)
so for metar 'KEWR 310212Z 17003KT 6SM BR SCT008 OVC013 09/07 A2995 RMK AO2 T00940072'
components should be (-1.039948366491091, -2.8139842563583244)
however, when I use the parser
import metpy
from metpy import io
io.parse_metar_to_dataframe('KEWR 310212Z 17003KT 6SM BR SCT008 OVC013 09/07 A2995 RMK AO2 T00940072')
i get the components as (-0.520945, 2.954423)
Can anyone help me with this please?
thanks,
Manoj
Beta Was this translation helpful? Give feedback.
All reactions