Dear All,
Greetings.!.
Now we are going to see the procedure to install PyGrib [1] inside the CDAT [2] installed path in our system.
[1] http://code.google.com/p/pygrib/
[2] http://www2-pcmdi.llnl.gov/cdat
Let us assume we have installed CDAT in our system and its working path is /usr/local/cdat5.2/bin/ .
Make sure that the path working fine as like below….
$ /usr/local/cdat5.2//bin/python
Executing /usr/local/cdat5.2//bin/python
Python 2.5.2 (r252:60911, Feb 2 2011, 15:29:23)
[GCC 4.4.5] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>>
To install PyGrib in your normal python path, kindly follow the link
First Install the following dependencies for pygrib in our ubuntu.
$ sudo apt-get install libjasper-dev libjasper-runtime .
Note : Do Not install libjasper-java, jasper and openjpeg-tools.
If you installed these above 3 packages, then it should crash our ubuntu login and its X.
These are all stuff tested in ubuntu 10.10.
libjasper-dev and libjasper-runtime are working fine without making any problem.
Download grib_api-1.9.5.tar.gz from http://www.ecmwf.int/products/data/software/download/grib_api.html
Download pyproj-1.8.8.tar.gz from http://code.google.com/p/pyproj/downloads/list
Download pygrib-1.8.0.tar.gz from http://code.google.com/p/pygrib/downloads/list
Now we need to move the three downloaded packages to the cdat path as like below …
$ mv grib_api-1.9.5.tar.gz /usr/local/cdat5.2/bin/
$ mv pyproj-1.8.8.tar.gz /usr/local/cdat5.2/bin/
$ mv pygrib-1.8.0.tar.gz /usr/local/cdat5.2/bin/
Now change the current working directory into cdat .
$ cd /usr/local/cdat5.2/bin/
$ pwd
/usr/local/cdat5.2/bin/
$ su – root
installing grib-api
Following these instructions should be safe on an average linux machine:
- mkdir grib_api_dir
- tar zxvf grib_api-1.9.5.tar.gz
- cd grib_api-1.9.5
- export CFLAGS=”-O2 -fPIC”
- ./configure –prefix= `pwd`/../grib_api_dir
- make
- make check
- make install
- cd ..
- pwd
/usr/local/cdat5.2/bin/
installing pyproj
This one is very simple, just like the normal python install :
- tar zxvf pyproj-1.8.8.tar.gz
- cd pyproj-1.8.8
- /usr/local/cdat5.2/bin//python setup.py install
- cd ..
- pwd
/usr/local/cdat5.2/bin/
installing pygrib
Installing pygrib inside cdat path.
- export GRIBAPI_DIR=`pwd`/grib_api_dir
- export JASPER_DIR=/usr
- tar zxvf pygrib-1.8.0.tar.gz
- cd pygrib-1.8.0
- /usr/local/cdat5.2/bin//python setup.py install
- /usr/local/cdat5.2/bin//python test.py
- pwd
/usr/local/cdat5.2/bin/pygrib
checking pygrib
open a new terminal as a normal user
- $ /usr/local/cdat5.2//bin/pythonExecuting /usr/local/cdat5.2//bin/python
Python 2.5.2 (r252:60911, Feb 2 2011, 15:29:23)
[GCC 4.4.5] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import pygrib
>>>
Thats it. We have successfully installed pygrib in our cdat path and imported it.
Enjoy !
Arulalan.T
i am using window os please help me same process for install pygrib
LikeLike
i am using window7 64bit and python 27,i already installed numpy and pyproj using cmd:python -m pipe install numpy . i need pygrib installation process step by step with picture . please help me š¦
LikeLike
Friends ,
The above procedure working perfectly in ubuntu 11.04 version too š
Enjoy….
LikeLiked by 1 person
i am using window7. how it possible ??? please help me
LikeLike
Sorry I do not know how to install in Windows OS. I do not use that OS. I prefer to use Linux Distro. I suggest you to use Linux OS.
LikeLike
i am a fresh for this field i cannot follow your steps, so have any youtube video link or other link for installing pygrib in ubundu
LikeLike
Why do you want to install pygrib ? Do you need to access grib1 or grib2 files ?. If so better you need to install iris via conda installation. https://github.com/SciTools/iris-grib and https://iris-grib.readthedocs.io/en/latest/
LikeLike
finally i change my os
LikeLike
Thank you……………………………thank you very much…………….
LikeLike