Subversion Repositories lagranto.arpege

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 michaesp 1
#!/bin/csh
2
 
3
 
4
# Write usage information
5
if ( ${#argv} == 0) then
6
 echo 
7
  /home/binderh/prog/programs/lagranto.mf/bin/lagrantohelp list2lsl short
8
  echo  
9
  exit 0
10
endif
11
 
12
set inpfile=$1
13
set outfile=$2
14
 
15
set refdate   = `date +'%Y%m%d_%H%M'`
16
set timevalue = 0
17
 
18
while ( $#argv > 0 )
19
 
20
   switch ( $argv[1] )
21
 
22
   case -ref
23
     set refdate=$argv[2]
24
     shift;
25
   breaksw
26
 
27
   case -time
28
     set timevalue=$argv[2]
29
     shift;
30
   breaksw
31
 
32
  endsw
33
 
34
  shift;
35
 
36
end
37
 
38
set ntra=`wc -l ${inpfile} | awk '{print $1}'`
39
 
40
# Split the reference date
41
set yyyy=`echo ${refdate}   | cut -c 1-4`
42
set   mm=`echo ${refdate}   | cut -c 5-6`
43
set   dd=`echo ${refdate}   | cut -c 7-8`
44
set   hh=`echo ${refdate}   | cut -c 10-11`
45
set  min=`echo ${refdate}00 | cut -c 12-13`
46
 
47
\rm -f list2lsl.param
48
echo \"${inpfile}\"                      >! list2lsl.param
49
echo \"${outfile}\"                      >> list2lsl.param
50
echo ${ntra}                             >> list2lsl.param
51
echo ${yyyy} ${mm} ${dd} ${hh} ${min} 00 >> list2lsl.param 
52
echo ${timevalue}                        >> list2lsl.param 
53
 
54
/home/binderh/prog/programs/lagranto.mf/goodies/list2lsl
55
 
56
\rm -f list2lsl.param
57
 
58
exit 0
59