[gradsusr] evaluation of grads expressions in pygrads (galab.py)

Francesco Benincasa francesco.benincasa at bsc.es
Tue Nov 29 06:19:47 EST 2011


* lunedì 28 novembre 2011, alle 22:06, Arlindo da Silva scrive:
> Just in case try the latest release:
> 
>        http://sourceforge.net/projects/opengrads/files/python-grads/1.1.b5/

I've seen, I'll do it asap.

> Strange, I am able to plot this file with no problems, without setting
> "transf". Here is what I did:
> 
>   from grads import gacm
>   ga.open('testfile.nc')
>   ga.imshow('1e6*sconc_dust',cmap=gacm.jet_l)
> 
> The image is attached. For the record, I am running python 2.7 from EPD 7.1-2
> on Mac OS X.

I've developed a little package to provide my own colorbar and some other
features, this is the line that I call to draw maps:

ga.contourf(varName+'*'+str(multiply), N=len(self.bounds)-1, V=self.bounds,
            clines=False, cmap=self.cmap, norm=self.norm, extend=self.extend,
            aspect=False)

where in this case:
varname = 'sconc_dust'
multiply = '1e6'
self.cmap = mpl.colors.ListedColormap(<list of colors>)

and so on ...

I don't know on what it can depends, I'll check with new version.

Thank you very much.


-- 
| Francesco Benincasa
| http://www.linkedin.com/in/fbenincasa
****
The fashion wears out more apparel than the man.
		-- William Shakespeare, "Much Ado About Nothing"



More information about the gradsusr mailing list