source: lmdz_wrf/trunk/tools/lmdz_check.bash @ 210

Last change on this file since 210 was 210, checked in by lfita, 11 years ago

Changing figures output to $ofold/figs

  • Property svn:executable set to *
File size: 19.3 KB
Line 
1#!/bin/bash
2## e.g. # lmdz_check.bash -1:6:3:26 wrfout_d01_1979-12-01_00:00:00 /home/lluis/PY /home/lluis/etudes/WRF_LMDZ/WaquaL/LaTeX/NPv31_hgardfou/figs 0 None 0
3if test $1 = '-h'; then
4  echo "**********************************"
5  echo "***   Shell script to analyze  ***"
6  echo "*** LMDZ runs at a given point ***"
7  echo "**********************************"
8  echo "lmdz_check.bash [point](as Time:z:y:x, -1 last value) [infile] [pyhome] \
9    (place with pthon scripts) [ofold](output folder) [getvals](0, no; 1: yes, \
10    whether to compute intermediary files) [mapv](None, no; map characteristics:[proj],[res])"
11  echo "  [point]: as Time:z:y:x, (-1 for last value, python style (0 based))"
12  echo "  [infile]: file to use"
13  echo "  [pyhome]: place with pthon scripts"
14  echo "  [ofold]: output folder"
15  echo "  [getvals]: 0, no; 1: yes, whether to compute intermediary files"
16  echo "  [mapv]: None, no; map characteristics:[proj],[res]"
17  echo "  [visualize]: 0, no; 1: yes, whether to visualize results"
18else
19  rootsh=`pwd`
20  errmsg='ERROR -- error -- ERROR -- error'
21  main='lmdz_check.bash'
22
23  point=$1
24  infile=$2
25  PYHOME=$3
26  ofold=$4
27  getvals=$5
28  mapv=$6
29  vis=$7
30
31# To paint figures
32  draw=1
33
34# To generate Hovmoller graph
35  dohov=1
36
37# To generate point graph
38  dopt=1
39
40# To generate horizontal graph
41  dohor=1
42
43# To generate neighbourghood evol graph
44  doneig=1
45
46# To generate LaTeX
47  dolatex=1
48
49  vartypes='dt:st:sfc'
50
51  dtvariables='AJS:CON:DYN:EVA:LSCST:LSCTH:LSC:PHY:THE:VDF:WAK'
52  stvariables='QVAPOR:QCLOUD:LGEOP:LTEMP:LVITU:LVITV:LVITW:LRHUM:LH2O:LPR_CON_I:'
53  stvariables=${stvariables}'LPR_CON_L:LIWCON:LPTCONV'
54  sfcvariables='LSNOW:LEVAP:LPRECIP:LPLUC:LPLUL:LRH2M:T2:U10:V10:LCLDL:LCLDM:LCLDH:PSFC'
55
56  kvalues='2dh:hovz:tevol'
57
58  otex=${ofold}'/lmdz_check.tex'
59####### ###### ##### #### ### ## #
60# Levels to interpolate
61  plevels='100000.,97500.,95000.,92500.,90000.,85000.,80000.,75000.,70000.,'
62  plevels=${plevels}'65000.,60000.,55000.,50000.,45000.,40000.,35000.,30000.,'
63  plevels=${plevels}'25000.,20000.,15000.,10000.,5000.,2500.,1000.,'
64  plevels=${plevels}'500.,250.'
65
66  tval=`echo ${point} | tr ':' ' ' | awk '{print $1}'`
67  zval=`echo ${point} | tr ':' ' ' | awk '{print $2}'`
68  yval=`echo ${point} | tr ':' ' ' | awk '{print $3}'`
69  xval=`echo ${point} | tr ':' ' ' | awk '{print $4}'`
70
71#######    #######
72## MAIN
73    #######
74
75  vtypes=`echo ${vartypes} | tr ':' ' '`
76  kvals=`echo ${kvalues} | tr ':' ' '`
77
78# All variables
79  allvars0=''
80
81  for vt in ${vtypes}; do
82    case $vt in
83      'dt' )
84        var0s=`echo ${dtvariables} | tr ':' ' '`
85        for var0 in $var0s; do
86          allvars0=${allvars0}'LDQ'${var0}',LDT'${var0}','
87          if test ${var0} = 'CON' || test ${var0} = 'DYN' || test ${var0} = 'VDF'; then
88            allvars0=${allvars0}'LDU'${var0}',LDV'${var0}','
89          fi
90        done
91      ;;
92      'sfc' )
93        var0s=`echo ${sfcvariables} | tr ':' ' '`
94        for var0 in $var0s; do
95          allvars0=${allvars0}${var0}','
96        done
97      ;;
98      'st' )
99        var0s=`echo ${stvariables} | tr ':' ' '`
100        for var0 in $var0s; do
101          allvars0=${allvars0}${var0}','
102        done
103      ;;
104    esac
105  done
106  Lallvars0=`expr length ${allvars0}`
107  Lallvars01=`expr ${Lallvars0} - 1`
108  allvars=${allvars0:0:${Lallvars01}}
109  echo "all vars: '"${allvars}"'"
110
111  if test ${getvals} -eq 1; then
112    for kvn in ${kvals}; do
113      echo "  kind of values: "${kvn}
114      case $kvn in
115        '2dh')
116          pyvls='Time,'${tval}','${tval}',1@bottom_top,'${zval}','${zval}',1'
117        ;;
118        'hovz')
119          pyvls='south_north,'${yval}','${yval}',1@west_east,'${xval}','${xval}',1'
120        ;;
121        'tevol')
122          pyvls='bottom_top,'${zval}','${zval}',1@south_north,'${yval}','${yval}
123          pyvls=${pyvls}',1@west_east,'${xval}','${xval}',1'
124        ;;
125      esac
126      ofile=`python ${PYHOME}/nc_var.py -o DataSetSection_multidims -f ${infile}     \
127        -S ${pyvls} | grep succesfull | awk '{print $6}' | tr '"' ' '`
128      if test $? -ne 0; then
129        echo ${errmsg}
130        echo "  "${main}": python failed!"
131        echo "    python "${HOME}/nc_var.py -o DataSetSection_multidims              \
132          -f ${infile} -S ${pyvls}
133        exit
134      fi
135      case $kvn in
136        '2dh')
137# Adding CF longitudes and latitudes
138          python ${PYHOME}/nc_var.py -f ${ofile} -o WRF_CFlonlat_creation            \
139            -S longitude,latitude -v XLONG,XLAT
140        ;;
141        'tevol')
142# Adding CF time
143          python ${PYHOME}/nc_var.py -f ${ofile} -o WRF_CFtime_creation              \
144            -S 19491201000000,hours -v time
145        ;;
146        'hovz')
147# Adding CF time
148          python ${PYHOME}/nc_var.py -f ${ofile} -o WRF_CFtime_creation              \
149            -S 19491201000000,hours -v time
150# Adding variable dimension from 'bottom_top'
151          python ${PYHOME}/nc_var.py -f ${ofile} -o dimVar_creation -S bottom_top
152# Vertical interpolation
153#          dvals='T:Time,Z:bottom_top,Y:south_north,X:west_east'
154#          python ${PYHOME}/vertical_interpolation.py -f ${ofile} -o WRFp             \
155#            -i ${plevels} -k 'lin' -v ${allvars} -d ${dvals}                         \
156#            -D T:Times,Z:ZNU,Y:XLAT,X:XLONG
157#          if test $? -ne 0; then
158#            echo ${errormsg}
159#            echo "  "${main}": drawing.py fails!"
160#            echo python ${PYHOME}/vertical_interpolation.py -f ${ofile} -o WRFp \
161#             -i ${plevels} -k 'lin' -v ${allvars} -d ${dvals} \
162#             -D T:Times,Z:ZNU,Y:XLAT,X:XLONG
163#            exit
164#          fi
165#          ofilen0=`echo ${ofile} | tr '.' ' ' | awk '{print $1}'`
166#          mv vertical_interpolation_WRFp.nc ${ofilen0}_WRFp.nc
167        ;;
168      esac
169    done
170  fi
171
172#exit
173  if test $draw -eq 1; then
174  echo "Drawing..."
175  mkdir ${ofold}/figs
176
177  for vt in ${vtypes}; do
178    echo "variable type: "${vt}
179    case $vt in
180      'dt' )
181        var0s=`echo ${dtvariables} | tr ':' ' '`
182        vars=''
183        for var0 in $var0s; do
184          vars=${vars}'LDQ'${var0}' LDT'${var0}' '
185          if test ${var0} = 'CON' || test ${var0} = 'DYN' || test ${var0} = 'VDF'; then
186            vars=${vars}'LDU'${var0}' LDV'${var0}' '
187          fi
188        done
189      ;;
190      'sfc' )
191        vars=`echo ${sfcvariables} | tr ':' ' '`
192      ;;
193      'st' )
194        vars=`echo ${stvariables} | tr ':' ' '`
195      ;;
196    esac
197    echo ${vars}
198    for var in ${vars}; do
199      echo "  var: "${var}
200      varvals=`python ${PYHOME}/drawing.py -o variable_values -S ${var} | grep all_values`
201      if test $? -ne 0; then
202        echo "  "${main}": Variable '"${var}"' not defined !!!!"
203        exit
204      fi
205      stdn=`echo ${varvals} | tr ',' ' ' | awk '{print $3}'`
206      cbar=`echo ${varvals} | tr ',' ' ' | awk '{print $9}'`
207      min=`echo ${varvals} | tr ',' ' ' | awk '{print $5}'`
208      max=`echo ${varvals} | tr ',' ' ' | awk '{print $6}'`
209
210      if test $dohov -eq 1 && ! test ${vt} = 'sfc'; then
211# Shadded vertical Hovmoller diagrams
212      filetail='south_north_B'${yval}'-E'${yval}'-I1_west_east_B'${xval}
213      filetail=${filetail}'-E'${xval}'-I1'
214
215# Let's make it easy
216      if test ${vt} = 'st';then
217        min='Saroundminmax@0.97'
218        max='Saroundminmax@0.97'
219      else
220        min='Spercentile@1'
221        max='Spercentile@1'
222      fi
223
224      if test ${var} = 'LDQEVA' || test ${var} = 'LDTEVA' || test ${var} = 'LH2O';then
225        min='Saroundminmax@0.75'
226        max='Saroundminmax@0.75'
227        if test ${var} = 'LDQEVA'; then
228          cbar='Reds'
229        else
230          cbar='Blues'
231        fi
232      fi
233
234      echo "    min: "${min}" max: "${max}
235
236      values=${stdn}':Time|-1,bottom_top|-1:varDIMbottom_top:time:'${cbar}':'
237      values=${values}${min}','${max}':vertical|temporal|evolution|:pdf:'
238      values=${values}'transpose:time|hours!since!1949-12-01|exct,12,h|'
239      values=${values}'$%d^{%H}$|date!($[DD]^{[HH]}$)|x:True'
240
241      python ${PYHOME}/drawing.py -o draw_2D_shad_time -f ${infile}_${filetail}.nc   \
242        -S ${values} -v ${var},time
243      if test $? -ne 0; then
244        echo ${errormsg}
245        echo "  "${main}": drawing.py fails!"
246        echo python ${PYHOME}/drawing.py -o draw_2D_shad_time \
247          -f ${infile}_${filetail}.nc -S ${values} -v ${var},time
248        exit
249      else
250        mv 2Dfields_shadow_time.pdf ${ofold}/figs/${stdn}_Hovmoller.pdf
251        if test $vis -eq 1; then evince ${ofold}/figs/${stdn}_Hovmoller.pdf & fi
252      fi
253      fi
254     
255      if test $dopt -eq 1; then
256# Point evolution
257      filetail='bottom_top_B'${zval}'-E'${zval}'-I1_south_north_B'${yval}'-E'
258      filetail=${filetail}${yval}'-I1_west_east_B'${xval}'-E'${xval}'-I1'
259
260      values=${stdn}':time|($[DD]^{[HH]}$):exct,12,h:$%d^{%H}$:time|evolution|at'
261      values=${values}'|(x='${xval}',y='${yval}',z='${zval}'):1:pdf'
262      python ${PYHOME}/drawing.py -o draw_timeSeries -f ${infile}_${filetail}.nc     \
263        -S ${values} -v ${var},time
264      if test $? -ne 0; then
265        echo ${errormsg}
266        echo "  "${main}": drawing.py fails!"
267        echo python ${PYHOME}/drawing.py -o draw_timeSeries \
268          -f ${infile}_${filetail}.nc -S ${values} -v ${var},time
269        exit
270      else
271        mv TimeSeries_${stdn}.pdf ${ofold}/figs/${stdn}_TimeSeries.pdf
272        if test $vis -eq 1; then evince ${ofold}/figs/${stdn}_TimeSeries.pdf & fi
273      fi
274      fi
275
276      if test $dohor -eq 1; then
277# Horizontal plot
278      filetail='Time_B'${tval}'-E'${tval}'-I1_bottom_top_B'${zval}
279      filetail=${filetail}'-E'${zval}'-I1'
280
281      min=`echo ${varvals} | tr ',' ' ' | awk '{print $5}'`
282      max=`echo ${varvals} | tr ',' ' ' | awk '{print $6}'`
283
284      if test ${vt} = 'dt'; then
285        min='Spercentile@1'
286        max='Spercentile@1'
287      elif test ${vt} = 'st'; then
288        min='Saroundminmax@0.97'
289        max='Saroundminmax@0.97'
290      fi
291
292      if test ${var} = 'LRH2M'; then
293        max='100.'
294      elif test ${var} = 'T2'; then
295        min='270'
296        max='300.'
297      fi
298
299      echo "    min: "${min}" max: "${max}
300
301      values=${stdn}':south_north|-1,west_east|-1:longitude:latitude:'${cbar}':'
302      values=${values}${min}','${max}':horizontal|section|at|(t='${tval}
303      values=${values}',z='${zval}'):pdf:None:'${mapv}':True'
304
305      python ${PYHOME}/drawing.py -o draw_2D_shad -f ${infile}_${filetail}.nc        \
306        -S ${values} -v ${var}
307      if test $? -ne 0; then
308        echo ${errormsg}
309        echo "  "${main}": drawing.py fails!"
310        echo python ${PYHOME}/drawing.py -o draw_2D_shad \
311          -f ${infile}_${filetail}.nc -S ${values} -v ${var}
312        exit
313      else
314        mv 2Dfields_shadow.pdf ${ofold}/figs/${stdn}_hor.pdf
315        if test $vis -eq 1; then evince ${ofold}/figs/${stdn}_hor.pdf & fi
316      fi
317      fi
318
319      if test $doneig -eq 1; then
320# Neighbourghood plot
321      filetail=''
322
323      min=`echo ${varvals} | tr ',' ' ' | awk '{print $5}'`
324      max=`echo ${varvals} | tr ',' ' ' | awk '{print $6}'`
325
326      if test ${vt} = 'dt'; then
327        min='Spercentile@1'
328        max='Spercentile@1'
329      elif test ${vt} = 'st'; then
330        min='Saroundminmax@0.97'
331        max='Saroundminmax@0.97'
332      fi
333
334      if test ${var} = 'LRH2M'; then
335        max='100.'
336      elif test ${var} = 'T2'; then
337        min='270'
338        max='300.'
339      fi
340
341      echo "    min: "${min}" max: "${max}
342
343      values=${stdn}':Time|-1|Times,bottom_top|'${zval}'|ZNU,south_north|'${yval}
344      values=${values}'|XLAT,west_east|'${xval}'|XLONG:south_north,west_east:5:auto:'
345      values=${values}'time|($[DD]^{[HH]}$),time|($[DD]^{[HH]}$):exct,2,h|exct,1,d:'
346      values=${values}'$%d^{%H}$,$%d^{%H}$:5|pts|neighbourghood|temporal|evolution:'
347      values=${values}${min}','${max}':'${cbar}':pdf:False'
348
349      python ${PYHOME}/drawing.py -o draw_Neighbourghood_evol -f ${infile}           \
350        -S ${values} -v ${var}
351      if test $? -ne 0; then
352        echo ${errormsg}
353        echo "  "${main}": drawing.py fails!"
354        echo python ${PYHOME}/drawing.py -o draw_Neighbourghood_evol \
355          -f ${infile} -S ${values} -v ${var}
356        exit
357      else
358        mv Neighbourghood_evol.pdf ${ofold}/figs/${stdn}_Neighbourghood_evol.pdf
359        if test $vis -eq 1; then evince ${ofold}/figs/${stdn}_Neighbourghood_evol.pdf & fi
360      fi
361      fi
362
363#      exit
364    done
365  done
366  fi
367
368# LaTeX file generation
369##
370#
371  if test $dolatex -eq 1; then
372  echo "  LaTeX file '"${otex}"' generation..."
373  if test ${tval} -eq -1; then tvalS='last'; fi
374
375  cat << EOF > ${otex}
376\\documentclass{article}
377\\usepackage{graphicx}
378
379\\textwidth=18cm
380\\textheight=23cm
381\\oddsidemargin=-1cm
382\\evensidemargin=-1cm
383\\topmargin=-1cm
384
385\\begin{document}
386
387\\title{checking LMDZ at time=${tval}, z=${zval}, y=${yval}, x=${xval}}
388\\author{}
389
390\\maketitle
391EOF
392  for vt in ${vtypes}; do
393    echo "variable type: "${vt}
394    case $vt in
395      'dt' )
396        vars=`echo ${dtvariables} | tr ':' ' '`
397        ivar=1
398        for var in ${vars}; do
399          varvals=`python ${PYHOME}/drawing.py -o variable_values -S LDQ${var} \
400            | grep all_values`
401#          varn=`echo ${varvals} | tr ',' ' ' | awk '{print $3}'`
402          varn=`echo ${var} | tr '[:upper:]' '[:lower:]'`
403          ln=`echo ${varvals} | tr ',' ' ' | awk '{print $7}'`
404          echo "    var: "${varn}
405
406          cat << EOF >> ${otex}
407% d[q/t]_${varn}
408%%
409
410\\begin{figure}
411\\begin{center}
412\\begin{tabular}{cc}
413\\includegraphics[height=0.2\\textheight]{figs/dq${varn}_hor}
414&
415\\includegraphics[height=0.2\\textheight]{figs/dt${varn}_hor}
416\\\\
417\\includegraphics[height=0.2\\textheight]{figs/dq${varn}_Hovmoller}
418&
419\\includegraphics[height=0.2\\textheight]{figs/dt${varn}_Hovmoller}
420\\\\
421\\includegraphics[height=0.2\\textheight]{figs/dq${varn}_TimeSeries}
422&
423\\includegraphics[height=0.2\\textheight]{figs/dt${varn}_TimeSeries}
424\\\\
425\\includegraphics[height=0.2\\textheight]{figs/dq${varn}_Neighbourghood_evol}
426&
427\\includegraphics[height=0.2\\textheight]{figs/dt${varn}_Neighbourghood_evol}
428\\end{tabular}
429EOF
430          if test ${ivar} -eq 1; then
431            firstvar=${varn}
432            caption='\caption{Instantaneaous value at time='${tvalS}', z='${zval}
433            caption=${caption}' level of humidity tendency due to '${varn}' (top left)'
434            caption=${caption}', thermal tendency (top right), temporal evolution of '
435            caption=${caption}'the vertical profile at yval='${yval}', xval='${xval}
436            caption=${caption}'humidity tendency (2nd row left), thermal tendency '
437            caption=${caption}'(2nd row right), temporal evolution at the given point'
438            caption=${caption}' (3rd row), evolution of a box of 5x5 centered on the '
439            caption=${caption}'point (bottom)}'
440          else
441            caption='\caption{As in figure \ref{fig:d_qt_'${firstvar}'}, but for '
442            caption=${caption}${varn}'}'
443          fi
444          cat << EOF >> ${otex}
445${caption}
446\\label{fig:d_qt_${varn}}
447\\end{center}
448\\end{figure}
449EOF
450# LD[U/V]
451##
452          if test ${var} = 'CON' || test ${var} = 'DYN' || test ${var} = 'VDF'; then
453            varvals=`python ${PYHOME}/drawing.py -o variable_values -S LDU${var} \
454              | grep all_values`
455#          varn=`echo ${varvals} | tr ',' ' ' | awk '{print $3}'`
456            varn=`echo ${var} | tr '[:upper:]' '[:lower:]'`
457            ln=`echo ${varvals} | tr ',' ' ' | awk '{print $7}'`
458            echo "    var: "${varn}
459
460            cat << EOF >> ${otex}
461% d[u/v]_${varn}
462%%
463
464\\begin{figure}
465\\begin{center}
466\\begin{tabular}{cc}
467\\includegraphics[height=0.2\\textheight]{figs/du${varn}_hor}
468&
469\\includegraphics[height=0.2\\textheight]{figs/dv${varn}_hor}
470\\\\
471\\includegraphics[height=0.2\\textheight]{figs/du${varn}_Hovmoller}
472&
473\\includegraphics[height=0.2\\textheight]{figs/dv${varn}_Hovmoller}
474\\\\
475\\includegraphics[height=0.2\\textheight]{figs/du${varn}_TimeSeries}
476&
477\\includegraphics[height=0.2\\textheight]{figs/dv${varn}_TimeSeries}
478\\\\
479\\includegraphics[height=0.2\\textheight]{figs/du${varn}_Neighbourghood_evol}
480&
481\\includegraphics[height=0.2\\textheight]{figs/dv${varn}_Neighbourghood_evol}
482\\end{tabular}
483EOF
484            caption='\caption{As in figure \ref{fig:d_qt_'${firstvar}'}, but for '
485            caption=${caption}${varn}'}'
486            cat << EOF >> ${otex}
487${caption}
488\\label{fig:d_qu_${varn}}
489\\end{center}
490\\end{figure}
491EOF
492          fi
493          ivar=`expr ${ivar} + 1`
494        done
495cat << EOF >> ${otex}
496\\clearpage
497EOF
498      ;;
499      'sfc' )
500        vars=`echo ${sfcvariables} | tr ':' ' '`
501        ivar=1
502        for var in ${vars}; do
503          varvals=`python ${PYHOME}/drawing.py -o variable_values -S ${var} \
504            | grep all_values`         
505          varn=`echo ${varvals} | tr ',' ' ' | awk '{print $3}'`
506          ln=`echo ${varvals} | tr ',' ' ' | awk '{print $7}'`
507          cat << EOF >> ${otex}
508% ${varn}
509%%
510
511\\begin{figure}
512\\begin{center}
513\\begin{tabular}{ccc}
514\\includegraphics[width=0.33\\textwidth]{figs/${varn}_hor}
515&
516\\includegraphics[width=0.33\\textwidth]{figs/${varn}_TimeSeries}
517&
518\\includegraphics[width=0.33\\textwidth]{figs/${varn}_Neighbourghood_evol}
519\\end{tabular}
520EOF
521          if test ${ivar} -eq 1; then
522            firstvar=${varn}
523            caption='\caption{Instantaneaous value at time='${tvalS}' of '${varn}
524            caption=${caption}' (left), temporal evolution at the given point'
525            caption=${caption}' (middle), evolution of a box of 5x5 centered on the '
526            caption=${caption}'point (right)}'
527          else
528             caption='\caption{As in figure \ref{fig:state_'${firstvar}'}, but for '
529             caption=${caption}${varn}'}'
530          fi
531          cat << EOF >> ${otex}
532${caption}
533\\label{fig:state_${varn}}
534\\end{center}
535\\end{figure}
536EOF
537          ivar=`expr ${ivar} + 1`
538        done
539cat << EOF >> ${otex}
540\\clearpage
541EOF
542      ;;
543      'st' )
544        vars=`echo ${stvariables} | tr ':' ' '`
545        ivar=1
546        for var in ${vars}; do
547          varvals=`python ${PYHOME}/drawing.py -o variable_values -S ${var} \
548            | grep all_values`         
549          varn=`echo ${varvals} | tr ',' ' ' | awk '{print $3}'`
550          ln=`echo ${varvals} | tr ',' ' ' | awk '{print $7}'`
551          cat << EOF >> ${otex}
552% ${varn}
553%%
554
555\\begin{figure}
556\\begin{center}
557\\begin{tabular}{cc}
558\\includegraphics[width=0.5\\textwidth]{figs/${varn}_hor}
559&
560\\includegraphics[width=0.5\\textwidth]{figs/${varn}_Hovmoller}
561\\\\
562\\includegraphics[width=0.5\\textwidth]{figs/${varn}_TimeSeries}
563&
564\\includegraphics[width=0.5\\textwidth]{figs/${varn}_Neighbourghood_evol}
565\\end{tabular}
566EOF
567          if test ${ivar} -eq 1; then
568            firstvar=${varn}
569            caption='\caption{Instantaneaous value at time='${tvalS}', z='${zval}
570            caption=${caption}' level of '${varn}' (top left), temporal evolution of the'
571            caption=${caption}' vertical profile at yval='${yval}', xval='${xval}
572            caption=${caption}' (top right), temporal evolution at the given point '
573            caption=${caption}' (bottom left), evolution of a box of 5x5 centered on the '
574            caption=${caption}'point (bottom right)}'
575          else
576             caption='\caption{As in figure \ref{fig:state_'${firstvar}'}, but for '
577             caption=${caption}${varn}'}'
578          fi
579          cat << EOF >> ${otex}
580${caption}
581\\label{fig:state_${varn}}
582\\end{center}
583\\end{figure}
584EOF
585          ivar=`expr ${ivar} + 1`
586        done
587cat << EOF >> ${otex}
588\\clearpage
589EOF
590      ;;
591    esac
592  done
593  cat << EOF >> ${otex}
594\\end{document}
595EOF
596  otexn=`echo ${otex} | tr '.' ' ' | awk '{print $1}'`
597  cd ${ofold}
598  pdflatex ${otexn}
599  pdflatex ${otexn}
600  evince ${otexn}.pdf &
601  cd ${rootsh}
602  fi
603fi
604
Note: See TracBrowser for help on using the repository browser.