Metadata-Version: 2.5
Name: kval
Version: 0.5.1
Summary: Processing and analysis of ocean data in Python
Project-URL: Homepage, https://github.com/NPIOcean/kval/
Author-email: Øyvind Foss <oyvind.foss@npolar.no>, Tore Hattermann <tore.hattermann@npolar.no>
Maintainer: Norwegian Polar Institute, Oceanography section
Maintainer-email: "Øyvind Foss, NPI" <oyvind.foss@npolar.no>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Oceanography
Requires-Python: <3.14,>=3.11
Requires-Dist: cartopy>=0.21.1
Requires-Dist: cftime>=1.6.2
Requires-Dist: cmocean>=3.0.3
Requires-Dist: compliance-checker>=6.1
Requires-Dist: glob2>=0.7
Requires-Dist: gsw>=3.6
Requires-Dist: ipykernel<7,>=6.26.0
Requires-Dist: ipympl>=0.9.3
Requires-Dist: matplotlib<3.11,>=3.10
Requires-Dist: netcdf4>=1.6.4
Requires-Dist: numpy>=1.23
Requires-Dist: pandas>=2.1.0
Requires-Dist: pygeomag>=1.1.0
Requires-Dist: pyrsktools>=1.1.1
Requires-Dist: ruamel-yaml>=0.18.15
Requires-Dist: scipy>=1.11.3
Requires-Dist: tqdm>=4.66.1
Requires-Dist: xarray>=2023.10.1
Requires-Dist: xlrd>=2.0.1
Provides-Extra: dev
Requires-Dist: pytest>=8.1.1; extra == 'dev'
Requires-Dist: requests>=2.2.1; extra == 'dev'
Description-Content-Type: text/markdown

![image](https://raw.githubusercontent.com/npiocean/kval/master/graphics/kval_banner.png)

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

Maintained by the Oceanography section at the [Norwegian Polar Institute](https://www.npolar.no/en/) and supported by the [HiAOOS](https://hiaoos.eu/) project.
___


#### [Documentation page](https://kval.readthedocs.io/) *(in development)*


___

### Installation

Conda:

    conda install -c npiocean -c conda-forge kval


Pip [^tag] :

    pip install kval


[^tag]: Conda is recommended for Windows users as we have experienced errors with the dependent library `compliance-checker` on Windows+pip.


___

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10360162.svg)](https://doi.org/10.5281/zenodo.10360162)

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](https://github.com/ipython/ipykernel/issues/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.

___