Skip to content
Quality Control of Temperature and Salinity profiles
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE.rst Adjusting license details. Jul 14, 2015


CoTe De l'eau

Documentation Status

`CoTeDe<>`_ is an Open Source Python package to quality control (QC) hydrographic data such as temperature and salinity. It was designed to attend individual scientists as well as operational systems with large databases, reading the inputs from different formats and types of sensors, and processing those in parallel for high performance. To achieve that, CoTeDe is highly customizable, allowing the user to compose the desired set of tests, as well as the specific parameters of each test. Otherwise there are preset QC procedures conforming with GTSPP, EuroGOOS and ARGO recommendations. It is also implemented innovating approaches to QC like the Fuzzy Logic (Timms 2011, Morello 2014) and Anomaly Detection (Castelão 2015).

At this point it is operational for profiles (CTD, XBT and Argo) and tracks (TSG). For CTD profiles and TSG time series it uses PySeabird package to interpret directly the SeaBird's .cnv output file, and for argo it uses PyARGO package to interpret the netCDF files.

This is the result from several generations of quality control systems, which started in 2006, when I developed from scratch an automatic quality control system for realtime evaluation of thermosalinographs at AOML-NOAA, USA. Later I was advising the quality control of the brazilian hydrography of PIRATA.

My vision is that we can do better than we do today with more flexible classification techniques, which includes machine learning, to minimize the burden on manual expert QC improving the consistency, performance and reliability of the QC procedure for oceanographic data, especially for realtime operations.

Why use CoTeDe

CoTeDe can apply different quality control procedures:
  • The default GTSPP, EGOOS or Argo procedures;
  • A custom set of tests, including user defined thresholds;
  • A novel approach based on Anomaly Detection, described by Castelao 2015;
  • Two different fuzzy logic approaches: as proposed by Timms 2011 & Morello 2014, and using usual defuzification by the bisector.

Process multiple files in parallel, ideal for large datasets.

Export output, original data plus flags, into netCDF files following OCEANSites data structure.

Quick howto

To evaluate the records of a profile:

import cotede.qc

pqc = cotede.qc.fProfileQC('example.cnv')

To see the temperature records of the primary sensor:


To see the flags of all tests applied on the secondary sensor of salinity:


To evaluate a full set of profiles at once, like all profiles from a cruise, use the class ProfileQCCollection, like:

dataset = ProfileQCCollection('/path/to/data/', inputpattern=".*.cnv")


Check the notebooks gallery for more examples and functionalities:


You can’t perform that action at this time.