RSK2ODV.m
Arguments
Input
-Required-
RSK
-Optional-
channel
: ' ' (all channels default).profile
: [ ] (all profiles default).direction
: [ ] (both directions default).outputdir
: ' ' (current directory as default)comment
: ' '
Output
- ODV file(s)
RSK2ODV
outputs channel data and metadata from the RSK structure into one or more ODV files. The ODV file header contains logger metadata, station metadata (see RSKaddmetadata). The data table starts with a row of variable names and units above each column of channel data. If the data has been organized into profiles, then one file will be written for each profile. Furthermore, an extra column called 'cast_direction' will be included. The column will contain 'd' or 'u' to indicate whether the sample is part of the downcast or upcast, respectively.
Users can customize which channel, profile for outputs, output directory and comments attached to the end of the header.
Example using RSK2ODV
as below:
rsk = RSKopen(fname);
rsk = RSKreadprofiles(rsk);
RSK2ODV(rsk,'channel',{'Conductivity','Pressure','Dissolved O2'},'outputdir','/Users/decide/where','comment','Hey Jude');
Example of a ODV file created with RSK2ODV
:
//<Creator>RBR</Creator>
//<CreateTime>30-Nov-2017 17:20:01</CreateTime>
//<Software>RSKtools</Software>
//<Source></Source>
//<SourceLast-Modified></SourceLast-Modified>
//<Version>ODV Spreadsheet V4.0</Version>
//<DataField>Ocean</DataField>
//<DataType>Profile</DataType>
//<DataVariable>label="Cast_direction" value_type="TEXT" is_primary_variable="F" comment="d-downcast u-upcast"</DataVariable>
//<MissingDataValues>NaN</MissingDataValues>
// Model=RBRmaestro
// Firmware=12.03
// Serial=80217
//Processing history:
///Users/RZhang/code/rsk_files/080217_20150919_1417.rsk opened using RSKtools v2.3.0.
//Sea pressure calculated using an atmospheric pressure of 10.1325 dbar.
//Comment: Hey Jude
Cruise Station Type yyyy-mm-ddTHH:MM:ss.FFF Longitude[degrees_east] Latitude [degrees_north] Bot. Depth [m] Conductivity[mS/cm] Pressure[dbar] Dissolved_O2[%] Cast_direction
C1 S1 C 2015-09-19T08:59:05.000 0.0 0.0 0.0 34.2349 79.0907 472.6810 d
C1 S1 C 2015-09-19T08:59:05.167 0.0 0.0 0.0 34.2363 78.8998 472.5748 d
C1 S1 C 2015-09-19T08:59:05.333 0.0 0.0 0.0 34.2414 78.7738 472.5124 d
Cruise, station, longitude, latitude and bottom depth are set to `C1`, `S1`, `0.0`, `0.0` and `0.0` respectively as default. They will be filled automatically with Ruskin annotations if they were added by the user. Alternatively, they can be populated with RSKaddmetadata.m.