/splpak

Modernized SPLPAK library for multidimensional least-squares cubic spline fitting

Primary LanguageFortranOtherNOASSERTION

splpak

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.

Status

Language GitHub release Build Status codecov last-commit

Compiling

A fpm.toml file is provided for compiling splpak with the Fortran Package Manager. 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) 16

For 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:

[dependencies]
splpak = { git="https://github.com/jacobwilliams/splpak.git" }

or, to use a specific version:

[dependencies]
splpak = { git="https://github.com/jacobwilliams/splpak.git", tag = "2.0.0"  }

Documentation

The latest API documentation can be found here. This was generated from the source code using FORD (i.e. by running ford ford.md).

See also