kval 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. kval-0.3.0/.github/workflows/ci_pytest_kval_macOS.yml +35 -0
  2. kval-0.3.0/.github/workflows/ci_pytest_kval_ubuntu.yml +33 -0
  3. kval-0.3.0/.github/workflows/ci_pytest_kval_ubuntu_py11.yml +33 -0
  4. kval-0.3.0/.github/workflows/ci_pytest_kval_win.yml +35 -0
  5. kval-0.3.0/.gitignore +75 -0
  6. kval-0.3.0/LICENSE +21 -0
  7. kval-0.3.0/PKG-INFO +185 -0
  8. kval-0.3.0/README.md +142 -0
  9. kval-0.3.0/graphics/kval_banner.png +0 -0
  10. kval-0.3.0/graphics/kval_banner_0_0_2.png +0 -0
  11. kval-0.3.0/graphics/kval_graphic_inkskape.png +0 -0
  12. kval-0.3.0/graphics/kval_graphic_inkskape.svg +404 -0
  13. kval-0.3.0/graphics/kval_graphic_inkskape_workbook.svg +321 -0
  14. kval-0.3.0/pyproject.toml +65 -0
  15. kval-0.3.0/src/kval/__init__.py +1 -0
  16. kval-0.3.0/src/kval/calc/number.py +68 -0
  17. kval-0.3.0/src/kval/data/__init__.py +0 -0
  18. kval-0.3.0/src/kval/data/ctd.py +1103 -0
  19. kval-0.3.0/src/kval/data/dataset.py +287 -0
  20. kval-0.3.0/src/kval/data/edit.py +850 -0
  21. kval-0.3.0/src/kval/data/moored.py +1901 -0
  22. kval-0.3.0/src/kval/data/moored_tools/_compare_moored_prof.py +220 -0
  23. kval-0.3.0/src/kval/data/moored_tools/_moored_decorator.py +81 -0
  24. kval-0.3.0/src/kval/data/moored_tools/_moored_tools.py +507 -0
  25. kval-0.3.0/src/kval/data/ship_ctd_tools/__init__.py +0 -0
  26. kval-0.3.0/src/kval/data/ship_ctd_tools/_ctd_decorator.py +79 -0
  27. kval-0.3.0/src/kval/data/ship_ctd_tools/_ctd_edit.py +618 -0
  28. kval-0.3.0/src/kval/data/ship_ctd_tools/_ctd_tools.py +719 -0
  29. kval-0.3.0/src/kval/data/ship_ctd_tools/_ctd_visualize.py +600 -0
  30. kval-0.3.0/src/kval/data/ship_ctd_tools/qc_salt.py +553 -0
  31. kval-0.3.0/src/kval/file/__init__.py +1 -0
  32. kval-0.3.0/src/kval/file/_variable_defs.py +274 -0
  33. kval-0.3.0/src/kval/file/matfile.py +416 -0
  34. kval-0.3.0/src/kval/file/rbr.py +261 -0
  35. kval-0.3.0/src/kval/file/sbe.py +2196 -0
  36. kval-0.3.0/src/kval/geo/geocalc.py +114 -0
  37. kval-0.3.0/src/kval/maps/quickmap.py +60 -0
  38. kval-0.3.0/src/kval/metadata/__init__.py +0 -0
  39. kval-0.3.0/src/kval/metadata/_standard_attrs.py +454 -0
  40. kval-0.3.0/src/kval/metadata/_standard_attrs_org.py +20 -0
  41. kval-0.3.0/src/kval/metadata/check_conventions.py +100 -0
  42. kval-0.3.0/src/kval/metadata/conventionalize.py +598 -0
  43. kval-0.3.0/src/kval/ocean/empirical.py +30 -0
  44. kval-0.3.0/src/kval/ocean/uv.py +131 -0
  45. kval-0.3.0/src/kval/signal/despike.py +145 -0
  46. kval-0.3.0/src/kval/signal/filt.py +141 -0
  47. kval-0.3.0/src/kval/signal/interp.py +26 -0
  48. kval-0.3.0/src/kval/signal/spec.py +205 -0
  49. kval-0.3.0/src/kval/util/era5.py +217 -0
  50. kval-0.3.0/src/kval/util/index.py +56 -0
  51. kval-0.3.0/src/kval/util/internals.py +60 -0
  52. kval-0.3.0/src/kval/util/magdec.py +182 -0
  53. kval-0.3.0/src/kval/util/time.py +373 -0
  54. kval-0.3.0/src/kval/util/user_input.py +249 -0
  55. kval-0.3.0/src/kval/util/xr_funcs.py +258 -0
  56. kval-0.3.0/tests/.gitattributes +1 -0
  57. kval-0.3.0/tests/README_tests.md +24 -0
  58. kval-0.3.0/tests/functional_tests/test_ctd_prof/test_ctd_edit_pipeline/Testing with a simple mock dataset.ipynb +128 -0
  59. kval-0.3.0/tests/functional_tests/test_ctd_prof/test_ctd_edit_pipeline/test_cnv_pipeline_atwain.py +42 -0
  60. kval-0.3.0/tests/functional_tests/test_imports.py +13 -0
  61. kval-0.3.0/tests/test_data/sbe_files/sbe37/cnv/README.txt +3 -0
  62. kval-0.3.0/tests/test_data/sbe_files/sbe37/cnv/test_sbe37.cnv +2742 -0
  63. kval-0.3.0/tests/test_data/sbe_files/sbe37/raw/SBE37SMP-ODO-RS232_03723180_2022_10_09.XML +10756 -0
  64. kval-0.3.0/tests/test_data/sbe_files/sbe37/raw/SBE37SMP-ODO-RS232_03723180_2022_10_09.hex +8238 -0
  65. kval-0.3.0/tests/test_data/sbe_files/sbe37/raw/SBE37SMP-ODO-RS232_03723180_2022_10_09.xmlcon +99 -0
  66. kval-0.3.0/tests/test_data/sbe_files/sbe56/AMU22_SBE56-1225_test.cnv +414 -0
  67. kval-0.3.0/tests/test_data/sbe_files/sbe56/README.md +6 -0
  68. kval-0.3.0/tests/test_data/sbe_files/sbe56/SBE05602355_NABOS-test.csv +94 -0
  69. kval-0.3.0/tests/test_data/sbe_files/sbe56/SBE56-1232_test.csv +114 -0
  70. kval-0.3.0/tests/test_data/sbe_files/sbe911plus/atwain_cruise_ctds/AT285.cnv +782 -0
  71. kval-0.3.0/tests/test_data/sbe_files/sbe911plus/atwain_cruise_ctds/AT286.cnv +741 -0
  72. kval-0.3.0/tests/test_data/sbe_files/sbe911plus/atwain_cruise_ctds/AT287.cnv +647 -0
  73. kval-0.3.0/tests/test_data/sbe_files/sbe911plus/dml_2020/sta013_01.btl +227 -0
  74. kval-0.3.0/tests/test_data/sbe_files/sbe911plus/dml_2020/sta013_01.cnv +1790 -0
  75. kval-0.3.0/tests/test_data/sbe_files/sbe911plus/dml_2020/sta014_01.btl +231 -0
  76. kval-0.3.0/tests/test_data/sbe_files/sbe911plus/dml_2020/sta014_01.cnv +2496 -0
  77. kval-0.3.0/tests/test_data/sbe_files/sbe911plus/dml_2020/sta015_01.btl +231 -0
  78. kval-0.3.0/tests/test_data/sbe_files/sbe911plus/dml_2020/sta015_01.cnv +2045 -0
  79. kval-0.3.0/tests/test_data/sbe_files/sbe911plus/kongsfjorden_ctds/Kb1_2.btl +287 -0
  80. kval-0.3.0/tests/test_data/sbe_files/sbe911plus/kongsfjorden_ctds/Kb1_2_binned.cnv +420 -0
  81. kval-0.3.0/tests/test_data/sbe_files/sbe911plus/pirata_ctd/dfr26003.cnv +396 -0
  82. kval-0.3.0/tests/test_data/sbe_files/sbe911plus/troll_transect_22_23/003.btl +287 -0
  83. kval-0.3.0/tests/test_data/sbe_files/sbe911plus/troll_transect_22_23/003.cnv +4816 -0
  84. kval-0.3.0/tests/test_data/sbe_files/sbe911plus/troll_transect_22_23/004.btl +287 -0
  85. kval-0.3.0/tests/test_data/sbe_files/sbe911plus/troll_transect_22_23/004.cnv +4477 -0
  86. kval-0.3.0/tests/test_data/sbe_files/sbe911plus/troll_transect_22_23/006.btl +287 -0
  87. kval-0.3.0/tests/test_data/sbe_files/sbe911plus/troll_transect_22_23/006.cnv +4016 -0
  88. kval-0.3.0/tests/test_data/sbe_files/sbe911plus/troll_transect_22_23/README.md +11 -0
  89. kval-0.3.0/tests/unit_tests/calc/test_number.py +36 -0
  90. kval-0.3.0/tests/unit_tests/data/test_ctd.py +66 -0
  91. kval-0.3.0/tests/unit_tests/data/test_dataset.py +178 -0
  92. kval-0.3.0/tests/unit_tests/data/test_edit.py +274 -0
  93. kval-0.3.0/tests/unit_tests/data/test_moored.py +425 -0
  94. kval-0.3.0/tests/unit_tests/file/test_rbr.py +109 -0
  95. kval-0.3.0/tests/unit_tests/file/test_sbe.py +110 -0
  96. kval-0.3.0/tests/unit_tests/file/test_xr_funcs.py +190 -0
  97. kval-0.3.0/tests/unit_tests/geo/test_geocalc.py +69 -0
  98. kval-0.3.0/tests/unit_tests/ocean/test_uv.py +159 -0
  99. kval-0.3.0/tests/unit_tests/signal/test_despike.py +76 -0
  100. kval-0.3.0/tests/unit_tests/signal/test_filt.py +195 -0
  101. kval-0.3.0/tests/unit_tests/util/test_era5.py +83 -0
  102. kval-0.3.0/tests/unit_tests/util/test_index.py +32 -0
  103. kval-0.3.0/tests/unit_tests/util/test_internals.py +7 -0
  104. kval-0.3.0/tests/unit_tests/util/test_magdec.py +94 -0
  105. kval-0.3.0/tests/unit_tests/util/test_time.py +74 -0
@@ -0,0 +1,35 @@
1
+ name: Run Tests for Kval (MacOS)
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ jobs:
7
+ build:
8
+
9
+ runs-on: ${{ matrix.os }}
10
+
11
+ strategy:
12
+ matrix:
13
+ os: [macos-latest]
14
+ python-version: [ "3.9", "3.10", "3.11", "3.12"]
15
+
16
+ steps:
17
+ - name: Checkout repository
18
+ uses: actions/checkout@v3 # Use the latest version of actions/checkout
19
+
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v4 # Use the latest version of actions/setup-python
22
+ with:
23
+ python-version: ${{ matrix.python-version }}
24
+
25
+ - name: Install dependencies
26
+ run: |
27
+ python -m pip install --upgrade pip
28
+ pip install .
29
+ pip install -e '.[dev]' # This installs the optional dev dependencies, including pytest
30
+
31
+ - name: Run tests
32
+ run: |
33
+ pytest
34
+ env:
35
+ CI: true
@@ -0,0 +1,33 @@
1
+ name: Run Tests for Kval (Ubuntu)
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ jobs:
6
+ build:
7
+
8
+ runs-on: ubuntu-latest
9
+
10
+ strategy:
11
+ matrix:
12
+ python-version: [ "3.9", "3.10", "3.11", "3.12"]
13
+
14
+ steps:
15
+ - name: Checkout repository
16
+ uses: actions/checkout@v3 # Use the latest version of actions/checkout
17
+
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v4 # Use the latest version of actions/setup-python
20
+ with:
21
+ python-version: ${{ matrix.python-version }}
22
+
23
+ - name: Install dependencies
24
+ run: |
25
+ python -m pip install --upgrade pip
26
+ pip install .
27
+ pip install -e '.[dev]' # This installs the optional dev dependencies, including pytest
28
+
29
+ - name: Run tests
30
+ run: |
31
+ pytest
32
+ env:
33
+ CI: true
@@ -0,0 +1,33 @@
1
+ name: Run Tests for Kval (Ubuntu) (py3.11 only)
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ jobs:
6
+ build:
7
+
8
+ runs-on: ubuntu-latest
9
+
10
+ strategy:
11
+ matrix:
12
+ python-version: [ "3.9",]
13
+
14
+ steps:
15
+ - name: Checkout repository
16
+ uses: actions/checkout@v3 # Use the latest version of actions/checkout
17
+
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v4 # Use the latest version of actions/setup-python
20
+ with:
21
+ python-version: ${{ matrix.python-version }}
22
+
23
+ - name: Install dependencies
24
+ run: |
25
+ python -m pip install --upgrade pip
26
+ pip install .
27
+ pip install -e '.[dev]' # This installs the optional dev dependencies, including pytest
28
+
29
+ - name: Run tests
30
+ run: |
31
+ pytest
32
+ env:
33
+ CI: true
@@ -0,0 +1,35 @@
1
+ name: Run Tests for Kval (Win)
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ jobs:
7
+ build:
8
+
9
+ runs-on: ${{ matrix.os }}
10
+
11
+ strategy:
12
+ matrix:
13
+ os: [ windows-latest]
14
+ python-version: [ "3.9", "3.10", "3.11", "3.12"]
15
+
16
+ steps:
17
+ - name: Checkout repository
18
+ uses: actions/checkout@v3 # Use the latest version of actions/checkout
19
+
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v4 # Use the latest version of actions/setup-python
22
+ with:
23
+ python-version: ${{ matrix.python-version }}
24
+
25
+ - name: Install dependencies
26
+ run: |
27
+ python -m pip install --upgrade pip
28
+ pip install .
29
+ pip install -e '.[dev]' # This installs the optional dev dependencies, including pytest
30
+
31
+ - name: Run tests
32
+ run: |
33
+ pytest
34
+ env:
35
+ CI: true
kval-0.3.0/.gitignore ADDED
@@ -0,0 +1,75 @@
1
+ #### Øyvind's:
2
+
3
+ *.pyc
4
+ *.rsk
5
+ development/
6
+ dist/
7
+ kval_local_files
8
+ tests/test_data/rbr_files
9
+
10
+ #### Defaults:
11
+
12
+ # Byte-compiled / optimized / DLL files
13
+ __pycache__/
14
+ *.py[cod]
15
+
16
+ *$py.class
17
+
18
+ # PyInstaller
19
+ # Usually these files are written by a python script from a template
20
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
21
+ *.manifest
22
+ *.spec
23
+
24
+ # Installer logs
25
+ pip-log.txt
26
+ pip-delete-this-directory.txt
27
+
28
+ # Unit test / coverage reports
29
+ htmlcov/
30
+ .tox/
31
+ .nox/
32
+ .coverage
33
+ .coverage.*
34
+ .cache
35
+ nosetests.xml
36
+ coverage.xml
37
+ *.cover
38
+ *.py,cover
39
+ .hypothesis/
40
+ .pytest_cache/
41
+ cover/
42
+
43
+ # Translations
44
+ *.mo
45
+ *.pot
46
+
47
+ # Sphinx documentation
48
+ docs/_build/
49
+
50
+ # PyBuilder
51
+ .pybuilder/
52
+ target/
53
+
54
+ # Jupyter Notebook
55
+ .ipynb_checkpoints
56
+
57
+ # IPython
58
+ profile_default/
59
+ ipython_config.py
60
+
61
+
62
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
63
+ __pypackages__/
64
+
65
+ # Environments
66
+ .env
67
+ .venv
68
+ env/
69
+ venv/
70
+ ENV/
71
+ env.bak/
72
+ venv.bak/
73
+
74
+ # mkdocs documentation
75
+ /sitedist/
kval-0.3.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Norwegian Polar Institute Oceanography section
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
kval-0.3.0/PKG-INFO ADDED
@@ -0,0 +1,185 @@
1
+ Metadata-Version: 2.4
2
+ Name: kval
3
+ Version: 0.3.0
4
+ Summary: Tools for oceanographic data processing and analysis in Python
5
+ Project-URL: Homepage, https://github.com/NPIOcean/kval/
6
+ Author-email: Øyvind Foss <oyvind.foss@npolar.no>
7
+ Maintainer: Norwegian Polar Institute, Oceanography section
8
+ Maintainer-email: "Øyvind Foss, NPI" <oyvind.foss@npolar.no>
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Classifier: Development Status :: 2 - Pre-Alpha
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3 :: Only
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Scientific/Engineering :: Oceanography
19
+ Requires-Python: >=3.9
20
+ Requires-Dist: cartopy>=0.21.1
21
+ Requires-Dist: cftime>=1.6.2
22
+ Requires-Dist: cmocean>=3.0.3
23
+ Requires-Dist: glob2>=0.7
24
+ Requires-Dist: ipykernel>=6.26.0
25
+ Requires-Dist: ipympl>=0.9.3
26
+ Requires-Dist: jupyter>=1.0.0
27
+ Requires-Dist: matplotlib>=3.7.2
28
+ Requires-Dist: mplcursors>=0.5.3
29
+ Requires-Dist: numpy>=1.23
30
+ Requires-Dist: pandas>=2.1.0
31
+ Requires-Dist: pygeomag>=1.1.0
32
+ Requires-Dist: pyrsktools>=1.1.1
33
+ Requires-Dist: scipy>=1.11.3
34
+ Requires-Dist: seawater>=3.3.4
35
+ Requires-Dist: tqdm>=4.66.1
36
+ Requires-Dist: xarray>=2023.10.1
37
+ Requires-Dist: xlrd>=2.0.1
38
+ Provides-Extra: compliance
39
+ Requires-Dist: compliance-checker>=5.1.0; extra == 'compliance'
40
+ Provides-Extra: dev
41
+ Requires-Dist: pytest>=8.1.1; extra == 'dev'
42
+ Description-Content-Type: text/markdown
43
+
44
+ ![image](graphics/kval_banner.png)
45
+
46
+ Collection of Python functions for working with oceanography data processing and analysis.
47
+
48
+ Maintained by the Oceanography section at the [Norwegian Polar Institute](https://www.npolar.no/en/).
49
+
50
+ Supported by the project [HiAOOS](https://hiaoos.eu/).
51
+ ___
52
+
53
+ Last release,`0.3.0`:
54
+
55
+
56
+
57
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15229098.svg)](https://doi.org/10.5281/zenodo.15229098)
58
+
59
+
60
+
61
+ - This version is used to work out pypi and conda distribution.
62
+ - An updated version with improved documentation and a code overhaul is planned for Spring 2025.
63
+
64
+ __
65
+
66
+ *In active development.*
67
+
68
+ ____
69
+ <details>
70
+ <summary><strong>CORE FUNCTIONALITY</strong></summary>
71
+
72
+ ##### Submodules
73
+
74
+
75
+ - `file`: Converting to and from various file format (e.g. read CTD .cnv data to xarray/netCDF)
76
+ - `data`: Data post-processing and QC (e.g. CTD post-processing)
77
+ - `metadata`: Handling and standardizing metadata according to CF conventions
78
+ - `plots*`: Various tools to help make nice (matplotlib) figures
79
+ - `maps`: Tools for making maps
80
+ - `geo`: Geographical calculations (coordinate transformations, point-to-point distances etc)
81
+ - `ocean`: Oceanography-specific tools (e.g. (`*`) vertical modes, turner angles, wkb scaling, geostrophical calculations)
82
+ - `calc`: Various useful functions for numerical calculations.
83
+ - `util`: Various backend support functions and wrappers for xarray functionality.
84
+ - `signal`: Filtering, spectral analysis, etc.
85
+
86
+ `*` Not implemented
87
+
88
+ </details>
89
+
90
+ ____
91
+
92
+ <details>
93
+ <summary><strong>GENERAL PRINCIPLES</strong></summary>
94
+
95
+ *Note: These are aspirational guidelines and not always adhered to in the current code structure. We will try to get there!*
96
+
97
+ ###### Code
98
+
99
+ - Written in Python (>=3.8).
100
+ - Tailored for use in a [Jupyter] notebook environment.
101
+ - Data and metadata should be stored in [xarray(https://docs.xarray.dev/en/stable/)] `Datasets`.
102
+ - Intermediate operations using, e.g., `numpy` or `pandas` objects are fine, but the end user should only interact with `Datasets`.
103
+ - Code should adhere to [PEP8](https://peps.python.org/pep-0008/) style guide, and all functions should have docstrings.
104
+ - All functionality should have associated [pytest](https://docs.pytest.org/en/7.4.x/) tests.
105
+ - Unit tests of individual functions are found in `tests/unit_tests/`. Its directory structure and contents should mirror that of `src/kval`.
106
+ - Tests of more complex functionality (e.g. processing pipelines using multiple modules) should be put in `tests/functional_tests/`.
107
+ - 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.
108
+
109
+ ###### Metadata
110
+
111
+ - All operations that modify data should be recorded in the file metadata.
112
+ - Wherever possibly, and at as early a stage as possible, all available useful metadata should be added to Datasets.
113
+ - Metadata formatting should adhere to [CF](http://cfconventions.org/) and [ACDD](https://wiki.esipfed.org/Attribute_Convention_for_Data_Discovery_1-3) conventions, supplemented by:
114
+ - [OceanSITES](http://www.oceansites.org/docs/oceansites_data_format_reference_manual_20140917.pdf)
115
+ - [2021 NPI NetCDF guidelines](https://gitlab.com/npolar/netcdf-creator/-/blob/main/docs/netcdf_standard_npi.pdf?ref_type=heads)
116
+
117
+ ###### Project
118
+
119
+ - The project is maintained by the Oceanography section at the [Norwegian Polar Institute](www.npolar.no/en).
120
+ - External contributions (pull requests, issues, whatever) are very welcome!
121
+ - We will attempt to follow the guidelines from the
122
+ [Scientific Python Library Development Guide](https://learn.scientific-python.org/development/).
123
+ - *Releases* will be published relatively often, whenever a new functionality has been added.
124
+ Releases will be archived on [zenodo](www.zenodo.org) and given a DOI.
125
+
126
+ ###### Contributing
127
+
128
+ Pull requests, issues, etc are very welcome!
129
+
130
+ *[Something about branches here]*
131
+
132
+ *[Something about python style, test suite]*
133
+
134
+
135
+ </details>
136
+
137
+ ____
138
+
139
+
140
+ <details>
141
+ <summary><strong>RELEASE NOTES</strong></summary>
142
+
143
+
144
+
145
+
146
+
147
+ - **0.3.0** *(CURRENT, released 16 April 2025)*:
148
+ - Refactoring of large parts of the code for structure, clarity and efficiency.
149
+ - ~~Complete reproducability and self-documentation in the CTD processing functionality.~~
150
+ - Adding mooring processing functionality
151
+ - ~~Functionality for parsing moored CTD sensors (RBR and SBE)~~
152
+ - Functionality for basic processing source file -> CF-NetCDF
153
+ - ~~Test suite (comprehensive but not entirely complete)~~
154
+ - ~~Decluttering the repo bringing it down from its currently bloated state.~~
155
+ - Started useful documentation with somenotebook examples (need a lot of work).
156
+ - Released to PyPi and conda-forge.
157
+ - Many other improvements and additions.
158
+
159
+
160
+ - **0.4.0** *(PLANNED for spring 2025)*
161
+
162
+ - Complete (useful) documentation with good notebook examples of core functionality.
163
+ - Expanded test suite for good coverage of basic functionality plus
164
+ - *Possibly*:
165
+ - Parsing data from inductive loggers.
166
+ - Breaking out NPI-specific stuff (if there really is that much of it) to a sepåarate libraru, ´naust´.
167
+
168
+
169
+ - *0.0.2*:
170
+ - Name change from `oceanograpy` to `kval`.
171
+ - Introduction of test suite.
172
+ - Other minor changes.
173
+
174
+ - *0.0.1:*
175
+ - Initial release.
176
+ - Functionality tailored for CTD processing.
177
+
178
+
179
+
180
+
181
+ </details>
182
+
183
+
184
+
185
+
kval-0.3.0/README.md ADDED
@@ -0,0 +1,142 @@
1
+ ![image](graphics/kval_banner.png)
2
+
3
+ Collection of Python functions for working with oceanography data processing and analysis.
4
+
5
+ Maintained by the Oceanography section at the [Norwegian Polar Institute](https://www.npolar.no/en/).
6
+
7
+ Supported by the project [HiAOOS](https://hiaoos.eu/).
8
+ ___
9
+
10
+ Last release,`0.3.0`:
11
+
12
+
13
+
14
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15229098.svg)](https://doi.org/10.5281/zenodo.15229098)
15
+
16
+
17
+
18
+ - This version is used to work out pypi and conda distribution.
19
+ - An updated version with improved documentation and a code overhaul is planned for Spring 2025.
20
+
21
+ __
22
+
23
+ *In active development.*
24
+
25
+ ____
26
+ <details>
27
+ <summary><strong>CORE FUNCTIONALITY</strong></summary>
28
+
29
+ ##### Submodules
30
+
31
+
32
+ - `file`: Converting to and from various file format (e.g. read CTD .cnv data to xarray/netCDF)
33
+ - `data`: Data post-processing and QC (e.g. CTD post-processing)
34
+ - `metadata`: Handling and standardizing metadata according to CF conventions
35
+ - `plots*`: Various tools to help make nice (matplotlib) figures
36
+ - `maps`: Tools for making maps
37
+ - `geo`: Geographical calculations (coordinate transformations, point-to-point distances etc)
38
+ - `ocean`: Oceanography-specific tools (e.g. (`*`) vertical modes, turner angles, wkb scaling, geostrophical calculations)
39
+ - `calc`: Various useful functions for numerical calculations.
40
+ - `util`: Various backend support functions and wrappers for xarray functionality.
41
+ - `signal`: Filtering, spectral analysis, etc.
42
+
43
+ `*` Not implemented
44
+
45
+ </details>
46
+
47
+ ____
48
+
49
+ <details>
50
+ <summary><strong>GENERAL PRINCIPLES</strong></summary>
51
+
52
+ *Note: These are aspirational guidelines and not always adhered to in the current code structure. We will try to get there!*
53
+
54
+ ###### Code
55
+
56
+ - Written in Python (>=3.8).
57
+ - Tailored for use in a [Jupyter] notebook environment.
58
+ - Data and metadata should be stored in [xarray(https://docs.xarray.dev/en/stable/)] `Datasets`.
59
+ - Intermediate operations using, e.g., `numpy` or `pandas` objects are fine, but the end user should only interact with `Datasets`.
60
+ - Code should adhere to [PEP8](https://peps.python.org/pep-0008/) style guide, and all functions should have docstrings.
61
+ - All functionality should have associated [pytest](https://docs.pytest.org/en/7.4.x/) tests.
62
+ - Unit tests of individual functions are found in `tests/unit_tests/`. Its directory structure and contents should mirror that of `src/kval`.
63
+ - Tests of more complex functionality (e.g. processing pipelines using multiple modules) should be put in `tests/functional_tests/`.
64
+ - 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.
65
+
66
+ ###### Metadata
67
+
68
+ - All operations that modify data should be recorded in the file metadata.
69
+ - Wherever possibly, and at as early a stage as possible, all available useful metadata should be added to Datasets.
70
+ - Metadata formatting should adhere to [CF](http://cfconventions.org/) and [ACDD](https://wiki.esipfed.org/Attribute_Convention_for_Data_Discovery_1-3) conventions, supplemented by:
71
+ - [OceanSITES](http://www.oceansites.org/docs/oceansites_data_format_reference_manual_20140917.pdf)
72
+ - [2021 NPI NetCDF guidelines](https://gitlab.com/npolar/netcdf-creator/-/blob/main/docs/netcdf_standard_npi.pdf?ref_type=heads)
73
+
74
+ ###### Project
75
+
76
+ - The project is maintained by the Oceanography section at the [Norwegian Polar Institute](www.npolar.no/en).
77
+ - External contributions (pull requests, issues, whatever) are very welcome!
78
+ - We will attempt to follow the guidelines from the
79
+ [Scientific Python Library Development Guide](https://learn.scientific-python.org/development/).
80
+ - *Releases* will be published relatively often, whenever a new functionality has been added.
81
+ Releases will be archived on [zenodo](www.zenodo.org) and given a DOI.
82
+
83
+ ###### Contributing
84
+
85
+ Pull requests, issues, etc are very welcome!
86
+
87
+ *[Something about branches here]*
88
+
89
+ *[Something about python style, test suite]*
90
+
91
+
92
+ </details>
93
+
94
+ ____
95
+
96
+
97
+ <details>
98
+ <summary><strong>RELEASE NOTES</strong></summary>
99
+
100
+
101
+
102
+
103
+
104
+ - **0.3.0** *(CURRENT, released 16 April 2025)*:
105
+ - Refactoring of large parts of the code for structure, clarity and efficiency.
106
+ - ~~Complete reproducability and self-documentation in the CTD processing functionality.~~
107
+ - Adding mooring processing functionality
108
+ - ~~Functionality for parsing moored CTD sensors (RBR and SBE)~~
109
+ - Functionality for basic processing source file -> CF-NetCDF
110
+ - ~~Test suite (comprehensive but not entirely complete)~~
111
+ - ~~Decluttering the repo bringing it down from its currently bloated state.~~
112
+ - Started useful documentation with somenotebook examples (need a lot of work).
113
+ - Released to PyPi and conda-forge.
114
+ - Many other improvements and additions.
115
+
116
+
117
+ - **0.4.0** *(PLANNED for spring 2025)*
118
+
119
+ - Complete (useful) documentation with good notebook examples of core functionality.
120
+ - Expanded test suite for good coverage of basic functionality plus
121
+ - *Possibly*:
122
+ - Parsing data from inductive loggers.
123
+ - Breaking out NPI-specific stuff (if there really is that much of it) to a sepåarate libraru, ´naust´.
124
+
125
+
126
+ - *0.0.2*:
127
+ - Name change from `oceanograpy` to `kval`.
128
+ - Introduction of test suite.
129
+ - Other minor changes.
130
+
131
+ - *0.0.1:*
132
+ - Initial release.
133
+ - Functionality tailored for CTD processing.
134
+
135
+
136
+
137
+
138
+ </details>
139
+
140
+
141
+
142
+
Binary file