Skip to content

Instantly share code, notes, and snippets.

@tamalw
Created August 20, 2010 18:51
Show Gist options
  • Save tamalw/540909 to your computer and use it in GitHub Desktop.
Save tamalw/540909 to your computer and use it in GitHub Desktop.
#!/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