[1273] | 1 | <HTML> |
---|
| 2 | <HEAD> |
---|
| 3 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8"/> |
---|
| 4 | <LINK REL="stylesheet" TYPE="text/css" HREF="PyNCplot.css"/> |
---|
| 5 | </HEAD> |
---|
| 6 | |
---|
| 7 | <!--BODY STYLE="color:rgb(240,240,240);font-size:1em;"--> |
---|
| 8 | <BODY CLASS="genintro"> |
---|
| 9 | <H1>Installation guide</H1> |
---|
| 10 | A step-by-step instructions to follow in order to install all the required packages and tools. <BR> |
---|
| 11 | |
---|
| 12 | Example of installation in a Debian 8 as root: |
---|
| 13 | <OL> |
---|
| 14 | <LI>as root</LI> |
---|
| 15 | <DIV CLASS="codetxt">$ su</DIV> |
---|
| 16 | <LI>install subversion, version control packaes</LI> |
---|
| 17 | <DIV CLASS="codetxt"># apt-get install subversion</DIV> |
---|
| 18 | <LI>install GIT, different paradigm version control</LI> |
---|
| 19 | <DIV CLASS="codetxt"># apt-get install git</DIV> |
---|
| 20 | |
---|
| 21 | <LI>get python and its necessary applications</LI> |
---|
| 22 | <DIV CLASS="codetxt"># apt-get install python python-scipy python-numpy cython cython-dbg</DIV> |
---|
| 23 | |
---|
| 24 | <LI>get netcdf libraries tools and applications (cdo and nco are also installed maybe not required...)</LI> |
---|
| 25 | <DIV CLASS="codetxt"># apt-get install netcdf-bin netcdf-dbg libnetcdf-dev netcdf-doc ncview cdo nco</DIV> |
---|
| 26 | |
---|
| 27 | <LI>get hdf5</LI> |
---|
| 28 | <DIV CLASS="codetxt"># apt-get install libhdf5-dev</DIV> |
---|
| 29 | |
---|
| 30 | <LI>install matplotlib and basemap in order to plot and drow maps</LI> |
---|
| 31 | <DIV CLASS="codetxt"># apt-get install python-matplotlib python-matplotlib-data python-matplotlib-doc python-mpltoolkits.basemap python-mpltoolkits.basemap-data</DIV> |
---|
| 32 | |
---|
| 33 | <LI>install system tools (Scripts use L<SUP>A</SUP>T<SUB>E</SUB>X interface for titles and labels)</LI> |
---|
| 34 | <DIV CLASS="codetxt"># apt-get install dvipng</DIV> |
---|
| 35 | |
---|
| 36 | <LI>install netcdf4, python API interface to netCDF files (following <A CLASS="la" HREF="https://github.com/Unidata/netcdf4-python" TARGET="_blank">https://github.com/Unidata/netcdf4-python</A>)</LI> |
---|
[1356] | 37 | <DIV CLASS="codetxt"># git clone https://github.com/Unidata/netcdf4-python.git<BR> |
---|
[1273] | 38 | cd netcdf4-python/</DIV> |
---|
| 39 | <UL> |
---|
| 40 | <LI>Editing `setup.cfg' to add/change some values (there are installation issues if `nc-config' is used along installation)</LI> |
---|
| 41 | <PRE><CODE> |
---|
| 42 | use_ncconfig=False |
---|
| 43 | netCDF4_dir = /usr/local |
---|
| 44 | HDF5_dir = /usr/local |
---|
| 45 | HDF5_libdir = /usr/lib/x86_64-linux-gnu/hdf5/serial |
---|
| 46 | HDF5_INCDIR = /usr/include/hdf5/serial |
---|
| 47 | </CODE></PRE> |
---|
| 48 | </UL> |
---|
| 49 | <DIV CLASS="codetxt"> |
---|
| 50 | # python setup.py build >& run_pysetup.log<BR> |
---|
| 51 | # python setup.py install >& run_pyinstall.log</DIV> |
---|
| 52 | <LI>Getting the scripts, no need to be root:</LI> |
---|
| 53 | <DIV CLASS="codetxt"># exit<BR> |
---|
| 54 | $ cd $HOME <BR> |
---|
| 55 | $ svn co http://svn.lmd.jussieu.fr/LMDZ_WRF/trunk/tools PyNCplot</DIV> |
---|
| 56 | <LI>Now all the scripts are held in ${HOME}/PyNCplot. It might be desirable to set an environment variable to make life easier: |
---|
| 57 | <DIV CLASS="codetxt">$ export pyHOME=${HOME}/PyNCplot</DIV> |
---|
[1352] | 58 | <LI>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 <A CLASS="la" HREF="https://docs.scipy.org/doc/numpy-dev/f2py/" TARGET="_blank">f2py</A> 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:</LI> |
---|
| 59 | <DIV CLASS="codetxt"> |
---|
| 60 | $ ln -s Makefile.[machine].[compiler] ./Makefile |
---|
| 61 | </DIV> |
---|
| 62 | At the end one should have: |
---|
| 63 | <PRE><CODE> |
---|
| 64 | module_ForDiag.so |
---|
| 65 | module_ForInt.so |
---|
| 66 | </CODE></PRE> |
---|
[1273] | 67 | |
---|
| 68 | </OL> |
---|
| 69 | |
---|
| 70 | </BODY> |
---|
| 71 | </HTML> |
---|
| 72 | |
---|