An update to the above post. It's working now. I'm using exp from visad.python.JPythonMethods instead of Numeric.
Code: Select all
from visad.python.JPythonMethods import exp
psfc=loadGrid(filename='',field='PSFC')
temps = loadGrid(filename='',field='T2')
hgt=loadGrid(filename='',field='HGT')
temps = newUnit(temps,"temps","hPa")
hgt = newUnit(hgt,"hgt","hPa")
psfc = newUnit(psfc,"psfc","hPa")
stemps = temps+6.5*hgt/1000
mslp = psfc*np.exp(9.81/(287.0*stemps)*hgt) + (6.7 * hgt / 1000)
Yunus