plot_residuals.pl
changeset 56 8f120b9f795a
parent 53 b4374f1ebd60
equal deleted inserted replaced
55:2d8e1139acd5 56:8f120b9f795a
     1 #======================================================================
     1 #======================================================================
     2 #                    P L O T _ R E S I D U A L S . P L 
     2 #                    P L O T _ R E S I D U A L S . P L 
     3 #                    doc: Tue Jul 28 13:21:09 2015
     3 #                    doc: Tue Jul 28 13:21:09 2015
     4 #                    dlm: Tue Oct 29 13:14:19 2019
     4 #                    dlm: Thu Jul  1 13:26:39 2021
     5 #                    (c) 2015 A.M. Thurnherr
     5 #                    (c) 2015 A.M. Thurnherr
     6 #                    uE-Info: 20 0 NIL 0 0 72 0 2 4 NIL ofnI
     6 #                    uE-Info: 81 0 NIL 0 0 72 0 2 4 NIL ofnI
     7 #======================================================================
     7 #======================================================================
     8 
     8 
     9 # HISTORY:
     9 # HISTORY:
    10 #	Jul 28, 2015: - created from [LWplot_residuals]
    10 #	Jul 28, 2015: - created from [LWplot_residuals]
    11 #	Jul 30, 2015: - made it respect outGrid_ selection
    11 #	Jul 30, 2015: - made it respect outGrid_ selection
    22 
    22 
    23 sub plot_residuals($)
    23 sub plot_residuals($)
    24 {
    24 {
    25 	my($pfn) = @_;
    25 	my($pfn) = @_;
    26 
    26 
    27 	return unless ($P{max_depth});
    27 	return unless ($P{'depth.max'});
    28 
    28 
    29 	my($xmin) = $P{min_ens}-0.5;
    29 	my($xmin) = $P{'ens.min'}-0.5;
    30 	my($xmax) = $P{max_ens}+0.5;
    30 	my($xmax) = $P{'ens.max'}+0.5;
    31 	my($ymin) = round(antsParam('min_depth')-25,50);
    31 	my($ymin) = round(antsParam('depth.min')-25,50);
    32 	my($ymax) = ($P{water_depth} > 0) ?
    32 	my($ymax) = ($P{water_depth} > 0) ?
    33 				round($P{water_depth}+25,50) :
    33 				round($P{water_depth}+25,50) :
    34 				round($P{max_depth}+$P{ADCP_bin_length}+25,50);
    34 				round($P{'depth.max'}+$P{ADCP_bin_length}+25,50);
    35 
    35 
    36 	my($ens_width) = 10 / ($P{max_ens} - $P{min_ens} + 1);
    36 	my($ens_width) = 10 / ($P{'ens.max'} - $P{'ens.min'} + 1);
    37 	my($bin_length) = 10 * $P{ADCP_bin_length} / 
    37 	my($bin_length) = 10 * $P{ADCP_bin_length} / 
    38 						($P{max_depth}-$P{min_depth}+$P{ADCP_bin_length});
    38 						($P{'depth.max'}-$P{'depth.min'}+$P{ADCP_bin_length});
    39 
    39 
    40 	my($R) = "-R$xmin/$xmax/$ymin/$ymax";
    40 	my($R) = "-R$xmin/$xmax/$ymin/$ymax";
    41 	GMT_begin($pfn,'-JX10/-10',$R,'-P');
    41 	GMT_begin($pfn,'-JX10/-10',$R,'-P');
    42 
    42 
    43 	my($C) = "-C$WCALC/residuals.cpt";
    43 	my($C) = "-C$WCALC/residuals.cpt";