1 #!/usr/bin/perl |
1 #!/usr/bin/perl |
2 #====================================================================== |
2 #====================================================================== |
3 # L I S T B I N S |
3 # L I S T B I N S |
4 # doc: Fri Aug 25 15:57:05 2006 |
4 # doc: Fri Aug 25 15:57:05 2006 |
5 # dlm: Wed Jan 6 16:08:54 2016 |
5 # dlm: Sun Jan 31 12:43:28 2016 |
6 # (c) 2006 A.M. Thurnherr |
6 # (c) 2006 A.M. Thurnherr |
7 # uE-Info: 153 28 NIL 0 0 72 10 2 4 NIL ofnI |
7 # uE-Info: 340 0 NIL 0 0 72 10 2 4 NIL ofnI |
8 #====================================================================== |
8 #====================================================================== |
9 |
9 |
10 # Split data file into per-bin time series. |
10 # Split data file into per-bin time series. |
11 |
11 |
12 # HISTORY: |
12 # HISTORY: |
327 unless (defined($dta{ENSEMBLE}[$e]->{VELOCITY}[$b][0])) { |
327 unless (defined($dta{ENSEMBLE}[$e]->{VELOCITY}[$b][0])) { |
328 undef(@{$dta{ENSEMBLE}[$e]->{PERCENT_GOOD}[$b]}); # not sure when this can happen |
328 undef(@{$dta{ENSEMBLE}[$e]->{PERCENT_GOOD}[$b]}); # not sure when this can happen |
329 next; |
329 next; |
330 } |
330 } |
331 } else { # Earth coordinates |
331 } else { # Earth coordinates |
|
332 |
|
333 my(@iVels) = &velEarthToInstrument(\%dta,$e,@{$dta{ENSEMBLE}[$e]->{VELOCITY}[$b]}); |
|
334 my(@eVels) = &velInstrumentToEarth(\%dta,$e,@iVels); |
|
335 # printf(STDERR "err($e,$b) = %g,%g/%g,%g/%g,%g/%g,%g\n", |
|
336 # $dta{ENSEMBLE}[$e]->{VELOCITY}[$b][0],$iVels[0], |
|
337 # $dta{ENSEMBLE}[$e]->{VELOCITY}[$b][1],$iVels[1], |
|
338 # $dta{ENSEMBLE}[$e]->{VELOCITY}[$b][2],$iVels[2], |
|
339 # $dta{ENSEMBLE}[$e]->{VELOCITY}[$b][3],$iVels[3]); |
|
340 |
332 @{$dta{ENSEMBLE}[$e]->{BEAM_VELOCITY}[$b]} = # calculate beam velocities |
341 @{$dta{ENSEMBLE}[$e]->{BEAM_VELOCITY}[$b]} = # calculate beam velocities |
333 velInstrumentToBeam(\%dta, |
342 velInstrumentToBeam(\%dta, |
334 &velEarthToInstrument(\%dta,$e,@{$dta{ENSEMBLE}[$e]->{VELOCITY}[$b]})); |
343 &velEarthToInstrument(\%dta,$e,@{$dta{ENSEMBLE}[$e]->{VELOCITY}[$b]})); |
335 |
344 |
336 @{$dta{ENSEMBLE}[$e]->{BEAMPAIR_VELOCITY}[$b]} = # calculate w12, w34 |
345 @{$dta{ENSEMBLE}[$e]->{BEAMPAIR_VELOCITY}[$b]} = # calculate w12, w34 |