-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a5b4b5
commit 25e30e8
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Created on Fri Jun 15 14:52:14 2018 | ||
@author: Taeke | ||
""" | ||
import numpy as np | ||
|
||
def update_wind_velocity(data, filterKeys, generalMissingValue,missingValueList): | ||
|
||
# The rate of horizontal travel of air past a fixed point in meters per second | ||
windSpeed = np.array(data['wind_speed']) | ||
|
||
# The angle, measured in a clockwise direction, between true north and | ||
# the direction from which the wind is blowing. | ||
# MIN: 001 MAX: 360 UNITS: Angular Degrees | ||
windDir = np.radians(np.array(data['wind_direction'])) | ||
|
||
|
||
data['wind_north'] = (-np.cos(windDir) * windSpeed).tolist() | ||
data['wind_east'] = (-np.sin(windDir) * windSpeed).tolist() | ||
|
||
return data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters