Subversion Repositories lagranto.icon

Rev

Details | Last modification | View Log | RSS feed

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