Skip to content
NPIOceanPublic

About

Tools for analysis and processing of ocean data in Python.

Resources

Contributing

Stars

3 stars

Watchers

2 watching

Forks

Repository files navigation

image

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

Maintained by the Oceanography section at the Norwegian Polar Institute and supported by the HiAOOS project.


Documentation page (in development)


Installation

Conda:

conda install -c npiocean -c conda-forge kval

Pip 1 :

pip install kval

DOI

About the latest release, 0.5.1:

NOTE 0.5 introduces breaking changes from 0.4. Existing code may need updating. See Breaking changes below.

(0.5.0 was immediately superseded by 0.5.1 after finding some errors)

New

  • kval.plot.tsplot: T-S diagram plotting.
  • moored.plot works on 2D variables.
  • Function for combining moored datasets, and time averaging (xr_funcs.time_average).
  • Other minor support functions.

Fixes

  • Interactive plots no longer go blank when called more than once in the same notebook. This was caused by a bug in ipykernel 7 (ipykernel#1564), so kval now requires ipykernel<7.
  • Interactive hand edits are now applied correctly, and interactive figures display consistently.
  • Better drift correction (non-uniform time steps) and time utilities (fractional seconds).
  • Various fixes to SBE and RBR file reading, CF-compliance checking (now CF-1.11), and metadata.
  • Time coordinates are never converted to 32-bit (convert_64_to_32), and the compliance check flags 32-bit time.
  • Refactoring and cleaning up of the code.
  • Minor fixes/improvements to despiking and time averaging functions.
  • Extended pytest coverage.

Dependencies

  • Temporary caps: ipykernel<7 and matplotlib<3.11. These will be relaxed when the upstream issues are resolved.
  • Now requires compliance-checker>=6.1; gsw and netcdf4 are listed explicitly.

Breaking changes

  • Python 3.10 is no longer supported (now 3.11–3.13).
  • Renamed modules:
    • kval.data.ctd → kval.data.ctdprof
    • kval.maps → kval.plot
    • kval.metadata.check_conventions → kval.metadata.compliance
  • Renamed arguments: var_name/varnm → variable, and D → ds. Affects code that passes these as keyword arguments.
  • The PROCESSING variable has been removed. Processing steps are now recorded in a processing_history attribute.
  • Metadata functions no longer assume NPI-specific attributes.

kval is in active development.


Footnotes

  1. Conda is recommended for Windows users as we have experienced errors with the dependent library compliance-checker on Windows+pip. ↩

About

Tools for analysis and processing of ocean data in Python.

Resources

Contributing

Stars

3 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages