Subversion Repositories lagranto.um

Rev

Rev 5 | Rev 13 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5 Rev 7
Line 22... Line 22...
22
  echo "        -t min      : Time steps for calculation               "
22
  echo "        -t min      : Time steps for calculation               "
23
  echo "        -o min      : Output interval in minutes               "
23
  echo "        -o min      : Output interval in minutes               "
24
  echo "        -p          : Periodicity flag                         "
24
  echo "        -p          : Periodicity flag                         "
25
  echo "        -changet    : flag whether to change times on P,S files before calculation" 
25
  echo "        -changet    : flag whether to change times on P,S files before calculation" 
26
  echo "        -noclean    : flag whether to remove temporary files"
26
  echo "        -noclean    : flag whether to remove temporary files"
-
 
27
  echo "        -wfactor    : Vertical wind scaling (expected unit is Pa/s)"
27
  echo "--------------------------------------------------------------"
28
  echo "--------------------------------------------------------------"
28
  exit 0
29
  exit 0
29
endif
30
endif
30
 
31
 
31
# Write title
32
# Write title
Line 77... Line 78...
77
set flag_t     = "nil"
78
set flag_t     = "nil"
78
set flag_o     = "nil"
79
set flag_o     = "nil"
79
set flag_p     = "nil"
80
set flag_p     = "nil"
80
set changet    = 'false'
81
set changet    = 'false'
81
set noclean    = 'false'
82
set noclean    = 'false'
82
set timecheck  = 'yes' 
83
set timecheck  = 'no' 
83
 
-
 
-
 
84
set wfactor    = 1
84
 
85
 
85
while ( $#argv > 0 )
86
while ( $#argv > 0 )
86
 
87
 
87
  switch ( $argv[1] )
88
  switch ( $argv[1] )
88
 
89
 
Line 127... Line 128...
127
   case -notimecheck
128
   case -notimecheck
128
     set timecheck = 'no'
129
     set timecheck = 'no'
129
     echo "timecheck               -> no (user defined)"
130
     echo "timecheck               -> no (user defined)"
130
   breaksw
131
   breaksw
131
 
132
   
-
 
133
   case -wfactor
-
 
134
     set wfactor=$argv[2]
-
 
135
     echo "Flag '-wfactor'     -> ${wfactor} (user defined)"
-
 
136
     shift;
-
 
137
   breaksw
132
 
138
 
133
  endsw
139
  endsw
134
 
140
 
135
  shift;
141
  shift;
136
 
142
 
Line 419... Line 425...
419
 
425
 
420
echo
426
echo
421
echo $datfiles
427
echo $datfiles
422
 
428
 
423
# ---------------------------------------------------------------------
429
# ---------------------------------------------------------------------
424
# Handle vertical wind - scaling factor
-
 
425
# ---------------------------------------------------------------------
-
 
426
 
-
 
427
echo
-
 
428
echo '---- VERTICAL WIND SCALING ------------------------------'
-
 
429
echo
-
 
430
 
-
 
431
# Check whether OMEGA is avialbale on first file
-
 
432
set first=$datfiles[1]
-
 
433
set file="${charp}${first}"
-
 
434
set omflag=`${LAGRANTO}/goodies/getvars $file | grep " OMEGA " | wc -l`
-
 
435
if ( $omflag != 1 ) then
-
 
436
   echo " ERROR: variable OMEGA is not on file $file"
-
 
437
   exit 1
-
 
438
endif
-
 
439
 
-
 
440
# Get the maximum and minimum wind on 850 hPa and decide the <wfactor>
-
 
441
set wmin  = `${LAGRANTO}/goodies/getmima $file OMEGA P850 | awk '{print $1}'`
-
 
442
set wmax  = `${LAGRANTO}/goodies/getmima $file OMEGA P850 | awk '{print $2}'`
-
 
443
set wmin  = `echo $wmin | sed -e 's/\.//'`
-
 
444
set wmax  = `echo $wmax | sed -e 's/\.//'`
-
 
445
set wdiff = `echo $wmax - $wmin | bc`
-
 
446
 
-
 
447
if ( $wdiff > 400 ) then
-
 
448
    set wfactor=1.
-
 
449
else
-
 
450
    set wfactor=100.
-
 
451
endif
-
 
452
 
-
 
453
# Write status information
-
 
454
echo "Vertical scaling factor (wfactor)  : ${wfactor}"
-
 
455
 
-
 
456
# ---------------------------------------------------------------------
-
 
457
# Time step and output interval
430
# Time step and output interval
458
# ---------------------------------------------------------------------
431
# ---------------------------------------------------------------------
459
 
432
 
460
echo
433
echo
461
echo '---- TIME STEPS -----------------------------------------'
434
echo '---- TIME STEPS -----------------------------------------'