Skip to content

Commit

Permalink
Update epfd_script.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kuchaale committed Mar 25, 2015
1 parent eb56033 commit 2afa8fc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions epfd_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def rmv_mean(arr):

def interp(lev, data, lev_int):
f = interp1d(lev[::-1],data[:,::-1,:],axis=1)
return f1(lev_int[::-1])[:,::-1,:]
return f(lev_int[::-1])[:,::-1,:]

in_file = sys.argv[1] #input file
scale_by_sqrt_p = True #scaled by square root of (1000/p)
Expand Down Expand Up @@ -74,7 +74,7 @@ def interp(lev, data, lev_int):

Fdiv1 = np.transpose(c_diff(np.transpose(Fphi,[2,1,0]), asphi),[2,1,0])
Fdiv2 = np.transpose(c_diff(np.transpose(Fp,[1,0,2]), lev*100.),[1,0,2])
Fdiv = Fdiv1 + Fdiv1
Fdiv = Fdiv1 + Fdiv2


#residual circulation
Expand Down Expand Up @@ -136,11 +136,11 @@ def interp(lev, data, lev_int):
latitude.units = 'degrees north'

levels.units = 'hPa'
fx.units = 'K'
fy.units = 'm/s'
fd.units = 'm/s'
fx.units = 'kg/s^2'
fy.units = 'kg/s^2'
fd.units = 'm/s^2'
oc.units = 'Pa/day'
vc.units = 'Pa/day'
vc.units = 'm/s'

t[:] = tim
latitude[:] = lat
Expand Down

0 comments on commit 2afa8fc

Please sign in to comment.