import pandas
import sys
import os
import urllib2
import datetime
import time
import psycopg2
import math
from subprocess import call, Popen
import pandas as pd
import gzip
import csv
import zipfile as z
import numpy as np
from decimal import *

df = pd.read_csv('hurricane_test_v2.dat.gz', compression = 'gzip', sep=',' , error_bad_lines=False)

print df

datetime = df.iloc[:,5:6]
forecast_time = df.iloc[:,2:3]
pn = 1010
pc = df.iloc[:,9:10]
Vmax = df.iloc[:,8:9]
Rmax = df.iloc[:,19:20]
roci = df.iloc[:,18:19]
Vtrans = df.iloc[:,23:24]
lat = df.iloc[:,6:7].replace(to_replace='N', value='', regex=True).replace(to_replace='S', value='', regex=True)

pc_float = (np.float64(pc.values[5]).item())
Vmax_float = (np.float64(Vmax.values[5]).item())
Rmax_float = (np.float64(Rmax.values[5]).item())
roci_float = (np.float64(roci.values[5]).item())
Vtrans_float = (np.float64(Vtrans.values[5]).item())
theta_float = (np.float64(lat.values[5]).item())


f = 2*7.292*math.sin(theta_float)
rho = 1.15
e = 2.7182

#Dir = []
#phi = []

B = int((((Vmax_float**2)*rho*e)*(1/(pn - pc_float))))

A = int(Rmax_float)**int(B)

print Rmax_float
print B

print range(1,int(roci_float))

for i in range(1,int(roci_float)):
	Vg = (A*B*(pn - pc_float)*math.exp(-A/i**B))/(((rho*i**B + i**2*f**2)/4))**1/2)-(i * f/2)

@@ -188,28 +188,27 @@
 ort 
-zipfile
+numpy
  as 
-z
+np
 %0Aimport 
 nump
@@ -207,40 +207,35 @@
 ort 
-numpy as np%0Afrom decimal
+decimal%0Afrom mpmath
  import 
 *%0A%0Ad
@@ -230,17 +230,19 @@
  import 
-*
+mp%0A
 %0A%0Adf = p
@@ -1129,16 +1129,34 @@
 rint B%0A%0A
+%0Awind_speed = %5B%5D%0A%0A
 print ra
@@ -1220,16 +1220,26 @@
 :%0A%09Vg = 
+(mp.sqrt((
 (A*B*(pn
@@ -1237,24 +1237,28 @@
 ((A*B*(pn - 
+int(
 pc_float)*ma
@@ -1258,69 +1258,128 @@
 oat)
-*math
+))*mp
 .exp(
+int(
 -A
+)
 /i
-**
+nt(i)**int(
 B))/(((
+(
+int(
 rho
+)
 *i
-**B + i**2*f**2)/4))**1/2)-(i * f/2)
+nt(i)**int(B) + int(i)**2*int(f)**2)/4))))) - (int(i)* int(f)/2))%0A%09print Vg
 %0A

Update wind_profile.py