default_paths.pl
changeset 42 f7690c7b92e0
child 45 6d49c7420a6c
equal deleted inserted replaced
41:6bddb82924e3 42:f7690c7b92e0
       
     1 #======================================================================
       
     2 #                    D E F A U L T _ P A T H S . P L 
       
     3 #                    doc: Tue Mar 29 07:09:52 2016
       
     4 #                    dlm: Tue Mar 29 13:47:24 2016
       
     5 #                    (c) 2016 A.M. Thurnherr
       
     6 #                    uE-Info: 11 0 NIL 0 0 72 0 2 4 NIL ofnI
       
     7 #======================================================================
       
     8 
       
     9 # HISTORY:
       
    10 #	Mar 29, 2016: - split from [defaults.pl]
       
    11 
       
    12 #======================================================================
       
    13 # ProcessingParams file selection
       
    14 #======================================================================
       
    15 
       
    16 if (-r "ProcessingParams.$RUN") {
       
    17 	$processing_param_file = "ProcessingParams.$RUN";
       
    18 } elsif (-r "ProcessingParams.default") {
       
    19 	$processing_param_file = "ProcessingParams.default";
       
    20 } elsif (-r "ProcessingParams") {
       
    21 	$processing_param_file = "ProcessingParams";
       
    22 } else {
       
    23 	error("$0: cannot find either <ProcessingParams.$RUN> or <ProcessingParams[.default]>\n");
       
    24 }
       
    25 
       
    26 #======================================================================
       
    27 # Output
       
    28 #======================================================================
       
    29 
       
    30 # The "base name" of all output files (usually 0-padded 3-digits)
       
    31 
       
    32 $out_basename = sprintf('%03d',$PROF);
       
    33 
       
    34 
       
    35 # Output subdirectories
       
    36 #	these are automatically created as long as they don't contain a "/"
       
    37 
       
    38 $data_dir = $plot_dir = $log_dir = $RUN;
       
    39 unless (-d $data_dir) {
       
    40 	unless ($data_dir =~ m{/}) {
       
    41 		warning(0,"Creating data sub-directory ./$data_dir\n");
       
    42 		mkdir($data_dir);
       
    43 	}
       
    44 	error("$data_dir: no such directory\n") unless (-d $data_dir);
       
    45 }
       
    46 unless (-d $plot_dir) { 										    
       
    47 	unless ($plot_dir =~ m{/}) {
       
    48 		warning(0,"Creating plot sub-directory ./$plot_dir\n");
       
    49 		mkdir($plot_dir);
       
    50 	}
       
    51 	error("$plot_dir: no such directory\n") unless (-d $plot_dir);
       
    52 }
       
    53 unless (-d $log_dir) {
       
    54 	unless ($log_dir =~ m{/}) {
       
    55 		warning(0,"Creating log-file sub-directory ./$log_dir\n");
       
    56 		mkdir($log_dir);
       
    57 	}
       
    58 	error("$log_dir: no such directory\n") unless (-d $log_dir);
       
    59 }
       
    60            
       
    61 
       
    62 #----------------------------------------------------------------------
       
    63 # Processing log (diagnostic messages) output
       
    64 #----------------------------------------------------------------------
       
    65 
       
    66 $out_log = "$log_dir/$out_basename.log";
       
    67 
       
    68 
       
    69 #----------------------------------------------------------------------
       
    70 # Vertical-velocity profile output and plots:
       
    71 #
       
    72 # Data:
       
    73 #	*.wprof				vertical velocity profiles
       
    74 #
       
    75 # Plots:
       
    76 # 	*_wprof.ps			vertical velocity profiles (main output plot)
       
    77 #----------------------------------------------------------------------
       
    78 
       
    79 @out_profile = ("plot_wprof($plot_dir/${out_basename}_wprof.ps)",
       
    80 			    "$data_dir/$out_basename.wprof");
       
    81 
       
    82 
       
    83 #----------------------------------------------------------------------
       
    84 # Vertical-velocity sample data output and plots:
       
    85 #
       
    86 # Data (in $data_dir):
       
    87 #	*.wsamp							w sample data
       
    88 #	residuals/<prof>/<ens>.rprof	OPTIONAL: per-ensemble residuals
       
    89 #						
       
    90 # Plots (in $plot_dir):
       
    91 #	*_wsamp.ps						vertical velocity time-depth plot
       
    92 #	*_residuals.ps					residual vertical velocity time-depth plot
       
    93 #	*_backscatter.ps				volume scattering coefficient time-depth plot
       
    94 #	*_correlation.ps				OPTIONAL: correlation time-depth plot
       
    95 #----------------------------------------------------------------------
       
    96 
       
    97 push(@out_wsamp,"$data_dir/$out_basename.wsamp");
       
    98 #push(@out_wsamp,sprintf('dump_residual_profiles(%s/residuals/%03d)',$data_dir,$PROF));
       
    99 
       
   100 push(@out_wsamp,"plot_residuals($plot_dir/${out_basename}_residuals.ps)");
       
   101 push(@out_wsamp,"plot_backscatter($plot_dir/${out_basename}_backscatter.ps)");
       
   102 push(@out_wsamp,"plot_wsamp($plot_dir/${out_basename}_wsamp.ps)");
       
   103 #push(@out_wsamp,"plot_correlation($plot_dir/${out_basename}_correlation.ps)");
       
   104 
       
   105 
       
   106 #----------------------------------------------------------------------
       
   107 # Time-series output
       
   108 #
       
   109 #	*.tis			combined CTD/LADCP time-series data, including 
       
   110 #					package- and LADCP reference layer w
       
   111 #----------------------------------------------------------------------
       
   112 
       
   113 @out_timeseries = ("$data_dir/$out_basename.tis");
       
   114 
       
   115 #----------------------------------------------------------------------
       
   116 # Per-bin vertical-velocity residuals (plot only)
       
   117 #----------------------------------------------------------------------
       
   118 
       
   119 @out_BR	= ("plot_mean_residuals($plot_dir/${out_basename}_mean_residuals.ps)");
       
   120 
       
   121 
       
   122 #----------------------------------------------------------------------
       
   123 # Time-lagging correlation statistics (plot only)
       
   124 #----------------------------------------------------------------------
       
   125 
       
   126 @out_TL = ("plot_time_lags($plot_dir/${out_basename}_time_lags.ps)");
       
   127 
       
   128 1;	# return true
       
   129