1 #!/usr/local/bin/perl |
1 #!/usr/local/bin/perl |
2 #====================================================================== |
2 #====================================================================== |
3 # R D I 2 G R D |
3 # R D I 2 G R D |
4 # doc: Wed Aug 30 11:51:22 2006 |
4 # doc: Wed Aug 30 11:51:22 2006 |
5 # dlm: Thu Jun 18 07:06:34 2009 |
5 # dlm: Thu Mar 17 07:39:24 2016 |
6 # (c) 2006 A.M. Thurnherr |
6 # (c) 2006 A.M. Thurnherr |
7 # uE-Info: 18 54 NIL 0 0 72 2 2 4 NIL ofnI |
7 # uE-Info: 20 0 NIL 0 0 72 2 2 4 NIL ofnI |
8 #====================================================================== |
8 #====================================================================== |
9 |
9 |
10 # make GMT grd files from RDI file |
10 # make GMT grd files from RDI file |
11 |
11 |
12 # HISTORY: |
12 # HISTORY: |
14 # Aug 31, 2006: - BUG: ensembles/bins were numbered from 0 |
14 # Aug 31, 2006: - BUG: ensembles/bins were numbered from 0 |
15 # - added -d)imensional coords |
15 # - added -d)imensional coords |
16 # Sep 1, 2006: - fiddled with registration |
16 # Sep 1, 2006: - fiddled with registration |
17 # Sep 19, 2007: - adapted to new [RDI_BB_Read.pl] |
17 # Sep 19, 2007: - adapted to new [RDI_BB_Read.pl] |
18 # Jun 18, 2009: - BUG: xysize had been called xyside |
18 # Jun 18, 2009: - BUG: xysize had been called xyside |
|
19 # Mar 17, 2016: - adapted to new Getopt library |
19 |
20 |
20 # NOTES: |
21 # NOTES: |
21 # - regular grids only => no dimensional time axis for data collected |
22 # - regular grids only => no dimensional time axis for data collected |
22 # in multi-ensemble burst mode! |
23 # in multi-ensemble burst mode! |
23 |
24 |
24 # TODO: |
25 # TODO: |
25 # - implement soundspeed corretion |
26 # - implement soundspeed corretion |
26 # - add temporal pre-averaging |
27 # - add temporal pre-averaging |
27 |
28 |
28 require "getopts.pl"; |
29 use Getopt::Std; |
29 $0 =~ m{(.*/)[^/]+}; |
30 $0 =~ m{(.*/)[^/]+}; |
30 require "$1RDI_BB_Read.pl"; |
31 require "$1RDI_BB_Read.pl"; |
31 require "$1RDI_Coords.pl"; |
32 require "$1RDI_Coords.pl"; |
32 |
33 |
33 use NetCDF; |
34 use NetCDF; |
121 |
122 |
122 $usage = "$0 @ARGV"; |
123 $usage = "$0 @ARGV"; |
123 die("Usage: $0 [-M)agnetic <declination>] [-r)ange <first_ens,last_ens>] " . |
124 die("Usage: $0 [-M)agnetic <declination>] [-r)ange <first_ens,last_ens>] " . |
124 "[output -b)ase <name>] [-d)imensional coordinates] " . |
125 "[output -b)ase <name>] [-d)imensional coordinates] " . |
125 "<RDI file>\n") |
126 "<RDI file>\n") |
126 unless (&Getopts("b:dM:r:") && @ARGV == 1); |
127 unless (&getopts("b:dM:r:") && @ARGV == 1); |
127 |
128 |
128 print(STDERR "WARNING: magnetic declination not set!\n") |
129 print(STDERR "WARNING: magnetic declination not set!\n") |
129 unless defined($opt_M); |
130 unless defined($opt_M); |
130 |
131 |
131 unless (defined($opt_b)) { |
132 unless (defined($opt_b)) { |