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
/
README.txt
129 lines (102 loc) · 5.51 KB
/
README.txt
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
README
This is the README file for the Matlab code to process AC data.
==========================================================================
Section 1:
General code organization
==========================================================================
The AC processing code consists of the following types of code:
A) Scripts to hold the processing logic
B) Data objects to hold the data, and the functions to process the data
C) Output data files, plots, and a processing log
Data is processed by YEAR_DAY - a 24 hour period of data which is part of a
CRUISE_LEG which is part of a CRUISE.
==========================================================================
Section 2:
Main processing files
==========================================================================
The code specifically contains the following scripts:
1) accode.ini - a text .ini file, editable to set all the
parameters needed for processing. Controls how
data is processed as well as what processing
takes place.
2) RUN_CODE.m - a script to run one/more days of code all at once
3) IngestManager.m - a script to call the objects and methods needed
for ingesting raw data files
4) PreProcessingManager.m - a script to call the objects and methods needed
for finding the TSW/FSW transitions in a/c data,
flow, and valve data; checking transitions
(manually if necessary); synchronizing a/c data
with flow/valve data; separating TSW/FSW
5) ProcessingManager - a script to call the objects and methods needed
to process the separated a/c TSW/FSW data
6) OutputManager - a script to do the final processing needed to
output various file formats (SeaBASS) and final
plots
7) CheckManager - a script to read SeaBASS data files and output
plots for visual checking purposes
==========================================================================
Section 3:
Setting up a new cruise to process
==========================================================================
The code looks for three folders to put data in:
- Processed Data & Plots for each YEAR_DAY(for now set to: PROCESSED/ )
- A Log file for each YEAR_DAY (for now set to: LOGS/ )
- A directory for saving intermittant files during processing that will get
overwritten by the next YEAR_DAY processed (for now set to: TEMP/ )
1. Create a directory for each of these, if it doesn't already exist,
and update accode.ini to reference the full path for each of these files.
2. Make sure prepacs.exe is executable by your system. You might need to
put it on your path.
3. Update accode.ini to hold all the variables you want for
processing
Change the paths for your DATA/ LOGS/ PROCESSED/ and TEMP/ directories.
Change other variables based on how you want to process the data
4. Update the import methods for each data type you are using (ac, tsg, flow, etc.)
(See section 4)
5. Run RUN_CODE.m
==========================================================================
Section 4:
Setting up data files
==========================================================================
In this code, the data sources are decoupled from the data types. This means
that different cruises can have the data stored in different formats and
very little code needs to be changed.
Before any code can be run, the import functions for importing your raw data
need to be created. You can do this manually, or automatically in Matlab.
Four examples are given:
importfileACS - the script used for TaraMed to import data output
by prepacs.exe for .bin AC files
importfileACS_dat - the script used for TaraMed to import data output
by prepacs.exe for .dat AC files
importfileFlow - the script used for TaraMed to import flow files
containing flow and valve data
importfileTSG - the script used for TaraMed to import TSG files
containing
It is the job of the "importfiles" to know the file layout of the file and
identify the data correctly. The easiest thing might be to edit one of the existing
import files to fit your data.
When IngestManager runs, the objects that call the import methods and assign the data appropriately are:
ACFileLoader
GPSFileLoader
TSGFileLoader
It is the job of the FileLoaders to call the correct import method and assign
the raw data appropriately to the correct data object
After running IngestManager, the assigned data is now in the data objects:
ACData
TemperatureData
SalinityData
GPSData
FlowData
ValveData
It now no longer matters how the raw data was initally stored, it is now in
a uniform data structure.
==========================================================================
Section 5:
Editing TSW/FSW transitions manually
==========================================================================
1. Set MANUAL_MODE = true in accode.ini
2. Run RUN_CODE.m. It will stop at the section necessary to be run manually/
3. Open PreProcessingManager. Follow the directions when you get to the manual
sections.
4. If you need to re-run the code with the data you set manually, set
REPROCESS_MANUAL = true; (keep MANUAL_MODE = false;)