ncllibs2py 0.2.1__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.
- ncllibs2py-0.2.1/CHANGELOG.md +29 -0
- ncllibs2py-0.2.1/CITATION.cff +21 -0
- ncllibs2py-0.2.1/CONTRIBUTING.md +49 -0
- ncllibs2py-0.2.1/LICENSE +674 -0
- ncllibs2py-0.2.1/MANIFEST.in +8 -0
- ncllibs2py-0.2.1/PKG-INFO +852 -0
- ncllibs2py-0.2.1/README.md +154 -0
- ncllibs2py-0.2.1/THIRD_PARTY_NOTICES.md +18 -0
- ncllibs2py-0.2.1/pyproject.toml +41 -0
- ncllibs2py-0.2.1/setup.cfg +4 -0
- ncllibs2py-0.2.1/setup.py +34 -0
- ncllibs2py-0.2.1/src/ncllibs2py/__init__.py +24 -0
- ncllibs2py-0.2.1/src/ncllibs2py/_ccm_hybrid_pressure.c +12864 -0
- ncllibs2py-0.2.1/src/ncllibs2py/_ccm_hybrid_pressure.pyx +38 -0
- ncllibs2py-0.2.1/src/ncllibs2py/_ecmwf_sea_level_pressure.c +13622 -0
- ncllibs2py-0.2.1/src/ncllibs2py/_ecmwf_sea_level_pressure.pyx +76 -0
- ncllibs2py-0.2.1/src/ncllibs2py/_spherical_delaunay.c +42467 -0
- ncllibs2py-0.2.1/src/ncllibs2py/_spherical_delaunay.pyx +1060 -0
- ncllibs2py-0.2.1/src/ncllibs2py/ccm_geopotential_height.py +125 -0
- ncllibs2py-0.2.1/src/ncllibs2py/ccm_hybrid_pressure.py +59 -0
- ncllibs2py-0.2.1/src/ncllibs2py/ecmwf_sea_level_pressure.py +61 -0
- ncllibs2py-0.2.1/src/ncllibs2py/murphy_koop_relative_humidity.py +117 -0
- ncllibs2py-0.2.1/src/ncllibs2py/spherical_delaunay.py +791 -0
- ncllibs2py-0.2.1/src/ncllibs2py.egg-info/PKG-INFO +852 -0
- ncllibs2py-0.2.1/src/ncllibs2py.egg-info/SOURCES.txt +31 -0
- ncllibs2py-0.2.1/src/ncllibs2py.egg-info/dependency_links.txt +1 -0
- ncllibs2py-0.2.1/src/ncllibs2py.egg-info/requires.txt +8 -0
- ncllibs2py-0.2.1/src/ncllibs2py.egg-info/top_level.txt +1 -0
- ncllibs2py-0.2.1/tests/test_ccm_geopotential_height.py +31 -0
- ncllibs2py-0.2.1/tests/test_ccm_hybrid_pressure.py +18 -0
- ncllibs2py-0.2.1/tests/test_ecmwf_sea_level_pressure.py +33 -0
- ncllibs2py-0.2.1/tests/test_murphy_koop_relative_humidity.py +17 -0
- ncllibs2py-0.2.1/tests/test_spherical_delaunay.py +56 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
- Split the atmospheric utilities into purpose-specific modules instead of
|
|
6
|
+
one generic `ncl_utils.py` module.
|
|
7
|
+
- Added Cython cores for `pres_hybrid_ccm` and `pslec_atomic` after
|
|
8
|
+
benchmarking showed that direct NumPy implementations were slower than the
|
|
9
|
+
original Numba routines.
|
|
10
|
+
- Kept the public top-level function names unchanged.
|
|
11
|
+
|
|
12
|
+
## 0.2.0
|
|
13
|
+
|
|
14
|
+
- Added `pres_hybrid_ccm` for CCM hybrid-level pressure calculation.
|
|
15
|
+
- Added `cz2ccm` for geopotential-height calculation on hybrid levels.
|
|
16
|
+
- Added `relhum` for Murphy-Koop relative-humidity calculation with one-
|
|
17
|
+
dimensional pressure-level support.
|
|
18
|
+
- Added `pslec_atomic` and `pslec` for NCL-style sea-level pressure reduction.
|
|
19
|
+
- Implemented the new utilities with NumPy and Xarray without a mandatory
|
|
20
|
+
Numba dependency.
|
|
21
|
+
|
|
22
|
+
## 0.1.0
|
|
23
|
+
|
|
24
|
+
- Added the NCL-compatible `Csstri` spherical Delaunay triangulation.
|
|
25
|
+
- Added the Cython computational core and generated C source.
|
|
26
|
+
- Added deterministic random-state context support for repeated calls.
|
|
27
|
+
- Added packaging metadata, tests, and documentation for independent use.
|
|
28
|
+
- Verified triangle connectivity and CPL7 weight results against NCL for the
|
|
29
|
+
CN_30 and CN_15 CRESM cases.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
title: ncllibs2py
|
|
3
|
+
version: 0.2.1
|
|
4
|
+
message: If you use ncllibs2py, please cite this software and its upstream NCL algorithm.
|
|
5
|
+
type: software
|
|
6
|
+
authors:
|
|
7
|
+
- given-names: Omarjan
|
|
8
|
+
family-names: Obulkasim
|
|
9
|
+
- given-names: Shulei
|
|
10
|
+
family-names: Zhang
|
|
11
|
+
- given-names: Han
|
|
12
|
+
family-names: Zhang
|
|
13
|
+
- given-names: Hongjing
|
|
14
|
+
family-names: Chen
|
|
15
|
+
repository-code: https://github.com/wubulks/ncllibs2py
|
|
16
|
+
license: GPL-3.0-or-later
|
|
17
|
+
keywords:
|
|
18
|
+
- NCL
|
|
19
|
+
- Cython
|
|
20
|
+
- spherical Delaunay triangulation
|
|
21
|
+
- climate modeling
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Contributing to ncllibs2py
|
|
2
|
+
|
|
3
|
+
Thank you for contributing to `ncllibs2py`. New NCL-to-Python ports should
|
|
4
|
+
remain independent of the CRESM repository and should include tests,
|
|
5
|
+
documentation, and any required upstream attribution.
|
|
6
|
+
|
|
7
|
+
## Development setup
|
|
8
|
+
|
|
9
|
+
Use the Python environment that will run the package. For the CRESM
|
|
10
|
+
workflow, this is normally `cresm`:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
conda activate cresm
|
|
14
|
+
python -m pip install --no-build-isolation ".[test,build]"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Checks
|
|
18
|
+
|
|
19
|
+
Run the test suite and packaging checks before opening a pull request:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
python -m pytest -q
|
|
23
|
+
python -m build --no-isolation
|
|
24
|
+
python -m twine check dist/*
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The public implementation must preserve the NCL-compatible behavior. When
|
|
28
|
+
algorithmic code changes, compare its result with the relevant NCL routine
|
|
29
|
+
and document the test case and numerical or connectivity differences.
|
|
30
|
+
|
|
31
|
+
## Cython source
|
|
32
|
+
|
|
33
|
+
The generated C source is tracked deliberately. If the `.pyx` file changes,
|
|
34
|
+
regenerate the C source with:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
python -m cython -3 --fast-fail \
|
|
38
|
+
-o src/ncllibs2py/_spherical_delaunay.c \
|
|
39
|
+
src/ncllibs2py/_spherical_delaunay.pyx
|
|
40
|
+
python -m cython -3 --fast-fail \
|
|
41
|
+
-o src/ncllibs2py/_ecmwf_sea_level_pressure.c \
|
|
42
|
+
src/ncllibs2py/_ecmwf_sea_level_pressure.pyx
|
|
43
|
+
python -m cython -3 --fast-fail \
|
|
44
|
+
-o src/ncllibs2py/_ccm_hybrid_pressure.c \
|
|
45
|
+
src/ncllibs2py/_ccm_hybrid_pressure.pyx
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Do not commit compiled `.so` files, build directories, wheels, or egg-info
|
|
49
|
+
directories.
|