https://github.com/jacobwilliams/splpak
Modernized SPLPAK library for multidimensional least-squares cubic spline fitting
https://github.com/jacobwilliams/splpak
cubic-splines curve-fitting fortran fortran-package-manager interpolation least-squares splines
Last synced: 2 months ago
JSON representation
Modernized SPLPAK library for multidimensional least-squares cubic spline fitting
- Host: GitHub
- URL: https://github.com/jacobwilliams/splpak
- Owner: jacobwilliams
- License: other
- Created: 2023-01-18T04:37:38.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-02-07T21:58:11.000Z (3 months ago)
- Last Synced: 2025-02-07T22:34:17.106Z (3 months ago)
- Topics: cubic-splines, curve-fitting, fortran, fortran-package-manager, interpolation, least-squares, splines
- Language: Fortran
- Homepage:
- Size: 1000 KB
- Stars: 8
- Watchers: 3
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

============This library contains routines for fitting (least squares) a multidimensional cubic spline to arbitrarily located data. It also contains routines for evaluating this spline (or its partial derivatives) at any point.
This is a modernization of the double precision SPLPAK files from [NCL](https://github.com/NCAR/ncl).## Status
[](https://github.com/topics/fortran)
[](https://github.com/jacobwilliams/splpak/releases/latest)
[](https://github.com/jacobwilliams/splpak/actions)
[](https://codecov.io/gh/jacobwilliams/splpak)
[](https://github.com/jacobwilliams/splpak/commits/master)## Compiling
A `fpm.toml` file is provided for compiling splpak with the [Fortran Package Manager](https://github.com/fortran-lang/fpm). For example, to build:
```
fpm build --profile release
```By default, the library is built with double precision (`real64`) real values. Explicitly specifying the real kind can be done using the following processor flags:
Preprocessor flag | Kind | Number of bytes
----------------- | ----- | ---------------
`REAL32` | `real(kind=real32)` | 4
`REAL64` | `real(kind=real64)` | 8
`REAL128` | `real(kind=real128)` | 16For example, to build a single precision version of the library, use:
```
fpm build --profile release --flag "-DREAL32"
```To run the unit tests:
```
fpm test --profile release
```To use `splpak` within your fpm project, add the following to your `fpm.toml` file:
```toml
[dependencies]
splpak = { git="https://github.com/jacobwilliams/splpak.git" }
```or, to use a specific version:
```toml
[dependencies]
splpak = { git="https://github.com/jacobwilliams/splpak.git", tag = "2.0.0" }
```## Documentation
The latest API documentation can be found [here](https://jacobwilliams.github.io/splpak/). This was generated from the source code using [FORD](https://github.com/Fortran-FOSS-Programmers/ford) (i.e. by running `ford ford.md`).
## See also
* [The NCAR Command Language ](https://github.com/NCAR/ncl) (specificially, the [csagrid](https://github.com/NCAR/ncl/tree/develop/ngmath/src/lib/gridpack/csagrid) directory)
* [bspline](https://github.com/NCAR/bspline) - Cubic B-Spline implementation in C++ templates. Also has a copy of [splpak.f](https://github.com/NCAR/bspline/tree/master/Tests/Fortran)
* [Ngmath Library Overview](https://ngwww.ucar.edu/ngmath/)
* [bspline-fortran](https://github.com/jacobwilliams/bspline-fortran) Multidimensional B-Spline Interpolation of Data on a Regular Grid
* [regridpack](https://github.com/jacobwilliams/regridpack) Linear or cubic interpolation for 1D-4D grids
* [finterp](https://github.com/jacobwilliams/finterp) 1D-6D linear or nearest-neighbor interpolation