Subversion Repositories lagranto.ecmwf

Rev

Rev 3 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3 Rev 5
Line 48... Line 48...
48
 
48
 
49
echo '---- OPTIONAL FLAGS -------------------------------------'
49
echo '---- OPTIONAL FLAGS -------------------------------------'
50
echo
50
echo
51
 
51
 
52
# Set some default values ("nil" must be set according to input files)
52
# Set some default values ("nil" must be set according to input files)
53
set flag_i     = "nil"
53
set flag_i      = "nil"
54
set flag_v     = "tracevars"
54
set flag_v      = "tracevars"
55
set flag_f     = "nil"
55
set flag_f      = "nil"
56
set tvfile     = 'tracevars'
56
set tvfile      = 'tracevars'
57
set changet    = 'false'
57
set changet     = 'false'
58
set noclean    = 'false'
58
set noclean     = 'false'
59
set timecheck  = 'no' 
59
set timecheck   = 'no' 
60
set intmode    = 'normal'
60
set intmode     = 'normal'
61
set pmin       = 100
61
set pmin        = 'nil'
62
set pmax       = 1000
62
set pmax        = 'nil'
63
set npre       = 100
63
set npre        = 100
64
set centering  = 'no'
64
set centering   = 'no'
-
 
65
set orientation = 'vertical'
65
set outmode    = 'sum'
66
set outmode     = 'sum'
-
 
67
set dumpcoord   = 'no'
66
 
68
 
67
# Set flag for consistency
69
# Set flag for consistency
68
set isok = 1
70
set isok = 1
69
set explicit_limits = false
71
set explicit_limits = false
70
 
72
 
Line 101... Line 103...
101
   case -centering
103
   case -centering
102
     set centering = 'yes'
104
     set centering = 'yes'
103
     echo "Flag '-centering'  -> centering (user defined): ${centering}"
105
     echo "Flag '-centering'  -> centering (user defined): ${centering}"
104
   breaksw
106
   breaksw
105
 
107
 
-
 
108
   case -dumpcoord
-
 
109
     set dumpcoord = 'yes'
-
 
110
     echo "Flag '-dumpcoord'  -> dumpcoord (user defined): ${dumpcoord}"
-
 
111
   breaksw
-
 
112
 
-
 
113
   case -orientation
-
 
114
     set orientation=$argv[2]
-
 
115
     echo "Flag '-orientation'-> orientation (user defined): ${orientation}"
-
 
116
     shift;
-
 
117
   breaksw
-
 
118
 
106
   case -v
119
   case -v
107
     set flag_v="-v"
120
     set flag_v="-v"
108
     set tvfile=$argv[2]
121
     set tvfile=$argv[2]
109
     echo "Flag '-v'          -> ${tvfile} (user defined)"
122
     echo "Flag '-v'          -> ${tvfile} (user defined)"
110
     shift;
123
     shift;
Line 153... Line 166...
153
 
166
 
154
  shift;
167
  shift;
155
 
168
 
156
end
169
end
157
 
170
 
-
 
171
# For orientation=normal: only centering is reasonable
-
 
172
if ( "${orientation}" == "normal" && "${centering}" == "no" ) then
-
 
173
  echo "For horizontal(normal) Lidar, only centering is reasonable - > mode changed"
-
 
174
  set centering = 'yes'
-
 
175
endif
-
 
176
 
158
# No change of times necessary if no check requested
177
# No change of times necessary if no check requested
159
if ( "${timecheck}" == "no" ) then
178
if ( "${timecheck}" == "no" ) then
160
   set  changet = 'false'
179
   set  changet = 'false'
161
endif
180
endif
162
 
181
 
Line 165... Line 184...
165
    echo
184
    echo
166
    echo " ERROR: Use either option '-v' or '-f', but not both..."
185
    echo " ERROR: Use either option '-v' or '-f', but not both..."
167
    exit 1
186
    exit 1
168
endif
187
endif
169
 
188
 
-
 
189
# Set position boundaries - pmin,pmax (pressure, lat,lon, deg rotated)
-
 
190
if ( ( "${pmin}" == "nil" ) && ( "${orientation}" == "vertical" ) ) then
-
 
191
    set pmin =  100
-
 
192
    set pmax = 1000
-
 
193
else if ( ( "${pmin}" == "nil" ) && ( "${orientation}" == "lat" ) ) then
-
 
194
    set pmin =  -90
-
 
195
    set pmax =   90
-
 
196
else if ( ( "${pmin}" == "nil" ) && ( "${orientation}" == "lon" ) ) then
-
 
197
    set pmin =  -180
-
 
198
    set pmax =   180
-
 
199
else if ( ( "${pmin}" == "nil" ) && ( "${orientation}" == "normal" ) ) then
-
 
200
    set pmin =  -90
-
 
201
    set pmax =   90
-
 
202
endif
-
 
203
    
170
# If centering is chosen, set reasonable upper and lower limits
204
# If centering is chosen, set reasonable upper and lower limits
171
if ( ( "$centering" == "yes" ) && ( "${explicit_limits}" == "false" ) ) then
205
if ( ( "$centering" == "yes" ) && ( "${explicit_limits}" == "false" ) ) then
-
 
206
   if ( "${orientation}" == "vertical" ) then
172
   set pmin = -500
207
      set pmin = -500
173
   set pmax =  500
208
      set pmax =  500
-
 
209
   else if ( "${orientation}" == "lat" ) then
-
 
210
      set pmin = -10
-
 
211
      set pmax =  10
-
 
212
   else if ( "${orientation}" == "lon" ) then
-
 
213
      set pmin = -10
-
 
214
      set pmax =  10
-
 
215
   else if ( "${orientation}" == "normal" ) then
-
 
216
      set pmin = -10
-
 
217
      set pmax =  10
-
 
218
   endif
174
endif
219
endif
175
 
220
 
176
# ---------------------------------------------------------------------
221
# ---------------------------------------------------------------------
177
# Handle the input trajectory file
222
# Handle the input trajectory file
178
# ---------------------------------------------------------------------
223
# ---------------------------------------------------------------------
Line 543... Line 588...
543
endif
588
endif
544
echo \"${timecheck}\"                                      >> $parfile
589
echo \"${timecheck}\"                                      >> $parfile
545
echo \"${intmode}\"                                        >> $parfile
590
echo \"${intmode}\"                                        >> $parfile
546
echo ${pmin},${pmax},${npre}                               >> $parfile
591
echo ${pmin},${pmax},${npre}                               >> $parfile
547
echo \"${centering}\"                                      >> $parfile
592
echo \"${centering}\"                                      >> $parfile
-
 
593
echo \"${orientation}\"                                    >> $parfile
-
 
594
echo \"${dumpcoord}\"                                      >> $parfile
548
 
595
 
549
# Finish the preprocessor
596
# Finish the preprocessor
550
echo 
597
echo 
551
echo '       *** END OF PREPROCESSOR LIDAR ***              '
598
echo '       *** END OF PREPROCESSOR LIDAR ***              '
552
echo '========================================================='
599
echo '========================================================='