Skip to main content

Tools for oceanographic data processing and analysis in Python

Project description

image

Collection of Python functions for working with oceanography data processing and analysis.

Maintained by the Oceanography section at the Norwegian Polar Institute.

Supported by the project HiAOOS.


Last release,0.3.0:

DOI

  • This version is used to work out pypi and conda distribution.
  • An updated version with improved documentation and a code overhaul is planned for Spring 2025.

__

In active development.


CORE FUNCTIONALITY
Submodules
  • file: Converting to and from various file format (e.g. read CTD .cnv data to xarray/netCDF)
  • data: Data post-processing and QC (e.g. CTD post-processing)
  • metadata: Handling and standardizing metadata according to CF conventions
  • plots*: Various tools to help make nice (matplotlib) figures
  • maps: Tools for making maps
  • geo: Geographical calculations (coordinate transformations, point-to-point distances etc)
  • ocean: Oceanography-specific tools (e.g. (*) vertical modes, turner angles, wkb scaling, geostrophical calculations)
  • calc: Various useful functions for numerical calculations.
  • util: Various backend support functions and wrappers for xarray functionality.
  • signal: Filtering, spectral analysis, etc.

* Not implemented


GENERAL PRINCIPLES

Note: These are aspirational guidelines and not always adhered to in the current code structure. We will try to get there!

Code
  • Written in Python (>=3.8).
  • Tailored for use in a [Jupyter] notebook environment.
  • Data and metadata should be stored in [xarray(https://docs.xarray.dev/en/stable/)] Datasets.
    • Intermediate operations using, e.g., numpy or pandas objects are fine, but the end user should only interact with Datasets.
  • Code should adhere to PEP8 style guide, and all functions should have docstrings.
  • All functionality should have associated pytest tests.
    • Unit tests of individual functions are found in tests/unit_tests/. Its directory structure and contents should mirror that of src/kval.
    • Tests of more complex functionality (e.g. processing pipelines using multiple modules) should be put in tests/functional_tests/.
    • A collection of sample data to be used in testing is found in tests/test_data/. Should aim to cover a wide range of input data, but we also don't want this to become too bulky - try to keep file size to a minimum.
Metadata
  • All operations that modify data should be recorded in the file metadata.
  • Wherever possibly, and at as early a stage as possible, all available useful metadata should be added to Datasets.
  • Metadata formatting should adhere to CF and ACDD conventions, supplemented by:
Project
  • The project is maintained by the Oceanography section at the Norwegian Polar Institute.
    • External contributions (pull requests, issues, whatever) are very welcome!
  • We will attempt to follow the guidelines from the Scientific Python Library Development Guide.
  • Releases will be published relatively often, whenever a new functionality has been added. Releases will be archived on zenodo and given a DOI.
Contributing

Pull requests, issues, etc are very welcome!

[Something about branches here]

[Something about python style, test suite]


RELEASE NOTES
  • 0.3.0 (CURRENT, released 16 April 2025):

    • Refactoring of large parts of the code for structure, clarity and efficiency.
    • Complete reproducability and self-documentation in the CTD processing functionality.
    • Adding mooring processing functionality
      • Functionality for parsing moored CTD sensors (RBR and SBE)
      • Functionality for basic processing source file -> CF-NetCDF
    • Test suite (comprehensive but not entirely complete)
    • Decluttering the repo bringing it down from its currently bloated state.
    • Started useful documentation with somenotebook examples (need a lot of work).
    • Released to PyPi and conda-forge.
    • Many other improvements and additions.
  • 0.4.0 (PLANNED for spring 2025)

  • Complete (useful) documentation with good notebook examples of core functionality.

  • Expanded test suite for good coverage of basic functionality plus

  • Possibly:

    • Parsing data from inductive loggers.
    • Breaking out NPI-specific stuff (if there really is that much of it) to a sepåarate libraru, ´naust´.
  • 0.0.2:

    • Name change from oceanograpy to kval.
    • Introduction of test suite.
    • Other minor changes.
  • 0.0.1:

    • Initial release.
    • Functionality tailored for CTD processing.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kval-0.3.0.tar.gz (3.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kval-0.3.0-py3-none-any.whl (138.5 kB view details)

Uploaded Python 3

File details

Details for the file kval-0.3.0.tar.gz.

File metadata

  • Download URL: kval-0.3.0.tar.gz
  • Upload date:
  • Size: 3.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for kval-0.3.0.tar.gz
Algorithm Hash digest
SHA256 9e034613e33e945248023b6ec0d53ccc895ee0069239c9c511b7e0837d44a13f
MD5 93edb6148c84fe92c6a3c86783d77fa1
BLAKE2b-256 da0a08e66d4edda6bed38692f3ee5f7d0ba171d2617a6a59ed261ef4d0bd3b52

See more details on using hashes here.

File details

Details for the file kval-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: kval-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 138.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for kval-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35bdf3f0a436ee89ae350a224431e20c303318e72b2db1b5ea99bfc19261c276
MD5 d31ae49047e184ea6351ec1b3f4d5c26
BLAKE2b-256 0f545d7e99dced0fc7327c15c428dc795479ec679f70214f29b6441ee534e99c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page