default_output.pl
changeset 54 828e5466391b
parent 47 2ccb81b7cea5
child 56 8f120b9f795a
equal deleted inserted replaced
53:b4374f1ebd60 54:828e5466391b
     1 #======================================================================
     1 #======================================================================
     2 #                    D E F A U L T _ O U T P U T . P L 
     2 #                    D E F A U L T _ O U T P U T . P L 
     3 #                    doc: Wed Jun  1 19:21:19 2016
     3 #                    doc: Wed Jun  1 19:21:19 2016
     4 #                    dlm: Wed Jun  1 19:26:01 2016
     4 #                    dlm: Sat May 16 12:19:26 2020
     5 #                    (c) 2016 A.M. Thurnherr
     5 #                    (c) 2016 A.M. Thurnherr
     6 #                    uE-Info: 106 1 NIL 0 0 72 0 2 4 NIL ofnI
     6 #                    uE-Info: 71 0 NIL 0 0 72 0 2 4 NIL ofnI
     7 #======================================================================
     7 #======================================================================
     8 
     8 
     9 # NOTES:
     9 # NOTES:
    10 #  - as this file is executed after ProcessingParams, only undefined
    10 #  - as this file is executed after ProcessingParams, only undefined
    11 #	 variables are set
    11 #	 variables are set
    12 
    12 
    13 # HISTORY:
    13 # HISTORY:
    14 #	Jun  1, 2016: - created from [default_paths.pl]
    14 #	Jun  1, 2016: - created from [default_paths.pl]
       
    15 #	May 15, 2020: - removed a couple of time-depth plots from level 1
       
    16 #				  - changed semmantics so that pushing to plot adds,
       
    17 #				    instead of overwwriting
       
    18 #				  - BUG: one of the plots did not repect plotting level
    15 
    19 
    16 #----------------------------------------------------------------------
    20 #----------------------------------------------------------------------
    17 # Processing log (diagnostic messages) output
    21 # Processing log (diagnostic messages) output
    18 #----------------------------------------------------------------------
    22 #----------------------------------------------------------------------
    19 
    23 
    20 $out_log = "$log_dir/$out_basename.log"
    24 $out_log = "$log_dir/$out_basename.log"
    21 	unless defined($out_log);
    25 	unless defined($out_log);
    22 
       
    23 
    26 
    24 #----------------------------------------------------------------------
    27 #----------------------------------------------------------------------
    25 # Vertical-velocity profile output and plots:
    28 # Vertical-velocity profile output and plots:
    26 #
    29 #
    27 # Data:
    30 # Data:
    29 #
    32 #
    30 # Plots:
    33 # Plots:
    31 # 	*_wprof.ps			vertical velocity profiles (main output plot)
    34 # 	*_wprof.ps			vertical velocity profiles (main output plot)
    32 #----------------------------------------------------------------------
    35 #----------------------------------------------------------------------
    33 
    36 
    34 unless (@out_profile) {
    37 push(@out_profile,"$data_dir/$out_basename.wprof");
    35 	push(@out_profile,"$data_dir/$out_basename.wprof");
    38 push(@out_profile,"plot_wprof($plot_dir/${out_basename}_wprof.ps)")
    36 	push(@out_profile,"plot_wprof($plot_dir/${out_basename}_wprof.ps)")
    39 	if ($plotting_level > 0);
    37 		if ($plotting_level > 0);
       
    38 }
       
    39 
    40 
    40 #--------------------------------------------------------------------------------------------------
    41 #--------------------------------------------------------------------------------------------------
    41 # Vertical-velocity sample data output and plots:
    42 # Vertical-velocity sample data output and plots:
    42 #
    43 #
    43 # Data (in $data_dir):
    44 # Data (in $data_dir):
    44 #	*.wsamp							w sample data
    45 #	*.wsamp							w sample data
    45 #	residuals/<prof>/<ens>.rprof	OPTIONAL: per-ensemble residuals
    46 #	residuals/<prof>/<ens>.rprof	OPTIONAL: per-ensemble residuals
    46 #						
    47 #						
    47 # Plots (in $plot_dir):
    48 # Plots (in $plot_dir):				plotting level: contents
    48 #	*_wsamp.ps						1: vertical velocity time-depth plot
    49 #	*_wprof.ps						1: summary plot
    49 #	*_residuals.ps					1: residual vertical velocity time-depth plot
    50 #	*_bin_residuals.ps				1: residuals binned wrt bin number
    50 #	*_residual_profs.ps				1: residuals binned in depth
    51 #	*_residual_profs.ps				1: residuals binned in depth
    51 #	*_backscatter.ps				1: volume scattering coefficient time-depth plot
    52 #	*_wsamp.ps						2: vertical velocity time-depth plot
    52 #	*_attitude_res.ps				2: residuals binned wrt. pitch/roll
    53 #	*_residuals.ps					2: residual vertical velocity time-depth plot
    53 #	*_residuals12.ps				2: beampair <1,2> residual vertical velocity time-depth plot
    54 #	*_backscatter.ps				2: volume scattering coefficient time-depth plot
    54 #	*_residuals34.ps				2: beampair <3,4> residual vertical velocity time-depth plot
    55 #	*_attitude_res.ps				3: residuals binned wrt. pitch/roll
    55 #	*_attitude_res.ps				2: residuals binned wrt. package attitude
    56 #	*_residuals12.ps				3: beampair <1,2> residual vertical velocity time-depth plot
    56 #	*_acceleration_res.ps			2: residuals binned wrt. package acceleration derivative
    57 #	*_residuals34.ps				3: beampair <3,4> residual vertical velocity time-depth plot
    57 #	*_correlation.ps				3: correlation time-depth plot
    58 #	*_attitude_res.ps				3: residuals binned wrt. package attitude
       
    59 #	*_acceleration_res.ps			3: residuals binned wrt. package acceleration derivative
       
    60 #	*_correlation.ps				4: correlation time-depth plot
    58 #--------------------------------------------------------------------------------------------------
    61 #--------------------------------------------------------------------------------------------------
    59 
    62 
    60 unless (@out_wsamp) {
    63 push(@out_wsamp,"$data_dir/$out_basename.wsamp");
    61 	push(@out_wsamp,"$data_dir/$out_basename.wsamp");
       
    62 	#push(@out_wsamp,sprintf('dump_residual_profiles(%s/residuals/%03d)',$data_dir,$PROF));
       
    63 
    64 
    64 	if ($plotting_level > 0) {
    65 #push(@out_wsamp,sprintf('dump_residual_profiles(%s/residuals/%03d)',$data_dir,$PROF));
       
    66 #push(@out_wsamp,"write_residual_profs('$data_dir/$out_basename.resprof')");
       
    67 
       
    68 if ($plotting_level > 0) {
       
    69 	push(@out_wsamp,"plot_residual_profs($plot_dir/${out_basename}_residual_profs.ps)");
       
    70 	if ($plotting_level > 1) {
    65 		push(@out_wsamp,"plot_wsamp($plot_dir/${out_basename}_wsamp.ps)");
    71 		push(@out_wsamp,"plot_wsamp($plot_dir/${out_basename}_wsamp.ps)");
    66 		push(@out_wsamp,"plot_residuals($plot_dir/${out_basename}_residuals.ps)");
    72 		push(@out_wsamp,"plot_residuals($plot_dir/${out_basename}_residuals.ps)");
    67 		push(@out_wsamp,"plot_residual_profs($plot_dir/${out_basename}_residual_profs.ps)");
       
    68 		push(@out_wsamp,"plot_backscatter($plot_dir/${out_basename}_backscatter.ps)");
    73 		push(@out_wsamp,"plot_backscatter($plot_dir/${out_basename}_backscatter.ps)");
    69 		if ($plotting_level > 1) {
    74 		if ($plotting_level > 2) {
    70 			push(@out_wsamp,"plot_residuals12($plot_dir/${out_basename}_residuals12.ps)");
    75 			push(@out_wsamp,"plot_residuals12($plot_dir/${out_basename}_residuals12.ps)");
    71 			push(@out_wsamp,"plot_residuals34($plot_dir/${out_basename}_residuals34.ps)");
    76 			push(@out_wsamp,"plot_residuals34($plot_dir/${out_basename}_residuals34.ps)");
    72 			push(@out_wsamp,"plot_attitude_residuals($plot_dir/${out_basename}_attitude_res.ps)");
    77 			push(@out_wsamp,"plot_attitude_residuals($plot_dir/${out_basename}_attitude_res.ps)");
    73 			push(@out_wsamp,"plot_acceleration_residuals($plot_dir/${out_basename}_acceleration_res.ps)");
    78 			push(@out_wsamp,"plot_acceleration_residuals($plot_dir/${out_basename}_acceleration_res.ps)");
    74 			if ($plotting_level > 2) {
    79 			if ($plotting_level > 3) {
    75 				push(@out_wsamp,"plot_correlation($plot_dir/${out_basename}_correlation.ps)");
    80 				push(@out_wsamp,"plot_correlation($plot_dir/${out_basename}_correlation.ps)");
    76 			}
    81 			}
    77 		}
    82 		}
    78 	}
    83 	}
    79 }
    84 }
    83 #
    88 #
    84 #	*.tis			combined CTD/LADCP time-series data, including 
    89 #	*.tis			combined CTD/LADCP time-series data, including 
    85 #					package- and LADCP reference layer w
    90 #					package- and LADCP reference layer w
    86 #----------------------------------------------------------------------
    91 #----------------------------------------------------------------------
    87 
    92 
    88 push(@out_timeseries,"$data_dir/$out_basename.tis")
    93 push(@out_timeseries,"$data_dir/$out_basename.tis");
    89 	unless (@out_timeseries);
       
    90 
    94 
    91 #----------------------------------------------------------------------
    95 #----------------------------------------------------------------------
    92 # Per-bin vertical-velocity residuals (plot only)
    96 # Per-bin vertical-velocity residuals (plot only)
    93 #----------------------------------------------------------------------
    97 #----------------------------------------------------------------------
    94 
    98 
    95 push(@out_BR,"plot_mean_residuals($plot_dir/${out_basename}_bin_residuals.ps)")
    99 push(@out_BR,"plot_mean_residuals($plot_dir/${out_basename}_bin_residuals.ps)")
    96 	unless (@out_BR);
   100 	if ($plotting_level > 0);
    97 
       
    98 
   101 
    99 #----------------------------------------------------------------------
   102 #----------------------------------------------------------------------
   100 # Time-lagging correlation statistics (plot only)
   103 # Time-lagging correlation statistics (plot only)
   101 #----------------------------------------------------------------------
   104 #----------------------------------------------------------------------
   102 
   105