defaults.pl
changeset 49 5006e9158207
parent 48 d9309804b6cf
child 51 0f6d9e64cc4f
equal deleted inserted replaced
48:d9309804b6cf 49:5006e9158207
     1 #======================================================================
     1 #======================================================================
     2 #                    D E F A U L T S . P L 
     2 #                    D E F A U L T S . P L 
     3 #                    doc: Tue Oct 11 17:11:21 2011
     3 #                    doc: Tue Oct 11 17:11:21 2011
     4 #                    dlm: Sun Mar 12 12:53:44 2017
     4 #                    dlm: Wed May  2 14:11:50 2018
     5 #                    (c) 2011 A.M. Thurnherr
     5 #                    (c) 2011 A.M. Thurnherr
     6 #                    uE-Info: 459 36 NIL 0 0 72 0 2 4 NIL ofnI
     6 #                    uE-Info: 308 44 NIL 0 0 72 0 2 4 NIL ofnI
     7 #======================================================================
     7 #======================================================================
     8 
     8 
     9 # HISTORY:
     9 # HISTORY:
    10 #	Oct 11, 2011: - created
    10 #	Oct 11, 2011: - created
    11 #	Oct 12, 2011: - added $processing_param_file
    11 #	Oct 12, 2011: - added $processing_param_file
    80 #	Jul 12, 2016: - updated docu on acoustic backscatter
    80 #	Jul 12, 2016: - updated docu on acoustic backscatter
    81 #	Jul 31, 2016: - BUG: -d to disable bin mapping did not work, because
    81 #	Jul 31, 2016: - BUG: -d to disable bin mapping did not work, because
    82 #						 this file is read before the options are parsed
    82 #						 this file is read before the options are parsed
    83 #	Aug  5, 2016: - updated header
    83 #	Aug  5, 2016: - updated header
    84 #	Dec 22, 2016: - added $opt_p
    84 #	Dec 22, 2016: - added $opt_p
       
    85 #	Nov 27, 2017: - added @valid_ensemble_range
       
    86 #	Nov 29, 2017: - replaced opt_i by initial_time_lag
       
    87 #	Apr 24, 2018: - added $water_depth_db_cmd
       
    88 #	May  2, 2018: - added max_hspeed
       
    89 #				  - replaced $PPI_seabed_editing_required by &PPI_seabed_editing_required
    85 
    90 
    86 #======================================================================
    91 #======================================================================
    87 # Output Log Files
    92 # Output Log Files
    88 #	- there are 4 verbosity levels, selected by -v
    93 #	- there are 4 verbosity levels, selected by -v
    89 #		0 :	errors
    94 #		0 :	errors
   110 
   115 
   111 
   116 
   112 #======================================================================
   117 #======================================================================
   113 # Input Data 
   118 # Input Data 
   114 #======================================================================
   119 #======================================================================
       
   120 
       
   121 # The two elements in the @valid_ensemble_range array limit the minimum
       
   122 # and maximum ensemble numbers considered during processing. This is
       
   123 # useful primarily for files with lots of on-deck data.
       
   124 
       
   125 # @valid_ensemble_range = (3000,10000)
   115 
   126 
   116 # Set $opt_4 to 1 (or use the -4 option) to suppress 3-beam LADCP 
   127 # Set $opt_4 to 1 (or use the -4 option) to suppress 3-beam LADCP 
   117 # solutions. This only has an effect for beam-coordinate data.
   128 # solutions. This only has an effect for beam-coordinate data.
   118 
   129 
   119 #$opt_4 = 1;
   130 #$opt_4 = 1;
   245 # Inspired by 2011_IWISE station 8.
   256 # Inspired by 2011_IWISE station 8.
   246 
   257 
   247 $surface_layer_depth = 25;
   258 $surface_layer_depth = 25;
   248 
   259 
   249 
   260 
       
   261 # Water depth is important for precious ping interference editing 
       
   262 # (see below) and for setting the height-above bottom field.
       
   263 # 	- by default, water depth for dowwnward-facing ADCPs is determined
       
   264 #	  from the seabed echo return
       
   265 #	- when water depth is set explicitly either via the $water_depth or
       
   266 #	  the $opt_h variable no search for the seabed is done
       
   267 #	- the variable $water_depth_db_cmd can be set to the name of an 
       
   268 #	  external command, which is used to get nominal water depth
       
   269 #	  from a data base if there is no other water depth information
       
   270 #	  (from echo return or supplied by user). The command will be
       
   271 #	  called with longitude and latitude as the only arguments and
       
   272 #	  is expected to return the water depth in meters.
       
   273 
       
   274 #$water_depth = 2048;					# uncomment to set water depth to 2048m
       
   275 #$opt_h	= 2048;							# uncomment to set water depth to 2048m
       
   276 #$water_depth_db_cmd = 'waterdepth';	# uncomment to use 'waterdepth' command to get water depth
       
   277 
       
   278 
   250 # Previous Ping Interference editing as described in [edit_data.pl]
   279 # Previous Ping Interference editing as described in [edit_data.pl]
   251 #	- enabled by default for WH150 data
   280 #	- enabled by default seabed editing of WH150 data but nothing else
   252 #	- PPI_seabed_editing_required defines a string with a perl expression 
   281 #	- PPI_seabed_editing_required is a function that is called
   253 #	  that is evaluated once the data are loaded; if true, seabed PPI
   282 #	  once the data are loaded for the downlooker only; if it 
   254 #	  editing is enabled 
   283 #	  returns true, seabed PPI editing is enabled
   255 #	- to enable PPI editing without condition, set $PPI_editing = 1;
   284 #	- PPI_surface_editing_required is a function that is called
       
   285 #	  once the data are loaded for the uplooker only; if it 
       
   286 #	  returns true, sea surface PPI editing is enabled
   256 #	- 2014 CLIVAR P16 #47 has a slight discontinuity at 4000m; this
   287 #	- 2014 CLIVAR P16 #47 has a slight discontinuity at 4000m; this
   257 #	  discontinuity is there without PPI filtering but gets slightly
   288 #	  discontinuity is there without PPI filtering but gets slightly
   258 #	  worse with PPI filtering. Setting $PPI_extend_upper_limit to 
   289 #	  worse with PPI filtering. Setting $PPI_extend_upper_limit to 
   259 #	  1.03-1.05 partially removes the discontinuity but the profile
   290 #	  1.03-1.05 partially removes the discontinuity but the profile
   260 #	  never gets better than the profile wihtout PPI editing. Note
   291 #	  never gets better than the profile wihtout PPI editing. Note
   261 #	  the only reason why the upper PPI should be extended is if the
   292 #	  the only reason why the upper PPI should be extended is if the
   262 #	  recorded ping intervals are inaccurate as the upper limit is
   293 #	  recorded ping intervals are inaccurate as the upper limit is
   263 #	  set by the shortest acoustic path between the ADCP and the 
   294 #	  set by the shortest acoustic path between the ADCP and the 
   264 #	  seabed.
   295 #	  seabed.
   265 
   296 
   266 $PPI_seabed_editing_required = '($LADCP{BEAM_FREQUENCY} < 300)';
   297 sub PPI_seabed_editing_required()
   267 
   298 {
   268 #$PPI_editing = 1;						# uncomment to enable PPI always
   299 #	return 1;								# uncomment to enable unconditional PPI editing
   269 #$PPI_extend_upper_limit = 1.03;		# see comments above
   300 	return ($LADCP{BEAM_FREQUENCY} < 300);	# low-frequency instruments require PPI editing
       
   301 }
       
   302 
       
   303 sub PPI_surface_editing_required()
       
   304 {
       
   305 	return 0;								# no sea surface PPI editing by default
       
   306 }
       
   307 
       
   308 #$PPI_extend_upper_limit = 1.03;			# see comments above
   270 
   309 
   271 
   310 
   272 # The following variables control the "non-obvious" sidelobe editing for
   311 # The following variables control the "non-obvious" sidelobe editing for
   273 # contamination from the seabed for the UL and from the sea surface for the
   312 # contamination from the seabed for the UL and from the sea surface for the
   274 # DL. Tests with DoMORE-2 data (WH150 DL, WH300 UL) strongly suggest that
   313 # DL. Tests with DoMORE-2 data (WH150 DL, WH300 UL) strongly suggest that
   283 # from the surface. 
   322 # from the surface. 
   284 
   323 
   285 $vessel_draft					= 6;		# in meters
   324 $vessel_draft					= 6;		# in meters
   286 
   325 
   287 
   326 
       
   327 # The following function, which is called after the LADCP data have been 
       
   328 # read, must return the maximum horizontal reference-layer
       
   329 # speed that is allowed. The following values are based on 2018 GO-SHIP
       
   330 # S4P profile #106 where the CTD rosette was dragged quickly during
       
   331 # the latter part of the upcast. Of course, it is possible that the
       
   332 # differnces between the UL and DL data could be due to tilt-
       
   333 # sensor differences, rather than due to instrument type.
       
   334 
       
   335 sub max_hspeed()
       
   336 {
       
   337 	if (abs($LADCP{BEAM_FREQUENCY}-300) <= 25) {		# 300kHz Workhorse
       
   338 		$max_hspeed = 0.55;	# meters/second
       
   339 	} elsif (abs($LADCP{BEAM_FREQUENCY}-150) <= 25) {	# 150kHz Workhorse
       
   340 		$max_hspeed = 0.35;	# meters/second
       
   341 	} else {
       
   342 		warning(2,"unknown horizontal speed limit for this instrument frequency ($LADCP{BEAM_FREQUENCY} kHz)\n");
       
   343 		$max_hspeed = 9e99;
       
   344 	}
       
   345 }
       
   346 
   288 #======================================================================
   347 #======================================================================
   289 # Time Lagging
   348 # Time Lagging
   290 #======================================================================
   349 #======================================================================
   291 
   350 
   292 # The -i option allows defining an initial guess for the time lag between
   351 # The following variable allows specifying an initial guess for the time 
   293 # the LADCP and the CTD data.
   352 # lag between the LADCP and the CTD data. The -i option overrides any value
   294 
   353 # set in the [ProcessingParams] file.
   295 # $opt_i = 567;
   354 
       
   355 # $initial_time_lag = 567;
   296 
   356 
   297 
   357 
   298 # The following variables define the bins used to calculate the reference-
   358 # The following variables define the bins used to calculate the reference-
   299 # layer velocities used for time lagging.
   359 # layer velocities used for time lagging.
   300 
   360