1 #====================================================================== |
1 #====================================================================== |
2 # P L O T _ R E S I D U A L S 1 2 . P L |
2 # P L O T _ R E S I D U A L S 1 2 . P L |
3 # doc: Wed Jun 1 19:05:22 2016 |
3 # doc: Wed Jun 1 19:05:22 2016 |
4 # dlm: Tue Oct 29 13:14:53 2019 |
4 # dlm: Thu Jul 1 13:28:07 2021 |
5 # (c) 2016 A.M. Thurnherr |
5 # (c) 2016 A.M. Thurnherr |
6 # uE-Info: 84 46 NIL 0 0 72 0 2 4 NIL ofnI |
6 # uE-Info: 12 47 NIL 0 0 72 0 2 4 NIL ofnI |
7 #====================================================================== |
7 #====================================================================== |
8 |
8 |
9 # HISTORY: |
9 # HISTORY: |
10 # Jun 1, 2016: - created from [plot_residuals.pl] |
10 # Jun 1, 2016: - created from [plot_residuals.pl] |
11 # Oct 29, 2019: - updated psscale -B to gmt5 syntax |
11 # Oct 29, 2019: - updated psscale -B to gmt5 syntax |
|
12 # Jul 1, 2021: - adapted to more std %PARAMs |
12 |
13 |
13 require "$ANTS/libGMT.pl"; |
14 require "$ANTS/libGMT.pl"; |
14 |
15 |
15 sub plot_residuals12($) |
16 sub plot_residuals12($) |
16 { |
17 { |
17 my($pfn) = @_; |
18 my($pfn) = @_; |
18 |
19 |
19 return unless ($P{max_depth}); |
20 return unless ($P{'depth.max'}); |
20 |
21 |
21 my($xmin) = $P{min_ens}-0.5; |
22 my($xmin) = $P{'ens.min'}-0.5; |
22 my($xmax) = $P{max_ens}+0.5; |
23 my($xmax) = $P{'ens.max'}+0.5; |
23 my($ymin) = round(antsParam('min_depth')-25,50); |
24 my($ymin) = round(antsParam('depth.min')-25,50); |
24 my($ymax) = ($P{water_depth} > 0) ? |
25 my($ymax) = ($P{water_depth} > 0) ? |
25 round($P{water_depth}+25,50) : |
26 round($P{water_depth}+25,50) : |
26 round($P{max_depth}+$P{ADCP_bin_length}+25,50); |
27 round($P{'depth.max'}+$P{ADCP_bin_length}+25,50); |
27 |
28 |
28 my($ens_width) = 10 / ($P{max_ens} - $P{min_ens} + 1); |
29 my($ens_width) = 10 / ($P{'ens.max'} - $P{'ens.min'} + 1); |
29 my($bin_length) = 10 * $P{ADCP_bin_length} / |
30 my($bin_length) = 10 * $P{ADCP_bin_length} / |
30 ($P{max_depth}-$P{min_depth}+$P{ADCP_bin_length}); |
31 ($P{'depth.max'}-$P{'depth.min'}+$P{ADCP_bin_length}); |
31 |
32 |
32 my($R) = "-R$xmin/$xmax/$ymin/$ymax"; |
33 my($R) = "-R$xmin/$xmax/$ymin/$ymax"; |
33 GMT_begin($pfn,'-JX10/-10',$R,'-P'); |
34 GMT_begin($pfn,'-JX10/-10',$R,'-P'); |
34 |
35 |
35 my($C) = "-C$WCALC/residuals.cpt"; |
36 my($C) = "-C$WCALC/residuals.cpt"; |