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)
Conda:
conda install -c npiocean -c conda-forge kval
Pip 1 :
pip install kval
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.plotworks 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
ipykernel7 (ipykernel#1564), sokvalnow requiresipykernel<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<7andmatplotlib<3.11. These will be relaxed when the upstream issues are resolved. - Now requires
compliance-checker>=6.1;gswandnetcdf4are listed explicitly.
Breaking changes
- Python 3.10 is no longer supported (now 3.11–3.13).
- Renamed modules:
kval.data.ctd→kval.data.ctdprofkval.maps→kval.plotkval.metadata.check_conventions→kval.metadata.compliance
- Renamed arguments:
var_name/varnm→variable, andD→ds. Affects code that passes these as keyword arguments. - The
PROCESSINGvariable has been removed. Processing steps are now recorded in aprocessing_historyattribute. - Metadata functions no longer assume NPI-specific attributes.
kval is in active development.
Footnotes
-
Conda is recommended for Windows users as we have experienced errors with the dependent library
compliance-checkeron Windows+pip. ↩
