Last change
on this file since 39 was
39,
checked in by pinsard, 15 years ago
|
ResST comments in shell scripts
|
-
Property svn:executable set to
*
-
Property svn:keywords set to
Id
|
File size:
1.4 KB
|
Line | |
---|
1 | #! /bin/sh |
---|
2 | # |
---|
3 | #+ |
---|
4 | # |
---|
5 | # NAME |
---|
6 | # ==== |
---|
7 | # |
---|
8 | # step2_diff.sh - launch step2_diff.pro with year argument |
---|
9 | # |
---|
10 | # |
---|
11 | # SYNOPSYS |
---|
12 | # ======== |
---|
13 | # |
---|
14 | # :: |
---|
15 | # |
---|
16 | # $ step2_diff.sh -y year |
---|
17 | # |
---|
18 | # EXAMPLES |
---|
19 | # ======== |
---|
20 | # |
---|
21 | # For test on year 1994: |
---|
22 | # :: |
---|
23 | # |
---|
24 | # $ ./step2_diff.sh -y 1994 |
---|
25 | # |
---|
26 | # FILES |
---|
27 | # ===== |
---|
28 | # |
---|
29 | # original location |
---|
30 | # ~~~~~~~~~~~~~~~~~ |
---|
31 | # |
---|
32 | # /usr/home/fplod/incas/geomag/geomag_ws/step2_diff.sh sur aedon.locean-ipsl.upmc.fr |
---|
33 | # |
---|
34 | # EVOLUTIONS |
---|
35 | # ========== |
---|
36 | # |
---|
37 | # $Id$ |
---|
38 | # |
---|
39 | # - fplod 2007-08-22T08:50:02Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
40 | # |
---|
41 | # * creation to avoid retall and redefinition of file1 and file2 |
---|
42 | # |
---|
43 | #- |
---|
44 | # |
---|
45 | system=$(uname) |
---|
46 | case "${system}" in |
---|
47 | AIX|IRIX64) |
---|
48 | echo " www : no specific posix checking" |
---|
49 | ;; |
---|
50 | *) |
---|
51 | set -o posix |
---|
52 | ;; |
---|
53 | esac |
---|
54 | # |
---|
55 | command=$(basename ${0}) |
---|
56 | # |
---|
57 | usage=" Usage : ${command} -y year" |
---|
58 | # |
---|
59 | while [ ! -z "${1}" ] # ++ pb bash |
---|
60 | do |
---|
61 | case ${1} in |
---|
62 | -y) # year |
---|
63 | year=${2} |
---|
64 | shift |
---|
65 | ;; |
---|
66 | *) # other choice |
---|
67 | echo "${usage}" |
---|
68 | exit 1 |
---|
69 | ;; |
---|
70 | esac |
---|
71 | shift # next flag |
---|
72 | done |
---|
73 | # |
---|
74 | # ++ check year validity |
---|
75 | # |
---|
76 | # remove previous output file |
---|
77 | rm Sigma_5d_${year}_grid_T_ORCA2_diff.nc |
---|
78 | # |
---|
79 | # build IDL sequence of commands |
---|
80 | cat <<EOF > /tmp/${command}${$}.pro |
---|
81 | year=getenv('year') |
---|
82 | file1= '/usr/work/sur/fvi/OPA/ORCA2/' + '/Sigma_5d_'+year+'_grid_T.nc' |
---|
83 | file2=getenv('GEOMAG_OD') + '/Sigma_5d_'+year+'_grid_T_ORCA2.nc' |
---|
84 | step2_diff, file1, file2, 'Sigma_5d_'+year+'_grid_T_ORCA2_diff.nc' |
---|
85 | EOF |
---|
86 | # |
---|
87 | # launch IDL with the sequence |
---|
88 | ${IDL_DIR}/bin/idl < /tmp/${command}${$}.pro |
---|
89 | # |
---|
90 | # cleanning |
---|
91 | #++rm /tmp/${command}${$}.pro |
---|
92 | # |
---|
93 | # end |
---|
94 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.