Ship CTD: Post-processing in Matlab / NetCDF-Creator#
Matlab#
After the automatic batch processing, the next step is to read the .cnv files into Matlab and export them as .mat files.
CTD data#
Using cruiseTag/script/cnv2mat.m
Follow instructions in script
For each stations range of the same setup check a
.cnvfile and update the reading function in the end of the script for each station range.
Bottle data#
Using cruiseTag/script/btl2mat.m
Follow instructions in script
For each station range of the same setup check a
.cnvfile and update the reading function in the end of the script for each station range.
Sample number logsheets#
Fill .xls sheet located at cruiseTag/logsheets/logsheet.xls
Salinity measurements#
If not relevant comment out respective part in cruiseTag/script/btl2mat.m
Fill .xls sheet located at cruiseTag/salts/SALTS.xls. Open cruiseTag/salts/salts2mat.m and adjust sample_number = [1:24]'; to the represent the number of samples in the sheets. Run the script which will create the file cruiseTag/salts/salts2mat.mat which is loaded in the bottle file processing.
Winkler measurements#
If not relevant comment out respective part in cruiseTag/script/btl2mat.m
Fill .xlsx sheet located at cruiseTag/winkler/winkler.xlsx.
Fill session
Get summary from next sheet tab
Export the summary sheet as
.csvOpen
cruiseTag/winkler/winkler_summary.xlsxData > From Text/CSV > import saved
winkler.csvThe reason for step 3-5 is that Matlab can otherwise not read the result as a number but rather reads the equation.
Finally, run the script cruiseTag/winkler/wink2mat.m which will create the file cruiseTag/winkler/wink2mat.mat which is loaded in the bottle file processing.
Merge dataset and add results#
Using cruiseTag/script/combine_mat.m
Adjust variables in script as needed The script does:
Merge the CTD sensor and bottle data into one Matlab
.matfileInclude CDOM result
Remove moonpool bad data
Adds further necessary variables for NetCDF conversion
NetCDF-Creator#
Requires the NetCDF-Creator Software.
Uses the .json config file in the cruiseTag/netcdf directory. Use one from a previous year as cruiseTag and adjust it to the needs.
Load the datafile
cruiseTag/mat/final.matSave in
cruiseTag/netcdf/bin,cruiseTag/netcdf/botorcruiseTag/netcdf/carbon_chemistrydepending on what is converted