ticket_282_TicketSummary - ACCESS-NRI/accessdev-Trac-archive GitHub Wiki

Second Build/Install of the pybufr-ecmwf Python Package

The developer of the software package, Jos de Kloe has updated the code after a request from Jin Lee. For details about the update see the github issue,

https://github.com/jdkloe/pybufr-ecmwf/issues/6

Build and install directories

For traceability of build and install following 2 collectively managed subdirectories are used to do the build and install (respectively) of the package,

raijin6:/projects/access/da/utilities/bufr/pybufr-ecmwf/build/pybufr-ecmwf

raijin6:/projects/access/da/utilities/bufr/pybufr-ecmwf/install/pybufr-ecmwf

Source code

The package was pulled from github using following command,

raijin6:/projects/access/da/utilities/bufr/pybufr-ecmwf/build> git clone https://github.com/jdkloe/pybufr-ecmwf

Build

Unloaded Intel compiler environment as Python generally doesn't handle the Intel runtime libraries correctly (advice from Ben Menadue of NCI),

raijin6:/projects/access/da/utilities/bufr/pybufr-ecmwf/build/pybufr-ecmwf> module unload intel-cc intel-fc intel-mpi
raijin6:/projects/access/da/utilities/bufr/pybufr-ecmwf/build/pybufr-ecmwf> module list
Currently Loaded Modulefiles:
  1) pbs                       11) pythonlib/pyshp/1.1.7     21) iris/1.9.1
  2) gcom/5.2_intelmpi513      12) pythonlib/six/1.9.0       22) odbapi/30.0
  3) netcdf/4.2.1.1            13) geos/3.3.8                23) mars/1.0.1
  4) nco/4.5.3                 14) pythonlib/cartopy/0.13.1  24) metview/4.3.10
  5) python/2.7.6              15) pythonlib/PIL/1.1.7       25) cawcr-utils/1.0.0
  6) python/2.7.6-matplotlib   16) pythonlib/Biggus/0.13.0   26) subversion/1.9.0
  7) pythonlib/basemap/1.0.7   17) pythonlib/pyke/1.1.1      27) perl/5.10.1
  8) pythonlib/docutils/0.12   18) pythonlib/cf-units/1.0.0  28) fcm/2016.02.0
  9) pythonlib/netCDF4/1.0.4   19) udunits/2.1.24            29) rose/2015.11.0
 10) pythonlib/Shapely/1.5.7   20) grib-api/1.12.3

Then did a build using a supplied Python script,

python setup.py build

Install

The installation of the package was done using following command,

raijin6:/projects/access/da/utilities/bufr/pybufr-ecmwf/build/pybufr-ecmwf> python setup.py install --prefix=/projects/access/da/utilities/bufr/pybufr-ecmwf/install

Setting PYTHONPATH

To be able to use the pybufr_ecmwf module you will need to set the Python module search path. The easiest way would be to add to the environment variable, PYTHONPATH the installation location,

export PYTHONPATH=~access/da/utilities/bufr/pybufr-ecmwf/install/lib/python2.7/site-packages:$PYTHONPATH

N.B. the path added is up to ../site-packages