Exercise 6 - CTD Alignment#
Aim: To evaluate choices for aligning (and/or cell thermal mass) corrections for a CTD.
Data: Data are at http://bit.ly/dynopoCTD. You should download at least one CTD profile (*.hex
) and its corresponding *.xmlcon
file.
Directions: You will need to first run the profile through SBE processing. There is one laptop available for students, or you will need a windows machine with SBE Data Processing downloaded and installed.
Create a notebook#
Create an
*.ipynb
containing the commands for this assignment, or copy this file.File naming convention
Name your python notebook something useful
ex<X>-<Lastname>-<slug>-seaocn.ipynb
where you replace<X>
with the exercise number and<slug>
with the short slug to name the topic, and<Lastname>
with your last name.Figures should be named something like
ex<X>fig<Y>-<Lastname>-<slug>-seaocn.png
where you replace<X>
with the exercise number,<Y>
with the figure number, and<Lastname>
with your last name.Import necessary packages.
For example,
matplotlib
andpandas
andnumpy
andxarray
. You may also needimport matplotlib.pyplot as plt import pandas as pd import numpy as np import xarray as xr from datetime import datetime
If you are missing any of these packages, please refer to Resources: Python.
# Your code here
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import xarray as xr
from datetime import datetime
import gsw
# Some extra colormaps
import cmocean
Downloading data#
Download some data. Get the data from http://bit.ly/dynopoCTD.
Tip
Double check when you commit that these files are not getting committed to the gitlab repository.
Basic Seabird processing (data conversion)#
Run the data through SBE Data Processing “basic”. Steps are outlined here. This needs to be carried out on a Windows machine with SBE Data Processing installed. You may also find the screenshots at the end of the lecture useful find on the Moodle for week 7.
Initially, your main task is to convert the
*.hex
file into a*.cnv
file. Make sure to output at least pressure (dbar), temperature (deg C) and conductivity (S/m). Primary is enough, you don’t really need secondary here).You may then follow the instructions in the SBE slides to use “Sea Plot”. Or you can then convert the CTD data into a
*.nc
file following what we did in Ex 2 and convert it first using theseabird cnv2nc
tool.Use the
gsw
toolbox to calculate salinity. (Preferred, but optional: absolute salinity and conservative temperature.) Then plot the CTD profiles (ex6fig1...-seaocn.png
) and TS-diagram (ex6fig2...-seaocn.png
).
# Your code here
Advanced CTD processing - Align#
Now you should read the instructions here from the “Seabird University” Advanced data processing.
First: Run the “align CTD” process 3 times. Advance the conductivity (C) relative to temperature by 2 scans (0.084 sec), by 4 scans (0.168 sec) and by 6 scans (0.252 sec). Append to the name
_A2
and_A4
and_A6
to indicate the alignment by advancing 2, 4 and 6 scans respectively (note that we refer to scans with an associated time offset since this is a 24Hz instrument).Convert these files into
*.nc
usingseabird cnv2nc
.Replot the profiles, with multiple versions in the same figure (e.g., no alignment applied, and 6 scans applied, or some other combination). Try to zoom in the plot to a region where you can see the effect of the alignment on salinity - specifically, for a large advancement of conductivity relative to temperature, you should start to see salinity spikes appearing in the data. Call these
ex6fig3...-seaocn.png
, following the file naming convention.
# Your code here.
Advanced CTD processing - Cell thermal mass#
Now experiment with the cell thermal mass adjustments.
Using the unaligned CTD data, run the
Cell thermal mass
in the SBE Data Processing. Vary the correction parameters for \(\alpha = 0.03\), \(\alpha=0.06\) and the \(1/\beta = 7\) and \(1/\beta = 14\). To be able to distiguish the files after, append to the name_ctm_a3b7
or_ctm_a6b14
.Convert these files into
*.nc
usingseabird cnv2nc
.Replot the profiles, now creating a \(\theta-S\) diagram. Zoom in on the diagram to find where the gap between the up- and downcast gets larger (for which values of \(\alpha\) and \(1/\beta\) does this occur? Name your figure
ex6fig4...-seaocn.png
.
# Your code here