Metadata-Version: 2.4
Name: skyborn-spharm
Version: 0.1.0
Summary: Modern Fortran-accelerated spherical harmonic transforms for Python (SPHEREPACK + reduced Gaussian grids)
Author-email: Qianye Su <suqianye2000@gmail.com>
License-Expression: BSD-3-Clause
Project-URL: Homepage, https://github.com/skyborn-org/skyborn-spharm
Project-URL: Repository, https://github.com/skyborn-org/skyborn-spharm
Project-URL: Documentation, https://skyborn.readthedocs.io/
Project-URL: Bug Tracker, https://github.com/skyborn-org/skyborn-spharm/issues
Keywords: atmospheric-science,meteorology,spherical-harmonics,spherepack,gaussian-grid
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: LICENSE.spherepack
Requires-Dist: numpy>=1.24.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: matplotlib; extra == "dev"
Requires-Dist: pandas; extra == "dev"
Requires-Dist: xarray; extra == "dev"
Dynamic: license-file

# skyborn-spharm (`skybornspharm`)

Modern, prebuilt-wheel spherical harmonic transforms in Python backed by NCAR SPHEREPACK Fortran/OpenMP kernels and native **reduced Gaussian grid** support (ECMWF IFS / ERA5 style).

Part of the [**Skyborn** (`skyborn-org`)](https://github.com/skyborn-org) ecosystem.

## Why `skyborn-spharm`?

- **Drop-in modern replacement for `pyspharm`**: Full Python 3.9–3.14 and NumPy 1.24–2.x support with prebuilt wheels for Linux (`manylinux2014` & `manylinux_2_28`), macOS (`arm64` & `x86_64`), and Windows (`win_amd64`).
- **Zero extra runtime dependencies**: Depends only on `numpy`.
- **Thread-safe & OpenMP accelerated**: Modernized Fortran 90 kernels with Meson build system.
- **Reduced Gaussian Grid Support**: Direct transforms on packed reduced Gaussian grids (`ReducedGaussianSpharmt`).

## Installation

```bash
pip install skyborn-spharm
```

## Quick Start

```python
import numpy as np
from skybornspharm import Spharmt, gaussian_lats_wts

nlon, nlat = 144, 73
sht = Spharmt(nlon=nlon, nlat=nlat, gridtype="gaussian")
field = np.random.randn(nlat, nlon)

spec = sht.grdtospec(field)
reconstructed = sht.spectogrd(spec)
```

Note: `skyborn.spharm` in the `skyborn` package seamlessly re-exports `skybornspharm`.

## License

- Python wrappers and modern extensions: BSD 3-Clause License ([LICENSE](LICENSE))
- Underlying SPHEREPACK routines: SPHEREPACK License ([LICENSE.spherepack](LICENSE.spherepack))
