Index: trunk/adm/extract_rst.sh
===================================================================
--- trunk/adm/extract_rst.sh	(revision 2)
+++ trunk/adm/extract_rst.sh	(revision 2)
@@ -0,0 +1,332 @@
+#! /bin/sh
+#+
+#
+# .. extract.sh:
+#
+# ==========
+# extract.sh
+# ==========
+#
+# -----------------------------------------
+# extract ReStructuredText from source file
+# -----------------------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ``extract_rst.sh -i filein -l language -o fileout``
+#
+# DESCRIPTION
+# ===========
+#
+# ``extract_rst.sh`` extracts ReST comments from the file given in argument
+#
+# -i  input file
+# -o  output file (ReST)
+# -l  language
+#
+# Comment block (start, end) identification depends on language :
+#
+#  *F90*
+#   FORTRAN source free form
+#  *fortran*
+#   FORTRAN source fixed form
+#  *sh*
+#   shell scripts
+#  *IDL*
+#   IDL source
+#  *xml*
+#   XML and XSL
+#  *dot*
+#   graphviz files
+#  *php*
+#   PHP files
+#  *matlab*
+#   matlab or octave files
+#
+# EXAMPLES
+# ========
+#
+# To extract ReST comments of this shell script:
+# ::
+#
+#   $ extract_rst.sh -i extract_rst.sh -l sh -o extract_rst.sh.rst
+#   iii : rst lines of extract_rst.sh are in extract_rst.sh.rst
+#
+#
+# You can produce HTML file from this new file:
+# ::
+#
+#  $ rst2html.py --input-encoding=ISO-8859-15 extract_rst.sh.rst \
+#    /usr/temp/${LOGNAME}/extract_rst.sh.html
+#
+#
+# You can produce PDF file from this new file:
+# ::
+#
+#  $ rst2newlatex.py --input-encoding=ISO-8859-15 extract_rst.sh.rst \
+#    /usr/temp/${LOGNAME}/extract_rst.sh.tex
+#  $ pdflatex extract_rst.sh.tex
+#
+# Of course beware of consistency of path on links.
+#
+# CAUTIONS
+# ========
+#
+# Becaue of poor implementation of Standard FORTRAN in cpp (prepocessing)
+# within gfortran and g95, ReST comments might induce trouble in
+# FORTRAN sources.
+#
+# For example following line is pointed out be gfortran with
+# ``error: unterminated comment``.
+# This is because ``/*`` is the beginning of a C style comment !!
+# ::
+#
+#      !    **MEAN** = sum( *X*\ (:) )/*ntime*
+#
+#
+#
+# One can modify this ReST line with
+# ::
+#
+#      !    **MEAN** = sum( *X*\ (:) ) / *ntime*
+#
+#
+#
+# TODO
+# ====
+#
+# check parameters
+#
+# log
+#
+# add perl
+#
+# SEE ALSO
+# ========
+#
+# ReStructuredText_
+#
+# .. _ReStructuredText: http://docutils.sourceforge.net/rst.html
+#
+# Docutils_
+#
+# .. _Docutils: http://docutils.sourceforge.net/
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+# - fplod 20100630T103629Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * add language ferret
+#
+# - fplod 2009-04-20T08:13:37Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * add CAUTIONS paragraph to warn about possible FORTRAN compiling problem
+#
+#
+# - fplod 2009-04-03T14:53:18Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * usage of tr instead of sed to remove ``\r``
+#     due to difference between ``/sw/bin/sed`` and ``/usr/bin/sed`` (the last
+#     one do not work coorectly on ``\r`` interpertation ie: remove the first occurence of
+#     ``r``)
+#
+# - fplod 2009-02-10T10:46:23Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * add language fortran for FORTRAN source in fixed form
+#
+# - fplod 2009-01-05T11:41:33Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * remove \\r (CRLF) from file before awk and sed (otherwise ReST block
+#     was not found in "ISO-8859 text, with CRLF line terminators" files
+#
+# - fplod 2008-12-22T10:37:37Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * add matlab (octave)
+#
+# - fplod 2008-09-17T13:40:37Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * add php language
+#
+# - fplod 2008-09-08T09:34:04Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * add F90 language
+#
+# - fplod 2008-08-08T08:28:30Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * add KML files (with other XML files)
+#   * add parameters ``-i`` ``-l`` ``-o``
+#
+# - fplod 200807
+#
+#   * creation
+#
+#-
+#
+system=$(uname)
+case "${system}" in
+   AIX|IRIX64)
+      echo " www : no specific posix checking"
+   ;;
+   *)
+     set -o posix
+   ;;
+esac
+#
+command=$(basename ${0})
+log_date=$(date -u +"%Y%m%dT%H%M%SZ")
+log=/tmp/$(basename ${command} .sh).log.${log_date}
+#
+usage=" Usage : ${command} -i filein -l language -o fileout"
+#
+minargcount=6
+#echo " narg ${#}"
+if [ ${#} -lt ${minargcount} ]
+then
+   echo "eee : not enought arguments"
+   echo "${usage}"
+   exit 1
+fi
+#
+# default
+# n.a.
+#
+set +u
+while [ ! -z "${1}" ]
+do
+   case ${1} in
+      -i)
+         filein=${2}
+         shift
+      ;;
+      -o)
+         fileout=${2}
+         shift
+      ;;
+      -l)
+         language=${2}
+         shift
+      ;;
+      -h)
+         echo "${usage}"
+         exit 0
+      ;;
+      *)
+         echo "eee : unknown option ${1}"
+         echo "${usage}"
+         exit 1
+      ;;
+   esac
+   # next flag
+   shift
+done
+#
+set -u
+#
+# ++ check param
+#
+case "${language}" in
+   fortran)
+      awkblockstart="^C\+$"
+      awkblockend="^C-$"
+      sedblockstart="^C+$"
+      sedblockend="^C-$"
+      comment="^C"
+   ;;
+   F90)
+      awkblockstart="^!\+$"
+      awkblockend="^!-$"
+      sedblockstart="^!+$"
+      sedblockend="^!-$"
+      comment="^!"
+   ;;
+   ferret)
+      awkblockstart="^!\+$"
+      awkblockend="^!-$"
+      sedblockstart="^!+$"
+      sedblockend="^!-$"
+      comment="^!"
+   ;;
+   IDL)
+      awkblockstart="^;\+$"
+      awkblockend="^;-$"
+      sedblockstart="^;+$"
+      sedblockend="^;-$"
+      comment="^;"
+   ;;
+   xml)
+      awkblockstart="^<!--rst$"
+      awkblockend="-->$"
+      sedblockstart="^<!--rst$"
+      sedblockend="-->$"
+      comment=""
+   ;;
+   sh)
+      # iii : awk '/^\#\+/,/^\#\-/' $file
+      awkblockstart="^\#\+$"
+      awkblockend="^\#\-$"
+      sedblockstart="^#+"
+      sedblockend="^#-"
+      comment="^#"
+   ;;
+   dot|php)
+      awkblockstart="^\/\*rst$"
+      awkblockend="*\/"
+      sedblockstart="^\/\*rst$"
+      sedblockend="^\*\/"
+      comment=""
+   ;;
+   matlab)
+      awkblockstart="^%\+$"
+      awkblockend="^%-$"
+      sedblockstart="^%+$"
+      sedblockend="^%-$"
+      comment="^%"
+   ;;
+   *)
+      echo "eee : ${language} not implemented"
+      exit 1
+   ;;
+esac
+#
+# just in case suppress \r at the end of lines
+tr -d '\r' < ${filein} > /tmp/${$}_0
+#
+# put rst blocks in one temporary file
+#awk '/^;+/,/^;-/' a.pro | sed -e "/^;+$/d" -e "/^;-$/d" -e "s/^;//"
+cmdawk="awk '/${awkblockstart}/,/${awkblockend}/' /tmp/${$}_0 > /tmp/${$}_1" #++
+eval ${cmdawk}
+if [ ! -s /tmp/${$}_1 ]
+then
+  rm /tmp/${$}_0 /tmp/${$}_1
+  echo "iii : no rst comments in ${filein}"
+  exit 1
+fi
+#
+# suppress begin and end of each block
+sedcmd="sed -e \"/${sedblockstart}/d\" -e \"/${sedblockend}/d\" /tmp/${$}_1 > /tmp/${$}_2"
+eval ${sedcmd}
+#
+# suppress comment at the beginning of each line
+if [ "${comment}" != "" ]
+then
+   sedcmd="sed -e \"s/${comment}//\" /tmp/${$}_2 > /tmp/${$}_3"
+   eval ${sedcmd}
+   # suppress first blank
+   cp /tmp/${$}_3 /tmp/${$}_2
+   sed -e "s/^ //" /tmp/${$}_2 > /tmp/${$}_3
+   cp /tmp/${$}_3 ${fileout}
+else
+   cp /tmp/${$}_2 ${fileout}
+fi
+#
+echo "iii : rst lines of ${filein} are in ${fileout}"
+#
+# clean
+rm /tmp/${$}_0 /tmp/${$}_1 /tmp/${$}_2 /tmp/${$}_3 2> /dev/null
+#
+# exit
+exit 0
Index: trunk/adm/guides/bibliography.rst
===================================================================
--- trunk/adm/guides/bibliography.rst	(revision 2)
+++ trunk/adm/guides/bibliography.rst	(revision 2)
@@ -0,0 +1,17 @@
+.. +
+..
+.. EVOLUTIONS
+.. ==========
+..
+.. - fplod 20101118T172830Z aedon.locean-ipsl.upmc.fr (Darwin)
+..
+..   * creation
+..
+.. -
+
+.. _ bibliography:
+
+Bibliography
+============
+
+.. [pomme] `campagne POMME <http://www.locean-ipsl.upmc.fr/POMME/>`
Index: trunk/adm/guides/contact.rst
===================================================================
--- trunk/adm/guides/contact.rst	(revision 2)
+++ trunk/adm/guides/contact.rst	(revision 2)
@@ -0,0 +1,28 @@
+.. +
+..
+.. TODO
+.. ====
+..
+.. emails
+..
+.. EVOLUTIONS
+.. ==========
+..
+.. $Id$
+..
+.. - fplod 20101129T112213Z aedon.locean-ipsl.upmc.fr (Darwin)
+..
+..   * creation
+..
+.. -
+
+.. _contact:
+
+Contact
+=======
+
+Marina Lévy pour la science
+
+Françoise Pinsard pour la gestion du projet sous trac et svn
+
+Marina Lévy, Françoise Pinsard et Anne-Charlotte Peter pour les développments
Index: trunk/adm/guides/contributing.rst
===================================================================
--- trunk/adm/guides/contributing.rst	(revision 2)
+++ trunk/adm/guides/contributing.rst	(revision 2)
@@ -0,0 +1,38 @@
+.. +
+..
+.. EVOLUTIONS
+.. ==========
+..
+.. $Id$
+..
+.. - fplod 20101129T111813Z aedon.locean-ipsl.upmc.fr (Darwin)
+..
+..   * creation
+..
+.. -
+
+.. |project| replace:: POMME
+
+.. _contributing:
+
+==============
+ Contributing
+==============
+
+Development is tracked with svn_.
+
+Installing a *svn* client is not needed unless you want
+to participate in |project| development.
+
+.. _svn: +todo+
+
+You will need a login on forge.ipsl.jussieu.fr to commit your change
+and add/answer tickets.
+
+See :ref:`Contact <contact>` to ask for login or any trouble on your forge.ipsl.jussieu.fr account.
+
+You will find in
+:ref:`svn Basic Commands <svnbasiccommands>` how to commit your change
+
+You will find in
+:ref:`builddoc` how to build HTML, PDF and troff versions of documentations.
Index: trunk/adm/guides/data_content.rst
===================================================================
--- trunk/adm/guides/data_content.rst	(revision 2)
+++ trunk/adm/guides/data_content.rst	(revision 2)
@@ -0,0 +1,175 @@
+.. +
+..
+.. EVOLUTIONS
+.. ==========
+..
+.. - fplod 20101118T170732Z aedon.locean-ipsl.upmc.fr (Darwin)
+.. 
+..   * creation
+..
+.. -
+
+.. _data_contents:
+
+Data
+====
+
+contenu terminologie granulométrie organisation etc.
+
+.. _data_mld:
+
+MLD in situ
+-----------
+
+Introduction
+~~~~~~~~~~~~
+
+http://www.obs-vlfr.fr/proof/vt/op/ec/pomme/pom.htm
+
+Pomme 1 en février-mars 2001, Pomme 2 de mars à mai 2001
+
+Zone de 550 x 750 km dans l'Atlantique nord-est centrée sur 41,5° N et 19° O
+
+http://www.ifremer.fr/sismer/FR/catal/campagne/indexcamnom.htql?nomcam=P
+
+::
+
+POMME 1 LEG1 	Universite de Paris VI - UPMC	Du 29/01/2001 au 24/02/2001 	ENTRE LE PORTUGAL ET LES AÇORES
+POMME 1 LEG2 	Universite de Paris VI - UPMC	Du 27/02/2001 au 19/03/2001 	ENTRE LE PORTUGAL ET LES AÇORES
+POMME 2 LEG1 	CNRS	Du 22/03/2001 au 13/04/2001 	ATLANTIQUE 
+
+
+http://www.ifremer.fr/sismer/FR/catal/campagne/campagne.htql?crno=1010021
+http://www.ifremer.fr/sismer/FR/catal/campagne/campagne.htql?crno=1010170
+http://www.ifremer.fr/sismer/FR/catal/campagne/campagne.htql?crno=1010031
+http://www.ifremer.fr/sismer/FR/catal/campagne/campagne.htql?crno=1010180
+
+images des parcours bateau
+
+
+
+résolution temporelle
+   +todo+
+
+couverture temporelle
+   +tooo+
+
+résolution spatiale
+   +todo+
+
+couverture spatiale
+   +todo+
+
+Reference files
+~~~~~~~~~~~~~~~
+
+déposés par Marina Lévy in :file:`/net/zeus/usr/zeus/incas/mousson/MLD/MLD_{yyyy}/`
+
+exemple de terminologie :
+ - +todo+
+
+Derived files
+~~~~~~~~~~~~~
+
+format texte produits par Marina Lévy en utilisant :ref:`LectureMLDHDF.pro`
+déposés dans par Marina Lévy in :file:`/net/zeus/usr/zeus/incas/mousson/MLD/`
+
+terminologie : :file:`mld{yyyy}_float.txt`
+
+taille : 193 Mo/an
+
+:caution: year value is not written in the file, only present in filename.
+
+:caution: can not be read by :program:`QGIS`.
+
+Here is a recipe to transform these files for QGIS::
+
+ $ for filetxt in /net/zeus/usr/zeus/incas/mousson/MLD/mld????_float.txt
+ do
+    filecsv=$(basename ${filetxt} .txt).csv
+    sed -e "s/^ //" -e "s/  */ /g" ${filetxt} > ${VARAMMA_ID}/MLD/${filecsv}
+ done
+
+Here is a recipe to isolate latitude(y), longitude (x) and attribute an unique ID for each point for QGIS::
+
+ $ for filetxt in /net/zeus/usr/zeus/incas/mousson/MLD/mld????_float.txt
+   do
+       bfile=$(basename ${filetxt})
+       yyyy=$(echo ${bfile} | sed -e "s/mld//" -e "s/_float.txt//")
+       filecsv=mld_id${yyyy}.txt
+       echo "Y X ID" > ${VARAMMA_ID}/MLD/${filecsv}
+       awk 'NR > 1 {printf "%f %f %d\n", $1, $2, NR - 1}' ${filetxt} >> ${VARAMMA_ID}/MLD/${filecsv}
+   done
+
+
+Annexes
+~~~~~~~
+
+Outil primaire de simulation : :ref:`simul_mld.m` et :ref:`write_mld.m`
+
+.. _data_mld_models:
+
+MLD models Data
+---------------
+
+Introduction
+~~~~~~~~~~~~
+
+
+résolution temporelle
+  +todo+
+
+couverture temporelle
+  +todo+
+
+résolution spatiale
+  +todo+
+
+couverture spatiale
+  +todo+
+
+Reference files
+~~~~~~~~~~~~~~~
+
+Directories
++++++++++++
+
+Terminology
++++++++++++
+
+
+Size
+++++
+
+++ Mo/an 400Ko * 24/3 * 365
+
+.. _data_precipitation_insitu:
+
+Other data sets
+---------------
+
+Stations description 
+~~~~~~~~~~~~~~~~~~~~
+
+http://www.ifremer.fr/sismer/FR/catal/campagne/station.htql?Num=1010180&Bas=CTDF02
+
+::
+
+ Numéro 	Latitude 	Longitude 	Date/Heure
+ 00820 	39 40.38 	-020 00.46 	17/04/2001 - 17:00
+ 00830 	39 45.01 	-019 45.43 	18/04/2001 - 05:46
+ 00840 	39 45.84 	-019 44.24 	18/04/2001 - 07:32
+ 00850 	39 45.54 	-019 45.74 	18/04/2001 - 11:05 
+
+.. _traitdecote.mat:
+
+This file has been provided by Marina Lévy.
+
+Following instruction load this file to arrays **Xgco** and **Ygco**::
+
+ octave> load('cmgco_traitdecote.mat','Xgco','Ygco');
+
+Plot of the whole world (black dots) can be done like this::
+
+ octave> plot(Xgco,Ygco,'k.','MarkerSize',1)
+
Index: trunk/adm/guides/glossary.rst
===================================================================
--- trunk/adm/guides/glossary.rst	(revision 2)
+++ trunk/adm/guides/glossary.rst	(revision 2)
@@ -0,0 +1,32 @@
+.. +
+..
+.. EVOLUTIONS
+.. ==========
+..
+.. - fplod 20101118T172108Z aedon.locean-ipsl.upmc.fr (Darwin)
+..
+..   * creation
+..
+.. -
+
+Glossary
+========
+
+.. _glossary:
+
+DMS
+   degree minute second
+   format for latitude and longitude
+POMME
+   Programme Océan Multidisciplinaire Méso Échelle
+MLD
+   Mixed Layer Depth
+
+P1L1
+   POMME 1 LEG 1
+P1L2
+   POMME 1 LEG 2
+P2L1
+   POMME 2 LEG 1
+P2L2
+   POMME 2 LEG 2
Index: trunk/adm/guides/requirements.rst
===================================================================
--- trunk/adm/guides/requirements.rst	(revision 2)
+++ trunk/adm/guides/requirements.rst	(revision 2)
@@ -0,0 +1,28 @@
+.. +
+..
+.. EVOLUTIONS
+.. ==========
+..
+.. $Id$
+..
+.. - fplod 20101129T112330Z aedon.locean-ipsl.upmc.fr (Darwin)
+..
+..   * creation
+..
+.. -
+
+.. |project| replace:: POMME 
+
+.. _requirements:
+
+==============
+ Requirements
+==============
+
+|project| is written using unix shell scripts and IDL/SAXO sources.
+
+You will need the following :
+
+IDL
+    reference version 7.0
+
Index: trunk/adm/guides/svnbasiccommands.rst
===================================================================
--- trunk/adm/guides/svnbasiccommands.rst	(revision 2)
+++ trunk/adm/guides/svnbasiccommands.rst	(revision 2)
@@ -0,0 +1,196 @@
+.. +
+..
+.. EVOLUTIONS
+.. ==========
+..
+.. $Id$
+..
+.. - fplod 20101129T111611Z aedon.locean-ipsl.upmc.fr (Darwin)
+..
+..   * creation from modmarin
+..
+.. -
+
+.. |project| replace:: pomme
+.. |dollar| replace:: \$
+
+.. _svnbasiccommands:
+
+======================
+``svn`` basic commands
+======================
+
+:author: Sébastien Masson <Sebastien.Masson_at_locean-ipsl.upmc.fr>
+
+$Id$
+
+.. help:
+
+svn help
+========
+
+::
+
+ $ svn help
+
+Help on a specific command (for example `add`):
+
+::
+
+ $ svn help add
+
+.. download:
+
+Download |project|
+==================
+
+To download |project| in the directory :file:`${HOME}/pomme_ws` execute (with the appropriate login)::
+
+ $ svn checkout svn+ssh://**YOUR_LOGIN**@forge.ipsl.jussieu.fr/ipsl/forge/projets/pomme/svn/trunk ${HOME}/pomme_ws
+
+.. update:
+
+Update |project|
+================
+
+To update everything, go to the directory where you installed |project| (for example :file:`${HOME}/pomme_ws`) and execute::
+
+ $ svn update
+
+You can also specify |project| when calling svn update, for example::
+
+ $ svn update ${HOME}/pomme_ws
+
+Or you can specify one or several files you want to update::
+
+ $ svn update ${HOME}/pomme_ws/src/*.pro
+
+.. compare:
+
+Compare your version with the reference deposit
+===============================================
+
+To compare your version with the reference deposit as it was at the time you download (or updated) |project|, execute::
+
+ $ svn status
+
+To compare your version with the latest version of the reference deposit, execute::
+
+ $ svn status -u
+
+.. addfile:
+
+Add a new file
+==============
+
+Add a new file to |project|::
+
+ $ svn add **file_name**
+
+If **file_name** is not in the working space (here :file:`${HOME}/pomme_ws`), you must copy it::
+
+ $ cp -p **another_directory** ${HOME}/pomme_ws/
+
+For example
+
+create a :file:`aaa` file
+::
+
+   $ touch aaa
+   $ ls -l aaa
+   -rw-r--r-- 1 smasson lodyc 0 Oct 29 09:59 aaa
+
+check your deposit, :file:`aaa` file is signaled as unknown
+::
+
+   $ svn status
+   ?      aaa
+
+
+add :file:`aaa` file to the svn deposit
+::
+
+ $ svn add aaa
+ A         aaa
+
+
+check that :file:`aaa` has been add to the deposit
+::
+
+ $ svn status
+ A      aaa
+
+
+.. createdir:
+
+Create a directory file
+=======================
+
+::
+
+ $ svn mkdir **directory_name**
+
+For example::
+
+ # create the directory and add it to the svn deposit in one unique command
+ $ svn mkdir AAA
+ A         AAA
+
+or::
+
+ # create the directory
+ $ mkdir AAA
+ # check your deposit, :file:`AAA` is signaled as unknown
+ $ svn status
+ ?      AAA
+
+ # add it to the svn deposit
+ $ svn add AAA
+ A         AAA
+
+.. deletefile:
+
+Delete an existing file
+=======================
+
+::
+
+ # works for file or directory
+ $ svn rm --force aaa
+
+.. addversion:
+
+Add automatic version number in a file
+======================================
+
+Edit your file and add somewhere `\$Id\$`.
+
+Next execute the following svn command::
+
+ $ svn propset svn:keywords Id *YOUR_FILE_NAME*
+
+Next time you download/update your file, `\$Id\$` will be automatically replaced by the version tag.
+
+.. commit:
+
+Commit your changes
+===================
+
+Commit all your changes with one command::
+
+ $ svn commit --username **YOUR_LOGIN** --message "A SHORT DESCRIPTION" ${HOME}/pomme_ws
+
+or commit your change on one specific file (for example :file:`${HOME}/pomme_ws/src/aaa`)::
+
+ $ svn commit --username **YOUR_LOGIN** \
+   --message "A SHORT DESCRIPTION" \
+   ${HOME}/pomme_ws/src/aaa
+
+.. version:
+
+More info on your version
+=========================
+
+::
+
+ $ svn info ${HOME}/pomme_ws
Index: trunk/adm/index.rst
===================================================================
--- trunk/adm/index.rst	(revision 2)
+++ trunk/adm/index.rst	(revision 2)
@@ -0,0 +1,36 @@
+.. +
+..
+.. EVOLUTIONS
+.. ==========
+.. 
+.. $Id$
+..
+.. - fplod 20101118T165100Z aedon.locean-ipsl.upmc.fr (Darwin)
+..
+..   * creation to join manuals and guides
+.. -
+
+.. _index:
+
+====================
+POMME Documentations
+====================
+
+Comparaison données in-situ/modèle de hauteurs de couche de mélange
+
+.. toctree::
+   :maxdepth: 2
+
+   index_guides
+   index_manuals.rst
+
+   guides/bibliography.rst
+   guides/glossary.rst
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+
Index: trunk/adm/index_guides.rst
===================================================================
--- trunk/adm/index_guides.rst	(revision 2)
+++ trunk/adm/index_guides.rst	(revision 2)
@@ -0,0 +1,32 @@
+.. +
+..
+.. EVOLUTIONS
+.. ==========
+..
+..
+.. - fplod 20101118T165301Z aedon.locean-ipsl.upmc.fr (Darwin)
+..
+..   * creation
+..
+.. -
+
+.. _index_guides:
+
+============
+POMME guides
+============
+
+.. only:: html
+
+   **Download** offline version (`.pdf <../../pdf/sphinx/POMME.pdf>`__)
+
+.. toctree::
+   :maxdepth: 1
+   :glob:
+
+   guides/data_content
+
+.. +todo+   guides/requirements
+.. +todo+   guides/installing
+.. +todo+   guides/using
+.. +todo+   guides/contributing
Index: trunk/adm/install.sh
===================================================================
--- trunk/adm/install.sh	(revision 2)
+++ trunk/adm/install.sh	(revision 2)
@@ -0,0 +1,162 @@
+#! /bin/sh
+#+
+#
+# .. _install.sh:
+#
+# NAME
+# ====
+#
+# install.sh - publication of HTML files and associated files
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ install.sh -w dirwww -p dirpublish -u urlpublish -l login
+#
+# DESCRIPTION
+# ===========
+#
+# publication (rsync) of dirwww content on dirpublish given in argument
+#
+# If the host of publication is cerbere.locean-ipsl.upmc.fr, a specific update
+# is launched.
+#
+# -w  input directort
+# -p  output directory
+# -u  output url
+# -l  login used to access on output url
+#
+# EXAMPLES
+# ========
+#
+# FILES
+# =====
+#
+# fplod 2009-04-27T13:10:24Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+# - fplod 2009-04-27T10:21:23Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * creation from personnal tool (used for superbib, SAXO, etc.)
+#
+#-
+system=$(uname)
+case "${system}" in
+   AIX|IRIX64)
+      echo " www : no specific posix checking"
+   ;;
+   *)
+      set -o posix
+   ;;
+esac
+#
+command=$(basename ${0})
+log_date=$(date -u +"%Y%m%dT%H%M%SZ")
+log=/tmp/$(basename ${command} .sh).log.${log_date}
+#
+usage=" Usage : ${command} -w dirwww -p dirpublish -u urlpublish -l login"
+#
+minargcount=4
+#echo " narg ${#}"
+if [ ${#} -lt ${minargcount} ]
+then
+   echo "eee : not enought arguments"
+   echo "${usage}"
+   exit 1
+fi
+#
+# default
+dirpublish="none"
+urlpublish="none"
+login="none"
+#
+set +u
+while [ ! -z "${1}" ]
+do
+   case ${1} in
+      -w)
+         dirwww=${2}
+         shift
+      ;;
+      -p)
+         dirpublish=${2}
+         shift
+      ;;
+      -u)
+         urlpublish=${2}
+         shift
+      ;;
+      -l)
+         login=${2}
+         shift
+      ;;
+   esac
+   # next flag
+   shift
+done
+#
+set -u
+#
+# ++ check directories
+#
+answer=${1:-" "}
+case ${answer} in
+   y|Y|n|N)
+   ;;
+   *)
+      if [ "${dirpublish}" != "none" ]
+      then
+         echo "Do you want to install ${dirwww} on ${dirpublish} (y|[n]) ?"
+         read answer
+      fi
+      if [ "${urlpublish}" != "none" ]
+      then
+         echo "Do you want to install ${dirwww} on ${urlpublish} (y|[n]) ?"
+         read answer
+      fi
+   ;;
+esac
+#
+case ${answer} in
+   y|Y)
+      if [ "${dirpublish}" != "none" ]
+      then
+         # copy of ${dirwww} on $dirpublish
+         echo "iii : update of ${dirpublish}"
+         rsync -av --exclude=".DS_Store" -e ssh ${dirwww}/ ${dirpublish}
+         # detect if in dirpublish following this pattern [USER@]HOST:SRC, HOST
+         # is cerbere.locean-ipsl.upmc.fr. If so, a specific update is launched
+         userhost=${dirpublish%%:*}
+         host=${userhost##*@}
+         if [ ${login} = "none" ]
+         then
+            user=${userhost%%@*}
+         else
+            user=${login}
+         fi
+         if [ "${host}" = "cerbere.locean-ipsl.upmc.fr" ]
+         then
+           wget -q "http://intranet.locean-ipsl.upmc.fr/persoweb/?fastupdate=1&user=${user}" -O /dev/null
+         fi
+      else
+         # urlpublish=http://www.locean-ipsl.upmc.fr/~ginette/produit
+         dirpublish=${urlpublish##*~}
+         cd ${dirwww}
+         #lftp -e "mirror -R . ${dirpublish};quit" -u ${LOGNAME} skyros.locean-ipsl.upmc.fr
+         lftp -e "mirror -R . ${dirpublish};quit" -u ${LOGNAME} www.locean-ipsl.upmc.fr
+         # ++ log
+      fi
+   ;;
+   *)
+      echo "no update of ${dirpublish} or ${urlpublish}"
+   ;;
+esac
+#
+# normal exit
+exit 0
Index: trunk/adm/makefile
===================================================================
--- trunk/adm/makefile	(revision 2)
+++ trunk/adm/makefile	(revision 2)
@@ -0,0 +1,324 @@
+#+
+#
+# .. _makefile:
+#
+# ========
+# makefile
+# ========
+#
+# génération des manuels pomme
+#
+# TODO
+# ====
+#
+# add -W to sphinx command when encoding problems are solved
+#
+# usage of sphinx/source/Makefile
+#
+# IDL and matlab in man_troff
+#
+# EVOLUTIONS
+# ==========
+#
+#
+# - fplod 20101118T165524Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * creation
+#
+# SEE ALSO
+# ========
+#
+# :ref:`extract_rst.sh`
+#
+#-
+#
+PRODUCT = \
+pomme
+
+PRODUCTNAME = \
+$$(echo $(PRODUCT) | tr [:lower:] [:upper:])
+
+SUBPRODUCT = \
+pomme_ws
+
+DIRSRC = \
+../src/
+
+DIRADM = \
+./
+
+DIRTMP = \
+./
+
+DIRDESIGN = \
+./design/
+
+DIRWWW = \
+../doc/
+
+URLPUBLISH = \
+http://www.locean-ipsl.upmc.fr/~fplod/$(PRODUCT)/$(SUBPRODUCT)/doc/
+
+LIST_RST_GUIDES = \
+$(shell find $(DIRADM)/guides/ -name "*.rst")
+
+LIST_SRCSH = \
+$(shell find $(DIRSRC) -name "*.sh" | sort)
+
+LIST_SRCSH_RST = \
+$(shell echo "$(LIST_SRCSH)" | \
+	sed -e "s+$(DIRSRC)+$(DIRTMP)/sphinx_tmpdir/manuals/+g" \
+	    -e "s+\.sh+.sh.rst+g")
+
+LIST_SRCSH_TROFF = \
+$(shell echo "$(LIST_SRCSH)" | \
+	sed -e "s+$(DIRSRC)+$(DIRWWW)/man/man1/+g" \
+	    -e "s+\.sh+.sh.1+g")
+
+LIST_SRCIDL = \
+$(shell find $(DIRSRC) -name "*.pro" | sort)
+
+LIST_SRCIDL_RST = \
+$(shell echo "$(LIST_SRCIDL)" | \
+	sed -e "s+$(DIRSRC)+$(DIRTMP)/sphinx_tmpdir/manuals/+g" \
+	    -e "s+\.pro+.pro.rst+g")
+
+.PHONY : \
+help \
+before \
+clean \
+cleantmp \
+design \
+htmllinkcheckb \
+htmllinkchecka \
+spellcheck \
+all \
+man \
+man_troff_sphinx \
+html \
+html_sphinx \
+html_sphinx_one \
+pdf \
+pdf_sphinx \
+html_src_browser \
+html_src_browser_doxygen
+
+help :
+	@echo "Prepare output directories :"
+	@echo "\$$ make before"
+	@echo ""
+	@echo "Following commands are available to build outputs :"
+	@echo "\$$ make all"
+	@echo " "
+	@echo "Check links before installation : "
+	@echo "\$$ make htmllinkcheckb"
+	@echo " "
+	@echo "Last step = installation of HTML and pdf files"
+	@echo "\$$ make install_all"
+	@echo " "
+	@echo "Check links after installation : "
+	@echo "\$$ make htmllinkchecka"
+	@echo " "
+
+before :
+	@mkdir -p $(DIRWWW)/man/man1/
+	@mkdir -p $(DIRWWW)/html/sphinx/
+	@mkdir -p $(DIRWWW)/pdf/sphinx/
+	@mkdir -p $(DIRTMP)/sphinx_tmpdir/doctrees/
+	@mkdir -p $(DIRTMP)/sphinx_tmpdir/manuals/
+	@mkdir -p $(DIRTMP)/sphinx_tmpdir/guides/
+	@mkdir -p $(DIRWWW)/src_browser/
+
+
+install_all : \
+install_html \
+install_pdf \
+install_browser
+
+install_html :
+	@$(DIRADM)/install.sh -w $(DIRWWW)/html/ -u $(URLPUBLISH)/html/
+
+install_pdf :
+	@$(DIRADM)/install.sh -w $(DIRWWW)/pdf/ -u $(URLPUBLISH)/pdf/
+
+install_browser :
+	@$(DIRADM)/install.sh -w $(DIRWWW)/src_browser/doxygen/html/ -u $(URLPUBLISH)/src_browser/doxygen/html/
+
+clean : \
+cleantmp
+	-@rm -fr $(DIRWWW)/man/
+	-@rm -fr $(DIRWWW)/html/
+	-@rm -fr $(DIRWWW)/pdf/
+	-@rm -fr $(DIRWWW)/src_browser/
+
+
+cleantmp :
+	-@rm -f $(DIRTMP)/all.xml
+	-@rm -f $(DIRTMP)/*.txt
+	-@rm -f $(DIRTMP)/*.tex
+	-@rm -fr $(DIRTMP)/sphinx_tmpdir/
+	-@rm -f $(DIRTMP)/sphinx_*.log
+
+design : \
+$(DIRDESIGN)/images/$(PRODUCT)_fulldependencies.png \
+$(DIRDESIGN)/images/$(PRODUCT)_fulldependencies.svg
+
+htmllinkcheckb :
+	@$(DIRADM)/linkchecker.sh -d $(DIRWWW)/html/
+
+htmllinkchecka :
+	@$(DIRADM)/linkchecker.sh -u $(URLPUBLISH)
+
+spellcheck :
+	@++aspell --mode=sgml --master=english -c \
+	$(DIRSRC)/$(PRODUCT).xml
+
+all : \
+man \
+html_src_browser
+
+html_src_browser : \
+html_src_browser_doxygen
+
+man : \
+man_troff_sphinx
+
+man_troff_sphinx : \
+$(DIRADM)/sphinx/conf.py \
+$(DIRTMP)/sphinx_tmpdir/index_manuals.rst \
+$(LIST_SRCSH_RST) \
+$(LIST_SRCIDL_RST)
+	@sphinx-build -b man -c $(DIRADM)/sphinx \
+	    -d $(DIRTMP)/sphinx_tmpdir/doctrees/ \
+	    -d $(DIRTMP)/sphinx_tmpdir/doctrees/manuals/ \
+	    -w $(DIRTMP)/sphinx_man_troff.log \
+	    $(DIRTMP)/sphinx_tmpdir/ \
+	    $(DIRWWW)/man/man1/
+
+html : \
+html_sphinx \
+html_sphinx_one
+
+html_sphinx : \
+$(DIRADM)/sphinx/conf.py \
+$(DIRADM)/index.rst \
+$(DIRADM)/index_guides.rst \
+$(DIRTMP)/sphinx_tmpdir/index_manuals.rst \
+$(LIST_RST_GUIDES) \
+$(LIST_SRCSH_RST) \
+$(LIST_SRCIDL_RST)
+	@cp $(DIRADM)/index.rst $(DIRTMP)/sphinx_tmpdir/
+	@cp $(DIRADM)/index_guides.rst $(DIRTMP)/sphinx_tmpdir/
+	@cp $(LIST_RST_GUIDES) $(DIRTMP)/sphinx_tmpdir/guides/
+	@sphinx-build -b html -c $(DIRADM)/sphinx \
+	    -d $(DIRTMP)/sphinx_tmpdir/doctrees \
+	    -w $(DIRTMP)/sphinx_html.log \
+	    $(DIRTMP)/sphinx_tmpdir/ \
+	    $(DIRWWW)/html/sphinx/
+
+html_sphinx_one : \
+$(DIRADM)/sphinx/conf.py \
+$(DIRADM)/index.rst \
+$(DIRADM)/index_guides.rst \
+$(DIRTMP)/sphinx_tmpdir/index_manuals.rst \
+$(LIST_RST_GUIDES) \
+$(LIST_SRCSH_RST) \
+$(LIST_SRCIDL_RST)
+	@cp $(DIRADM)/index.rst $(DIRTMP)/sphinx_tmpdir/
+	@cp $(DIRADM)/index_guides.rst $(DIRTMP)/sphinx_tmpdir/
+	@cp $(LIST_RST_GUIDES) $(DIRTMP)/sphinx_tmpdir/guides/
+	@sphinx-build -b singlehtml -c $(DIRADM)/sphinx \
+	    -d $(DIRTMP)/sphinx_tmpdir/doctrees \
+	    -w $(DIRTMP)/sphinx_html_one.log \
+	    $(DIRTMP)/sphinx_tmpdir/ \
+	    $(DIRWWW)/html/sphinx_one/
+
+pdf : \
+pdf_sphinx
+
+pdf_sphinx : \
+$(DIRADM)/sphinx/conf.py \
+$(DIRADM)/index.rst \
+$(DIRADM)/index_guides.rst \
+$(DIRTMP)/sphinx_tmpdir/index_manuals.rst \
+$(LIST_RST_GUIDES) \
+$(LIST_SRCSH_RST) \
+$(LIST_SRCIDL_RST) 
+	@cp $(DIRADM)/index.rst $(DIRTMP)/sphinx_tmpdir/
+	@cp $(DIRADM)/index_guides.rst $(DIRTMP)/sphinx_tmpdir/
+	@cp $(LIST_RST_GUIDES) $(DIRTMP)/sphinx_tmpdir/guides/
+	@sphinx-build -b latex -c $(DIRADM)/sphinx \
+	    -d $(DIRTMP)/sphinx_tmpdir/doctrees \
+	    -w $(DIRTMP)/sphinx_pdf.log \
+	    $(DIRTMP)/sphinx_tmpdir/ \
+	    $(DIRTMP)/sphinx_tmpdir/latex_output
+	cd $(DIRTMP)/sphinx_tmpdir/latex_output/; make all-pdf
+	cp $(DIRTMP)/sphinx_tmpdir/latex_output/*.pdf \
+	   $(DIRWWW)/pdf/sphinx/
+
+$(DIRTMP)/sphinx_tmpdir/index_manuals.rst :
+	@-mkdir $(DIRTMP)/sphinx_tmpdir/
+	@echo ".. _index_manuals:" > $@
+	@echo " " >> $@
+	@echo "$(PRODUCTNAME) manuals" | tr [:print:] = >> $@
+	@echo "$(PRODUCTNAME) manuals" >> $@
+	@echo "$(PRODUCTNAME) manuals" | tr [:print:] = >> $@
+	@echo " " >> $@
+	@echo ".. only:: html" >> $@
+	@echo " " >> $@
+	@echo "   **Download** offline version (\`.pdf <../../pdf/sphinx/$(PRODUCTNAME).pdf>\`__)" >> $@
+	@echo " " >> $@
+	@echo "Shell scripts" >> $@
+	@echo "Shell scripts" | tr [:print:] = >> $@
+	@echo ".. toctree::" >> $@
+	@echo "   :maxdepth: 1" 1>> $@
+	@echo "   :glob:" 1>> $@
+	@echo " " >> $@
+	@for file in $(LIST_SRCSH); \
+	do \
+	   echo "   manuals/$$(basename $${file})"; \
+	done >> $@
+	@echo " " >> $@
+	@echo "IDL scripts" >> $@
+	@echo "IDL scripts" | tr [:print:] = >> $@
+	@echo ".. toctree::" >> $@
+	@echo "   :maxdepth: 1" 1>> $@
+	@echo "   :glob:" 1>> $@
+	@echo " " >> $@
+	@for file in $(LIST_SRCIDL); \
+	do \
+	   echo "   manuals/$$(basename $${file})"; \
+	done >> $@
+	@echo " " >> $@
+
+html_src_browser_doxygen : \
+	$(DIRWWW)/src_browser/doxygen/
+
+$(DIRWWW)/src_browser/doxygen/ : \
+$(DIRADM)/Doxyfile_$(PRODUCT) \
+$(DIRADM)/m2cpp.pl \
+$(LIST_SRCFORTRAN)
+	@doxygen $<
+	@touch $@
+
+$(DIRTMP)/sphinx_tmpdir/manuals/%.sh.rst : $(DIRSRC)/%.sh $(DIRADM)/extract_rst.sh
+	@$(DIRADM)/extract_rst.sh -i $< -l sh -o $@
+
+$(DIRTMP)/sphinx_tmpdir/manuals/%.pro.rst : $(DIRSRC)/%.pro $(DIRADM)/extract_rst.sh
+	@$(DIRADM)/extract_rst.sh -i $< -l IDL -o $@
+
+$(DIRTMP)/sphinx_tmpdir/manuals/%.m.rst : $(DIRSRC)/%.m $(DIRADM)/extract_rst.sh
+	@$(DIRADM)/extract_rst.sh -i $< -l matlab -o $@
+
+$(DIRTMP)/sphinx_tmpdir/manuals/%.jnl.rst : $(DIRSRC)/%.jnl  $(DIRADM)/extract_rst.sh
+	@$(DIRADM)/extract_rst.sh -i $< -l ferret -o $@
+
+$(DIRDESIGN)/images/%.png : $(DIRDESIGN)/images/%.svg
+	@convert $< $@
+
+$(DIRDESIGN)/images/%.svg : $(DIRDESIGN)/%.dot
+	@dot -Tsvg -o $@ $<
+
+$(DIRDESIGN)/$(PRODUCT)_fulldependencies.dot : \
+./makefile
+	@makeppgraph --graphviz --output=$@
Index: trunk/adm/sphinx/Makefile
===================================================================
--- trunk/adm/sphinx/Makefile	(revision 2)
+++ trunk/adm/sphinx/Makefile	(revision 2)
@@ -0,0 +1,130 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
+BUILDDIR      = _build
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
+
+help:
+	@echo "Please use \`make <target>' where <target> is one of"
+	@echo "  html       to make standalone HTML files"
+	@echo "  dirhtml    to make HTML files named index.html in directories"
+	@echo "  singlehtml to make a single large HTML file"
+	@echo "  pickle     to make pickle files"
+	@echo "  json       to make JSON files"
+	@echo "  htmlhelp   to make HTML files and a HTML help project"
+	@echo "  qthelp     to make HTML files and a qthelp project"
+	@echo "  devhelp    to make HTML files and a Devhelp project"
+	@echo "  epub       to make an epub"
+	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
+	@echo "  text       to make text files"
+	@echo "  man        to make manual pages"
+	@echo "  changes    to make an overview of all changed/added/deprecated items"
+	@echo "  linkcheck  to check all external links for integrity"
+	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+	-rm -rf $(BUILDDIR)/*
+
+html:
+	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+	@echo
+	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+	@echo
+	@echo "Build finished; now you can process the pickle files."
+
+json:
+	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+	@echo
+	@echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+	@echo
+	@echo "Build finished; now you can run HTML Help Workshop with the" \
+	      ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+	@echo
+	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
+	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/POMME.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/POMME.qhc"
+
+devhelp:
+	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+	@echo
+	@echo "Build finished."
+	@echo "To view the help file:"
+	@echo "# mkdir -p $$HOME/.local/share/devhelp/POMME"
+	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/POMME"
+	@echo "# devhelp"
+
+epub:
+	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+	@echo
+	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo
+	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+	@echo "Run \`make' in that directory to run these through (pdf)latex" \
+	      "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through pdflatex..."
+	make -C $(BUILDDIR)/latex all-pdf
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+	@echo
+	@echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+	@echo
+	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+changes:
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+	@echo
+	@echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+	@echo
+	@echo "Link check complete; look for any errors in the above output " \
+	      "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+	@echo "Testing of doctests in the sources finished, look at the " \
+	      "results in $(BUILDDIR)/doctest/output.txt."
Index: trunk/adm/sphinx/conf.py
===================================================================
--- trunk/adm/sphinx/conf.py	(revision 2)
+++ trunk/adm/sphinx/conf.py	(revision 2)
@@ -0,0 +1,216 @@
+# -*- coding: utf-8 -*-
+#
+# POMME documentation build configuration file, created by
+# sphinx-quickstart on Thu Nov 18 17:59:16 2010.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration -----------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = []
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+source_encoding = 'iso-8859-15'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'POMME'
+copyright = u'2010, CNRS'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '1.0'
+# The full version, including alpha/beta/rc tags.
+release = '1.0'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'POMMEdoc'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+  ('index', 'POMME.tex', u'POMME Documentation',
+   u'CNRS', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output --------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    ('index', 'pomme', u'POMME Documentation',
+     [u'CNRS'], 1)
+]
Index: trunk/src/dm2dd.pro
===================================================================
--- trunk/src/dm2dd.pro	(revision 2)
+++ trunk/src/dm2dd.pro	(revision 2)
@@ -0,0 +1,110 @@
+;+
+;
+; ==========
+; dm2dd.pro
+; ==========
+;
+; .. function:: dm2dd(degree,minute)
+;
+;    Calculate the decimal degree for a given degree and minute
+;
+;    :param degree: degree 
+;    :type degree: integer
+;    :raise degree: required
+;
+;    :param minute: minute 
+;    :type minute: float
+;    :raise minute: required
+;
+;    :returns: decimal degree or -1 if error in parameters type or dimension
+;    :rtype: double
+;
+; :examples:
+;
+; ::
+;
+;   IDL> degree=45
+;   IDL> minute=30.5
+;   IDL> dd=dm2dd(degree,minute)
+;   IDL> print,dd
+;   45.5083
+;
+; :uses:
+;
+; :func:`report`
+;
+; :see also:
+;
+; http://www.csgnetwork.com/gpscoordconv.html
+;
+; :todo:
+;
+;  authorize arrays in inputs (like :func:`julday`)
+;
+; :history:
+;
+; - fplod 20101126T140307Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * creation
+;
+; :version:
+;
+; $Id$
+;
+;-
+FUNCTION DM2DD, degree, minute
+
+compile_opt idl2, strictarrsubs
+
+; Return to caller if errors
+ON_ERROR, 2
+
+usage = 'result=dms2dss(degree, minute)'
+
+; check parameters
+nparam = N_PARAMS()
+IF (nparam LT 2) THEN BEGIN
+   ras = report(['Incorrect number of arguments.' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+
+arg_type = size(degree,/type)
+IF ((arg_type NE 2) AND (arg_type NE 3)) THEN BEGIN
+   ras = report(['Incorrect arg type degree' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+
+arg_dim =  size(degree,/n_elements)
+IF (arg_dim GT 1) THEN BEGIN
+   ras = report(['Incorrect arg dimension degree' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+
+arg_type = size(minute,/type)
+IF (arg_type NE 4) THEN BEGIN
+   ras = report(['Incorrect arg type minute' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+
+arg_dim =  size(minute,/n_elements)
+IF (arg_dim GT 1) THEN BEGIN
+   ras = report(['Incorrect arg dimension minute' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+
+; conversion
+dd = degree + minute/60.d
+
+return,dd
+
+END
Index: trunk/src/dmean_mld.pro
===================================================================
--- trunk/src/dmean_mld.pro	(revision 2)
+++ trunk/src/dmean_mld.pro	(revision 2)
@@ -0,0 +1,139 @@
+;+
+;
+; =============
+; dmean_mld.pro
+; =============
+;
+; .. function:: dmean_mld(data_prn)
+;
+;    Compute daily mean and standart deviation of MLD from structure ++details
+;
+;    :param data_prn: structure ++details
+;    :type data_prn: structure
+;    :raise data_prn: required
+;
+;    :returns: data structure +todo+ details or -1 if error
+;    :rtype: structure +todo+ details
+;
+; :examples:
+;
+; Realistic example with POMME files::
+;
+;    IDL> data_prn=file_prn_to_mem()
+;    IDL> data_dmean=dmean_mld(data_prn)
+;
+; impression de controle ::
+;
+;    IDL> help, data_dmean, /structure
+;    IDL> print, data_dmean[0]
+;    IDL> print, data_dmean.mean_zhom001
+;    IDL> print, data_dmean.std_zhom001
+;
+; :uses:
+;
+; :see also:
+;
+; :func:`file_prn_to_mem`
+; :func:`join_mean_asc`
+; 
+; :restrictions:
+;
+; :todo:
+;
+; test arguments
+;
+; missing values
+;
+; init returned structure to NaN vs 0L or 0.0
+;
+; usage of report
+;
+; - fplod 20101129T092544Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * add 1st station in result structure
+;
+; - fplod 20101124T143429Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * creation
+;
+; :version:
+;
+; $Id$
+;
+;-
+FUNCTION dmean_mld, data_prn
+;
+compile_opt idl2, strictarrsubs
+;
+; Return to caller if errors
+ON_ERROR, 2
+;
+usage = 'result=dmean_mld(data_prn)'
+;
+nparam = N_PARAMS()
+IF (nparam LT 1) THEN BEGIN
+   ras = report(['Incorrect number of arguments.' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+;
+; initialize returned structure
+resultstruct = { doy : 0L $
+             , first_station : 0L $
+             , mean_zhom001: 0.0 $
+             , mean_zhom002 : 0.0 $
+             , mean_zhom005 : 0.0 $
+             , mean_zhom010: 0.0 $
+             , mean_zhomelch : 0.0 $
+             , std_zhom001: 0.0 $
+             , std_zhom002 : 0.0 $
+             , std_zhom005 : 0.0 $
+             , std_zhom010: 0.0 $
+             , std_zhomelch : 0.0 $
+               }
+;
+; found days list
+multiple_days=ceil(data_prn.doy)
+days=multiple_days[UNIQ(multiple_days, SORT(multiple_days))]
+ndays=n_elements(days)
+;
+; initialize dimension of the returned structure 
+result = replicate(resultstruct, ndays)
+result.doy=days
+;
+; loop on each day
+FOR iday=0L, ndays - 1 DO BEGIN
+    ; find julian day in data_prn
+    ;++print, result[iday].doy
+    indice_prn = WHERE(ceil(data_prn.doy) EQ result[iday].doy,count)
+    ;++print, count
+    ;++print, 'indice du jour', result[iday].doy,' dans data_prn = ',indice_prn
+    ; store the first (in numeric number - supposed to be chronological order)
+    result[iday].first_station = data_prn[indice_prn[0]].station
+    ; compute daily mean of MLDs
+    result[iday].mean_zhom001 = total(data_prn[indice_prn].zhom001)/count
+    result[iday].mean_zhom002 = total(data_prn[indice_prn].zhom002)/count
+    result[iday].mean_zhom005 = total(data_prn[indice_prn].zhom005)/count
+    result[iday].mean_zhom010 = total(data_prn[indice_prn].zhom010)/count
+    result[iday].mean_zhomelch = total(data_prn[indice_prn].zhomelch)/count
+    IF (count GT 1) THEN BEGIN
+       ; compute standart deviation of MLDs
+       result[iday].std_zhom001 = stddev(data_prn[indice_prn].zhom001)
+       result[iday].std_zhom002 = stddev(data_prn[indice_prn].zhom002)
+       result[iday].std_zhom005 = stddev(data_prn[indice_prn].zhom005)
+       result[iday].std_zhom010 = stddev(data_prn[indice_prn].zhom010)
+       result[iday].std_zhomelch = stddev(data_prn[indice_prn].zhomelch)
+    ENDIF ELSE BEGIN
+       result[iday].std_zhom001 = 0.0
+       result[iday].std_zhom002 = 0.0
+       result[iday].std_zhom005 = 0.0
+       result[iday].std_zhom010 = 0.0
+       result[iday].std_zhomelch = 0.0
+    ENDELSE
+    ;++print, 'mean mld 1', result[iday].mean_zhom001
+ENDFOR
+;
+return, result
+;
+END
Index: trunk/src/dms2dd.pro
===================================================================
--- trunk/src/dms2dd.pro	(revision 2)
+++ trunk/src/dms2dd.pro	(revision 2)
@@ -0,0 +1,141 @@
+;+
+;
+; ==========
+; dms2dd.pro
+; ==========
+;
+; .. function:: dms2dd(degree,minute,second)
+;
+;    Calculate the decimal degree for a given degree minute and second
+;
+;    :param degree: degree 
+;    :type degree: integer
+;    :raise degree: required
+;
+;    :param minute: minute 
+;    :type minute: integer
+;    :raise minute: required
+;
+;    :param second: second 
+;    :type second: integer
+;    :raise second: required
+;
+;    :returns: decimal degree or -1 if error in parameters type or dimension
+;    :rtype: double
+;
+; :examples:
+;
+; ::
+;
+;   IDL> degree=45
+;   IDL> minute=30
+;   IDL> second=30
+;   IDL> dd=dms2dd(degree,minute,second)
+;   IDL> print,dd
+;   45.5083
+;
+; :uses:
+;
+; :func:`report`
+;
+; :see also:
+;
+; http://www.csgnetwork.com/gpscoordconv.html
+;
+; :todo:
+;
+;  authorize arrays in inputs (like :func:`julday`)
+;
+; :history:
+;
+; - fplod 20101124T140937Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * returned value type from float to double
+;   * Double constants in conversion
+;
+; - fplod 20101124T120209Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * apply http://sphinx.pocoo.org/domains.html Info field lists
+;     to have a nicer parameters documentation
+;
+; - fplod 20101122T094140Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * creation
+;
+; :version:
+;
+; $Id$
+;
+;-
+FUNCTION DMS2DD, degree, minute, second
+
+compile_opt idl2, strictarrsubs
+
+; Return to caller if errors
+ON_ERROR, 2
+
+usage = 'result=dms2dss(degree, minute, second)'
+
+; check parameters
+nparam = N_PARAMS()
+IF (nparam LT 3) THEN BEGIN
+   ras = report(['Incorrect number of arguments.' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+
+arg_type = size(degree,/type)
+IF ((arg_type NE 2) AND (arg_type NE 3)) THEN BEGIN
+   ras = report(['Incorrect arg type degree' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+
+arg_dim =  size(degree,/n_elements)
+IF (arg_dim GT 1) THEN BEGIN
+   ras = report(['Incorrect arg dimension degree' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+
+arg_type = size(minute,/type)
+IF ((arg_type NE 2) AND (arg_type NE 3)) THEN BEGIN
+   ras = report(['Incorrect arg type minute' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+
+arg_dim =  size(minute,/n_elements)
+IF (arg_dim GT 1) THEN BEGIN
+   ras = report(['Incorrect arg dimension minute' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+
+arg_type = size(second,/type)
+IF ((arg_type NE 2) AND (arg_type NE 3)) THEN BEGIN
+   ras = report(['Incorrect arg type second' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+
+arg_dim =  size(second,/n_elements)
+IF (arg_dim GT 1) THEN BEGIN
+   ras = report(['Incorrect arg dimension second' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+
+; conversion
+dd = degree + float(minute/60.d) + (second/60.d)/60.d
+
+return,dd
+
+END
Index: trunk/src/fig_mld.pro
===================================================================
--- trunk/src/fig_mld.pro	(revision 2)
+++ trunk/src/fig_mld.pro	(revision 2)
@@ -0,0 +1,110 @@
+;+
+;
+;
+; .. program:: fig_mld
+;
+; ===========
+; fig_mld.pro
+; ===========
+;
+; main POMME project program
+;
+; - read the 2 mld models
+; - read mld insitu data and metadata
+; - compute daily mean insitu mld data
+; - compute daily mean modeled data in boxes of 1/2° and 1/4° around insitu measement location
+; - plot ++
+;
+; :examples:
+;
+; ::
+;
+;   IDL> fig_mld
+;   IDL> exit
+;
+; :uses:
+;
+; +todo+
+; :func:`dmean_mld`
+;
+; :todo:
+;
+; make it work
+; consolidate
+;
+; :history:
+;
+; - fplod 20101125T145638Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * add ReST minimal header
+;
+; - marina 20101125T130000Z
+;
+;   * creation draft
+;
+;
+;-
+PRO fig_mld
+
+@init_pom
+ mldm = -read_ncdf('mld', 0, 383, /timestep, file=iodir+'SIMU_HR/PHYSIQUE/LC4.mld.nc',  /nostruct)
+ mldr = -read_ncdf('mld', 0, 383, /timestep, file=iodir+'SIMU_LISSEE/REF.DIA2D.nc',  /nostruct)
+time=julday(09,27,2000)+dindgen(jpt)
+
+;openps, 'fig_mld.ps'
+;pltt, mldm , box=[-22,-16, 38, 44],  't',  -200,  0, color = 70,  title = 'MLD'
+;pltt, mldr , box=[-22,-16, 38, 44],  't',  color = 220,  /ov1d
+;closeps
+
+delta = 0.5
+
+;boucle sur le nombre de donnees:
+FOR it = 1, nt DO BEGIN : it varie de 0-60 env (nb de donnees campagnes)
+domdef
+;ici lecture de jt, xlon, ylat : jt varie de 0-383 (nb de sorties
+;modeles)
+;jt = 0 : 27 sept 2000
+;it = 0 : env fev 2001
+;read, jt, xlon, ylat, mld1, mld2, mld3, mld4, mld5
+jt = 10
+xlon = -20
+ylat = 41
+
+mybox = [xlon-delta, xlon+delta, ylat-delta, ylat+delta]
+
+; ++ verifier que la moyenne est bien faite dans la boite et pas dans tout le domaine
+mldm = reform(read_ncdf('mld', jt, /timestep, file=iodir+'SIMU_HR/PHYSIQUE/LC4.mld.nc',  /nostruct, box = mybox))
+mldr = reform(read_ncdf('mld', jt, /timestep, file=iodir+'SIMU_LISSEE/REF.DIA2D.nc',  /nostruct, box = mybox))
+
+mymldm = moyenne(mldm, box = mybox, 'xy')
+mymldr = moyenne(mldr, box = mybox, 'xy')
+myvarm = stddev(mldm)
+myvarr = stadev(mldr)
+ENDFOR
+delta = 0.5
+
+;boucle sur le nombre de donnees:
+FOR it = 1, nt DO BEGIN : it varie de 0-60 env (nb de donnees campagnes)
+domdef
+;ici lecture de jt, xlon, ylat : jt varie de 0-383 (nb de sorties
+;modeles)
+;jt = 0 : 27 sept 2001
+;it = 0 : env fev 2001
+;read, jt, xlon, ylat, mld1, mld2, mld3, mld4, mld5
+jt = 10
+xlon = -20
+ylat = 41
+
+mybox = [xlon-delta, xlon+delta, ylat-delta, ylat+delta]
+
+mldm = reform(read_ncdf('mld', jt, /timestep, file=iodir+'SIMU_HR/PHYSIQUE/LC4.mld.nc',  /nostruct, box = mybox))
+mldr = reform(read_ncdf('mld', jt, /timestep, file=iodir+'SIMU_LISSEE/REF.DIA2D.nc',  /nostruct, box = mybox))
+
+mymldm1 = moyenne(mldm, box = mybox, 'xy')
+mymldr1 = moyenne(mldr, box = mybox, 'xy')
+myvarm1 = stddev(mldm)
+myvarr1 = stadev(mldr)
+ENDFOR
+
+;write, jt, xlon, ylat, mld1, mld2, mld3, mld4, mld5, mymldm, mymldr,myvarm, myvarr,mymldm1, mymldr1,myvarm1, myvarr1
+END
Index: trunk/src/file_asc_long2mem.pro
===================================================================
--- trunk/src/file_asc_long2mem.pro	(revision 2)
+++ trunk/src/file_asc_long2mem.pro	(revision 2)
@@ -0,0 +1,134 @@
+;+
+;
+; =====================
+; file_asc_long2mem.pro
+; =====================
+;
+; .. function:: file_asc_long2mem(filename)
+;
+;    Read long station information files and store data in a structure
+;
+;    :param filename: filename to be read
+;    :type filename: string
+;    :raise filename: required
+;
+;    :returns: data structure +todo+ details or -1 if error
+;    :rtype: structure +todo+ details
+;
+; notes
+; 18 fields in header vs 19 data fields. missing mm of ending time
+;
+; :examples:
+;
+; ::
+;
+;    IDL> filename='/usr/work/incas/fplod/pomme_d/sta.P1L2.asc'
+;    IDL> result=file_asc_long2mem(filename)
+;
+; impression de contrôle : structure, 1re station, toutes les stations ::
+;    IDL> print, result, /structure
+;    IDL> print, result[0].station
+;    IDL> print, result.station
+;
+; :uses:
+;
+; :func:`report`
+;
+; :restrictions:
+;
+; :todo:
+;
+; format fixe
+;
+; test existence of filename
+;
+; usage of ${POMME_ID}
+;
+; :history:
+;
+; - fplod 20101123T122132Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * creation using "Reading Into a Structure" of
+;     http://www.dfanning.com/tips/ascii_column_data.html
+;
+;
+; :version:
+;
+; $Id$
+;
+;-
+FUNCTION file_asc_long2mem, filename
+;
+compile_opt idl2, strictarrsubs
+;
+; Return to caller if errors
+ON_ERROR, 2
+;
+usage = 'result=file_asc_long2mem(filename)'
+;
+nparam = N_PARAMS()
+IF (nparam LT 1) THEN BEGIN
+   ras = report(['Incorrect number of arguments.' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+;
+arg_type = size(filename,/type)
+IF (arg_type NE 7) THEN BEGIN
+   ras = report(['Incorrect arg type filename' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+;
+arg_dim =  size(filename,/n_elements)
+IF (arg_dim LT 1) THEN BEGIN
+   ras = report(['Incorrect arg dimension filename' $
+         + '!C' $
+         + 'Usage : ' + usage])
+  return, -1
+ENDIF
+;
+; initialize header
+header = STRARR(1)
+;
+resultstruct = { station: 0L $
+                , sonde: 0L $
+                , zmax: 0L $
+                , an: 0L $
+                , mm: 0L $
+                , jj: 0L $
+                , hh_begin: 0L $
+                , mm_begin: 0L $
+                , ss: 0L $
+                , deg_lat_begin : 0L $
+                , mm_lat_begin: 0.0 $
+                , deg_lon_begin: 0L $
+                , mm_lon_begin: 0.0 $
+                , deg_lat_end: 0L $
+                , mm_lat_end: 0.0 $
+                , deg_lon_end: 0L $
+                , mm_lon_end: 0.0 $
+                , hh_end: 0L $
+                , mm_end: 0L }
+;
+nrows = file_lines(filename) - N_ELEMENTS(header)
+result = Replicate(resultstruct, nrows)
+;
+; open file
+OPENR, lun, filename, /GET_LUN
+;++ hanlde error
+;
+; read header
+READF, lun, header
+;
+; read data lines
+READF, lun, result
+;
+; close file
+FREE_LUN, lun
+;
+return, result
+;
+END
Index: trunk/src/file_asc_p1l1_to_mem.pro
===================================================================
--- trunk/src/file_asc_p1l1_to_mem.pro	(revision 2)
+++ trunk/src/file_asc_p1l1_to_mem.pro	(revision 2)
@@ -0,0 +1,129 @@
+;+
+;
+; ========================
+; file_asc_p1l1_to_mem.pro
+; ========================
+;
+; .. function:: file_asc_p1l1_to_mem(filename)
+;
+;    Read P1L1 station information files and store data in a structure
+;
+;    :param filename: filename to be read
+;    :type filename: string
+;    :raise filename: required
+;
+;    :returns: data structure +todo+ details or -1 if error
+;    :rtype: structure +todo+ details
+;
+; notes
+; guessed header
+;
+; :examples:
+;
+; ::
+;
+;    IDL> filename='/usr/work/incas/fplod/pomme_d/sta.P1L1.asc'
+;    IDL> result=file_asc_p1l1_to_mem(filename)
+;
+; impression de contrôle : 1re station, toutes les stations ::
+;
+;    IDL> help, result, /structure
+;    IDL> print, result[0].station
+;    IDL> print, result.station
+;
+; :uses:
+;
+; :func:`report`
+;
+; :restrictions:
+;
+; :todo:
+;
+; format fixe
+;
+; test existence of filename
+;
+; usage of ${POMME_ID}
+;
+; :history:
+;
+; - fplod 20101123T122132Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * creation using "Reading Into a Structure" of
+;     http://www.dfanning.com/tips/ascii_column_data.html
+;
+;
+; :version:
+;
+; $Id$
+;
+;-
+FUNCTION file_asc_p1l1_to_mem, filename
+;
+compile_opt idl2, strictarrsubs
+;
+; Return to caller if errors
+ON_ERROR, 2
+;
+usage = 'result=file_asc_p1l1_to_mem(filename)'
+;
+nparam = N_PARAMS()
+IF (nparam LT 1) THEN BEGIN
+   ras = report(['Incorrect number of arguments.' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+;
+arg_type = size(filename,/type)
+IF (arg_type NE 7) THEN BEGIN
+   ras = report(['Incorrect arg type filename' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+;
+arg_dim =  size(filename,/n_elements)
+IF (arg_dim LT 1) THEN BEGIN
+   ras = report(['Incorrect arg dimension filename' $
+         + '!C' $
+         + 'Usage : ' + usage])
+  return, -1
+ENDIF
+;
+; initialize header
+header = STRARR(1)
+;
+resultstruct = { station:0L $
+                 , prof :0L $ 
+                 , zctd : 0L $
+                 , an: 0L $
+                 , mm: 0L $
+                 , jj: 0L $
+                 , hh_begin: 0L $
+                 , mm_begin: 0L $
+                 , ss_begin: 0L $
+                 , deg_lat_begin : 0L $
+                 , mm_lat_begin: 0.0 $
+                 , deg_lon_begin: 0L $ 
+                 , mm_lon_begin: 0.0 $ 
+               }
+nrows = file_lines(filename) - N_ELEMENTS(header);
+result = Replicate(resultstruct, nrows)
+;
+; open file
+OPENR, lun, filename, /GET_LUN
+;++ hanlde error
+;
+; read header
+READF, lun, header
+;
+; read data lines
+READF, lun, result
+;
+; close file
+FREE_LUN, lun
+;
+return, result
+;
+END
Index: trunk/src/file_asc_p2l1_to_mem.pro
===================================================================
--- trunk/src/file_asc_p2l1_to_mem.pro	(revision 2)
+++ trunk/src/file_asc_p2l1_to_mem.pro	(revision 2)
@@ -0,0 +1,140 @@
+;+
+;
+; ========================
+; file_asc_p2l1_to_mem.pro
+; ========================
+;
+; .. function:: file_asc_p2l1_to_mem(filename)
+;
+;    Read P2L1 station information files and store data in a structure
+;
+;    :param filename: filename to be read
+;    :type filename: string
+;    :raise filename: required
+;
+;    :returns: data structure +todo+ details or -1 if error
+;    :rtype: structure +todo+ details
+;
+; notes
+; removed 1 empty line at the end
+;
+; :examples:
+;
+; ::
+;
+;
+;    IDL> filename='/usr/work/incas/fplod/pomme_d/sta.P2L1.asc'
+;    IDL> result=file_asc_p2l1_to_mem(filename)
+;
+; impression de controle : 1re station, toutes les stations::
+;
+;    IDL> print, result, /structure
+;    IDL> print, result[0].station
+;    IDL> print, result.station
+;    IDL> print, result[0]
+;    IDL> print, result[80]
+;
+; :uses:
+;
+; :func:`report`
+;
+; :see also:
+;
+; :restrictions:
+;
+; :todo:
+;
+; format fixe
+;
+; test existence of filename
+;
+; usage of ${POMME_ID}
+;
+; add sequence using read/write
+;
+; :history:
+;
+; - fplod 20101126T115613Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * specialized for P2L1
+;
+; - fplod 20101123T125624Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * creation using "Reading Into a Structure" of
+;     http://www.dfanning.com/tips/ascii_column_data.html
+;
+; :version:
+;
+; $Id$
+;
+;-
+FUNCTION file_asc_p2l1_to_mem, filename
+;
+compile_opt idl2, strictarrsubs
+;
+; Return to caller if errors
+ON_ERROR, 2
+;
+usage = 'result=file_asc_p2l1_to_mem(filename)'
+;
+nparam = N_PARAMS()
+IF (nparam LT 1) THEN BEGIN
+   ras = report(['Incorrect number of arguments.' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+;
+arg_type = size(filename,/type)
+IF (arg_type NE 7) THEN BEGIN
+   ras = report(['Incorrect arg type filename' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+;
+arg_dim =  size(filename,/n_elements)
+IF (arg_dim LT 1) THEN BEGIN
+   ras = report(['Incorrect arg dimension filename' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+;
+; initialize header
+header = STRARR(1)
+;
+resultstruct = { station: 0L $
+               , sonde: 0L $
+               , zctd: 0L $
+               , an: 0L $
+               , mm: 0L $
+               , jj: 0L $
+               , hh_begin: 0L $
+               , mm_begin: 0L $
+               , lat_begin: 0.0 $
+               , lon_begin: 0.0 $
+               , hh_end: 0L $
+               , mm_end: 0L $
+               , lat_end: 0.0 $
+               , lon_end: 0.0}
+;
+nrows = file_lines(filename) - N_ELEMENTS(header);
+result = Replicate(resultstruct, nrows)
+;
+; open file
+OPENR, lun, filename, /GET_LUN
+;++ hanlde error
+;
+; read header
+READF, lun, header
+;
+; read data lines
+READF, lun, result
+;
+; close file
+FREE_LUN, lun
+;
+return, result
+;
+END
Index: trunk/src/file_asc_p2l2_to_mem.pro
===================================================================
--- trunk/src/file_asc_p2l2_to_mem.pro	(revision 2)
+++ trunk/src/file_asc_p2l2_to_mem.pro	(revision 2)
@@ -0,0 +1,136 @@
+;+
+;
+; ========================
+; file_asc_p2l2_to_mem.pro
+; ========================
+;
+; .. function:: file_asc_p2l2_to_mem(filename)
+;
+;    Read long station information files and store data in a structure
+;
+;    :param filename: filename to be read
+;    :type filename: string
+;    :raise filename: required
+;
+;    :returns: data structure +todo+ details or -1 if error
+;    :rtype: structure +todo+ details
+;
+; notes
+; decalage 
+; xx
+;
+; :examples:
+;
+; ::
+;
+;    IDL> filename='/usr/work/incas/fplod/pomme_d/sta.P2L2.asc'
+;    IDL> result=file_asc_p2l2_to_mem(filename)
+;
+; impression de contrôle : 1re station, toutes les stations::
+;
+;    IDL> help, result,/structure
+;    IDL> print, result[0].station
+;    IDL> print, result.station
+;
+; :uses:
+;
+; :func:`report`
+;
+; :restrictions:
+;
+; :todo:
+;
+; format fixe
+;
+; test existence of filename
+;
+; usage of ${POMME_ID}
+;
+; :history:
+;
+; - fplod 20101123T122132Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * creation using "Reading Into a Structure" of
+;     http://www.dfanning.com/tips/ascii_column_data.html
+;
+;
+; :version:
+;
+; $Id$
+;
+;-
+FUNCTION file_asc_p2l2_to_mem, filename
+;
+compile_opt idl2, strictarrsubs
+;
+; Return to caller if errors
+ON_ERROR, 2
+;
+usage = 'result=file_asc_p2l2_to_mem(filename)'
+;
+nparam = N_PARAMS()
+IF (nparam LT 1) THEN BEGIN
+   ras = report(['Incorrect number of arguments.' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+;
+arg_type = size(filename,/type)
+IF (arg_type NE 7) THEN BEGIN
+   ras = report(['Incorrect arg type filename' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+;
+arg_dim =  size(filename,/n_elements)
+IF (arg_dim LT 1) THEN BEGIN
+   ras = report(['Incorrect arg dimension filename' $
+         + '!C' $
+         + 'Usage : ' + usage])
+  return, -1
+ENDIF
+;
+; initialize header
+header = STRARR(1)
+;
+resultstruct = { station: 0L $
+                , sonde: 0L $
+                , zmax: 0L $
+                , an: 0L $
+                , mm: 0L $
+                , jj: 0L $
+                , hh_begin: 0L $
+                , mm_begin: 0L $
+                , deg_lat_begin : 0L $
+                , mm_lat_begin: 0.0 $
+                , deg_lon_begin: 0L $
+                , mm_lon_begin: 0.0 $
+                , hh_end: 0L $
+                , mm_end: 0L $
+                , deg_lat_end: 0L $
+                , mm_lat_end: 0.0 $
+                , deg_lon_end: 0L $
+                , mm_lon_end: 0.0 $
+                }
+;
+nrows = file_lines(filename) - N_ELEMENTS(header)
+result = Replicate(resultstruct, nrows)
+;
+; open file
+OPENR, lun, filename, /GET_LUN
+;++ hanlde error
+;
+; read header
+READF, lun, header
+;
+; read data lines
+READF, lun, result
+;
+; close file
+FREE_LUN, lun
+;
+return, result
+;
+END
Index: trunk/src/file_asc_to_mem.pro
===================================================================
--- trunk/src/file_asc_to_mem.pro	(revision 2)
+++ trunk/src/file_asc_to_mem.pro	(revision 2)
@@ -0,0 +1,149 @@
+;+
+;
+; ========================
+; file_asc_to_mem.pro
+; ========================
+;
+; .. function:: file_asc_to_mem()
+;
+;    Read all station information files and store data in a structure
+;
+;    :returns: data structure +todo+ details or -1 if error
+;    :rtype: structure +todo+ details
+;
+; :examples:
+;
+; Realistic example with POMME files::
+;
+;    IDL> result=file_asc_to_mem()
+;
+; impression de controle::
+;
+;    IDL> help, result,/structure
+;    IDL> print, result
+;
+;
+; :todo:
+;
+; usage of ${POMME_ID}
+;
+; parametrisation ??
+;
+; learn how to concatenate array of structure (and avoid loop)
+;
+; :history:
+;
+; - fplod 20101126T134144Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * creation
+;
+; :version:
+;
+; $Id$
+;
+;-
+FUNCTION file_asc_to_mem
+;
+; Return to caller if errors
+ON_ERROR, 2
+;
+usage = 'result=file_asc_to_mem()'
+nparam = N_PARAMS()
+IF (nparam NE 0) THEN BEGIN
+   ras = report(['Incorrect number of arguments.' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+;
+resultstruct = { station: 0L $
+                 , aa: 0L $
+                 , mm: 0L $
+                 , jj: 0L $
+                 , hh: 0L $
+                 , mn: 0L $
+                 , lat : 0.0 $
+                 , lon: 0.0 $
+               }
+nrows=0L
+;
+filename='/usr/work/incas/fplod/pomme_d/sta.P1L1.asc'
+data_p1l1=file_asc_p1l1_to_mem(filename)
+nrows = nrows + n_elements(data_p1l1)
+filename='/usr/work/incas/fplod/pomme_d/sta.P1L2.asc'
+data_p1l2=file_asc_long2mem(filename)
+nrows = nrows + n_elements(data_p1l2)
+filename='/usr/work/incas/fplod/pomme_d/sta.P2L1.asc'
+data_p2l1=file_asc_p2l1_to_mem(filename)
+nrows = nrows + n_elements(data_p2l1)
+filename='/usr/work/incas/fplod/pomme_d/sta.P2L2.asc'
+data_p2l2=file_asc_p2l2_to_mem(filename)
+nrows = nrows + n_elements(data_p2l2)
+;
+result = Replicate(resultstruct, nrows)
+;
+offset = 0L
+;
+nstations = n_elements(data_p1l1)
+FOR istation=0L, nstations -1 DO BEGIN
+
+   rstation = istation + offset
+   result[rstation].station=data_p1l1[istation].station
+   result[rstation].aa=data_p1l1[istation].an
+   result[rstation].mm=data_p1l1[istation].mm
+   result[rstation].jj=data_p1l1[istation].jj
+   result[rstation].hh=data_p1l1[istation].hh_begin
+   result[rstation].mn=data_p1l1[istation].mm_begin
+   result[rstation].lat=dm2dd(data_p1l1[istation].deg_lat_begin,data_p1l1[istation].mm_lat_begin)
+   result[rstation].lon=dm2dd(data_p1l1[istation].deg_lon_begin,data_p1l1[istation].mm_lon_begin)
+ENDFOR
+
+offset=offset + nstations
+;
+nstations = n_elements(data_p1l2)
+FOR istation=0L, nstations -1 DO BEGIN
+   rstation = istation + offset
+   result[rstation].station=data_p1l2[istation].station
+   result[rstation].aa=data_p1l2[istation].an
+   result[rstation].mm=data_p1l2[istation].mm
+   result[rstation].jj=data_p1l2[istation].jj
+   result[rstation].hh=data_p1l2[istation].hh_begin
+   result[rstation].mn=data_p1l2[istation].mm_begin
+   result[rstation].lat=dm2dd(data_p1l2[istation].deg_lat_begin,data_p1l2[istation].mm_lat_begin)
+   result[rstation].lon=dm2dd(data_p1l2[istation].deg_lon_begin,data_p1l2[istation].mm_lon_begin)
+ENDFOR
+
+offset=offset + nstations
+;
+nstations = n_elements(data_p2l1)
+;
+FOR istation=0L, nstations -1 DO BEGIN
+   rstation = istation + offset
+   result[rstation].station=data_p2l1[istation].station
+   result[rstation].aa=data_p2l1[istation].an
+   result[rstation].mm=data_p2l1[istation].mm
+   result[rstation].jj=data_p2l1[istation].jj
+   result[rstation].hh=data_p2l1[istation].hh_begin
+   result[rstation].mn=data_p2l1[istation].mm_begin
+   result[rstation].lat=data_p2l1[istation].lat_begin
+   result[rstation].lon=data_p2l1[istation].lon_begin
+ENDFOR
+
+offset=offset + nstations
+;
+nstations = n_elements(data_p2l2)
+FOR istation=0L, nstations -1 DO BEGIN
+   rstation = istation + offset
+   result[rstation].station=data_p2l2[istation].station
+   result[rstation].aa=data_p2l2[istation].an
+   result[rstation].mm=data_p2l2[istation].mm
+   result[rstation].jj=data_p2l2[istation].jj
+   result[rstation].hh=data_p2l2[istation].hh_begin
+   result[rstation].mn=data_p2l2[istation].mm_begin
+   result[rstation].lat=dm2dd(data_p2l2[istation].deg_lat_begin,data_p2l2[istation].mm_lat_begin)
+   result[rstation].lon=dm2dd(data_p2l2[istation].deg_lon_begin,data_p2l2[istation].mm_lon_begin)
+ENDFOR
+;
+return, result
+
+END
Index: trunk/src/file_prn2mem.pro
===================================================================
--- trunk/src/file_prn2mem.pro	(revision 2)
+++ trunk/src/file_prn2mem.pro	(revision 2)
@@ -0,0 +1,143 @@
+;+
+;
+; ================
+; file_prn2mem.pro
+; ================
+;
+; .. function:: file_prn2mem(filename)
+;
+;    Read in situ MLD files and store data in a structure
+;
+; nb : mld float to handle NaN in file
+; ++ NaN dans les colonnes entier transformés en 0 par la lecture
+;
+;    :param filename: filename to be read
+;    :type filename: string
+;    :raise filename: required
+;
+;    :returns: data structure +todo+ details or -1 if error
+;    :rtype: structure +todo+ details
+;
+; :examples:
+;
+; ::
+;
+;    IDL> filename='/usr/temp/marina/POM/mld_prieur_P1L1.prn'
+;    IDL> result=file_prn2mem(filename)
+;
+;
+;    IDL> filename='/usr/temp/marina/POM/mld_prieur_P1L2_tot.prn'
+;    IDL> result=file_prn2mem(filename)
+;
+;    IDL> filename='/usr/temp/marina/POM/mld_prieur_P2L1.prn'
+;    IDL> result=file_prn2mem(filename)
+;
+;    IDL> filename='/usr/temp/marina/POM/mld_prieur_P2L2.prn'
+;    IDL> result=file_prn2mem(filename)
+;
+;    IDL> filename='/usr/temp/marina/POM/mld_prieur_P1L2_tot.prn'
+;    IDL> result=file_prn2mem(filename)
+;
+; impression de controle : 1re station, toutes les stations::
+;
+;    IDL> help, result, /structure
+;    IDL> print, result[0].station
+;    IDL> print, result.station
+;    IDL> print, result[0].zhomelch
+;    IDL> print, result[nrows-1].zhomelch
+;
+; :uses:
+;
+; :func:`report`
+;
+; :restrictions:
+;
+; :todo:
+;
+; format fixe
+;
+; test existence of filename
+;
+; usage of ${POMME_ID}
+;
+; :history:
+;
+; - fplod 20101123T134447Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * creation using "Reading Into a Structure" of
+;     http://www.dfanning.com/tips/ascii_column_data.html
+;
+; :version:
+;
+; $Id$
+;
+;-
+FUNCTION file_prn2mem, filename
+;
+compile_opt idl2, strictarrsubs
+;
+; Return to caller if errors
+ON_ERROR, 2
+;
+usage = 'result=file_prn2mem(filename)
+;
+nparam = N_PARAMS()
+IF (nparam LT 1) THEN BEGIN
+   ras = report(['Incorrect number of arguments.' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+;
+arg_type = size(filename,/type)
+IF (arg_type NE 7) THEN BEGIN
+   ras = report(['Incorrect arg type filename' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+;
+arg_dim =  size(filename,/n_elements)
+IF (arg_dim LT 1) THEN BEGIN
+   ras = report(['Incorrect arg dimension filename' $
+         + '!C' $
+         + 'Usage : ' + usage])
+  return, -1
+ENDIF
+;
+; initialize header
+header = STRARR(3)
+;
+resultstruct = { station: 0L $
+                , doy: 0.0 $
+                , zm: 0L $
+                , fluo: 0.0 $
+                , zfluo: 0.0 $
+                , fluosurfac: 0.0 $
+                , zhom001: 0.0 $
+                , zhom002 : 0.0 $
+                , zhom005 : 0.0 $
+                , zhom010: 0.0 $
+                , zhomelch : 0.0 $
+               }
+
+;
+nrows = file_lines(filename) - N_ELEMENTS(header)
+result = Replicate(resultstruct, nrows)
+;
+; open file
+OPENR, lun, filename, /GET_LUN
+;++ hanlde error
+;
+; read header
+READF, lun, header
+;
+; read data lines
+READF, lun, result
+;
+; close file
+FREE_LUN, lun
+;
+return, result
+;
+END
Index: trunk/src/file_prn_to_mem.pro
===================================================================
--- trunk/src/file_prn_to_mem.pro	(revision 2)
+++ trunk/src/file_prn_to_mem.pro	(revision 2)
@@ -0,0 +1,146 @@
+;+
+;
+; ===================
+; file_prn_to_mem.pro
+; ===================
+;
+; .. function:: file_prn_to_mem()
+;
+;    Read all station information files and store data in a structure
+;
+; nb : mld float to handle NaN in file
+;
+;    :returns: data structure +todo+ details or -1 if error
+;    :rtype: structure +todo+ details
+;
+; :examples:
+;
+; Realistic example with POMME files::
+;    
+;    IDL> result=file_prn_to_mem()
+;
+; impression de controle::
+;
+;    IDL> help, result, /structure
+;    IDL> print, result
+;
+; :todo:
+;
+; parametrisation ??
+;
+; usage of ${POMME_ID}
+;
+; learn how to concatenate array of structure (and avoid loop)
+;
+; :history:
+;
+; - fplod 20101126T134144Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * creation
+;
+; :version:
+;
+; $Id$
+;
+;-
+FUNCTION file_prn_to_mem
+;
+; Return to caller if errors
+ON_ERROR, 2
+;
+usage = 'result=file_prn_to_mem()'
+nparam = N_PARAMS()
+IF (nparam NE 0) THEN BEGIN
+   ras = report(['Incorrect number of arguments.' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+;
+resultstruct = { station: 0L $
+               , doy: 0.0 $
+               , zhom001: 0.0 $
+               , zhom002 : 0.0 $
+               , zhom005 : 0.0 $
+               , zhom010: 0.0 $
+               , zhomelch : 0.0 $
+               }
+;
+nrows=0L
+;
+filename='/usr/work/incas/fplod/pomme_d/mld_prieur_P1L1.prn'
+data_p1l1=file_prn2mem(filename)
+nrows = nrows + n_elements(data_p1l1)
+filename='/usr/work/incas/fplod/pomme_d/mld_prieur_P1L2_tot.prn'
+data_p1l2=file_prn2mem(filename)
+nrows = nrows + n_elements(data_p1l2)
+filename='/usr/work/incas/fplod/pomme_d/mld_prieur_P2L1.prn'
+data_p2l1=file_prn2mem(filename)
+nrows = nrows + n_elements(data_p2l1)
+filename='/usr/work/incas/fplod/pomme_d/mld_prieur_P2L2.prn'
+data_p2l2=file_prn2mem(filename)
+nrows = nrows + n_elements(data_p2l2)
+;
+result = Replicate(resultstruct, nrows)
+;
+offset = 0L
+;
+nstations = n_elements(data_p1l1)
+FOR istation=0L, nstations -1 DO BEGIN
+
+   rstation = istation + offset
+   result[rstation].station=data_p1l1[istation].station
+   result[rstation].doy=data_p1l1[istation].doy
+   result[rstation].zhom001=data_p1l1[istation].zhom001
+   result[rstation].zhom002=data_p1l1[istation].zhom002
+   result[rstation].zhom005=data_p1l1[istation].zhom005
+   result[rstation].zhom010=data_p1l1[istation].zhom010
+   result[rstation].zhomelch=data_p1l1[istation].zhomelch
+ENDFOR
+
+offset=offset + nstations
+;
+nstations = n_elements(data_p1l2)
+FOR istation=0L, nstations -1 DO BEGIN
+   rstation = istation + offset
+   result[rstation].station=data_p1l2[istation].station
+   result[rstation].doy=data_p1l2[istation].doy
+   result[rstation].zhom001=data_p1l2[istation].zhom001
+   result[rstation].zhom002=data_p1l2[istation].zhom002
+   result[rstation].zhom005=data_p1l2[istation].zhom005
+   result[rstation].zhom010=data_p1l2[istation].zhom010
+   result[rstation].zhomelch=data_p1l2[istation].zhomelch
+ENDFOR
+
+offset=offset + nstations
+;
+nstations = n_elements(data_p2l1)
+;
+FOR istation=0L, nstations -1 DO BEGIN
+   rstation = istation + offset
+   result[rstation].station=data_p2l1[istation].station
+   result[rstation].doy=data_p2l1[istation].doy
+   result[rstation].zhom001=data_p2l1[istation].zhom001
+   result[rstation].zhom002=data_p2l1[istation].zhom002
+   result[rstation].zhom005=data_p2l1[istation].zhom005
+   result[rstation].zhom010=data_p2l1[istation].zhom010
+   result[rstation].zhomelch=data_p2l1[istation].zhomelch
+ENDFOR
+
+offset=offset + nstations
+;
+nstations = n_elements(data_p2l2)
+FOR istation=0L, nstations -1 DO BEGIN
+   rstation = istation + offset
+   result[rstation].station=data_p2l2[istation].station
+   result[rstation].doy=data_p2l2[istation].doy
+   result[rstation].zhom001=data_p2l2[istation].zhom001
+   result[rstation].zhom002=data_p2l2[istation].zhom002
+   result[rstation].zhom005=data_p2l2[istation].zhom005
+   result[rstation].zhom010=data_p2l2[istation].zhom010
+   result[rstation].zhomelch=data_p2l2[istation].zhomelch
+ENDFOR
+;
+return, result
+
+END
Index: trunk/src/init.pro
===================================================================
--- trunk/src/init.pro	(revision 2)
+++ trunk/src/init.pro	(revision 2)
@@ -0,0 +1,153 @@
+;+
+;
+; .. _init.pro:
+;
+; ========
+; init.pro
+; ========
+;
+;
+; IDL Version 6.2, Mac OS X (darwin ppc m32)
+;
+; Journal File for marina@ino.lodyc.jussieu.fr
+;
+; Working directory: /Users/marina/WORK/SOURCES/SAXO_DIR
+;
+; This is the initialisation file.
+; it defines the !path and the defaut values of some of the common variables
+;
+; :see also:
+;
+; SAXO
+;
+; :ref:`init_pom.pro`
+;
+; :todo:
+;
+; header
+;
+; replace hard coded path using ${POMME}
+;
+; :history:
+;
+; - fplod 20101129T110610Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * add ReST minimal header
+;
+; - marina 20060314T135342Z ino.lodyc.jussieu.fr
+;
+;   * creation
+;
+;-
+;
+; path definition
+;
+!path = expand_path('+' + '/Users/marina/WORK/PROJETS/TERMINE/POMME/PIERREK/IDL') $
+      + ':' + expand_path('+' + '/Users/marina/WORK/SOURCES/SAXO_DIR') $
+      + ':' + expand_path('+' + !dir)
+;
+; compatibility with the old version
+;
+keep_compatibility, 0
+;
+; define all the commons
+;
+@all_cm
+;
+; define default directories
+;
+homedir = isadirectory('/Users/marina/WORK/PROJETS/TERMINE/POMME/PIERREK/IDL/', title = 'Select the default HOME directory')
+iodir = isadirectory('/Users/marina/DATA/DATA_PIERREK', title = 'Select the default IO directory')
+psdir = isadirectory('/Users/marina/WORK/PROJETS/TERMINE/POMME/PIERREK/FIG', title = 'Select the default postscripts directory')
+imagedir = psdir
+animdir = psdir
+;
+; define printer parameters
+;
+printer_human_names = strarr(2)
+printer_machine_names = strarr(2)
+print_command = strarr(2)
+printer_human_names[0] = 'x4'
+printer_machine_names[0] = 'x4'
+print_command[0] = '\lpr -P x4'
+printer_human_names[1] = 'hpl4'
+printer_machine_names[1] = 'hpl4'
+print_command[1] = '\lpr -P hpl4'
+;
+; colors ...
+;
+device, decomposed = 0
+device, retain = 2
+lct, 39
+;
+; postscript parameters ...
+;
+key_portrait = 1
+page_size = [20.9903, 29.7039]
+windowsize_scale = 0.8
+archive_ps = 0
+;
+;========================================================
+; end of the part that should be modified by the users...
+;========================================================
+;
+; default definitions of many other common parameters...
+jpiglo = 1L
+jpjglo = 1L
+jpkglo = 1L
+jpidta = jpiglo
+jpjdta = jpjglo
+jpkdta = jpjglo
+jpi = 1L
+jpj = 1L
+jpk = 1L
+jpt = 1L
+time = 0L
+ixminmesh = -1L
+ixmaxmesh = -1L
+iyminmesh = -1L
+iymaxmesh = -1L
+izminmesh = -1L
+izmaxmesh = -1L
+ixmindta = 0L
+ixmaxdta = jpidta-1
+iymindta = 0L
+iymaxdta = jpjdta-1
+izmindta = 0L
+izmaxdta = jpkdta-1
+key_shift = 0L
+key_periodic = 0L
+key_yreverse = 0L
+key_zreverse = 0L
+key_stride = [1, 1, 1]
+ccmeshparameters ={filename:'No File', filetype:'nothing' $
+, jpiglo:jpiglo, jpjglo:jpjglo, jpkglo:jpkglo $
+, jpi:jpi, jpj:jpj, jpk:jpk $
+, ixminmesh:ixminmesh, ixmaxmesh:ixmaxmesh $
+, iyminmesh:iyminmesh, iymaxmesh:iymaxmesh $
+, izminmesh:izminmesh, izmaxmesh:izmaxmesh $
+, key_shift:key_shift, key_periodic:key_periodic $
+, triangulation:-1, boundary:[-180, 180]}
+ccreadparameters = {funclec_name:'No File' $
+, jpidta:jpidta, jpjdta:jpjdta, jpkdta:jpkdta $
+, ixmindta:ixmindta, ixmaxdta:ixmaxdta $
+, iymindta:iymindta, iymaxdta:iymaxdta $
+, izmindta:izmindta, izmaxdta:izmaxdta}
+lon1 = 0
+lon2 = 1
+lat1 = 0
+lat2 = 1
+vert1 = 0
+vert2 = 1
+valmask = 1.e20
+vargrid = 'T'
+varname = ''
+varexp = ''
+varunit = ''
+vardate= '0'
+@updateold
+;
+print,  'iodir =', iodir
+
+;open saxo online help:
+;ONLINE_HELP,book="/Users/marina/WORK/SOURCES/SAXO_DIR/SRC/Documentation/idldoc_assistant_output/idldoc-lib.adp"
Index: trunk/src/init_pom.pro
===================================================================
--- trunk/src/init_pom.pro	(revision 2)
+++ trunk/src/init_pom.pro	(revision 2)
@@ -0,0 +1,88 @@
+;+
+;
+; .. _init_pom.pro:
+;
+; ============
+; init_pom.pro
+; ============
+; :see also:
+;
+; SAXO
+;
+; :ref:`init.pro`
+;
+; :todo:
+;
+; header
+;
+; :history:
+;
+; - fplod 20101129T110610Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * add ReST minimal header
+;
+; - marina ?
+;
+;   * creation
+;
+;-
+
+;
+@common
+
+;---------------------------------------------------------
+; bornes de la grille
+;----------------------------------------------------------
+;domaine total
+   ixminmesh  =-1
+   ixmaxmesh  =-1
+   iyminmesh  =-1
+   iymaxmesh  =-1
+   izminmesh  =-1
+   izmaxmesh  =-1
+
+; sans la zone de recirculation
+;    ixminmesh  = 6
+;    ixmaxmesh = 126
+;    iyminmesh = 6
+;    iymaxmesh  = 146
+;    izminmesh = 0
+;  izmaxmesh = 67
+
+;sans la zone de recirculation ni la zone de rappel
+nbord = 12
+   ixminmesh  = nbord
+   ixmaxmesh = 193-nbord
+   iyminmesh = nbord
+   iymaxmesh  = 262-nbord
+   izminmesh = 0
+   izmaxmesh = 67
+
+jpt = 1
+time = 0
+;key_stride = [5, 5, 1]
+key_stride = [1, 1, 1]
+
+;------------------------------------------------------
+; lecture de la grille
+;------------------------------------------------------
+langage = 'perso'
+varexp = 'NEW'
+varnum = '12'
+varunit = ''
+ncdf_meshlec, 'meshmask.nc'
+;ncdf_meshlec, 'meshmask.nc'
+;-------------------------------------------------------------
+domdef
+key_periodique = 0
+triangles = -1
+;----------------------------------------------------------
+; bornes pour la lecture des donnees
+;----------------------------------------------------------
+
+ixmindta = 0
+ixmaxdta = jpidta-1
+iymindta = 0
+iymaxdta = jpjdta-1
+izmindta = 0
+izmaxdta = jpkdta-1
Index: trunk/src/join_dmean_asc.pro
===================================================================
--- trunk/src/join_dmean_asc.pro	(revision 2)
+++ trunk/src/join_dmean_asc.pro	(revision 2)
@@ -0,0 +1,158 @@
+;+
+;
+; ==================
+; join_dmean_asc.pro
+; ==================
+;
+; .. function:: join_dmean_asc(data_dmean,data_asc)
+;
+;    Join information from mean (++details) and asc (++detail) structures
+;
+;    If station is not found in data_asc structure, latitude and longitude are set 
+;    to NaN.
+;
+;    :param data_dmean: structure ++details
+;    :type data_dmean: structure
+;    :raise data_dmean: required
+;
+;    :param data_asc: structure ++details
+;    :type data_asc: structure
+;    :raise data_asc: required
+;
+;    :returns: data structure +todo+ details or -1 if error
+;    :rtype: structure +todo+ details
+;
+; :examples:
+;
+; Realistic example with POMME files::
+;
+;    IDL> data_asc=file_asc_to_mem()
+;    IDL> data_prn=file_prn_to_mem()
+;    IDL> data_dmean=dmean_mld(data_prn)
+;    IDL> data_insitu=join_dmean_asc(data_dmean,data_asc)
+;
+; impression de controle ::
+;
+;    IDL> help, data_insitu, /structure
+;    IDL> print, data_insitu[0]
+;    IDL> print, data_insitu.lat
+;    IDL> print, data_insitu.lon
+;
+; :uses:
+;
+;
+; :func:`report`
+; :func:`julday`
+;
+; :see also:
+;
+; :func:`file_prn_to_mem`
+; :func:`file_asc_to_mem`
+; :func:`dmean_mld`
+;
+; :restrictions:
+;
+; :todo:
+;
+; test arguments
+;
+; missing values
+;
+; usage of report
+;
+; init returned structure to NaN vs 0L or 0.0
+;
+; check doy in prn files vs computed julianday
+; now (20101124) differences due to either bad calculation here or bad doy calculion in .prn file or difference choice between begin, end, middle time.
+;
+; :history:
+;
+; - fplod 20101129T091703Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * input data_dmean instead of data_prn
+;
+; - fplod 20101126T153732Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * input = structures no more files
+;
+; - fplod 20101124T141037Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * data.julianday type from float to double to be compatible
+;     with :func:`julday`
+;
+; - fplod 20101123T154451Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * creation
+;
+; :version:
+;
+; $Id$
+;
+;-
+FUNCTION join_dmean_asc, data_dmean, data_asc
+;
+compile_opt idl2, strictarrsubs
+;
+; Return to caller if errors
+ON_ERROR, 2
+;
+usage = 'result=join_dmean_asc(data_asc,data_dmean)'
+;
+nparam = N_PARAMS()
+IF (nparam LT 2) THEN BEGIN
+   ras = report(['Incorrect number of arguments.' $
+         + '!C' $
+         + 'Usage : ' + usage])
+   return, -1
+ENDIF
+;
+; initialize returned structure
+resultstruct = { doy : 0L $
+             , lat: 0.0 $
+             , lon: 0.0 $
+             , mean_zhom001: 0.0 $
+             , mean_zhom002 : 0.0 $
+             , mean_zhom005 : 0.0 $
+             , mean_zhom010: 0.0 $
+             , mean_zhomelch : 0.0 $
+             , std_zhom001: 0.0 $
+             , std_zhom002 : 0.0 $
+             , std_zhom005 : 0.0 $
+             , std_zhom010: 0.0 $
+             , std_zhomelch : 0.0 $
+             }
+;
+ndays = n_elements(data_dmean)
+result = replicate(resultstruct, ndays)
+;
+help, result,/structure
+help, data_dmean,/structure
+help, data_asc,/structure
+; fill returned structure
+FOR iday=0L, ndays -1 DO BEGIN
+   result[iday].doy=data_dmean[iday].doy
+   result[iday].mean_zhom001=data_dmean[iday].mean_zhom001
+   result[iday].mean_zhom002=data_dmean[iday].mean_zhom002
+   result[iday].mean_zhom005=data_dmean[iday].mean_zhom005
+   result[iday].mean_zhom010=data_dmean[iday].mean_zhom010
+   result[iday].mean_zhomelch=data_dmean[iday].mean_zhomelch
+   result[iday].std_zhom001=data_dmean[iday].std_zhom001
+   result[iday].std_zhom002=data_dmean[iday].std_zhom002
+   result[iday].std_zhom005=data_dmean[iday].std_zhom005
+   result[iday].std_zhom010=data_dmean[iday].std_zhom010
+   result[iday].std_zhomelch=data_dmean[iday].std_zhomelch
+   indice_asc=WHERE(data_asc.station EQ data_dmean[iday].first_station,count)
+   IF (count EQ 0) THEN BEGIN
+      print, 'no station ',  data_dmean[iday].first_station,' in data_asc.station'
+      result[iday].lat = NaN 
+      result[iday].lon = NaN
+   ENDIF ELSE BEGIN
+      ;print, 'indice de la first_station', data_dmean[iday].first_station,' dans data_asc = ',indice_asc
+      result[iday].lat = data_asc[indice_asc[0]].lat
+      result[iday].lon = data_asc[indice_asc[0]].lon
+   ENDELSE
+ENDFOR
+;
+return, result
+;
+END
Index: trunk/src/pomme_profile.sh
===================================================================
--- trunk/src/pomme_profile.sh	(revision 2)
+++ trunk/src/pomme_profile.sh	(revision 2)
@@ -0,0 +1,277 @@
+#! /bin/sh
+#+
+#
+# .. program:: pomme_profile.sh
+#
+# ================
+# pomme_profile.sh
+# ================
+#
+# ------------------------
+# define POMME environment
+# ------------------------
+#
+# SYNOPSIS
+# ========
+#
+# Online usage::
+#
+#  $ . ./pomme_profile.sh -d directory -i indir -o outdir -t tempdir
+#
+# In ${HOME}/.profile, add the following line::
+#
+#  . pomme_profile.sh -d directory  -i indir -o outdir -t tempdir
+#
+# DESCRIPTION
+# ===========
+#
+# .. option:: -d  <directory>
+# .. option:: -i  <indir>
+# .. option:: -o  <outdir>
+# .. option:: -t  <tempdir>
+#
+# define POMME environment
+#
+# ${POMME} is the base directory of tools.
+#
+# ${POMME_LOG} is the directory where log files will be written.
+#
+# ${POMME_ID} is the directory where input files must be.
+#
+# ${POMME_OD} is the directory where output files will be written.
+#
+# PATH is completed with ${POMME}.
+#
+# SEE ALSO
+# ========
+#
+# for IDL/GDL environment :
+#
+# :program:`pomme_startup.pro`
+#
+# EXAMPLES
+# ========
+#
+# For fplod, on aedon.locean-ipsl.upmc.fr::
+#
+#  $ cd /usr/home/fplod/incas/pomme/pomme_ws/
+#  $ . ./src/pomme_profile.sh \
+#    -d $(pwd) \
+#    -i /usr/temp/${LOGNAME}/pomme_d/ \
+#    -o /usr/temp/${LOGNAME}/pomme_d/ \
+#    -t /usr/temp/${LOGNAME}/log/
+#
+# For fplod on zeus.locean-ipsl.umpc.fr::
+#
+#  $ cd ${HOME}/incas/pomme/pomme_ws/
+#  $ . ./src/pomme_profile.sh \
+#    -d $(pwd) \
+#    -i /usr/temp/${LOGNAME}/pomme_d/ \
+#    -o /usr/temp/${LOGNAME}/pomme_d/ \
+#    -t /usr/temp/${LOGNAME}/log/
+#
+# For pinsard on camelot.ipsl.polytechnique.fr or merlin15-c.climserv::
+#
+#  $ cd ${HOME}/pomme/
+#  $ . ./src/pomme_profile.sh \
+#   -d $(pwd) \
+#   -i /homedata/${LOGNAME}/pomme_d/ \
+#   -o /homedata/${LOGNAME}/pomme_d/ \
+#   -t /homedata/${LOGNAME}/log/
+#
+# TODO
+# ====
+#
+# ++ option bavarde
+#
+# ++ machine dependant
+#
+# ++ besoin de posix
+#
+# ++ pas de MANPATH defini par défaut sur zeus et cerbere
+#
+# define IDL_STARTUP
+#
+# EVOLUTIONS
+# ==========
+#
+# - fplod 20101118T171653Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * creation
+#
+#-
+system=$(uname)
+case "${system}" in
+   AIX|IRIX64)
+      echo " www : no specific posix checking"
+   ;;
+   *)
+      set -o posix
+   ;;
+esac
+unset system
+#
+LANG=C
+#
+# as this script might be launch in .profile, command is forced.
+command=pomme_profile.sh
+#
+usage=" Usage : ${command} -d directory -i indir -o outdir -t tempdir"
+#
+set +u
+while [ ! -z "${1}" ]
+do
+   case ${1} in
+      -d)
+         # directory for application choosen by user (see svn checkout command used)
+         directory=${2}
+         shift
+      ;;
+      -i)
+         # directory for inputs choosen by user
+         indir=${2}
+         shift
+      ;;
+      -o)
+         # directory for outputs choosen by user
+         outdir=${2}
+         shift
+      ;;
+      -t)
+         # directory for temporary outputs choosen by user
+         tempdir=${2}
+         shift
+      ;;
+      *)
+         # other choice
+         echo "eee : unknown option ${1}"
+         echo "${usage}"
+         # nb : no exit because this file should be launched by login process
+      ;;
+   esac
+   # next flag
+   shift
+done
+unset usage
+#
+# check for ${directory}
+if [ ! -d ${directory} ]
+then
+   echo " eee : ${directory} not found"
+   # nb : no exit because this file should be launched by login process
+fi
+#
+# check for permission on directory
+if [ ! -x ${directory} ]
+then
+   echo " eee : ${directory} not reachable"
+   # nb : no exit because this file should be launched by login process
+fi
+#
+POMME=${directory}
+export POMME
+unset drectory
+#
+# add POMME tools to PATH
+# if not already done
+suppath=$(echo ${POMME}/src | tr -s "/")
+echo ${PATH} | grep -q "${suppath}:"
+test_path=${?}
+if [ ${test_path} -ne 0 ]
+then
+   PATH=${suppath}:${PATH}
+   export PATH
+else
+   # option bavarde oui/non pas encore implantée ++
+   echo "${command} : iii : ${suppath} already in \${PATH}"
+fi
+unset test_path
+#
+# add POMME manuals to MANPATH
+# if not already done
+suppath=$(echo ${POMME}/doc/man | tr -s "/")
+echo ${MANPATH} | grep -q "${suppath}:"
+test_manpath=${?}
+if [ ${test_manpath} -ne 0 ]
+then
+   MANPATH=${suppath}:${MANPATH}
+   export MANPATH
+else
+   # option bavarde oui/non pas encore implantée ++
+   echo "${command} : iii : ${suppath} already in \${MANPATH}"
+fi
+unset test_manpath
+unset suppath
+#
+POMME_LOG=${tempdir}
+export POMME_LOG
+unset tempdir
+if [ ! -d ${POMME_LOG} ]
+then
+   mkdir -p ${POMME_LOG}
+   status=${?}
+   if [ ${status} -ne 0 ]
+   then
+      echo "${command} : eee : can not create \${POMME_LOG}"
+      # nb : no exit because this file should be launched by login process
+   else
+      echo "${command} : iii : creation of \${POMME_LOG}"
+   fi
+   unset status
+fi
+# check for permission on POMME_LOG
+if [ ! -x ${POMME_LOG} ]
+then
+   echo " eee : ${POMME_LOG} not reachable"
+   # nb : no exit because this file should be launched by login process
+fi
+#
+# check for permission on POMME_LOG
+if [ ! -w ${POMME_LOG} ]
+then
+   echo " eee : ${POMME_LOG} not writable"
+   # nb : no exit because this file shouldreachable be launched by login process
+fi
+#
+EDITOR=vi
+export EDITOR
+#
+# io directories
+POMME_ID=${indir}
+export POMME_ID
+unset indir
+if [ ! -d ${POMME_ID} ]
+then
+   mkdir -p ${POMME_ID}
+   echo "${command} : iii : creation of \${POMME_ID}"
+fi
+# check for permission on POMME_ID
+if [ ! -x ${POMME_ID} ]
+then
+   echo " eee : ${POMME_ID} not reachable"
+   # nb : no exit because this file should be launched by login process
+fi
+#
+POMME_OD=${outdir}
+export POMME_OD
+unset outdir
+if [ ! -d ${POMME_OD} ]
+then
+    mkdir -p ${POMME_OD}
+    echo "${command} : iii : creation of \${POMME_OD}"
+fi
+# check for permission on POMME_OD
+if [ ! -x ${POMME_OD} ]
+then
+   echo " eee : ${POMME_OD} not reachable"
+   # nb : no exit because this file should be launched by login process
+fi
+if [ ! -w ${POMME_OD} ]
+then
+   echo " eee : ${POMME_OD} not writable"
+   # nb : no exit because this file should be launched by login process
+fi
+#
+# end
+unset command
+# nb : no exit because this file should be launched by login process
