Page 3 of 3

Re: How do I customise Default Background Maps?

Posted: Wed Sep 29, 2021 1:40 pm
by m.yunus.a.m.
Hello.

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)
This doesn't calculate MSLP properly however. I suspect the problem lies in the units. Particularly Pa and hPa. In comparing the result with plots from RIP4, The MSLP calculation agrees on the sea area, but not the land area.

Yunus