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 .cnv file 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 .cnv file 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.

  1. Fill session

  2. Get summary from next sheet tab

  3. Export the summary sheet as .csv

  4. Open cruiseTag/winkler/winkler_summary.xlsx

  5. Data > From Text/CSV > import saved winkler.csv The 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 .mat file

  • Include 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.mat

  • Save in cruiseTag/netcdf/bin, cruiseTag/netcdf/bot or cruiseTag/netcdf/carbon_chemistry depending on what is converted