/[lmdze]/trunk/Scripts/etat0_lim.sh
ViewVC logotype

Contents of /trunk/Scripts/etat0_lim.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 22 - (show annotations)
Fri Jul 31 15:18:47 2009 UTC (14 years, 11 months ago) by guez
File MIME type: application/x-sh
File size: 2409 byte(s)
Superficial modifications
1 # This is a script in Bash.
2
3 # This script collects input files necessary for the program
4 # "etat0_lim" and runs "etat0_lim". Run this script in the directory
5 # where you want "etat0_lim" to run. The "ln" command does not report
6 # missing targets, so we check them first.
7
8 # Specify directories:
9
10 in_dir=~/Documents/Utilisation_LMDZ/Input_etat0_lim
11 ##in_dir=$workdir/LMDZE/Input_etat0_lim
12
13 data_dir=~/Documents/Datasets
14
15 executable_dir=/usr/local/guez/LMDZ/LMDZE_work/Compil_prod_g95
16 ##executable_dir=$workdir/LMDZE/Compil_prod
17
18 res_dir=/usr/local/guez/LMDZ/LMDZE_work/Results_etat0_lim
19 # (only for comparison with a previous run)
20
21 read -p \
22 "Identifier for the set of parameters (\"*.def\" files and namelists)? " \
23 iel_id
24
25 my_host=`hostname`
26
27 if [[ $my_host = brodie ]]
28 then
29 # (The signal "ERR" does not exist with the old Bash version
30 # 2.05.8 on Brodie.)
31 set -xe
32 else
33 trap 'echo -e \\a; exit 1' ERR
34 set -x
35 fi
36
37 if [[ $my_host = vierne ]]
38 then
39 # This is only useful if the program was compiled with G95:
40 G95_FPU_UNDERFLOW=${G95_FPU_UNDERFLOW:+No}
41 fi
42
43 rm -f limit.nc start.nc startphy.nc coefoz_LMDZ.nc
44 # (If these are symbolic links then the Fortran program might not be
45 # able to replace them.)
46
47 test -d $in_dir/$iel_id
48
49 cd $data_dir
50 test -f Albedo.nc
51 test -f amipbc_sic_1x1.nc
52 test -f amipbc_sst_1x1.nc
53 test -f ECPHY.nc
54 test -f ECDYN.nc
55 test -f landiceref.nc
56 test -f Relief.nc
57 test -f Ozone/coefoz_v2_8.nc
58 test -f Rugos.nc
59 cd -
60
61 ln -s -f $data_dir/Albedo.nc $data_dir/amipbc_*.nc $data_dir/ECPHY.nc $data_dir/ECDYN.nc $data_dir/landiceref.nc $data_dir/Relief.nc $data_dir/Rugos.nc .
62
63 ln -sf $data_dir/Ozone/coefoz_v2_8.nc coefoz.nc
64
65 rm -f *.def
66 test -f $in_dir/$iel_id/run.def
67 ln -s -f $in_dir/$iel_id/*.def .
68
69 if [[ $my_host = brodie ]]
70 then
71 rsh brodie01 \
72 export F_PROGINF=YES \; \
73 cd $PWD \; \
74 $executable_dir/etat0_lim <$in_dir/$iel_id/etat0_lim_nml.txt \
75 >etat0_lim_out.txt 2>etat0_lim_err.txt
76 elif [[ $my_host = zahir* ]]
77 then
78 hpmcount $executable_dir/etat0_lim <$in_dir/$iel_id/etat0_lim_nml.txt \
79 >etat0_lim_out.txt 2>etat0_lim_err.txt
80 else
81 time $executable_dir/etat0_lim <$in_dir/$iel_id/etat0_lim_nml.txt \
82 >etat0_lim_out.txt 2>etat0_lim_err.txt
83 fi
84
85 echo -e '\a' # beep
86 set +x
87 read -p "Previous run number for comparison [none] ? "
88 if [[ -n $REPLY ]]
89 then
90 selective_diff.sh $res_dir/${REPLY# } .
91 fi

Properties

Name Value
svn:eol-style native
svn:executable

  ViewVC Help
Powered by ViewVC 1.1.21