Created
August 20, 2010 18:51
-
-
Save tamalw/540909 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env python | |
import sys | |
import math | |
import matfunc | |
import idmethod | |
import csv | |
for filename in sys.argv[1:]: | |
wdirlist=[] | |
wspdlist=[] | |
hghtlist=[] | |
blayer = 200 | |
tlayer = 6000 | |
headers = 0 | |
data = csv.reader(open(filename, 'rU'), delimiter=',') | |
for row in data: | |
if headers == 0: | |
headers = 1 | |
else: | |
hghtlist.append(int(row[0])) | |
wdirlist.append(float(row[1])) | |
wspdlist.append(float(row[2])) | |
print idmethod.meanwind(wdirlist,wspdlist,hghtlist,blayer,tlayer) | |
# print idmethod.bunkersmotion(wdirlist,wspdlist,hghtlist) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment