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

Francesco Benincasa francesco.benincasa at bsc.es
Thu Nov 24 03:31:34 EST 2011


Hi all,
I'm using pygrads to draw some maps from netcdf files, and I've noticed that
in some cases the map is drawn correctly only if I use the "transf" option set
to True (the projection is cylindric).

I've taken a look at the code in _contourf method in the galab.py module:

#       Evaluate GrADS expression
#       -------------------------
        if self.transf: self.cmd('set lon -180 180',Quiet=True)
        Z = self.exp(expr)

        g = Z.grid
        if self.transf: self.cmd('set x %s %s'%dh.x,Quiet=True)


But I don't understand why it does that and why in some models it needs
that options.

Any idea?

Thank you in advance,

-- 
| Francesco Benincasa



More information about the gradsusr mailing list