Index: /trunk/tools/lmdz_check.bash
===================================================================
--- /trunk/tools/lmdz_check.bash	(revision 209)
+++ /trunk/tools/lmdz_check.bash	(revision 210)
@@ -56,5 +56,5 @@
   kvalues='2dh:hovz:tevol'
 
-  otex='lmdz_check.tex'
+  otex=${ofold}'/lmdz_check.tex'
 ####### ###### ##### #### ### ## #
 # Levels to interpolate
@@ -173,4 +173,6 @@
   if test $draw -eq 1; then
   echo "Drawing..."
+  mkdir ${ofold}/figs
+
   for vt in ${vtypes}; do
     echo "variable type: "${vt}
@@ -246,6 +248,6 @@
         exit
       else
-        mv 2Dfields_shadow_time.pdf ${ofold}/${stdn}_Hovmoller.pdf
-        if test $vis -eq 1; then evince ${ofold}/${stdn}_Hovmoller.pdf & fi
+        mv 2Dfields_shadow_time.pdf ${ofold}/figs/${stdn}_Hovmoller.pdf
+        if test $vis -eq 1; then evince ${ofold}/figs/${stdn}_Hovmoller.pdf & fi
       fi
       fi
@@ -267,6 +269,6 @@
         exit
       else
-        mv TimeSeries_${stdn}.pdf ${ofold}/${stdn}_TimeSeries.pdf
-        if test $vis -eq 1; then evince ${ofold}/${stdn}_TimeSeries.pdf & fi
+        mv TimeSeries_${stdn}.pdf ${ofold}/figs/${stdn}_TimeSeries.pdf
+        if test $vis -eq 1; then evince ${ofold}/figs/${stdn}_TimeSeries.pdf & fi
       fi
       fi
@@ -310,6 +312,6 @@
         exit
       else
-        mv 2Dfields_shadow.pdf ${ofold}/${stdn}_hor.pdf
-        if test $vis -eq 1; then evince ${ofold}/${stdn}_hor.pdf & fi
+        mv 2Dfields_shadow.pdf ${ofold}/figs/${stdn}_hor.pdf
+        if test $vis -eq 1; then evince ${ofold}/figs/${stdn}_hor.pdf & fi
       fi
       fi
@@ -354,6 +356,6 @@
         exit
       else
-        mv Neighbourghood_evol.pdf ${ofold}/${stdn}_Neighbourghood_evol.pdf
-        if test $vis -eq 1; then evince ${ofold}/${stdn}_Neighbourghood_evol.pdf & fi
+        mv Neighbourghood_evol.pdf ${ofold}/figs/${stdn}_Neighbourghood_evol.pdf
+        if test $vis -eq 1; then evince ${ofold}/figs/${stdn}_Neighbourghood_evol.pdf & fi
       fi
       fi
@@ -409,19 +411,19 @@
 \\begin{center}
 \\begin{tabular}{cc}
-\\includegraphics[height=0.2\\textheight]{${ofold}/dq${varn}_hor}
-&
-\\includegraphics[height=0.2\\textheight]{${ofold}/dt${varn}_hor}
+\\includegraphics[height=0.2\\textheight]{figs/dq${varn}_hor}
+&
+\\includegraphics[height=0.2\\textheight]{figs/dt${varn}_hor}
 \\\\
-\\includegraphics[height=0.2\\textheight]{${ofold}/dq${varn}_Hovmoller}
-&
-\\includegraphics[height=0.2\\textheight]{${ofold}/dt${varn}_Hovmoller}
+\\includegraphics[height=0.2\\textheight]{figs/dq${varn}_Hovmoller}
+&
+\\includegraphics[height=0.2\\textheight]{figs/dt${varn}_Hovmoller}
 \\\\
-\\includegraphics[height=0.2\\textheight]{${ofold}/dq${varn}_TimeSeries}
-&
-\\includegraphics[height=0.2\\textheight]{${ofold}/dt${varn}_TimeSeries}
+\\includegraphics[height=0.2\\textheight]{figs/dq${varn}_TimeSeries}
+&
+\\includegraphics[height=0.2\\textheight]{figs/dt${varn}_TimeSeries}
 \\\\
-\\includegraphics[height=0.2\\textheight]{${ofold}/dq${varn}_Neighbourghood_evol}
-&
-\\includegraphics[height=0.2\\textheight]{${ofold}/dt${varn}_Neighbourghood_evol}
+\\includegraphics[height=0.2\\textheight]{figs/dq${varn}_Neighbourghood_evol}
+&
+\\includegraphics[height=0.2\\textheight]{figs/dt${varn}_Neighbourghood_evol}
 \\end{tabular}
 EOF
@@ -463,19 +465,19 @@
 \\begin{center}
 \\begin{tabular}{cc}
-\\includegraphics[height=0.2\\textheight]{${ofold}/du${varn}_hor}
-&
-\\includegraphics[height=0.2\\textheight]{${ofold}/dv${varn}_hor}
+\\includegraphics[height=0.2\\textheight]{figs/du${varn}_hor}
+&
+\\includegraphics[height=0.2\\textheight]{figs/dv${varn}_hor}
 \\\\
-\\includegraphics[height=0.2\\textheight]{${ofold}/du${varn}_Hovmoller}
-&
-\\includegraphics[height=0.2\\textheight]{${ofold}/dv${varn}_Hovmoller}
+\\includegraphics[height=0.2\\textheight]{figs/du${varn}_Hovmoller}
+&
+\\includegraphics[height=0.2\\textheight]{figs/dv${varn}_Hovmoller}
 \\\\
-\\includegraphics[height=0.2\\textheight]{${ofold}/du${varn}_TimeSeries}
-&
-\\includegraphics[height=0.2\\textheight]{${ofold}/dv${varn}_TimeSeries}
+\\includegraphics[height=0.2\\textheight]{figs/du${varn}_TimeSeries}
+&
+\\includegraphics[height=0.2\\textheight]{figs/dv${varn}_TimeSeries}
 \\\\
-\\includegraphics[height=0.2\\textheight]{${ofold}/du${varn}_Neighbourghood_evol}
-&
-\\includegraphics[height=0.2\\textheight]{${ofold}/dv${varn}_Neighbourghood_evol}
+\\includegraphics[height=0.2\\textheight]{figs/du${varn}_Neighbourghood_evol}
+&
+\\includegraphics[height=0.2\\textheight]{figs/dv${varn}_Neighbourghood_evol}
 \\end{tabular}
 EOF
@@ -510,9 +512,9 @@
 \\begin{center}
 \\begin{tabular}{ccc}
-\\includegraphics[width=0.33\\textwidth]{${ofold}/${varn}_hor}
-&
-\\includegraphics[width=0.33\\textwidth]{${ofold}/${varn}_TimeSeries}
-&
-\\includegraphics[width=0.33\\textwidth]{${ofold}/${varn}_Neighbourghood_evol}
+\\includegraphics[width=0.33\\textwidth]{figs/${varn}_hor}
+&
+\\includegraphics[width=0.33\\textwidth]{figs/${varn}_TimeSeries}
+&
+\\includegraphics[width=0.33\\textwidth]{figs/${varn}_Neighbourghood_evol}
 \\end{tabular}
 EOF
@@ -554,11 +556,11 @@
 \\begin{center}
 \\begin{tabular}{cc}
-\\includegraphics[width=0.5\\textwidth]{${ofold}/${varn}_hor}
-&
-\\includegraphics[width=0.5\\textwidth]{${ofold}/${varn}_Hovmoller}
+\\includegraphics[width=0.5\\textwidth]{figs/${varn}_hor}
+&
+\\includegraphics[width=0.5\\textwidth]{figs/${varn}_Hovmoller}
 \\\\
-\\includegraphics[width=0.5\\textwidth]{${ofold}/${varn}_TimeSeries}
-&
-\\includegraphics[width=0.5\\textwidth]{${ofold}/${varn}_Neighbourghood_evol}
+\\includegraphics[width=0.5\\textwidth]{figs/${varn}_TimeSeries}
+&
+\\includegraphics[width=0.5\\textwidth]{figs/${varn}_Neighbourghood_evol}
 \\end{tabular}
 EOF
@@ -593,7 +595,9 @@
 EOF
   otexn=`echo ${otex} | tr '.' ' ' | awk '{print $1}'`
+  cd ${ofold}
   pdflatex ${otexn}
   pdflatex ${otexn}
   evince ${otexn}.pdf &
+  cd ${rootsh}
   fi
 fi
