- as root
$ su
- install subversion, version control packaes
# apt-get install subversion
- install GIT, different paradigm version control
# apt-get install git
- get python and its necessary applications
# apt-get install python python-scipy python-numpy cython cython-dbg
- get netcdf libraries tools and applications (cdo and nco are also installed maybe not required...)
# apt-get install netcdf-bin netcdf-dbg libnetcdf-dev netcdf-doc ncview cdo nco
- get hdf5
# apt-get install libhdf5-dev
- install matplotlib and basemap in order to plot and drow maps
# apt-get install python-matplotlib python-matplotlib-data python-matplotlib-doc python-mpltoolkits.basemap python-mpltoolkits.basemap-data
- install system tools (Scripts use LATEX interface for titles and labels)
# apt-get install dvipng
- install netcdf4, python API interface to netCDF files (following https://github.com/Unidata/netcdf4-python)
# git clone https://github.com/Unidata/netcdf4-python.git
cd netcdf4-python/
- Editing `setup.cfg' to add/change some values (there are installation issues if `nc-config' is used along installation)
use_ncconfig=False
netCDF4_dir = /usr/local
HDF5_dir = /usr/local
HDF5_libdir = /usr/lib/x86_64-linux-gnu/hdf5/serial
HDF5_INCDIR = /usr/include/hdf5/serial
# python setup.py build >& run_pysetup.log
# python setup.py install >& run_pyinstall.log
- Getting the scripts, no need to be root:
# exit
$ cd $HOME
$ svn co http://svn.lmd.jussieu.fr/LMDZ_WRF/trunk/tools PyNCplot
- Now all the scripts are held in ${HOME}/PyNCplot. It might be desirable to set an environment variable to make life easier:
$ export pyHOME=${HOME}/PyNCplot
- Finally one need to compile the Fortran modules using the same python to run the scripts. This is done using a standard `Makefile' and the tool f2py to link Fortran compiled codes to python. There are different versions for different LMD/IPSL and French HPC machines. For a standard linux 64-bits machine (debain 7) there is one example as `Makefile.foudre'. Follow the instructions there in after linking the appropriated file:
$ ln -s Makefile.[machine].[compiler] ./Makefile
At the end one should have:
module_ForDiag.so
module_ForInt.so