/[lmdze]/trunk/Scripts/Movie/movie_LMDZ.sh
ViewVC logotype

Contents of /trunk/Scripts/Movie/movie_LMDZ.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (show annotations)
Wed Feb 27 13:16:39 2008 UTC (16 years, 3 months ago) by guez
File MIME type: application/x-sh
File size: 2032 byte(s)
Initial import
1 # This is a script in Bash.
2
3 trap 'exit 1' ERR
4 ##set -x
5
6 read -p "Run number? " run_numb
7
8 read -p "Scalar or vector? (s/v) "
9 if [[ $REPLY = s ]]
10 then
11 read -p "Name of variable? " name
12 read -p "Lower limit? " min
13 read -p "Upper limit? " max
14 read -p "Number of spatial dimensions? (2 or 3) " dim
15 if ((dim == 2))
16 then
17 read -p "Average zonally? (y/n) "
18 if [[ $REPLY = y ]]
19 then
20 # Ferret script name:
21 scr_name=rep_ave_pl.jnl
22 # Parameters for the Ferret script:
23 set $name $run_numb $min $max
24 # Name of output movie file:
25 out_name=${name}_x_ave.gif
26 else
27 read -p "Interval between levels of color palette? " interv
28 # Ferret script name:
29 scr_name=rep_fill.jnl
30 # Parameters for the Ferret script:
31 set $name $run_numb $min $max $interv
32 # Name of output movie file:
33 out_name=$name.gif
34 fi
35 else
36 # 3 spatial dimensions
37 read -p "Interval between levels of color palette? " interv
38 # Ferret script name:
39 scr_name=rep_ave_f.jnl
40 # Parameters for the Ferret script:
41 set $name $run_numb $min $max $interv
42 # Name of output movie file:
43 out_name=${name}_x_ave.gif
44 fi
45 else
46 # Vector
47 read -p "Name of variable 1? " name1
48 read -p "Name of variable 2? " name2
49 read -p "Standard vector length? " vec_len
50 # Ferret script name:
51 scr_name=rep_vect.jnl
52 # Parameters for the Ferret script:
53 set $name1 $name2 $run_numb $vec_len
54 # Name of output movie file:
55 out_name=${name1}_${name2}.gif
56 fi
57
58 cd ~/Documents/Utilisation_LMDZ/Results_gcm/$run_numb
59 echo "Running \"$scr_name $*\""
60
61 movie.sh ~/Documents/Informatique_fonctionnement/Programs/LMDZE_program/Scripts/$scr_name "$*"
62 # (In older versions of Ferret, there should be a single argument
63 # after the script name. Therefore, for those versions, it is
64 # necessary to enclose $* between quotes.)
65
66 mv movie.gif $out_name
67 echo "Moved \"movie.gif\" to \"$out_name\"."
68 gifview -a $out_name &

Properties

Name Value
svn:eol-style native
svn:executable

  ViewVC Help
Powered by ViewVC 1.1.21