author | A.M. Thurnherr <athurnherr@yahoo.com> |
Thu, 19 May 2016 09:38:56 -0400 | |
changeset 45 | 6d49c7420a6c |
parent 41 | 6bddb82924e3 |
child 46 | cc6c4309828a |
permissions | -rw-r--r-- |
30 | 1 |
#====================================================================== |
2 |
# P L O T _ T I M E _ L A G S . P L |
|
3 |
# doc: Tue Jul 28 13:21:09 2015 |
|
45
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
41
diff
changeset
|
4 |
# dlm: Wed May 18 12:58:17 2016 |
30 | 5 |
# (c) 2015 A.M. Thurnherr |
45
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
41
diff
changeset
|
6 |
# uE-Info: 51 28 NIL 0 0 72 2 2 4 NIL ofnI |
30 | 7 |
#====================================================================== |
8 |
||
9 |
# HISTORY: |
|
10 |
# Jul 29, 2015: - created from [LWplot_TL] |
|
34 | 11 |
# Jan 26, 2016: - added return on no data to plot |
41 | 12 |
# Mar 16, 2016: - adapted to gmt5 |
45
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
41
diff
changeset
|
13 |
# May 18, 2016: - added version |
30 | 14 |
|
15 |
require "$ANTS/libGMT.pl"; |
|
16 |
||
17 |
sub plot_time_lags($) |
|
18 |
{ |
|
19 |
my($pfn) = @_; |
|
20 |
||
34 | 21 |
return unless ($P{'elapsed.min'}); |
22 |
||
30 | 23 |
my($xmin) = $P{'elapsed.min'}/60; |
24 |
my($xmax) = $P{'elapsed.max'}/60; |
|
25 |
my($ymin) = -24; |
|
26 |
my($ymax) = 24; |
|
27 |
||
28 |
my($R) = "-R$xmin/$xmax/$ymin/$ymax"; |
|
29 |
GMT_begin($pfn,'-JX10',$R,'-P'); |
|
30 |
||
31 |
GMT_psxy('-Sc0.1 -Gcoral'); |
|
32 |
for (my($wi)=0; $wi<@elapsed_buf; $wi++) { |
|
33 |
last unless ($elapsed_buf[$wi]<$LADCP{ENSEMBLE}[$LADCP_atbottom]->{ELAPSED}); |
|
34 |
printf(GMT "%f %f\n",$elapsed_buf[$wi]/60,$so_buf[$wi]); |
|
35 |
} |
|
36 |
GMT_psxy('-Sc0.1 -GSeaGreen'); |
|
37 |
for (my($wi)=0; $wi<@elapsed_buf; $wi++) { |
|
38 |
next if ($elapsed_buf[$wi]<$LADCP{ENSEMBLE}[$LADCP_atbottom]->{ELAPSED}); |
|
39 |
printf(GMT "%f %f\n",$elapsed_buf[$wi]/60,$so_buf[$wi]); |
|
40 |
} |
|
41 |
||
41 | 42 |
GMT_psxy('-W1,grey20'); |
30 | 43 |
for (my($i)=0; $i<@bmo_buf; $i++) { |
44 |
printf(GMT ">\n%f %f\n%f %f\n", |
|
34 | 45 |
$fg_buf[$i]/60-0.5,$bmo_buf[$i], |
46 |
$lg_buf[$i]/60+0.5,$bmo_buf[$i]); |
|
30 | 47 |
} |
48 |
||
49 |
GMT_unitcoords(); # LABELS |
|
45
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
41
diff
changeset
|
50 |
GMT_pstext('-F+f9,Helvetica,orange+jTR -N -Gwhite'); |
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
41
diff
changeset
|
51 |
print(GMT "0.99 0.99 V$VERSION\n"); |
41 | 52 |
GMT_pstext('-F+f14,Helvetica,blue+jTL -N'); |
53 |
print(GMT "0.01 1.06 $P{out_basename} $P{run_label}\n"); |
|
30 | 54 |
|
55 |
GMT_setR($R); |
|
56 |
GMT_end('-Bf1a30:"Elapsed Time [min]":/f1a5:"Best Offset [scans]":WeSn'); # FINISH PLOT |
|
57 |
} |
|
58 |
||
59 |
1; # return true on require |