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