Subversion Repositories lagranto.um

Rev

Rev 13 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 michaesp 1
#!/bin/csh
2
 
15 michaesp 3
# Set Lagranto 
4
set LAGRANTO = ${LAGRANTOBASE}.${MODEL}/
5
 
3 michaesp 6
# ---------------------------------------------------------------------
7
# Usage, parameter settings
8
# ---------------------------------------------------------------------
9
 
10
# Write usage information
11
if ( (${#argv} == 0) | (${#argv} < 2) ) then
12
  echo 
13
  echo "--------------------------------------------------------------"
14
  echo " Usage: trace.sh inpfile outfile [flags]        "
15
  echo 
16
  echo "        inpfile   : Input trajectory file                     "
17
  echo "        outfile   : Output trajectory file                    "
18
  echo "        [ flags ] : Optional list of flags                    "
19
  echo
20
  echo " Optional flags                                               "
21
  echo
22
  echo "        -i hours     : Time increment for input files in hours"
23
  echo "        -v filename  : Name of tracing file                   "
24
  echo "        -f var scale : Trace field <var> with scaling <scale> "
25
  echo "        -changet     : change times on P,S files before calculation" 
26
  echo "        -noclean     : do not remove temporary files"
27
  echo 
28
  echo " Tracing variables must be available on file <tracevars>, if not"
29
  echo " provided with "-f" option. The format of the <tracevars> file is"
30
  echo  
31
  echo "           varname   scale    compflag[0|1]   prefix[P|S]     "
32
  echo
33
  echo " The tracing variables have the following form                "
34
  echo 
35
  echo "             varname[:shift] with <shift> as + 100 km[lat]    "
36
  echo "                                             - 100 km[lon]    "
37
  echo "                                             + 2 dlon         "
38
  echo "                                             - 2 dlat         "
39
  echo "                                             + 50 hPa         "
40
  echo "                                             - 1 dp           "
41
  echo "                                             + 6 h            "
42
  echo "                                             - 180 min        "
43
  echo
44
  echo " The following fields can be computed 'online':               "
45
  echo
46
  echo " TH, RHO, RH, THE, LHR, DUDX, DVDX, DTDX, DUDY, DVDY, DTDY,    " 
47
  echo " DUDP, DVDP, DTDP, DTHDP, NSQ, RELVORT, ABSVORT, DIV, DTHDX,"
48
  echo " DTHDY, PV, RI, TI"
49
  echo "--------------------------------------------------------------"
50
  exit 0
51
endif
52
 
53
# Write title
54
echo 
55
echo '========================================================='
56
echo '       *** START OF PREPROCESSOR TRACE ***              '
57
echo
58
 
59
# Get the arguments
60
set inpfile   = $1
61
set outfile   = $2
62
 
63
# Set base directories (run+prog)
64
set cdfdir=${PWD}
65
set tradir=${PWD}
66
 
67
# Set program paths and filenames 
68
set parfile = ${tradir}/trace.param 
69
set prog    = ${LAGRANTO}/trace/trace
70
 
71
# Set the prefix of the primary and secondary data files
72
set charp = 'P'
73
set chars = 'S'
74
 
75
echo '---- DIRECTORIES AND PROGRAMS ---------------------------'
76
echo    
77
echo "CDF directory         : ${cdfdir}"
78
echo "TRA directory         : ${tradir}"
79
echo "PROGRAM TRACE         : ${prog}"
80
echo "PARAMETER file        : ${parfile}"
81
echo
82
 
83
# ---------------------------------------------------------------------
84
# Set optional flags
85
# ---------------------------------------------------------------------
86
 
87
echo '---- OPTIONAL FLAGS -------------------------------------'
88
echo
89
 
90
# Set some default values ("nil" must be set according to input files)
91
set flag_i     = "nil"
92
set flag_v     = "tracevars"
93
set flag_f     = "nil"
94
set tvfile     = 'tracevars'
95
set changet    = 'false'
96
set noclean    = 'false'
97
set timecheck  = 'yes' 
98
 
99
# Set flag for consitency
100
set isok = 1
101
 
102
while ( $#argv > 0 )
103
 
104
  switch ( $argv[1] )
105
 
106
   case -i
107
     set flag_i=$argv[2]
108
     echo "Flag '-i'     -> ${flag_i} (user defined)"
109
     shift;
110
   breaksw
111
 
112
   case -v
113
     set flag_v="-v"
114
     set tvfile=$argv[2]
115
     echo "Flag '-v'     -> ${tvfile} (user defined)"
116
     shift;
117
     if ( $isok == 2 ) set isok = 0
118
     if ( $isok == 1 ) set isok = 2
119
   breaksw
120
 
121
   case -f
122
     set flag_f="-f"
123
     set tvfile="tracevars.tmp"
124
     shift;
125
     set tvar="$argv[1]"
126
     shift;
127
     set tscale="$argv[1]"
128
     echo "Flag '-f'     -> ${tvar} ${tscale} (user defined)"
129
     if ( $isok == 2 ) set isok = 0
130
     if ( $isok == 1 ) set isok = 2
131
   breaksw
132
 
133
   case -changet
134
     set changet = 'true'
135
     echo "changet       -> true (user defined)"
136
   breaksw
137
 
138
   case -noclean
139
     set noclean = 'true'
140
     echo "noclean       -> true (user defined)"
141
   breaksw
142
 
143
   case -notimecheck
144
     set timecheck = 'no'
145
     echo "timecheck               -> no (user defined)"
146
   breaksw
147
 
148
  endsw
149
 
150
  shift;
151
 
152
end
153
 
154
# No change of times necessary if no check requested
155
if ( "${timecheck}" == "no" ) then
156
   set  changet = 'false'
157
endif
158
 
159
# Check consitency of arguments
160
if ( $isok == 0 ) then
161
    echo
162
    echo " ERROR: Use either option '-v' or '-f', but not both..."
163
    exit 1
164
endif
165
 
166
# ---------------------------------------------------------------------
167
# Handle the input trajectory file
168
# ---------------------------------------------------------------------
169
 
170
echo
171
echo '---- TIME RANGE -----------------------------------------'
172
echo
173
 
174
# Check whether the input file can be found
175
if ( ! -f ${inpfile} ) then
176
    echo " ERROR : Input file ${inpfile} is missing"
177
    exit 1
178
endif
179
 
180
# Get the start, end and reference date for the tracing
181
set startdate = `${LAGRANTO}/goodies/trainfo.sh ${inpfile} startdate` 
182
set enddate   = `${LAGRANTO}/goodies/trainfo.sh ${inpfile} enddate` 
183
set refdate   = `${LAGRANTO}/goodies/trainfo.sh ${inpfile} refdate` 
184
set ntra      =  `${LAGRANTO}/goodies/trainfo.sh ${inpfile} ntra`
185
set ntim      =  `${LAGRANTO}/goodies/trainfo.sh ${inpfile} ntim`
186
set ncol      =  `${LAGRANTO}/goodies/trainfo.sh ${inpfile} ncol`
187
 
188
# Check format of start and end date - must be the same
189
set ns=`echo $startdate | sed -e 's/_[0-9]*//' | wc -c`
190
set ne=`echo $enddate   | sed -e 's/_[0-9]*//' | wc -c`
191
if ( $ns != $ne ) then
192
  echo " ERROR: start and end date must be in the same format ***"
193
  exit 1
194
endif
195
if ( $ns != 9 ) then
196
  echo " ERROR: Date format must be yyyymmdd ***"
197
  exit 1
198
endif
199
set ns=`echo $startdate | sed -e 's/[0-9]*_//' | wc -c`
200
set ne=`echo $enddate   | sed -e 's/[0-9]*_//' | wc -c`
201
if ( $ns != $ne ) then
202
  echo " ERROR: start and end date must be in the same format ***"
203
  exit 1
204
endif
205
if ( ( $ns != 5 ) & ( $ns != 3 ) ) then
206
  echo " ERROR: Time format must be hh(mm) ***"
207
  exit 1
208
endif
209
 
210
# Split the start and end date into <yymmdd_hh and mm>
211
set startdate_ymdh = `echo $startdate | cut -c 1-11`
212
set startdate_min  = `echo $startdate | cut -c 12-13`
213
if ( $startdate_min == "" ) set startdate_min = 00
214
 
215
set enddate_ymdh = `echo $enddate | cut -c 1-11`
216
set enddate_min  = `echo $enddate | cut -c 12-13`
217
if ( $enddate_min == "" ) set enddate_min = 00
218
 
219
# Get the time difference between <start_ymdh> and <end_ymdh> date
220
# Decide whether trajectoriesare forward or backward
221
set timediff_hh = `${LAGRANTO}/goodies/gettidiff ${enddate_ymdh} ${startdate_ymdh}`
222
 
223
if ( $timediff_hh == 0 ) then
224
  if ( $enddate_min > $startdate_min ) then
225
    set direction = f
226
    set idir      = 1
227
  else
228
    set direction = b
229
    set idir      = -1
230
  endif
231
else if ( $timediff_hh > 0 ) then
232
  set direction = f
233
  set idir      = 1
234
else
235
  set direction = b
236
  set idir      = -1
237
  @ timediff_hh = $idir * $timediff_hh
238
endif
239
 
240
# Get also minutes for time difference, if <start_min> or <end_min> != 0
241
set timediff_mm=
242
 
243
if ( $startdate_min != 00 || $enddate_min != 00 ) then
244
  @ min = ( $enddate_min - $startdate_min )
245
  if ( $min == 0 ) then
246
    set timediff_mm=
247
  else if ( $min > 0 ) then
248
    if ( $idir == 1 ) then
249
      set timediff_mm=$min
250
    else
251
      @ timediff_hh --
252
      @ timediff_mm = 60 - $min
253
    endif
254
  else
255
    if ( $idir == 1 ) then
256
      @ timediff_hh --
257
      @ timediff_mm = 60 + $min
258
    else
259
      @ timediff_mm = 0 - $min
260
    endif
261
  endif
5 michaesp 262
else
263
  set timediff_mm = 0
3 michaesp 264
endif
265
 
266
# Write status information
267
echo "Time range      : ${startdate} -> ${enddate}"
268
if ( ${timediff_mm} != "" ) then
269
   echo "Time difference : ${timediff_hh} h ${timediff_mm} min"
270
else
271
   echo "Time difference : ${timediff_hh} h"
272
endif
273
echo "Direction       : ${direction} (${idir})"
274
 
275
# ---------------------------------------------------------------------
276
# Check availability of input data 
277
# ---------------------------------------------------------------------
278
 
279
echo
280
echo '---- INPUT FILES ----------------------------------------'
281
echo
282
 
283
# Take the time increment from flag list ('nil', if not defined)
284
set timeinc = ${flag_i}
285
 
286
# Find a first data file (if possible corresponding to start/end date
287
# If starttime is not a data time, take the first file in the direectory
288
if ( $direction == "f" ) then
289
  set file=${charp}${startdate_ymdh}
290
else
291
  set file=${charp}${enddate_ymdh}
292
endif
293
if ( ! -f $file ) then
294
  set file=`ls ${charp}[0-9_]*[0-9] | head -1 | sed -e 's/@//'`
295
endif
296
 
297
# Determine timeinc (the time difference in hours between two data file)
298
# if not already defined with option -i
299
if ( ${timeinc} == "nil" ) then
5 michaesp 300
  set date1=`echo $file | cut -c 2-`
3 michaesp 301
  set n=`ls ${charp}[0-9_]*[0-9] | grep -n $date1 | awk -F: '{print $1}'`
302
  @ n ++
5 michaesp 303
  set date2=`\ls ${charp}[0-9_]*[0-9] | head -$n | tail -1 | cut -c 2-`
3 michaesp 304
  set timeinc=`${LAGRANTO}/goodies/gettidiff $date2 $date1`
305
endif
306
if ( $timeinc == 0 ) then
307
    echo " ERROR: cannot set the time increment between input files ***"
308
    exit 1
309
endif
310
 
5 michaesp 311
# Decide whether the time increment is smaller than 1 h; if so set the hires
312
# flag and convert the timeincement into fractional hour
313
set flag = `echo ${timeinc} | grep -n '\.'`
314
set hires = 0
315
if ( "${flag}" != "" ) then
316
  echo "Input files availability < 1 hour ($timeinc): switch to hires"
317
  echo "mode. All input files must be of form: P{yyyymmdd_hhmm}"
318
  set hires = 1
319
  set timeinc_min = `echo "(${timeinc} * 100 + 0.5)/1" | bc`
13 michaesp 320
  set timeinc     = `echo "scale=8; ${timeinc} * 100 / 60" | bc`
5 michaesp 321
  goto hires
322
endif
323
 
324
## Search the first file to use: We step through all P files and see whether they are
325
# good P files. Let's first do the test for the first data file found. If it's ok, we 
326
# take it; if not, we step through all P files and find the good one  
3 michaesp 327
set flag=0
328
set td=
5 michaesp 329
 
330
set date = `echo $file | cut -c 2-12`
331
set td1  = `${LAGRANTO}/goodies/gettidiff ${startdate_ymdh} ${date}`
332
set td2  = `${LAGRANTO}/goodies/gettidiff ${enddate_ymdh}   ${date}`
333
 
334
if (( $td1 < $timeinc || $td2 < $timeinc ) && ( $td1 >= 0 || $td2 >= 0 )) then
335
   set datfiles=$date
336
   if ( $td1 < $timeinc    ) set td=$td1
337
   if ( $td2 < $timeinc    ) set td=$td2
338
   if ( ( $startdate_min > 0 ) || ( $enddate_min > 0 ) ) @ td ++
339
   goto label2      
340
endif
341
 
3 michaesp 342
foreach i ( ${charp}????????_?? )
343
 
344
  set date = `echo $i | cut -c 2-12`
345
  set td1  = `${LAGRANTO}/goodies/gettidiff ${startdate_ymdh} ${date}`
346
  set td2  = `${LAGRANTO}/goodies/gettidiff ${enddate_ymdh}   ${date}`
347
 
348
  if (( $td1 < $timeinc || $td2 < $timeinc ) && ( $td1 >= 0 || $td2 >= 0 )) then
349
      set datfiles=$date
350
      if ( $td1 < $timeinc    ) set td=$td1
351
      if ( $td2 < $timeinc    ) set td=$td2
352
      if ( ( $startdate_min > 0 ) || ( $enddate_min > 0 ) ) @ td ++
353
      goto label2
354
  endif
355
 
356
end
357
 
358
if ( $td == "" ) then
359
  echo " ERROR: no data files available for the specified time period"
360
  exit 1
361
endif
362
 
5 michaesp 363
# If the input files come with time increment < 1 hour, handle it in this
364
# special section. The aim is not to 'interfere' with the well established
365
# code handling the standard case with time increment >= 1 hour. In this mode
366
# we require that the start and end date are available as P files: no start is
367
# allowed between the model output files
368
hires:
369
 
370
set flag=0
371
set td=0
372
 
373
if ( $direction == "f" ) then
374
  set file=${charp}${startdate}
375
else 
376
  set file=${charp}${enddate}
377
endif
378
 
379
if ( -f $file ) then
380
  set date     = `echo ${file} | cut -c 2-14`
381
  set datfiles = $date
382
  set td       = 0
383
  goto label2
384
else
385
  echo
386
  echo " ERROR: no data files available for the specified time period"
387
  exit 1
388
endif
389
 
3 michaesp 390
# Everything is fine so far: proceed
391
label2:
392
 
5 michaesp 393
# Calculate the number of further files; handle hires (timeinc<1 h) and
394
# standard mode (timeinc >= 1 h) separately
395
if ( ${hires} == 0 ) then
396
 @ num = ( $timediff_hh + $td ) / $timeinc + 1
397
 @ dum1 = ( $num - 1 ) * $timeinc
398
 @ dum2 = $timediff_hh + $td
399
 if ( $dum1 != $dum2 ) @ num ++
400
else
401
 set num = `echo "( ${timediff_hh}*60 + ${timediff_mm} ) / ( ${timeinc_min} ) + 1" | bc`
402
endif 
3 michaesp 403
 
404
# Get a list of all needed files
405
set numfiles=$num
406
set sfiles=1
5 michaesp 407
echo $datfiles
3 michaesp 408
while ( $num > 1 )
5 michaesp 409
  if ( $hires == 0 ) then
410
     set date=`${LAGRANTO}/goodies/newtime $date $timeinc`
411
  else
412
     set date=`${LAGRANTO}/goodies/newtime $date $timeinc_min`
413
  endif
3 michaesp 414
  if ( ! -f ${charp}${date} ) then
415
    echo " ERROR: file with primary data is missing for $date"
416
    exit 1
417
  else if ( ! -f ${chars}${date} ) then
418
    set sfiles=0
419
    set datfiles=`echo $datfiles $date`
420
  else
421
    set datfiles=`echo $datfiles $date`
422
  endif
423
  @ num --
424
end
425
 
426
# Calculate the start and the end time relative to the first datfile
427
if ( $direction == f ) then
428
  set tstart = `${LAGRANTO}/goodies/gettidiff $startdate $datfiles[1]`
429
  set tend   = `${LAGRANTO}/goodies/gettidiff $datfiles[$numfiles] $enddate`
430
else
431
  set tstart = `${LAGRANTO}/goodies/gettidiff $datfiles[$numfiles] $startdate`
432
  set tend   = `${LAGRANTO}/goodies/gettidiff $enddate $datfiles[1]`
433
endif
434
 
435
 
436
# Write some status information
437
echo "Primary file prefix               : ${charp}"
438
echo "Secondary file prefix             : ${chars}"
5 michaesp 439
if ( ${hires} == 0 ) then
440
  echo "Time increment for input files    : ${timeinc} h"
441
else
442
  echo "Time increment for input files    : ${timeinc_min} min (0$timeinc h) "
443
endif
3 michaesp 444
echo "# input files                     : ${numfiles}"
445
echo "First input file                  : $datfiles[1] " 
446
echo "Last input file                   : $datfiles[$numfiles] " 
447
echo "${charp} files availability              : 1"  
448
echo "${chars} files availability              : ${sfiles}"     
449
if ( $direction == f ) then
450
echo "Start time relative to first file : $datfiles[1] + ${tstart} "
451
echo "End time relative to last file    : $datfiles[$numfiles] - ${tend} "  
452
else
453
echo "Start time relative to last file  : $datfiles[$numfiles] - ${tstart} "
454
echo "End time relative to first file   : $datfiles[1] + ${tend} "
455
endif
456
 
5 michaesp 457
echo
458
echo $datfiles
459
 
3 michaesp 460
# ---------------------------------------------------------------------
461
# Check availability of input data 
462
# ---------------------------------------------------------------------
463
 
464
echo
465
echo '---- TRACEVAR FILE --------------------------------------'
466
echo    
467
 
468
# If "-f" option is used, create a temporary tracevar file
469
if ( "${flag_f}" == "-f" ) then
470
 
471
#   Preset values for <compfl> and <tprefix>
472
    set tcompfl=1
473
    set tprefix='P'
5 michaesp 474
 
475
#   Split the variable name into its vectorial components, if necessary
476
    set tvar0 = `echo ${tvar} | awk -F. '{print $1}' `
477
    set tvar1 = `echo ${tvar} | awk -F. '{print $2}' `
478
 
479
#   Check availability on P file - only for first vector component
3 michaesp 480
    foreach var ( `${LAGRANTO}/goodies/getvars ${charp}$datfiles[1]` )
5 michaesp 481
       if ( "${var}" == "${tvar0}" ) then
3 michaesp 482
          set tcompfl=0
5 michaesp 483
              set tprefix="P"
3 michaesp 484
       endif
485
    end
486
 
487
#   Check availability on S file 
488
    if ( ${sfiles} == 1 ) then
489
       foreach var ( `${LAGRANTO}/goodies/getvars ${chars}$datfiles[1]` )
5 michaesp 490
         if ( "${var}" == "${tvar0}" ) then
3 michaesp 491
            set tcompfl=0
5 michaesp 492
                set tprefix="S"
3 michaesp 493
         endif
494
       end
495
    endif
496
 
497
#   Write the temporary <tracevars> file
498
    echo "${tvar} ${tscale} ${tcompfl} ${tprefix}" >! ${tvfile}
499
    echo "Temporary tracervar file <${tvfile}> created"
500
    echo
501
 
502
endif
503
 
504
# Check if tracevars-file exists
505
if ( ! -f $tvfile ) then
506
  echo  " ERROR:  file $tvfile was not found ***"
507
  exit 1
508
endif
509
 
510
# check if the variables contained in the tracevars-file are available in the
511
# data file and check also if there are no empty lines in the tracevars-file
512
 
513
set nlines = `cat $tvfile | wc -l`
514
set vars   = `cat $tvfile | awk '{print $1}'`
515
set nvars  = `echo $vars | wc -w`
516
if ( $nlines != $nvars ) then
517
  echo " ERROR: tracevars-files must not contain empty lines ***"
518
  exit 1
519
endif
520
set calf=`cat $tvfile | awk '{print $3}'`
521
set tfil=`cat $tvfile | awk '{print $4}'`
5 michaesp 522
 
523
# Write some status information
524
cat ${tvfile}
525
echo
526
echo "# Number of tracing variables : ${nlines}"
527
echo "Fields are read from following files : ${tfil}"
528
 
529
# Loop over all variables - check availability
3 michaesp 530
foreach v ( $vars )
531
  if ( $calf[1] == 0 ) then
532
    set v0 = `echo $v | awk 'BEGIN {FS = ":"}; {print $1}'`
5 michaesp 533
    set flag=`${LAGRANTO}/goodies/getvars $tfil[1]$datfiles[1] | grep " $v0 " | wc -l`
3 michaesp 534
    set iscomment=`echo $v0 | cut -c 1` 
535
    if ( "${iscomment}" != "#" ) then 
5 michaesp 536
         if ( $flag == 0 ) then
3 michaesp 537
           echo " ERROR: variable $v listed in $tvfile is not on the $tfil[1]-files ***"
538
           exit 1
5 michaesp 539
         endif
3 michaesp 540
    endif
541
  endif
542
  shift calf
543
  shift tfil
544
end
545
set ntrace=${nlines} 
546
 
547
# ---------------------------------------------------------------------
548
# Prepare input file for trace and run it
549
# ---------------------------------------------------------------------
550
 
551
# Set times relative to the reference date
552
if ( "${changet}" == "true" ) then
553
  echo
554
  echo '---- CHANGE TIMES ON DATA FILES  ------------------------'
555
  echo   
556
  foreach i ( $datfiles )
557
    ${LAGRANTO}/goodies/changet.sh ${refdate} ${charp}${i}
558
  end
559
  if ( ${sfiles} == 1 ) then
560
    foreach i ( $datfiles )
561
      ${LAGRANTO}/goodies/changet.sh ${refdate} ${chars}${i}
562
    end
563
  endif
564
endif
565
 
566
# ---------------------------------------------------------------------
5 michaesp 567
# Prepare input file for trace and run it
3 michaesp 568
# ---------------------------------------------------------------------
569
 
570
# Write parameter file
571
\rm -f ${parfile}
572
touch ${parfile}
573
 
574
echo $inpfile                                              >> $parfile
575
echo $outfile                                              >> $parfile    
576
echo $startdate                                            >> $parfile
577
echo $enddate                                              >> $parfile
578
echo $idir                                                 >> $parfile
579
echo $numfiles                                             >> $parfile
580
foreach i ( $datfiles )
581
  echo $i                                                  >> $parfile
582
end
583
echo $timeinc                                              >> $parfile
584
echo $tstart                                               >> $parfile
585
echo $tend                                                 >> $parfile
586
echo $ntra                                                 >> $parfile
587
echo $ntim                                                 >> $parfile
588
echo $ncol                                                 >> $parfile
589
echo $ntrace                                               >> $parfile
590
cat ${tvfile}                                              >> $parfile
591
${LAGRANTO}/goodies/getvars ${charp}$datfiles[1] | wc -l   >> $parfile
592
${LAGRANTO}/goodies/getvars ${charp}$datfiles[1]           >> $parfile
593
if ( $sfiles == 1 ) then
594
  ${LAGRANTO}/goodies/getvars ${chars}$datfiles[1] | wc -l >> $parfile
595
  ${LAGRANTO}/goodies/getvars ${chars}$datfiles[1]         >> $parfile
596
else
597
  echo 0                                                   >> $parfile
598
endif
599
echo \"${timecheck}\"                                      >> $parfile
600
 
601
# Finish the preprocessor
602
echo 
603
echo '       *** END OF PREPROCESSOR TRACE ***              '
604
echo '========================================================='
605
echo
606
 
607
# Run  trace
608
${prog}
609
 
610
if ( "${status}" != "0" ) then
611
  echo "ERROR:  Program <trace> failed"
612
  exit 1
613
endif
614
 
615
# ---------------------------------------------------------------------
616
# Final tasks (make clean)
617
# ---------------------------------------------------------------------
618
 
619
finish:
620
 
621
if ( "${noclean}" == "false" ) then
622
  \rm -f ${parfile}
623
endif
624
 
625
exit 0 
626