ctdam: A python package for conversion, processing and plotting of CTD data

Read full text Summarise with VIRAT
Authors: Emil A. P. Michels
Cited by: 0

Summary

No summary yet. VIRAT can read this paper and write a plain-language summary of its aim, methods, key findings and limitations.

Summarise with VIRAT Free to try with your Science Catalogs account.

Abstract

Intro Welcome to the ctdam software package, a library to help with all thedifferent stages in working with CTD data. For now, it focuses only onSea-Bird CTD data, but we are open to extend to other CTD data types inthe future. At the moment, the focus remains on fast and reliableconversion and processing of Sea-Birds .hex files. Data and metadata arestored inside python objects, with the possibility to export native .cnvfiles, as well as NetCDFs. In general, there are parsers for all thedifferent Sea-Bird file formats: .hex, .xmlcon, .bl, .btl and .cnv . Conversion For conversion of raw CTD data, only a .hex file and its corresponding.xmlcon file are needed. Then, you can simply do: from ctdam.conv import decode_hex converted_ctd_data = decode_hex('sbs_data/hex/EMB356_11-1.hex') This assumes that the .xmlcon resides in the same directory as the .hexand is also using a similar name. The code snippet would yield you a`CTDData` object, a very general representation of CTD data and metadataof a single cast. You could for example do some processing on this data. Processing To process CTD data, one needs to define workflow files, called'procedures', .toml files which correspond to python dictionaries ande.g. look like this: processing_config = { "output_type": "cnv", "output_dir": ".", "modules": { "airpressure": {}, "wildedit_geomar": {'std2': 7}, "wfilter": {}, "celltm": {}, "alignctd": {'Oxygen': 3}, "SA_from_SP_Baltic": {}, "binavg": {}, }, } All processing module behaviour can be modified via key-values, as seenfor 'wildedit_geomar' and 'alignctd'. In the exampleconfig you can also see, that the native Sea-Bird processing modules canbe mixed with custom ones (airpressure) and all gsw functions(SA_from_SP_Baltic). The Sea-Bird ones are eithertaken from seabirdscientific or are more efficient rewrites that stick to the same core logic. Itsalso possible to use the original Sea-Bird processing binaries, as longas they are installed on your machine. In order to process the converted data from above, you would go aheadand do: from ctdam.proc import Procedure processed_ctd_data = Procedure(processing_config).run(converted_ctd_data) This again results in a `CTDData` instance, which you now could plot. Plotting This library uses bokeh for generating interactiveplots, that can be viewed inside your webbrowser: from ctdam.vis import basic_bokeh_plot basic_bokeh_plot(processed_ctd_data) The resulting plot of this operation can be seen here. The .html files generated like this, are self-contained and can beshared easily without the need of the original data or external tooling. Data export To write the data back to disk, two output methods are currentlysupported, Sea-Bird-like .cnv and NetCDF. In order to write theconverted and processed 'EMB356.hex' as .cnv to disk, justdo: processed_ctd_data.to_cnv('processed_EMB356_11-1.cnv') CLI Instead of working inside a python environment, the same results canalso be obtained by using a command line interface, also called'ctdam': ctdam run sbs_data/hex/EMB356_11-1.hex proc_workflow.toml ctdam plot EMB356_11-1.cnv -d '' -sm With the first command, a processing workflow is used on a .hex file,which also means, that its converted automatically. The second commanddoes plot the new .cnv file and save it in the same directory. Meaningthat we have literaly done the exact steps like above. v1.2.0 (2026-03-26) Chores Reduce possible metadata errors for zenodo publishing (#18, 72d7b9e) Update pyproject.toml to include netcdf dependencies (#19, cf3252b) Continuous Integration docs: Fix plot html path (#17, 074f165) docs: Run gh-pages when 'docs' was used in commit message (#17, 074f165) Documentation Removed commented settings (#17, 074f165) Replaced iframe in README with link to external plot page (#17, 074f165) Features Add function to convert NMA Coordinates to decimal (#19, cf3252b) Function to convert ctd data to netcdf format (#19, cf3252b) Testing parser: Tests for to_netCDF function (#19, cf3252b) Detailed Changes: v1.1.3...v1.2.0

Fields of Study & Subjects

Computational Physics and Python Applications Environmental Monitoring and Data Management Oceanographic and Atmospheric Processes

Publication details

Journal / source
Zenodo (CERN European Organization for Nuclear Research)
Publication date
26 March 2026
Language
EN