Subversion Repositories lagranto.wrf

Rev

Rev 2 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 10
1
#!/bin/csh
1
#!/bin/csh
2
 
2
 
3
# -----------------------------------------------------------------------------
3
# -----------------------------------------------------------------------------
4
# Set some parameters
4
# Set some parameters
5
# -----------------------------------------------------------------------------
5
# -----------------------------------------------------------------------------
6
 
6
 
7
# Write usage information
7
# Write usage information
8
if ( ${#argv} == 0) then
8
if ( ${#argv} == 0) then
9
  echo 
9
  echo 
10
  ${LAGRANTO}/bin/lagrantohelp mergetra short 
10
  ${LAGRANTO}/bin/lagrantohelp mergetra short 
11
  echo  
11
  echo  
12
  exit 0
12
  exit 0
13
endif
13
endif
14
 
14
 
15
# Set input file
15
# Set input file
16
set inpfile1 = $1
16
set inpfile1 = $1
17
set inpfile2 = $2
17
set inpfile2 = $2
18
set outfile  = $3
18
set outfile  = $3
19
shift; shift; shift
19
shift; shift; shift
20
 
20
 
21
# Handle optional arguments 
21
# Handle optional arguments 
22
set datecheck = "datecheck"
22
set datecheck = "datecheck"
23
while ( $#argv > 0 )
23
while ( $#argv > 0 )
24
   if ( "$1" == "-nodatecheck" ) set datecheck="nodatecheck"
24
   if ( "$1" == "-nodatecheck" ) set datecheck="nodatecheck"
25
   shift
25
   shift
26
end
26
end
27
 
27
 
28
# Set Fortran program
28
# Set Fortran program
29
set prog=${LAGRANTO}/goodies/mergetra
29
set prog=${LAGRANTO}/goodies/mergetra
30
 
30
 
31
# -----------------------------------------------------------------------------
31
# -----------------------------------------------------------------------------
32
# Run program 
32
# Run program 
33
# -----------------------------------------------------------------------------
33
# -----------------------------------------------------------------------------
34
 
34
 
35
set dims1=`${LAGRANTO}/goodies/trainfo.sh ${inpfile1} dim` 
35
set dims1=`${LAGRANTO}/goodies/trainfo.sh ${inpfile1} dim` 
36
set dims2=`${LAGRANTO}/goodies/trainfo.sh ${inpfile2} dim` 
36
set dims2=`${LAGRANTO}/goodies/trainfo.sh ${inpfile2} dim` 
37
 
37
 
38
\rm -f mergetra.param
38
\rm -f mergetra.param
39
echo \"${inpfile1}\"  >! mergetra.param 
39
echo \"${inpfile1}\"  >! mergetra.param 
40
echo \"${inpfile2}\"  >> mergetra.param
40
echo \"${inpfile2}\"  >> mergetra.param
41
echo \"${outfile}\"   >> mergetra.param
41
echo \"${outfile}\"   >> mergetra.param
42
echo ${dims1}         >> mergetra.param
42
echo ${dims1}         >> mergetra.param
43
echo ${dims2}         >> mergetra.param
43
echo ${dims2}         >> mergetra.param
44
echo \"${datecheck}\" >> mergetra.param
44
echo \"${datecheck}\" >> mergetra.param
45
 
45
 
46
${prog}
46
${prog}
47
 
47
 
48
exit 0
48
exit 0
49
 
49