Add wind_u(), wind_v() vector component functions
This commit is contained in:
parent
a231954de1
commit
9d9cfab9e2
1 changed files with 6 additions and 0 deletions
|
@ -189,3 +189,9 @@ def follow_saturated_mixing_ratio(temp: float, pressure: float, step: float=1.0)
|
||||||
p2 -= step
|
p2 -= step
|
||||||
|
|
||||||
return series
|
return series
|
||||||
|
|
||||||
|
def wind_u(speed: float, direction: float) -> float:
|
||||||
|
return speed * math.cos(rad(direction))
|
||||||
|
|
||||||
|
def wind_v(speed: float, direction: float) -> float:
|
||||||
|
return -speed * math.sin(rad(direction))
|
||||||
|
|
Loading…
Add table
Reference in a new issue