From: Arlindo da S. <da...@al...> - 2008-01-10 01:08:49
|
On Jan 9, 2008 8:44 AM, Mike Fiorino <mfi...@gm...> wrote: > dear arlindo, > > i'm back in the office after the holidays in CA and finally grabbed the > latest pygrads... i also install PIL.. > How about the basemaps. Because the map datasets it is a relatively large tarball they do not include it in the standard Matplotlib, you need an additional install. See the readme file. > > when i try running the examples: > > kishou.nhc.noaa.gov[W2]:/home/work/wxmap2/trunk/src/opengrads/pygrads- > 1.0.6/examples > 208 > ./galab_examples.py > Traceback (most recent call last): > File "./galab_examples.py", line 149, in ? > ga = GaLab(Bin='gradsnc',Window=False,Echo=False) > NameError: name 'GaLab' is not defined > This usually means that you do not have some of the dependencies. I designed the grads package in a way that when you import it, only imports modules that *can* are imported; in retrospect, it is perhaps too quiet. Here is how to diagnose the problem: start pygrads and at the ga-> prompt type "import galab", the error messages should tell you what you are missing. > > also in checked the tests/grads_tests.sh and it looks hardwired for a > particular grads/src? > Yeah, "grads_tests.sh" is something Pat introduced specifically for the "make check" in autotools. Run "grads_tests.py" instead. Outside the GrADS build environment you will need to specify the location of your grads binaries. Type "grads_tests.py -h" for more info. However, these tests are meant to test the grads binaries and only uses module gacore.py. > > some news from CA: > > bob drach says the lab is finally acting on converted lats to > opensource; not sure when but at least it's in the works. This is great news! Pat will finally be able to have a complete Fedora package. > > bob was very interested in pygrads, especially passing data to/from > grads/python. bob also was surprised that you think perl is faster with > numbers the python and numpy, his impression was that python was on par > with other languages. I read this in a couple of places, including a article implementing fractal algorithms. Although to be taken with a grain of salt, I heard the same in the PDL list as well. It would be nice to come up with a benchmark relevant to our problem. I like Matplotlib, but performance is lousy compared to GrADS. > i'm glad to see you getting into python, i have a > lot of legacy grads scripts that i would like to convert over... > It would be nice to inline them. Something like: def test(arg): return ga.inline(arg, """ function test(arg) i = 3*arg return i """) So, >>> print test(7) 21 We just need a version of run that reads from stdin. (I am avoiding exchange files for performance reasons). It may be less work than convert a bunch of scripts... > > thanks and best regards, mike > Let me know if basemaps fixes your problem. Cheers! Arlindo -- Arlindo da Silva da...@al... |