Difference between revisions of "UsingNetCDF"

From SourceWiki
Jump to navigation Jump to search
Line 25: Line 25:
 
<pre>
 
<pre>
 
wget http://sourcesup.cru.fr/frs/download.php/1833/Numeric-23.8.2.tar.gz
 
wget http://sourcesup.cru.fr/frs/download.php/1833/Numeric-23.8.2.tar.gz
 +
tar -xzf ...
 +
cd Numeric...
 +
python setup.py install
 
</pre>
 
</pre>
  
 
<pre>
 
<pre>
 
wget http://sourcesup.cru.fr/frs/download.php/2309/ScientificPython-2.8.tar.gz
 
wget http://sourcesup.cru.fr/frs/download.php/2309/ScientificPython-2.8.tar.gz
 +
cd ..
 +
tar ...
 +
</pre>
 +
 +
but now need to hack setup.py for:
 +
* netcdf path
 +
* problems with /usr/lib and /usr/lib64
 +
 +
perhaps easiest to just patch with a symbolic link:
 +
 +
<pre>
 +
cd /usr/lib/python2.4/site-packages
 +
ln -s /usr/lib64/python2.4/site-packages/Scientific
 
</pre>
 
</pre>

Revision as of 16:45, 9 June 2009

Using NetCDF files for your data

Introduction

Admin Details

Compiling the NetCDF Libraries from Unidata

wget http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-4.0.tar.gz


tar -xzf netcdf-4.0.tar.gz
cd netcdf-4.0
./configure --prefix=/opt/netcdf/netcdf-4.0 --enable-shared FC=ifort CC=gcc CXX=g++ CPPFLAGS="-DpgiFortran"
make
make check
make install


Installing the Python Interface

wget http://sourcesup.cru.fr/frs/download.php/1833/Numeric-23.8.2.tar.gz
tar -xzf ...
cd Numeric...
python setup.py install
wget http://sourcesup.cru.fr/frs/download.php/2309/ScientificPython-2.8.tar.gz
cd ..
tar ...

but now need to hack setup.py for:

  • netcdf path
  • problems with /usr/lib and /usr/lib64

perhaps easiest to just patch with a symbolic link:

cd /usr/lib/python2.4/site-packages
ln -s /usr/lib64/python2.4/site-packages/Scientific