Index: /trunk/MESOSCALE_DEV/NETCDF/gfortran_netcdf4_fpic
===================================================================
--- /trunk/MESOSCALE_DEV/NETCDF/gfortran_netcdf4_fpic	(revision 547)
+++ /trunk/MESOSCALE_DEV/NETCDF/gfortran_netcdf4_fpic	(revision 547)
@@ -0,0 +1,22 @@
+#!/bin/bash
+#Tue Feb 28 18:29:46 EST 2012
+
+FC=gfortran
+FFLAGS=" -O2"
+F90=gfortran
+FCFLAGS="-O2 -ffree-form"
+CPPFLAGS=""
+CC=gcc
+CFLAGS="-O2"
+CXX=g++
+CXXFLAGS="-O2"
+
+./configure --with-pic \
+  --prefix=/home/jmadelei/PROGRAMS/netcdf-4.0.1-gfortran \
+  > configure.log 2>&1
+
+make > make.log 2>&1
+
+make test > make_test.log 2>&1
+
+make install > make_install.log 2>&1
Index: /trunk/MESOSCALE_DEV/NOTES.txt
===================================================================
--- /trunk/MESOSCALE_DEV/NOTES.txt	(revision 546)
+++ /trunk/MESOSCALE_DEV/NOTES.txt	(revision 547)
@@ -1,2 +1,14 @@
+********************************* compilation API
+Il fallait faire trois choses:
+1) Spécifier le chemin vers la librairie NetCDF grâce à l'option --include-paths de f2py, autrement dit ajouter:
+--include-paths $NETCDF/include:$NETCDF/lib
+2) Ceci entrainait un bug:
+"readfortrancode: could not find include file" car une partie de la routine crackfortran.py du paquet EPD était mal écrite; j'ai installé la nouvelle version de EPD (7.2) et ce premier problème fut écarté car ils ont corrigé les lignes correspondantes dans crackfortran.py;
+3) Autre bug:
+"libnetcdf.a: could not read symbols: Bad value > collect2"
+L'ajoût de l'option --with-pic lors de la compilation de NetCDF résout le problème. Autrement dit, il faut faire:
+./configure --with-pic ...
+Cette option permet de créer un "position independent code, needed for shared libraries". Je ne comprends pas exactement ce que ça veut dire, mais maintenant ça marche! 
+*******************************
 
 NE PASE UTILISER NOMBRES NEGATIFS DANS LE CAS HILL !!!!
Index: /trunk/UTIL/PYTHON/api_gfortran.sh
===================================================================
--- /trunk/UTIL/PYTHON/api_gfortran.sh	(revision 547)
+++ /trunk/UTIL/PYTHON/api_gfortran.sh	(revision 547)
@@ -0,0 +1,15 @@
+#! /bin/bash
+
+which f2py
+
+NETCDF=$HOME/PROGRAMS/netcdf-4.0.1-gfortran
+echo $NETCDF
+
+f2py  -c -m api api.F90 --fcompiler=gnu95 \
+  -L$NETCDF/lib -lnetcdf \
+  -lm -I$NETCDF/include \
+  --f90flags="-Wall -ffree-form -fno-second-underscore" \
+  --include-paths $NETCDF/include:$NETCDF/lib \
+  --verbose \
+  > api.log 2>&1
+f2py -c -m timestuff time.F --fcompiler=gnu95 > timestuff.log 2>&1
