How do I customise Default Background Maps?

Post any questions, ideas, or topics related to Jython and Python scripting.
User avatar
m.yunus.a.m.
Posts: 18
Joined: Wed Aug 18, 2021 3:55 am

Re: How do I customise Default Background Maps?

Post 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
Post Reply