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.1.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.1-py3-none-any.whl (138.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kval-0.3.1.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.1.tar.gz
Algorithm Hash digest
SHA256 81b5df45be02053e9cabe2e444bc7b0816dbecad459cecd1dec785ba20019222
MD5 5e5240d5aa390aaa59eae00c6488d1d6
BLAKE2b-256 add5681d72b0e1c9c1463969908d143654de0c256c3202515ee103e1520dc8b6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kval-0.3.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9553ae12b1aeaed51aad843a430aeca8cbd8e51387226cb11e14bf606a70174e
MD5 724bedcced327e579b608b89cf7ac0f6
BLAKE2b-256 5b9219aa0ec1882fbda083026973f01e1d57647ed67191502ec8c79d97796af9

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