Index: /configs/testing/bash/X64_CURIE.sh
===================================================================
--- /configs/testing/bash/X64_CURIE.sh	(revision 501)
+++ /configs/testing/bash/X64_CURIE.sh	(revision 502)
@@ -1,3 +1,10 @@
 #!/bin/bash
+
+# This script provides site-specific functions
+# called by the site-independent scripts
+# create_runs.sh and submit.sh
+
+# NB : we must the queue 'normal' because there seems to be a limit
+# on the number of jobs that can be submitted to queue 'test'
 
 #----------------------------- split_XXX ----------------------------
@@ -11,4 +18,15 @@
 function split_mpi_80() {
     setvar nbp 81 nsplit_i 4 nsplit_j 2
+}
+
+#----------------- job submission ------------------
+
+function submit_job_X64_CURIE() # $1=script $* = SLURM OPTIONS
+{
+    TMP=$(mktemp)
+    ccc_msub $1 > $TMP
+    cat $TMP 1>&2
+    cat $TMP | awk '{print $NF }'
+    rm -f $TMP
 }
 
@@ -45,5 +63,5 @@
 #MSUB -T 600
 ## Quality of Service required (long [3 days], normal [1 day], test [30 min])
-#MSUB -Q test
+#MSUB -Q normal
 
 export OMP_NUM_THREADS=1
@@ -77,2 +95,44 @@
 EOF
 }
+
+#------------------------------ post-processing job -----------------------------
+
+function job_post_X64_CURIE() # LIST
+{
+    DEPLIST=afterany
+    for ID in $* ; do
+	DEPLIST="$DEPLIST:$ID"
+    done
+    cat <<EOF
+#!/bin/bash
+## Request name
+#MSUB -r testing
+#MSUB -q standard 
+#MSUB -A gen7548
+#MSUB -E "--dependency=$DEPLIST"
+## Number of tasks (=MPI processes) to use
+#MSUB -n 1
+## Elapsed time limit in seconds
+#MSUB -T 600
+## Quality of Service required (long [3 days], normal [1 day], test [30 min])
+#MSUB -Q normal
+
+export OMP_NUM_THREADS=1
+# this script is submitted from $ROOT/logs
+cd \${BRIDGE_MSUB_PWD}/..
+
+module purge
+module load licsrv/intel
+module load c/intel/14.0.3.174
+module load c++/intel/14.0.3.174
+module load fortran/intel/14.0.3.174
+module load mkl/14.0.3.174
+module load idb/14.0.3.174
+module load intel/14.0.3.174
+module load mpi/bullxmpi/1.2.8.4
+module load netcdf/4.3.3.1_hdf5_parallel
+module load python
+
+bash/post.sh
+EOF
+}
Index: /configs/testing/bash/daily.sh
===================================================================
--- /configs/testing/bash/daily.sh	(revision 502)
+++ /configs/testing/bash/daily.sh	(revision 502)
@@ -0,0 +1,45 @@
+#!/bin/bash
+source $HOME/.bash_profile
+ssh-add $HOME/.ssh/id_cron
+
+function version() # DIR SVN_OPTIONS
+{
+    cd $1
+    svn info $2 | grep Revision | cut -c 11- 
+}
+
+function update() # DIR
+{
+    echo "Updating $1"
+    cd $1
+    svn up || ( echo ; echo "***************** Update $1 FAILED ******************" ; exit 1)
+    cd -
+}
+
+cd $WORKDIR/testing
+
+DYN_CUR=$(version DYNAMICO)
+DYN_HEAD=$(version DYNAMICO '-r HEAD')
+XIOS_CUR=$(version XIOS)
+XIOS_HEAD=$(version XIOS '-r HEAD')
+echo 'DYNAMICO : ' $DYN_CUR $DYN_HEAD
+echo 'XIOS : ' $XIOS_CUR $XIOS_HEAD
+
+UPDATE=n
+if [[ $DYN_CUR != $DYN_HEAD ]]; then
+    echo "DYNAMICO needs an update from r$DYN_CUR to r$DYN_HEAD"
+    UPDATE=y
+fi
+if [[ $XIOS_CUR != $XIOS_HEAD ]]; then
+    echo "XIOS needs an update from r$XIOS_CUR to r$XIOS_HEAD"
+    UPDATE=y
+fi
+
+if [[ $UPDATE == y ]]; then
+    VERSION="${DYN_HEAD}_${XIOS_HEAD})"
+    update XIOS || exit 1
+    update DYNAMICO || exit 1
+    ./build.sh || exit 1
+    ./create_runs.sh || exit 1
+    ./submit.sh || exit 1
+fi
Index: /configs/testing/bash/job.sh
===================================================================
--- /configs/testing/bash/job.sh	(revision 502)
+++ /configs/testing/bash/job.sh	(revision 502)
@@ -0,0 +1,18 @@
+#!/bin/bash
+## Request name
+#MSUB -r build_testing
+#MSUB -q standard 
+#MSUB -A gen7548
+#MSUB -x
+## Number of tasks (=MPI processes) to use
+#MSUB -n 1
+## Elapsed time limit in seconds
+#MSUB -T 1200
+## Quality of Service required (long [3 days], normal [1 day], test [30 min])
+#MSUB -Q test
+
+export OMP_NUM_THREADS=1
+cd ${BRIDGE_MSUB_PWD} 
+
+time ./build.sh > logs/build.sh.log
+
Index: /configs/testing/bash/post.sh
===================================================================
--- /configs/testing/bash/post.sh	(revision 502)
+++ /configs/testing/bash/post.sh	(revision 502)
@@ -0,0 +1,78 @@
+#!/bin/bash
+
+function all_results()
+{
+    cd $ROOT/RUNS
+    for TEST in * ; do
+	NAME=$(echo $TEST | tr _ /)
+	echo "\subsection{$NAME}"
+	for GRAPH in $TEST/*.png ; do
+	    cat <<EOF
+\begin{figure}
+\centering{}
+\includegraphics[scale=0.5]{$ROOT/RUNS/$GRAPH}
+\end{figure}
+EOF
+	done
+    done
+#    cd $ROOT/tmp
+}
+
+function all_params()
+{
+    cd $ROOT/RUNS
+    for TEST in * ; do
+	NAME=$(echo $TEST | tr _ /)
+	cat <<EOF
+\subsection{$NAME}
+\begin{lstlisting}
+$(cat $TEST/run.def)
+\end{lstlisting}
+EOF
+    done
+#    cd $ROOT/tmp
+}
+
+ROOT=$PWD
+
+for dir in $ROOT/RUNS/* ; do
+    cd $dir
+    echo
+    pwd
+    ls -l post.py netcdf
+    python post.py & 
+done
+wait
+
+cd $ROOT/tmp
+rm -f *.aux *.log *.toc *.tex
+
+cat <<EOF >report.tex
+\documentclass[a4paper,english]{article}
+\usepackage{graphicx}
+\usepackage{listings}
+\usepackage[T1]{fontenc}
+\usepackage[latin9]{inputenc}
+\usepackage{color}
+\usepackage{babel}
+\usepackage[unicode=true,pdfusetitle,
+ bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
+ breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=true]
+ {hyperref}
+
+\begin{document}
+
+\title{DYNAMICO correctness report ($arch)}
+\author{Thomas Dubos}
+\maketitle
+\tableofcontents{}
+\section{Results}
+$(all_results)
+\section{Parameters}
+$(all_params)
+\end{document}
+EOF
+
+pdflatex report.tex >/dev/null
+pdflatex report.tex >/dev/null
+mailx -s "DYNAMICO correctness report " -a report.pdf dubos@lmd.polytechnique.fr </dev/null
Index: /configs/testing/bash/testing.sh
===================================================================
--- /configs/testing/bash/testing.sh	(revision 502)
+++ /configs/testing/bash/testing.sh	(revision 502)
@@ -0,0 +1,319 @@
+#!/bin/bash
+
+#################################### Site-specific functions #######################
+# In order to accomodate various computing environments, testing.sh relies on the following 
+# site-specific functions which must be provided by include_site.sh
+#
+# submit_run_and_post EXP
+#   Submit the run job run.job to the batch scheduler
+#   Submit the post-processing job post.job to the batch scheduler 
+#   so that it starts after successful completion of run.job
+#
+# qstat
+#   Display cluster status : jobs running, waiting, ect.
+#
+# print_run_job()
+#   Print run.job on standard output
+#   Standard output is redirected to run.job by caller
+#
+# print_post_job()
+#   Print beginning of post.job on standard output. The caller will print additional lines depending on the test case.
+#   Standard output is redirected to file post.job by caller
+#   Script post.job must source include_site.sh, include_post.sh 
+#   and either include_post_xios.sh or include_post_noxios.sh .
+#   These two scripts define functions suitable for output produced with/without XIOS
+#   These functions are called at the end of post.job, in the test-case-dependent part appended by the caller
+#   These functions call wrapper functions NCKS and CDO which must also be defined in include_site.sh
+
+################################ Helper functions ##############################
+
+function redef()
+{
+    while (($# > 0)) ; do
+	sed -i "s/$1[ ]*=[ ]*[[:alnum:]\.]*/$1=$2/g" run.def
+	shift; shift;
+    done
+}
+
+function create_exp()
+{
+# EXP_NAME param_dir run grid post_XX
+    mkdir -p $TESTING/$WORK/$1
+    cd $TESTING/$WORK/$1
+    ln -sf $DYNAMICO/bin/icosa_gcm.exe .
+    ln -sf $TESTING/$WORK/$4 mygrid
+    ln -sf $TESTING/include_*.sh .
+    ln -sf $TESTING/iodef.xml $TESTING/lmdz_physics.xml .
+    cp $TESTING/$WORK/param_sets/$2/*.def .
+    cp -f "$3.def" tmp.def
+    mv -f tmp.def run.def
+    redef nsplit_i 2 nsplit_j 2
+    print_run_job > run.job
+    print_post_job > post.job
+    echo $5 >> post.job
+    chmod a+rx *.job
+}
+
+function grid()
+{
+    echo gridtype = lonlat
+    echo xsize    = $1
+    echo xfirst   = $2
+    echo xinc     = $3
+    echo ysize    = $4
+    echo yfirst   = $5
+    echo yinc     = $6
+}
+
+
+########################### Resolution-dependent parameters ####################
+function nbpX() { redef nbp $1 dt $2 tau_graddiv $3 tau_gradrot $3 tau_divgrad $3
+}
+function nbp32() { nbpX 32 600 21600
+}
+function nbp64() { nbpX 64 300 10800
+}
+function nbp128() { nbpX 128 150 5400
+}
+function nbp40() { nbpX 40 480 18000
+}
+function nbp80() { nbpX 80 240 9000
+}
+function nbp160() { nbpX 160 120 4500
+}
+################################### Test cases #################################
+
+# Williamson (1991)
+
+function W91()
+{
+    EXP=W91_6_$1
+    echo "$EXP : nbp=$1 dt=$2 grid=$4"
+    create_exp $EXP shallow_water/williamson91 run6 $4 post_W91
+    ln -sf $TESTING/icosa_SW.xml icosa.xml
+    redef nbp $1 dt $2 tau_graddiv $3 tau_gradrot $3 tau_divgrad $3 
+    redef write_period 86400 run_length 2592000
+    submit_run_and_post $EXP
+}
+
+# Jablonowski & Williamson (2006)
+
+function JW06()
+{
+    EXP=JW06_$1
+    echo "$EXP : nbp=$1 dt=$2 grid=$4"
+    create_exp $EXP dcmip2012 run41 $4 post_JW06
+    ln -sf $TESTING/icosa_JW06.xml icosa.xml
+#    redef nbp $1 dt $2 tau_graddiv $3 tau_gradrot $3 tau_divgrad $3 
+    nbp$1
+    redef write_period 86400 run_length 864000 etat0 jablonowsky06
+    submit_run_and_post $EXP
+}
+
+# DCMIP1.2 Transport by Hadley-like circulation
+
+function DCMIP12()
+{
+    EXP=DCMIP12_$1_$2
+    echo "$EXP : nbp=$1 llm=$2 ncar_dz=$3 dt=$4 grid=$5"
+    create_exp $EXP dcmip2012 run11 $5 post_DCMIP12
+    redef nqtot 1 nbp $1 llm $2 ncar_dz $3 dt $4
+    redef dcmip1_shape hadley dcmip1_wind hadley run_length 86400 write_period 3600 
+    submit_run_and_post $EXP
+}
+
+# DCMIP2.0 Rest over orography (PGF error)
+
+function DCMIP20()
+{
+    EXP=DCMIP20_$1_$2
+    echo "$EXP : nbp=$1 llm=$2 ncar_dz=$3 dt=$4 grid=$5"
+    create_exp $EXP dcmip2012 run20 $5 post_DCMIP20
+#    redef nbp $1 dt $4
+    nbp$1
+    redef nqtot 0 llm $2 ncar_dz $3
+# from make_rundefs.sh : group 'Time' run_length 518400 write_period 21600
+# comment out the following line to conform to DCMIP document
+#    redef run_length 86400 write_period 3600 
+    submit_run_and_post $EXP
+}
+
+# DCMIP2.1 Orographic wave
+
+function DCMIP21()
+{
+    EXP=DCMIP21_$1_$2
+    echo "$EXP : nbp=$1 llm=$2 ncar_dz=$3 dt=$4 grid=$5"
+    create_exp $EXP dcmip2012 run21 $5 post_DCMIP21
+#    redef nbp $1 dt $4
+    nbp$1
+    redef nqtot 0 llm $2 ncar_dz $3 run_length 86400 write_period 3600 
+    submit_run_and_post $EXP
+}
+
+# DCMIP3.1 Non-orographic gravity wave
+
+function DCMIP31()
+{
+    EXP=DCMIP31_$1_$2
+    echo "$EXP : nbp=$1 llm=$2 ncar_dz=$3 dt=$4 grid=$5"
+    create_exp $EXP dcmip2012 run3 $5 post_DCMIP31
+#    redef nbp $1 dt $4
+    nbp$1
+    redef nqtot 0 llm $2 ncar_dz $3 run_length 86400 write_period 3600
+    submit_run_and_post $EXP
+}
+
+# DCMIP4.1 JW06 on a small planet with tracers
+
+function DCMIP41()
+{
+    EXP=DCMIP41_$1
+    echo "$EXP : nbp=$1 dt=$2 tau_dissip=$3 grid=$4"
+    create_exp $EXP dcmip2012 run41 $4 post_DCMIP41
+#    redef nbp $1 dt $2 tau_graddiv $3 tau_gradrot $3 tau_divgrad $3
+    nbp$1
+    redef nqtot 2 write_period 86400 run_length 864000
+    submit_run_and_post $EXP
+}
+
+# DCMIP5 Tropical cyclone
+
+function DCMIP51()
+{
+    EXP=DCMIP51_$1
+    echo "$EXP : nbp=$1 dt=$2 grid=$4"
+    create_exp $EXP dcmip2012 run51 $4 post_DCMIP51
+    nbp$1
+#    redef nbp $1 dt $2 tau_graddiv $3 tau_gradrot $3 tau_divgrad $3 
+    redef itau_physics 6
+    submit_run_and_post $EXP
+}
+
+# Held & Suarez (1994)
+
+function HS94()
+{
+    EXP=HS94_$1_$3
+    echo "$EXP : nbp=$1 dt=$2 grid=$4"
+    create_exp $EXP climate/Held_Suarez run $4 post_HS
+    nbp$1
+#    redef nbp $1 dt $2 tau_graddiv $3 tau_gradrot $3 tau_divgrad $3
+    submit_run_and_post $EXP
+}
+
+# Saturn : start from rest, vertical temperature profile read from file
+
+function Saturn()
+{
+    EXP=SATURN_$1
+    echo "$EXP : nbp=$1 dt=$2 grid=$4"
+    create_exp $EXP planets run_saturn $4
+    for x in saturn_const.def callphys.def gases.def icosa.xml apbp.txt temp_profile.txt DATAGENERIC; do
+    ln -s $TESTING/SATURN/TEST/$x
+    done
+    ln -sf $TESTING/icosa_SW.xml icosa.xml
+    redef nbp $1 dt $2 tau_graddiv $3 tau_gradrot $3 tau_divgrad $3 
+    redef nsplit_i 1 nsplit_j 1 nqtot 0 
+    redef run_length 38052    # 1     Saturn day
+#    redef run_length 3805200  # 100   Saturn days
+#    redef run_length 76104000 # 20000 Saturn day
+#    echo post_SATURN >> post.job
+#    submit_run_and_post $EXP
+}
+
+########################################  Main #######################################
+
+function reset()
+{
+    echo "Testing DYNAMICO revision $revision"
+    set -x
+    rm -rf $TESTING/$WORK
+    mkdir $TESTING/$WORK
+    set +x
+
+    mkdir $TESTING/$WORK/param_sets
+    cd $TESTING/$WORK/param_sets
+    $TESTING/trunk/param_sets/make_rundefs.sh
+
+    cd $TESTING/$WORK
+    grid 720 0.25 0.5 360 -89.75 0.5 > fine_grid
+    grid 360 0.5  1   180 -89.5  1   > medium_grid
+    grid 180 1    2    90 -89    2   > coarse_grid
+}
+
+function debug()
+{
+#    W91 32 600 21600 coarse_grid
+#    HS94 32 600 86400 coarse_grid
+    JW06 32 600 21600 coarse_grid
+#    DCMIP12 40 30 400 600 coarse_grid
+#    DCMIP12 80 60 200 300 medium_grid
+#    DCMIP12 160 120 100 150 medium_grid
+#    DCMIP20 40 30 400 480 coarse_grid
+#    DCMIP21 40 60 500 480 coarse_grid
+#    DCMIP31 40 10 1000 480 coarse_grid
+#    DCMIP41 32 600 21600 coarse_grid
+#    DCMIP51 32 600 21600 coarse_grid
+#    cp -pr $TESTING/trunk/param_sets/planets $TESTING/$WORK/param_sets
+#    Saturn 10 475.65 5000 coarse_grid
+}
+
+function fast()
+{
+    W91 32 600 21600 coarse_grid
+    JW06 32 600 21600 coarse_grid
+    DCMIP12 40 30 400 600 coarse_grid
+    DCMIP20 40 30 400 480 coarse_grid
+    DCMIP21 40 60 500 480 coarse_grid
+    DCMIP31 40 10 1000 480 coarse_grid
+    DCMIP41 32 600 21600 coarse_grid
+    DCMIP51 32 600 43200 coarse_grid
+}
+
+function GMD_2014()
+{
+#    W91 32 600 21600 coarse_grid
+#    JW06 32 600 21600 coarse_grid
+    HS94 32 600 86400 coarse_grid
+}
+
+function extended()
+{
+    W91      64 300 10800 fine_grid
+    W91     128 150 5400  fine_grid
+    JW06     64 300 10800 fine_grid
+    JW06    128 150 5400  fine_grid
+    DCMIP51  64 300 21600 fine_grid
+    DCMIP51 128 150 10800 fine_grid
+    HS94     32 600 86400 fine_grid
+    HS94     32 600 5400  fine_grid
+    HS94     40 480 50000 fine_grid
+    HS94     40 480 21600 fine_grid
+    HS94     64 300 10800 fine_grid
+}
+
+#set -o errexit
+
+# include machine-specific helper/wrapper functions : 
+#     print_run_job print_post_job submit_run_and_post qstat
+
+source include_site.sh
+
+clear
+echo "Usage : testing.sh [reset] [debug|fast|extended]"
+TESTING=$PWD
+DYNAMICO=$TESTING/trunk
+# find out revision number
+cd $DYNAMICO
+svn info --xml | grep revision | head -n 1 > info.xml
+sed -i "s/>//g" info.xml
+. info.xml    
+WORK="r$revision"
+
+for x in $* ; do
+echo $x
+$x
+done
+
+#qstat
Index: /configs/testing/build.sh
===================================================================
--- /configs/testing/build.sh	(revision 501)
+++ /configs/testing/build.sh	(revision 502)
@@ -38,3 +38,4 @@
 ( main ) || ( echo ; echo "***************** Build FAILED ******************" ; exit 1)
 
+echo "***************** Build : SUCCESS ******************"
 echo "You may now run create_runs.sh"
Index: /configs/testing/create_runs.sh
===================================================================
--- /configs/testing/create_runs.sh	(revision 501)
+++ /configs/testing/create_runs.sh	(revision 502)
@@ -12,4 +12,5 @@
     cd $EXPDIR
     ln -sf $ROOT/bin/icosa_${EXEC}.exe gcm.exe
+    ln -sf $ROOT/python/post_${EXP}.py post.py
     rundef_$EXP $* > tmp.def
     sort tmp.def | cut -c 7- > run.def
Index: /configs/testing/python/common.py
===================================================================
--- /configs/testing/python/common.py	(revision 502)
+++ /configs/testing/python/common.py	(revision 502)
@@ -0,0 +1,17 @@
+import numpy as np
+import netCDF4 as cdf
+import matplotlib.pyplot as plt
+
+def getdims(nc, *names): return [len(nc.dimensions[name]) for name in names]
+def getvars(nc, *names): return [nc.variables[name] for name in names]
+
+def axis_longitude():
+    plt.xlim((0,360))
+    plt.xlabel('longitude (degrees)')
+    plt.xticks(np.arange(0,361,30))
+
+def axis_latitude():
+    plt.ylim((-90,90))
+    plt.ylabel('latitude (degrees)')
+    plt.yticks(np.arange(-90,91,30))
+
Index: /configs/testing/python/post_DCMIP31.py
===================================================================
--- /configs/testing/python/post_DCMIP31.py	(revision 502)
+++ /configs/testing/python/post_DCMIP31.py	(revision 502)
@@ -0,0 +1,45 @@
+from common import *
+
+def plot_T850(lon,lat,T850):  # T850 at final time
+    print 'Reading data ...'
+    lon, lat, T850 = lon[:], lat[:], T850[-1, :, :]
+    print '... done.'
+    plt.figure(figsize=(12,6))
+    plt.contourf(lon,lat,T850)
+    plt.colorbar() 
+    plt.title('T850')
+    axis_longitude()
+    axis_latitude()
+    plt.savefig('T850.png')
+
+def plot_dT(nlon,nlat,llm, lon,T,Phi): # perturbation temp, final time
+    # vertical slice at final time
+    print 'Reading data ...'
+    T, Phi =T[-1,:,nlat/2,:], Phi[-1,:,nlat/2,:]
+    print '... done.'
+    Cpd, kappa, g = 1004.5, 0.2857143, 9.80616
+    N, Teq, peq = 0.01, 300., 1e5
+    N2, g2 = N*N, g*g
+    G = g2/(N2*Cpd)
+
+    lon2, z = np.zeros((llm,nlon)), np.zeros((llm,nlon))
+    for lev in range(llm):
+        z[lev,:] = (.5/g)*(Phi[lev,:]+Phi[lev+1,:]) # average from interfaces to full levels
+        lon2[lev,:] = lon[:]
+
+    Tb = G + (Teq-G)*np.exp(N2*z/g) # background temperature
+    plt.figure(figsize=(12,6))
+    plt.contourf(lon2,z,T-Tb, levels=np.arange(-0.08,0.12,0.02) )
+    plt.colorbar() 
+    plt.title('T-Tb')
+    axis_longitude()
+    plt.ylabel('z (m)')
+    plt.yticks(np.arange(0, 10001, 1000))
+    plt.savefig('dT.png')
+
+gridfile = 'netcdf/output_dcmip2016_regular.nc'
+nc = cdf.Dataset(gridfile, "r")
+llm, nlon, nlat, ntime = getdims(nc, 'lev','lon','lat','time_counter')
+lon, lat, T850, T, Phi = getvars(nc, 'lon','lat','T850', 'T', 'PHI')
+plot_dT(nlon,nlat,llm, lon,T,Phi)
+plot_T850(lon,lat,T850)
Index: /configs/testing/python/post_DCMIP41.py
===================================================================
--- /configs/testing/python/post_DCMIP41.py	(revision 502)
+++ /configs/testing/python/post_DCMIP41.py	(revision 502)
@@ -0,0 +1,22 @@
+from common import *
+
+def plot_T850(day, lon,lat,T850):  # T850 at final time
+    print 'Reading data ...'
+    lon, lat, T850 = lon[:], lat[:], T850[day-1, :, :]
+    print '... done.'
+    plt.figure(figsize=(12,5))
+    plt.contourf(lon,lat,T850)
+    plt.colorbar() 
+    plt.title('T850')
+    axis_longitude()
+    axis_latitude()
+    plt.savefig('T850_day%d.png'%day)
+
+gridfile = 'netcdf/output_dcmip2016_regular.nc'
+nc = cdf.Dataset(gridfile, "r")
+llm, nlon, nlat, ntime = getdims(nc, 'lev','lon','lat','time_counter')
+lon, lat, T850, T, Phi = getvars(nc, 'lon','lat','T850', 'T', 'PHI')
+
+plot_T850(7,lon,lat,T850)
+plot_T850(10,lon,lat,T850)
+plot_T850(30,lon,lat,T850)
Index: /configs/testing/report.sh
===================================================================
--- /configs/testing/report.sh	(revision 502)
+++ /configs/testing/report.sh	(revision 502)
@@ -0,0 +1,7 @@
+#!/bin/bash
+rm -f *.aux *.log
+pdflatex report.tex
+pdflatex report.tex
+
+mailx -s "DYNAMICO report " -a report.pdf dubos@lmd.polytechnique.fr </dev/null
+
Index: /configs/testing/setup.sh
===================================================================
--- /configs/testing/setup.sh	(revision 501)
+++ /configs/testing/setup.sh	(revision 502)
@@ -46,10 +46,14 @@
   # create separate build dirs sharing the same src/ and tools/ subdirs to save disk and time
   BUILD=$ROOT/DYNAMICO_serial
-  cp -pr $ROOT/DYNAMICO $BUILD
-  rm -rf $BUILD/src
-  rm -rf $BUILD/tools
-  ln -sf $ROOT/DYNAMICO/src $BUILD/src
-  ln -sf $ROOT/DYNAMICO/tools $BUILD/tools
+  echo "Creating build directory $BUILD"
+  rm -rf $BUILD
+  mkdir -p $BUILD
+  cd $ROOT/DYNAMICO
+  for NAME in arch build compile make_icosa src bld.cfg  clean doc tools ; do
+      ln -s $ROOT/DYNAMICO/$NAME $BUILD/
+  done
   for NAME in mpi mpi_omp ; do
+      echo "Creating build directory $ROOT/DYNAMICO_$NAME"
+      rm -rf $ROOT/DYNAMICO_$NAME
       cp -pr $BUILD $ROOT/DYNAMICO_$NAME
   done
Index: /configs/testing/submit.sh
===================================================================
--- /configs/testing/submit.sh	(revision 502)
+++ /configs/testing/submit.sh	(revision 502)
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+source current_args
+source bash/${arch}.sh
+
+ROOT=$PWD
+
+cd RUNS
+for dir in $ROOT/RUNS/* ; do 
+    cd $dir 
+    ID=$(submit_job_$arch job.sh)
+    LIST="$LIST $ID"
+done
+
+mkdir -p $ROOT/tmp
+job_post_$arch $LIST > $ROOT/tmp/job_post.sh
+cd $ROOT/logs
+submit_job_$arch $ROOT/tmp/job_post.sh > /dev/null
