source: trunk/step2_diff.sh @ 48

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#
46system=$(uname)
47case "${system}" in
48   AIX|IRIX64)
49      echo " www : no specific posix checking"
50   ;;
51   *)
52      set -o posix
53   ;;
54esac
55unset system
56#
57command=$(basename ${0})
58#
59usage=" Usage : ${command} -y year"
60#
61while [ ${#} -gt 0 ]
62do
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
77done
78unset usage
79#
80# ++ check year validity
81#
82# remove previous output file
83rm Sigma_5d_${year}_grid_T_ORCA2_diff.nc
84#
85# build IDL sequence of commands
86cat <<EOF > /tmp/${command}${$}.pro
87year=getenv('year')
88file1= '/usr/work/sur/fvi/OPA/ORCA2/' + '/Sigma_5d_'+year+'_grid_T.nc'
89file2=getenv('GEOMAG_OD') + '/Sigma_5d_'+year+'_grid_T_ORCA2.nc'
90step2_diff, file1, file2, 'Sigma_5d_'+year+'_grid_T_ORCA2_diff.nc'
91EOF
92#
93unset 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
102exit 0
Note: See TracBrowser for help on using the repository browser.