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