author | A.M. Thurnherr <athurnherr@yahoo.com> |
Fri, 18 Nov 2022 12:57:25 -0500 | |
changeset 63 | 4832af086e8c |
parent 59 | 4118a8e880de |
permissions | -rw-r--r-- |
29 | 1 |
#====================================================================== |
2 |
# P L O T _ W P R O F . P L |
|
3 |
# doc: Sun Jul 26 11:08:50 2015 |
|
58
7688bec6fe87
adapted to SBE files with badly formatted records
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
55
diff
changeset
|
4 |
# dlm: Mon Apr 12 08:44:01 2021 |
29 | 5 |
# (c) 2015 A.M. Thurnherr |
58
7688bec6fe87
adapted to SBE files with badly formatted records
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
55
diff
changeset
|
6 |
# uE-Info: 26 61 NIL 0 0 72 0 2 4 NIL ofnI |
29 | 7 |
#====================================================================== |
8 |
||
9 |
# HISTORY: |
|
10 |
# Jul 26, 2015: - created from LWplot_prof_2beam |
|
31 | 11 |
# Jul 30, 2015: - moved main label outside plot area |
32
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
12 |
# Oct 12, 2015: - BUG: gaps were not plotted as such |
41 | 13 |
# Mar 16, 2016: - adapted to gmt5 |
14 |
# Mar 17, 2016: - improved |
|
45
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
15 |
# May 18, 2016: - replaced rms tilt by mean tilt with traffic background |
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
16 |
# - added plot_wprof_ymin tweakable |
46 | 17 |
# May 24, 2016: - BUG: ymin did not work for nsamp |
18 |
# - fixed for partial-depth profiles |
|
19 |
# - suppress plotting of nsamp == 0 |
|
47
2ccb81b7cea5
version found on whoosher after repair
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
46
diff
changeset
|
20 |
# May 26, 2016: - added instrument coord system to plot labels |
49 | 21 |
# Mar 20, 2018: - BUG: units of vertical package acceleration were wrong |
22 |
# - added blue background for likely in-ice package accelerations |
|
54 | 23 |
# May 16, 2020: - added residual profile data to background |
24 |
# May 23, 2020: - BUG: windows without samples made program bomb |
|
55
2d8e1139acd5
adapted to Nortek files
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
54
diff
changeset
|
25 |
# Mar 23, 2021: - BUG: instrument frequency was rounded to 100kHz |
58
7688bec6fe87
adapted to SBE files with badly formatted records
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
55
diff
changeset
|
26 |
# Apr 12, 2021: - added documentation on background shading |
56 | 27 |
# Jun 30, 2021: - improved quality semaphore |
28 |
# Jul 1, 2021: - replaced bin setup by <w> in legend |
|
29 |
# Jul 7, 2021: - added colored background to <w> |
|
30 |
# Jul 9, 2021: - adapted to new residual editing (calculation in LADCP_w_ocean) |
|
31 |
# HISTORY END |
|
29 | 32 |
|
33 |
# Tweakables: |
|
34 |
# |
|
35 |
# $plot_wprof_xmin = -0.27; |
|
45
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
36 |
# $plot_wprof_ymin = 3600; |
29 | 37 |
# $plot_wprof_ymax = 5000; |
38 |
# $plot_wprof_xtics = "-0.25 -0.15 -0.05 0.05"; |
|
39 |
||
40 |
require "$ANTS/libGMT.pl"; |
|
41 |
||
45
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
42 |
sub setR1() { GMT_setR("-R$plot_wprof_xmin/0.35/$plot_wprof_ymin/$plot_wprof_ymax"); } |
46 | 43 |
sub setR2() { GMT_setR("-R-450/350/$plot_wprof_ymin/$plot_wprof_ymax"); } |
29 | 44 |
|
32
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
45 |
sub plotDC($$) |
29 | 46 |
{ |
32
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
47 |
my($f,$minsamp) = @_; |
29 | 48 |
for (my($bi)=0; $bi<=$#{$DNCAST{$f}}; $bi++) { |
32
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
49 |
if (numberp($DNCAST{$f}[$bi]) && $DNCAST{N_SAMP}[$bi]>=$minsamp) { |
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
50 |
printf(GMT "%g %g\n",$DNCAST{$f}[$bi],($bi+0.5)*$opt_o); |
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
51 |
} else { |
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
52 |
print(GMT "nan nan\n"); |
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
53 |
} |
29 | 54 |
} |
55 |
} |
|
56 |
||
32
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
57 |
sub plotUC($$) |
29 | 58 |
{ |
32
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
59 |
my($f,$minsamp) = @_; |
29 | 60 |
for (my($bi)=0; $bi<=$#{$UPCAST{$f}}; $bi++) { |
32
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
61 |
if (numberp($UPCAST{$f}[$bi]) && $UPCAST{N_SAMP}[$bi]>=$minsamp) { |
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
62 |
printf(GMT "%g %g\n",$UPCAST{$f}[$bi],($bi+0.5)*$opt_o); |
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
63 |
} else { |
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
64 |
print(GMT "nan nan\n"); |
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
65 |
} |
29 | 66 |
} |
67 |
} |
|
68 |
||
32
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
69 |
sub plotBT($$) |
29 | 70 |
{ |
32
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
71 |
my($f,$minsamp) = @_; |
29 | 72 |
for (my($bi)=0; $bi<=$#{$BT{$f}}; $bi++) { |
32
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
73 |
if (numberp($BT{$f}[$bi]) && $BT{N_SAMP}[$bi]>=$minsamp) { |
41 | 74 |
$have_BT = 1; |
32
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
75 |
printf(GMT "%g %g\n",$BT{$f}[$bi],($bi+0.5)*$opt_o); |
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
76 |
} else { |
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
77 |
print(GMT "nan nan\n"); |
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
78 |
} |
6041a20feb39
V1.0 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
31
diff
changeset
|
79 |
} |
29 | 80 |
} |
81 |
||
58
7688bec6fe87
adapted to SBE files with badly formatted records
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
55
diff
changeset
|
82 |
# plot red \\\\ //// patterns (for dc and uc) in background |
7688bec6fe87
adapted to SBE files with badly formatted records
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
55
diff
changeset
|
83 |
# - based on rms residual (like residual profiles) |
7688bec6fe87
adapted to SBE files with badly formatted records
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
55
diff
changeset
|
84 |
# - 100-m-thick layers |
7688bec6fe87
adapted to SBE files with badly formatted records
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
55
diff
changeset
|
85 |
# - white (no pattern) for rms residual <= 0.002 |
7688bec6fe87
adapted to SBE files with badly formatted records
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
55
diff
changeset
|
86 |
# - red (max saturation) for rms residual >= 0.012 |
7688bec6fe87
adapted to SBE files with badly formatted records
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
55
diff
changeset
|
87 |
|
54 | 88 |
sub plotRes() |
89 |
{ |
|
90 |
my($last_depth,$dc_sumsq_res,$dc_n,$uc_sumsq_res,$uc_n); |
|
91 |
for (my($bi)=0; $bi<=$#{$DNCAST{MEDIAN_W}}; $bi++) { |
|
92 |
my($depth) = ($bi+0.5) * $opt_o; |
|
93 |
if ($depth > $last_depth+100 || $bi == $#{$DNCAST{MEDIAN_W}}) { |
|
94 |
if ($dc_n==0 || sqrt($dc_sumsq_res/$dc_n) > 0.002) { |
|
58
7688bec6fe87
adapted to SBE files with badly formatted records
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
55
diff
changeset
|
95 |
my($lightness) = $dc_n ? round(100*max(0.01-max(sqrt($dc_sumsq_res/$dc_n)-0.002,0),0) * 255) : 0; |
7688bec6fe87
adapted to SBE files with badly formatted records
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
55
diff
changeset
|
96 |
GMT_psxy("-Gp300/12:F255/$lightness/${lightness}B-"); |
54 | 97 |
printf(GMT "%g %g\n%g %g\n%g %g\n%g %g\n", |
98 |
-0.1,$last_depth,0,$last_depth, |
|
99 |
0,$depth,-0.1,$depth); |
|
100 |
} |
|
101 |
if ($uc_n==0 || sqrt($uc_sumsq_res/$uc_n) > 0.002) { |
|
58
7688bec6fe87
adapted to SBE files with badly formatted records
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
55
diff
changeset
|
102 |
my($lightness) = $uc_n ? round(100*max(0.01-max(sqrt($uc_sumsq_res/$uc_n)-0.002,0),0) * 255) : 0; |
7688bec6fe87
adapted to SBE files with badly formatted records
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
55
diff
changeset
|
103 |
GMT_psxy("-Gp300/9:F255/$lightness/${lightness}B-"); |
54 | 104 |
printf(GMT "%g %g\n%g %g\n%g %g\n%g %g\n", |
105 |
0,$last_depth,0.07,$last_depth, |
|
106 |
0.07,$depth,0,$depth); |
|
107 |
} |
|
108 |
$dc_sumsq_res = $dc_n = $uc_sumsq_res = $uc_n = 0; |
|
109 |
$last_depth = $depth; |
|
110 |
} |
|
111 |
if (numberp($DNCAST{MEAN_RESIDUAL12}[$bi])) { |
|
112 |
$dc_sumsq_res += $DNCAST{MEAN_RESIDUAL12}[$bi]**2; |
|
113 |
$dc_n++; |
|
114 |
} |
|
115 |
if (numberp($UPCAST{MEAN_RESIDUAL12}[$bi])) { |
|
116 |
$uc_sumsq_res += $UPCAST{MEAN_RESIDUAL12}[$bi]**2; |
|
117 |
$uc_n++; |
|
118 |
} |
|
119 |
if (numberp($DNCAST{MEAN_RESIDUAL34}[$bi])) { |
|
120 |
$dc_sumsq_res += $DNCAST{MEAN_RESIDUAL34}[$bi]**2; |
|
121 |
$dc_n++; |
|
122 |
} |
|
123 |
if (numberp($UPCAST{MEAN_RESIDUAL34}[$bi])) { |
|
124 |
$uc_sumsq_res += $UPCAST{MEAN_RESIDUAL34}[$bi]**2; |
|
125 |
$uc_n++; |
|
126 |
} |
|
127 |
} |
|
128 |
} |
|
29 | 129 |
|
56 | 130 |
sub plotRes() |
131 |
{ |
|
132 |
for (my($bi)=0; $bi<=$#{$DNCAST{MEDIAN_W}}; $bi++) { |
|
133 |
if ($DNCAST{LR_RMS_BP_RESIDUAL}[$bi] > 0.002) { |
|
134 |
my($sat) = round(100*max(0.01-max($DNCAST{LR_RMS_BP_RESIDUAL}[$bi]-0.002,0),0) * 255); |
|
135 |
GMT_psxy("-Gp300/12:F255/$sat/${sat}B-"); |
|
136 |
printf(GMT "%g %g\n%g %g\n%g %g\n%g %g\n", |
|
137 |
-0.1,$bi*$opt_o,0,$bi*$opt_o, |
|
138 |
0,($bi+1)*$opt_o,-0.1,($bi+1)*$opt_o); |
|
139 |
} |
|
140 |
if ($UPCAST{LR_RMS_BP_RESIDUAL}[$bi] > 0.002) { |
|
141 |
my($sat) = round(100*max(0.01-max($UPCAST{LR_RMS_BP_RESIDUAL}[$bi]-0.002,0),0) * 255); |
|
142 |
GMT_psxy("-Gp300/9:F255/$sat/${sat}B-"); |
|
143 |
printf(GMT "%g %g\n%g %g\n%g %g\n%g %g\n", |
|
144 |
0,$bi*$opt_o,0.07,$bi*$opt_o, |
|
145 |
0.07,($bi+1)*$opt_o,0,($bi+1)*$opt_o); |
|
146 |
} |
|
147 |
} |
|
148 |
} |
|
149 |
||
29 | 150 |
sub plot_wprof($) |
151 |
{ |
|
152 |
my($pfn) = @_; |
|
153 |
||
154 |
$plot_wprof_xmin = -0.1 |
|
155 |
unless defined($plot_wprof_xmin); |
|
56 | 156 |
$plot_wprof_ymin = round(antsParam('depth.min')-25,50) |
45
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
157 |
unless defined($plot_wprof_ymin); |
29 | 158 |
$plot_wprof_ymax = ($P{water_depth} > 0) ? |
46 | 159 |
round($P{water_depth}+25,50) : |
56 | 160 |
round($P{'depth.max'}+25,50) |
29 | 161 |
unless defined($plot_wprof_ymax); |
162 |
$plot_wprof_xtics = "-0.05 0.05 0.15" |
|
163 |
unless defined($plot_wprof_xtics); |
|
164 |
||
46 | 165 |
GMT_begin($pfn,'-JX10/-10',"-R$plot_wprof_xmin/0.35/$plot_wprof_ymin/$plot_wprof_ymax",'-P'); # START PLOT |
29 | 166 |
|
167 |
GMT_psxy('-G200'); # MAD background |
|
46 | 168 |
print(GMT "0.07 $plot_wprof_ymin\n 0.07 $plot_wprof_ymax\n0.18 $plot_wprof_ymax\n0.18 $plot_wprof_ymin\n"); |
29 | 169 |
|
170 |
if ($P{water_depth} > 0) { # SEABED |
|
171 |
GMT_psxy('-G204/153/102'); |
|
54 | 172 |
print(GMT "$plot_wprof_xmin $plot_wprof_ymax\n0.07 $plot_wprof_ymax\n0.07 $P{water_depth}\n $plot_wprof_xmin $P{water_depth}\n"); |
29 | 173 |
} |
174 |
||
54 | 175 |
setR1(); |
176 |
plotRes(); # RESIDUAL PROFILES |
|
177 |
GMT_psxy('-W0.5'); # FRAME |
|
29 | 178 |
print(GMT "0 0\n 0 $plot_wprof_ymax\n"); |
179 |
setR2(); |
|
41 | 180 |
GMT_psxy('-W0.5'); |
29 | 181 |
print(GMT ">\n50 0\n 50 $plot_wprof_ymax\n"); |
182 |
print(GMT ">\n150 0\n 150 $plot_wprof_ymax\n"); |
|
41 | 183 |
print(GMT ">\n250 0\n 250 $plot_wprof_ymax\n"); |
29 | 184 |
|
185 |
setR1(); # VERTICAL VELOCITIES |
|
41 | 186 |
GMT_psxy('-W1,coral,8_2:0'); plotDC('MEDIAN_W12',$opt_k); |
187 |
GMT_psxy('-W1,coral,1_1:0'); plotDC('MEDIAN_W34',$opt_k); |
|
188 |
GMT_psxy('-W1,SeaGreen,8_2:0'); plotUC('MEDIAN_W12',$opt_k); |
|
189 |
GMT_psxy('-W1,SeaGreen,1_1:0'); plotUC('MEDIAN_W34',$opt_k); |
|
190 |
GMT_psxy('-W1,black'); plotBT('MEDIAN_W',$opt_k); |
|
29 | 191 |
|
54 | 192 |
GMT_psxy('-Sc0.1c -Gcoral'); plotDC('MAD_W',1); # MEAN ABSOLUTE DEVIATIONS |
193 |
GMT_psxy('-Sc0.1c -GSeaGreen'); plotUC('MAD_W',1); |
|
194 |
GMT_psxy('-Sc0.1c -Gblack'); plotBT('MAD_W',1); |
|
29 | 195 |
|
196 |
setR2(); # SAMPLES |
|
46 | 197 |
GMT_psxy('-W0.7,coral'); plotDC('N_SAMP',1); |
198 |
GMT_psxy('-W0.7,SeaGreen'); plotUC('N_SAMP',1); |
|
54 | 199 |
GMT_psxy('-W0.7,black'); plotBT('N_SAMP',1); |
200 |
||
201 |
GMT_unitcoords(); # QUALITY SEMAPHORE |
|
202 |
GMT_psxy('-Ggray90'); |
|
203 |
print(GMT "0.895 0.895\n0.985 0.895\n0.985 0.985\n0.895 0.985\n"); |
|
56 | 204 |
if ($dc_bres12_rms >= 0.005) { GMT_psxy('-W1,coral,8_2:0 -Gred -N'); } |
205 |
elsif ($dc_bres12_rms >= 0.003) { GMT_psxy('-W1,coral,8_2:0 -Gorange -N'); } |
|
206 |
elsif ($dc_bres12_rms >= 0.0015) { GMT_psxy('-W1,coral,8_2:0 -Gyellow -N'); } |
|
207 |
else { GMT_psxy('-W1,coral,8_2:0 -Ggreen -N'); } |
|
208 |
# print(GMT "0.90 0.90\n0.935 0.90\n0.935 0.935\n"); |
|
209 |
print(GMT "0.90 0.90\n0.935 0.90\n0.935 0.935\n0.90 0.935\n"); |
|
210 |
if ($dc_bres34_rms >= 0.005) { GMT_psxy('-W1,coral,1_1:0 -Gred -N'); } |
|
211 |
elsif ($dc_bres34_rms >= 0.003) { GMT_psxy('-W1,coral,1_1:0 -Gorange -N'); } |
|
212 |
elsif ($dc_bres34_rms >= 0.0015) { GMT_psxy('-W1,coral,1_1:0 -Gyellow -N'); } |
|
213 |
else { GMT_psxy('-W1,coral,1_1:0 -Ggreen -N'); } |
|
214 |
# print(GMT "0.945 0.90\n0.98 0.90\n0.945 0.935\n"); |
|
215 |
print(GMT "0.945 0.90\n0.98 0.90\n0.98 0.935\n0.945 0.935\n"); |
|
216 |
if ($uc_bres12_rms >= 0.005) { GMT_psxy('-W1,SeaGreen,8_2:0 -Gred -N'); } |
|
217 |
elsif ($uc_bres12_rms >= 0.003) { GMT_psxy('-W1,SeaGreen,8_2:0 -Gorange -N'); } |
|
218 |
elsif ($uc_bres12_rms >= 0.0015) { GMT_psxy('-W1,SeaGreen,8_2:0 -Gyellow -N'); } |
|
219 |
else { GMT_psxy('-W1,SeaGreen,8_2:0 -Ggreen -N'); } |
|
220 |
# print(GMT "0.90 0.98\n0.935 0.98\n0.935 0.945\n"); |
|
221 |
print(GMT "0.90 0.98\n0.935 0.98\n0.935 0.945\n0.90 0.945\n"); |
|
222 |
if ($uc_bres34_rms >= 0.005) { GMT_psxy('-W1,SeaGreen,1_1:0 -Gred -N'); } |
|
223 |
elsif ($uc_bres34_rms >= 0.003) { GMT_psxy('-W1,SeaGreen,1_1:0 -Gorange -N'); } |
|
224 |
elsif ($uc_bres34_rms >= 0.0015) { GMT_psxy('-W1,SeaGreen,1_1:0 -Gyellow -N'); } |
|
225 |
else { GMT_psxy('-W1,SeaGreen,1_1:0 -Ggreen -N'); } |
|
226 |
# print(GMT "0.945 0.98\n0.98 0.98\n0.945 0.945\n"); |
|
227 |
print(GMT "0.945 0.98\n0.98 0.98\n0.98 0.945\n0.945 0.945\n"); |
|
29 | 228 |
|
54 | 229 |
GMT_pstext('-F+f14,Helvetica,blue+jTL -N'); # LABELS |
41 | 230 |
print(GMT "0.01 -0.06 $P{out_basename} [$P{run_label}]\n"); |
54 | 231 |
GMT_pstext('-F+f12,Helvetica+jTR'); |
232 |
print(GMT "0.61 0.02 m.abs.dev.\n"); |
|
41 | 233 |
GMT_pstext('-F -N'); |
234 |
print(GMT "0.32 1.12 Vertical Velocity [m/s]\n"); |
|
54 | 235 |
GMT_pstext('-F+f9,Helvetica,LightSkyBlue+jTR -N -Gwhite'); |
41 | 236 |
print(GMT "0.99 0.01 V$VERSION\n"); |
29 | 237 |
|
41 | 238 |
GMT_pstext('-F+f12,Helvetica,coral+jTL -Gwhite'); |
54 | 239 |
print(GMT "0.02 0.02 downcast\n"); |
41 | 240 |
GMT_pstext('-F+f12,Helvetica,SeaGreen+jTL -Gwhite'); |
54 | 241 |
print(GMT "0.24 0.02 upcast\n"); |
41 | 242 |
if ($have_BT) { |
54 | 243 |
GMT_pstext('-F+f12,Helvetica,black+jBL -Gwhite'); |
244 |
print(GMT "0.02 0.98 b.track\n"); |
|
41 | 245 |
} |
246 |
||
56 | 247 |
# The following values were established manually in July 2021 with |
248 |
# a GMT version that does not seem to respect y, maybe because of |
|
249 |
# super-/subscripts. |
|
250 |
# my(@y) = (1.020,1.056,1.090,1.135); # 0.036, 0.034, 0.035 |
|
251 |
# my(@y) = (1.020,1.056,1.088,1.131); |
|
252 |
my(@y) = (1.020,1.060,1.088,1.127); |
|
253 |
||
41 | 254 |
GMT_pstext('-F+f9,Helvetica,CornFlowerBlue+jTL -N'); |
56 | 255 |
printf(GMT "0.64 $y[0] %d kHz $LADCP{INSTRUMENT_TYPE} $P{ADCP_orientation}\n", |
256 |
round($LADCP{BEAM_FREQUENCY},50)); |
|
257 |
||
258 |
# printf(GMT "0.64 1.055 %s [%.1fm/%1.fm/%1.fm]\n", |
|
259 |
# $LADCP{BEAM_COORDINATES} ? 'beam vels' : 'Earth vels', |
|
260 |
# $LADCP{BLANKING_DISTANCE},$LADCP{TRANSMITTED_PULSE_LENGTH},$LADCP{BIN_LENGTH}); |
|
261 |
||
262 |
print( GMT "0.64 $y[1] mean w\n 0.77 $y[1] :\n"); |
|
263 |
printf(GMT "0.64 $y[2] mean tilt\n 0.77 %f :\n",$y[2]+0.007); |
|
264 |
print( GMT "0.64 $y[3] rms a\@-pkg\@-\n 0.77 $y[3] :\n"); |
|
45
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
265 |
|
56 | 266 |
if (abs($P{'dc_w.mu'} - $P{'uc_w.mu'}) < 0.005) { |
45
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
267 |
GMT_pstext('-F+f9,Helvetica,coral+jTL -N'); |
56 | 268 |
} elsif (abs($P{'dc_w.mu'} - $P{'uc_w.mu'}) < 0.01) { |
269 |
GMT_pstext('-F+f9,Helvetica,coral+jTL -Gyellow -N'); |
|
270 |
} else { |
|
271 |
GMT_pstext('-F+f9,Helvetica,coral+jTL -Gred -N'); |
|
272 |
} |
|
273 |
printf(GMT "0.78 %f %dmm/s\n",$y[1]-0.006,round($P{'dc_w.mu'}*1000)); |
|
274 |
||
275 |
if (abs($P{'dc_w.mu'} - $P{'uc_w.mu'}) < 0.005) { |
|
276 |
GMT_pstext('-F+f9,Helvetica,SeaGreen+jTL -N'); |
|
277 |
} elsif (abs($P{'dc_w.mu'} - $P{'uc_w.mu'}) < 0.01) { |
|
278 |
GMT_pstext('-F+f9,Helvetica,SeaGreen+jTL -Gyellow -N'); |
|
279 |
} else { |
|
280 |
GMT_pstext('-F+f9,Helvetica,SeaGreen+jTL -Gred -N'); |
|
281 |
} |
|
282 |
printf(GMT "0.89 %f %dmm/s\n",$y[1]-0.006,round($P{'uc_w.mu'}*1000)); |
|
283 |
||
284 |
||
285 |
if ($P{'dc_tilt.mu'} < 4) { |
|
286 |
GMT_pstext('-F+f9,Helvetica,coral+jTL -N'); |
|
287 |
} elsif ($P{'dc_tilt.mu'} < 8) { |
|
45
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
288 |
GMT_pstext('-F+f9,Helvetica,coral+jTL -Gyellow -N'); |
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
289 |
} else { |
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
290 |
GMT_pstext('-F+f9,Helvetica,coral+jTL -Gred -N'); |
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
291 |
} |
56 | 292 |
printf(GMT "0.808 $y[2] %.1f\\260\n",$P{'dc_tilt.mu'}); |
293 |
||
294 |
if ($P{'uc_tilt.mu'} < 4) { |
|
45
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
295 |
GMT_pstext('-F+f9,Helvetica,SeaGreen+jTL -N'); |
56 | 296 |
} elsif ($P{'uc_tilt.mu'} < 8) { |
45
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
297 |
GMT_pstext('-F+f9,Helvetica,SeaGreen+jTL -Gyellow -N'); |
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
298 |
} else { |
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
299 |
GMT_pstext('-F+f9,Helvetica,SeaGreen+jTL -Gred -N'); |
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
300 |
} |
56 | 301 |
printf(GMT "0.91 $y[2] %.1f\\260\n",$P{'uc_tilt.mu'}); |
45
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
302 |
|
56 | 303 |
if ($P{'dc_accel_pkg.rms'} < 0.1) { |
49 | 304 |
GMT_pstext('-F+f9,Helvetica,coral+jTL -Gblue -N'); |
56 | 305 |
} elsif ($P{'dc_accel_pkg.rms'} < 0.7) { |
45
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
306 |
GMT_pstext('-F+f9,Helvetica,coral+jTL -N'); |
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
307 |
} else { |
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
308 |
GMT_pstext('-F+f9,Helvetica,coral+jTL -Gyellow -N'); |
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
309 |
} |
56 | 310 |
printf(GMT "0.78 %f %.1fm/s\@+2\@+\n",$y[3]-0.01,$P{'dc_accel_pkg.rms'}); |
45
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
311 |
|
56 | 312 |
if ($P{'uc_accel_pkg.rms'} < 0.1) { |
49 | 313 |
GMT_pstext('-F+f9,Helvetica,SeaGreen+jTL -Gblue -N'); |
56 | 314 |
} elsif ($P{'uc_accel_pkg.rms'} < 0.7) { |
45
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
315 |
GMT_pstext('-F+f9,Helvetica,SeaGreen+jTL -N'); |
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
316 |
} else { |
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
317 |
GMT_pstext('-F+f9,Helvetica,SeaGreen+jTL -Gyellow -N'); |
6d49c7420a6c
stable V1.3beta, just before implementing bin interpolation
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
318 |
} |
56 | 319 |
printf(GMT "0.89 %f %.1fm/s\@+2\@+\n",$y[3]-0.01,$P{'uc_accel_pkg.rms'}); |
41 | 320 |
|
46 | 321 |
my($depth_tics) = ($plot_wprof_ymax-$plot_prof_ymin < 1000 ) ? 'f10a100' : 'f100a500'; # AXES |
29 | 322 |
setR1(); |
41 | 323 |
GMT_psbasemap("-Bf0.01:'':/$depth_tics:'Depth [m]':WeS"); |
29 | 324 |
foreach my $t (split('\s+',$plot_wprof_xtics)) { |
325 |
GMT_psbasemap(sprintf('-Ba10-%fS',10-$t)); |
|
326 |
} |
|
327 |
setR2(); |
|
328 |
GMT_psbasemap('-Bf10a1000-950:" # of Samples":N'); |
|
329 |
GMT_psbasemap('-Ba1000-850N'); |
|
41 | 330 |
GMT_psbasemap('-Ba1000-750N'); |
29 | 331 |
|
332 |
GMT_end(); # FINISH PLOT |
|
333 |
} |
|
334 |
||
335 |
1; # return true on require |