This repository has been archived by the owner on Jun 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
accode.ini
451 lines (362 loc) · 16.4 KB
/
accode.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
# accode.ini
#
# .ini file containing all initialization parameters for ac code.
# This file is called by RUN_CODE.m to create a structure containing
# processing parameters, called 'params'. These processing parameters
# control how the data is processed.
#
# Other m-files required: ini2struct.m
# Subfunctions: none
# MAT-files required: none
#
# See also: RUN_LEG
# Author: Wendy Neary
# MISCLab, University of Maine
# email address: wendy.neary@maine.edu
# Website: http://misclab.umeoce.maine.edu/index.php
# Dec 2015; last update: 26-Feb-16
# 16-Feb-16: moved variables out of OutputManager and into this file.
# 26-Feb-16: Added new variables for OutputManager to control which
# uncertainties & data are printing for SeaBASS.
# 21-Sep-16: Moved IngestManager name to this file.
#--------------------------- BEGIN CODE ----------------------------------
# Note: Different sections start with [section name]
###########################################################################
# Overall variables affecting which data to run, and what to do to it
[RUN]
###########################################################################
# 1. Which yearday(s) to process
# This can be a single yearday [xxx] or a set [xxx:xxx] of yeardays
YEAR_DAYS = [299];
# -------------------------------------------------------------------------
# 2. Choose to run all the code, or only certain parts:
#
# To run all code: set all equal to TRUE;
# Run in parts: set the part you want to run = true; others = false;
# Make sure to edit variables indicated by #see X note.
INGEST = true;
PREPROCESSING = true; # see 2a.
PROCESSING = true; # see 2b.
OUTPUT = true; # see 2c.
CHECK = true; # see 2c.
# Variables for running specific parts
# -------------------------------------------------------------------------
# RUN > PREPROCESSING VARIABLES
# -------------------------------------------------------------------------
# 2a. Options for running PreprocessingManager:
# If PREPROCESSING above = true, set these variables:
# If this is set to TRUE, to software will load previously saved
# data from IngestManager from disk. This can be useful if you have already
# run IngestManager and saved the data to disk and don't want to reload it
# all.
# If you are running a YEAR_DAY for the first time, or are running
# PreProcessingManager and already have the ingest data in memory,
# set this to FALSE:
LOAD_INGEST_DATA_FROM_DISK = false;
# If you are running data for first time and need to find the TSW and FSW
# intervals automatically, set this to TRUE:
# If these have already been found, you can skip this step (long) by setting
# this variable to FALSE.
FIND_INITIAL_INTERVALS = true;
# If you want to set TSW/FSW intervals manually, set this to TRUE:
# The code will stop (return) at a set point and you will need to open
# PreProcessingManager and run it manually from the designated line.
MANUAL_MODE = false;
# If MANUAL_MODE = true, choose one of these options:
# - If you want the code to check the transitions it found automatically before
# you edit them manually, set this to true:
MANUALLY_EDIT_CHECKED_TRANSITIONS = false;
# - Otherwise set this to false:
MANUALLY_EDIT_RAW_TRANSITIONS = false;
# If you are re-running PreProcessingManager, after having manually set
# FSW/TSW transitions, and want to use the changed TSW/FSW
# variables you have already set (and skip setting them again) set this to TRUE.
REPROCESS_MANUAL = false;
# -------------------------------------------------------------------------
# RUN > PROCESSING VARIABLES
# -------------------------------------------------------------------------
# 2B. Options for running ProcessingManager:
# If PROCESSING = TRUE above, set these variables:
# Load the data from PreProcessingManager from disk
# If you have not just run PreProcessingManager, or have the data from PreProcessingManager
# in memory, or just want to load the data saved to disk from PreProcessingManager,
# set this to TRUE:
# If you are running all 'managers', and everything will be in memory,
# keep this set to false.
LOAD_PREPROCESS_DATA_FROM_DISK = false;
# -------------------------------------------------------------------------
# RUN > OUTPUT/CHECK VARIABLES
# -------------------------------------------------------------------------
# 2c. Options for running OutputManager & CheckManager
# Load the data from ProcessingManager from disk
# If you have not just run ProcessingManager, or have the data from ProcessingManager
# in memory, or just want to load the data saved to disk from ProcessingManager,
# set this to TRUE:
# If you are running all 'managers', and everything will be in memory,
# keep this set to false.
LOAD_OUTPUT_DATA_FROM_DISK = false;
LOAD_CHECK_DATA_FROM_DISK = false;
# ------------------------------------------------------------------------
# Set name for IngestManager for RUN_CODE to call
INGEST_MANAGER_NAME = 'AMT_IngestManager.m';
# 3. Logging variables
# This code produces a log. The logging statements are output to both the
# screen and a log file. You can set the amount of information to both.
# The options currently in use are: 'DEBUG'; 'INFO'; and 'ERROR'
# where DEBUG produces the most information and ERROR produces the least
LOG_SCREEN_OUTPUT_LEVEL = 'DEBUG'
LOG_FILE_OUTPUT_LEVEL = 'DEBUG';
# Set the directory to create the log files for each yearday
LOG_DIRECTORY = 'C:\Users\Wendy\Documents\data\AMT\LOGS';
# 4. Plotting variables
# Choose an option to create debug intermediate plots
# true - creates extra debug plots
# false - suppresses plot creation
CREATE_DEBUG_PLOTS = true;
# 5. Save Intermediate Data
SAVE_DATA = true;
###########################################################################
# Specific options for INGESTMANAGER
[INGEST]
###########################################################################
# Set this to true if you want Matlab to clean up variables as it goes along
CLEAR_VARS = true;
# -------------------------------------------------------------------------
# Ingest > Cruise Info
# -------------------------------------------------------------------------
# The year the data was collected
YEAR = 2014;
# name of cruise
CRUISE = 'AMT';
# CHANGEME 1/3 for a new cruise leg, or part of a multi-cruise project
# i.e. NAAMES01 for the NAAMES project.
# The name of the cruise. This will print on the plots
CRUISE_LEG = 'AMT24'; # Leg 01
# -------------------------------------------------------------------------
# Ingest > AC device info
# -------------------------------------------------------------------------
# Serial number of the ac device
# If using WAP and not calling specific device file, set to 'NA'
AC_SERIAL_NUMBER = 'NA';
# Device file location for this cruise
DEVICE_FILE_TYPE = 'WAP' # or COMPASS
DEVICE_FILE_LOCATION = 'C:\Users\Wendy\Documents\data\AMT\ACS\amt24_14_299_24_ACS.020';
# For AMT24, flow data is in the OCEANLOGGER
FLOW_EXISTS = true;
VALVE_EXISTS = false;
# -------------------------------------------------------------------------
# Ingest > AC VARIABLES
# -------------------------------------------------------------------------
# Set the directory for the processed data
DATA_OUTPUT_MAIN_DIRECTORY = 'C:\Users\Wendy\Documents\data\AMT\PROCESSED\';
# Set USE_ACFILELOADER to TRUE to load AC data from data files
# Set USE_ACFILELOADER to FALSE to load a saved AC data structure from disk
USE_ACFILELOADER = true;
# Set SAVE_AC_TO_DISK to TRUE to save a copy of the raw ac data to disk.
# This can avoid the lengthy process of reading ac files from binary with
# prepacs when reprocessing for some reason
SAVE_AC_TO_DISK = true;
# Directory where ACS files are
AC_DIRECTORY = 'C:\Users\Wendy\Documents\data\AMT\ACS\';
# Directory where prepacs.exe is:
PREPACS_BIN = 'C:\Users\Wendy\Documents\MATLAB\ACCode\prepacs.exe';
# A filename for the temporary output file that PREPACS creates
PREPACS_OUTPUT_FILE = 'prepacs.tmp';
# Units of measure for a/c data
AC_UNITS='1/m';
# SWITCH THESE 3 PARAMETERS FOR RUNNING EITHER .DAT/.BIN or files from WAP
# ------------------------------------------------------------------------
# 1) A matlab format spec for the AC file names
# Either 'dat' or 'bin'
#AC_FILE_LOADER_TYPE = 'bin';
#AC_FILE_LOADER_TYPE = 'dat';
AC_FILE_LOADER_TYPE = 'WAP';
# 2) Set the Matlab format spec for the filenames of the files. Extract
# whichever variables the ACFileLoader needs for date-stamping the data.
# Example: acs091_20151106171234 contains: acsDEV_yyyymmddHHMM
# So we extract DEV, yyyy, mm, and dd.
# Example #2: amt24_14_299_24_ACS.005 contains: PRJCT_yy_doy_pj_ACS.HHH
# Se we extract day-of-year
# Example for .bin:
#AC_FILE_FORMAT = acs%03s_%4d%02d%02d*.bin;
# example for .dat
#AC_FILE_FORMAT = 'acs%03s_%4d%02d%02d*.dat';
# example for WAP
AC_FILE_FORMAT = 'amt24_14_%03d_24_ACS.*';
# 3) The name of the matlab import function to read the AC files
#AC_IMPORT_METHOD_NAME = 'importfileACS';
#AC_IMPORT_METHOD_NAME = 'importfileACS_dat';
AC_IMPORT_METHOD_NAME = 'importfileACS_WAP';
# -------------------------------------------------------------------------
# INGEST > Ancillary Data Types
# -------------------------------------------------------------------------
# INGEST > Ancillary Data Types > OceanLogger
# -------------------------------------------------------------------------
# Example file name convention for AMT24:
# oceanlogger.300
# The directory where the TSG files are located
OCEANLOGGER_DIRECTORY = 'C:\Users\Wendy\Documents\data\AMT\ships_data\';
# The TSG file name format spec
OCEANLOGGER_FILE_FORMAT = 'oceanlogger.%03d';
# The name of the matlab method which imports a TSG file
OCEANLOGGER_IMPORT_METHOD_NAME = 'importfileOceanLogger2';
# units of measure for the temperature data
TEMP_UNITS = 'celcius';
# units of measure for the salinity data
SAL_UNITS = 'psu';
# units of measure for the flow data
FLOW_UNITS = 'l/min';
# -------------------------------------------------------------------------
# INGEST > Ancillary Data Types > Seatex
# -------------------------------------------------------------------------
# The directory where the SEATEX files are located
SEATEX_DIRECTORY = 'C:\Users\Wendy\Documents\data\AMT\ships_data\';
# The TSG file name format spec
SEATEX_FILE_FORMAT = 'seatex-gga.%03d';
# The name of the matlab method which imports a TSG file
SEATEX_IMPORT_METHOD_NAME = 'importfileSEATEX';
# units of measure for the GPS data
GPS_UNITS = 'DD';
# -------------------------------------------------------------------------
# INGEST > Ancillary Data Types > Example for another data type "ABC"
# -------------------------------------------------------------------------
# The directory where the "ABC" files are located
#ABC_DIRECTORY = 'C:\Users\Wendy\Documents\data\AMT\ships_data\';
# The TSG file name format spec
#ABC_FILE_FORMAT = 'ABC_FileName.%03d';
# The name of the matlab method which imports a TSG file
#ABC_IMPORT_METHOD_NAME = 'importfileSEATEX';
# units of measure for each data type:
# units of measure for the data type1
#DATATYPE1_UNITS = 'DD';
# units of measure for the data type2
#DATATYPE2_UNITS = 'DD';
###########################################################################
# preprocessing variables
[PREPROCESS]
###########################################################################
# Use valve data, if available, for flow and/or ac transition marking. If
# this is false, both USE_VALVE_FOR_AC_TRANSITIONS and
# USE_VALVE_FOR_FLOW_TRANSITIONS should be false
# if this is true, either USE_VALVE_FOR_AC_TRANSITIONS or
# USE_VALVE_FOR_FLOW_TRANSITIONS should be true
USE_VALVE_DATA = false;
# How the software finds the transitions between TSW and FSW. It can either
# the valve data (on/off); the flow data (looks for transitions in flow) or
# the ac data itself
# one has to be true: use_valve, use_flow or use_ac for ac_transitions
USE_VALVE_FOR_AC_TRANSITIONS = false;
USE_FLOW_FOR_AC_TRANSITIONS = false;
USE_AC_FOR_AC_TRANSITIONS = true;
# Use valve transition info to set flow and ac transitions?
USE_VALVE_FOR_FLOW_TRANSITIONS = false;
# Use both valve and flow data for processing?
# Process the flow data in some way -- find/mark/check transitions
# i.e. for Tara Mediterranean
USE_FLOW_DATA = true;
# Use only flow data for processing?
# Not being used anymore?
#USE_FLOW_ONLY = false;
# Synchronize the ac-data to flow data?
# This is useful if there is a lag between the measurement in flow and the
# ac meter.
SYNC_AC_TO_FLOW = false;
# Smooth the AC data for finding transitions?
SMOOTH_ACS = true;
# Manually offset the start of each FSW period by a given timespan?
OFFSET_FSW_STARTS = true;
# Set the manual offset time (in seconds) for each FSW period
OFFSET_FSW_TIME = 60; # changed for 316
# Variables for setRunningMeds() function, which calls findFSWTSWRunMeds()
# Amount of time used for finding running medians
PP_TIMESPAN = 19200; #19200 is 80 minutes * 240 readings/min
FLOW_PP_TIMESPAN = 4800; #4800 is 80 minutes * 60 readings/minute
SAMPLING_FREQ = 240; #number of ac readings taken per minute
CYCLE_FREQ = 60; #How often the whole FSW/TSW cycle starts over
TSW_DURATION = 50; #How long each TSW period lasts (minutes)
FSW_DURATION = 10; #How long each FSW period lasts (minutes)
TSW_DUR_TOLERANCE = .2; #How much of a tolerance to leave for checking periods
FSW_DUR_TOLERANCE = .3; #How much of a tolerance to leave for checking periods
FREQ_TOLERANCE = .1; #How much of a tolerance to leave for checking periods
###########################################################################
# processing variables
[PROCESS]
###########################################################################
# Choose which statistic to use for calculating bins:
# either 'median' or 'mean'
STAT_FOR_BINNING = 'median';
BIN_METHOD = 'median';
# if 'median', choose the percentiles for calculating variability
UPPER_PERCENTILE = 97.5;
LOWER_PERCENTILE = 2.5;
# Set which scattering correction to use for SeaBASS output
# 'FLAT' or 'ROTTGERS' or 'SLADE'
SCATTERING_CORR = 'SLADE';
# Choose either true or false for the following scattering correction
# methods to be used:
SCATTERING_CORR_SLADE = true;
SCATTERING_CORR_ST = false;
SCATTERING_CORR_ROTTGERS = true;
SCATTERING_CORR_FLAT = false;
# set the sample size for calculating uncertainty
UNCERTAINTY_N = 60;
# set the threshold for the STD checks in binning. Data with an STD
# above this threshold will be flagged as suspect
a_STD_THRESH = .015 #.015 for everything
c_STD_THRESH = .03 #.03 for everything
#MEAN_MEDIAN_FILTER = (abs(TSW_bin_median - TSW_bin_mean))./...
# (TSW_bin_median-FSW_interp_median) > max(0.3 , 0.001./...
# (TSW_bin_median-FSW_interp_median));
MEAN_MEDIAN_FILTER_1 = 0.3;
MEAN_MEDIAN_FILTER_2 = 0.001;
# Set the bin size (example: ONE MINUTE BINS )
BIN_SIZE = datenum(0,0,0,0,1,0);
# Set the threshold (in minutes) for copying GPS data if there are gaps
# i.e. copy the data if the gap is over 2 minutes
GPS_GAP_THRESHOLD = 2;
# set the type of method to use for binning TSG data
# either 'bin' or 'interpolate'
TSG_BIN_METHOD = 'bin';
# Choose whether to use a calculation of uncertainty for ap as
# the calculation between SLADE and ROTTGERS corrections
AP_UNCERTAINTY_BETWEEN_CORRECTIONS = true;
# Choose whether to unsmooth the data as the very last step
UNSMOOTH_DATA = true;
###########################################################################
# output variables
[OUTPUT]
###########################################################################
# 1.
# Choose which corrected data to use for SeaBASS (can only have one for ap)
USE_SLADE = true;
USE_ROTTGERS = false;
USE_FLAT = false;
# 2.
# Choose which data to output for ap uncertainty:
# choose only one below
# this is: abs(ap_slade-ap_rottgers)/2
USE_AP_UNCERTAINTY_BETWEEN_CORRECTIONS = false;
# this is: (InterpBinVariability + BinVariability)
USE_AP_UNCERTAINTY_1 = false;
# this is std of the bin, minus the outliers
USE_AP_STD = true;
# 3.
# which data to output for cp uncertainty:
# choose only one below
# this is: (InterpBinVariability + BinVariability)
USE_CP_UNCERTAINTY_1 = false;
# this is std of the bin, minus the outliers
USE_CP_STD = true;
# 4.
# variables to print on SeaBASS header:
SEABASS_FILE_PREFIX = 'AMT24_ACS_apcp';
INVESTIGATOR = 'Giorgio_DallAlmo';
AFFILIATION = 'Plymouth_Marine_Laboratory';
CONTACT = 'gdal@pml.ac.uk';
EXPERIMENT = 'AMT';
DOCUMENTATION = 'AMTdoc.pdf,acs091.dev';
CALIBRATION_FILES = 'AMTdoc.pdf';
DATA_TYPE = 'flow_thru';
DATA_STATUS = 'final';
MEASUREMENT_DEPTH = '1.5';
#--------------------------- END CODE ----------------------------------