source: trunk/step2_diff.sh @ 39

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