Python wrapper for a Fortran kriging and sequential Gaussian simulation engine
Project description
krigekit
A Python wrapper for a high-performance Fortran kriging engine parallelised with OpenMP.
| Capability | Notes |
|---|---|
| Ordinary and simple kriging | Point and block support |
| Co-kriging | Linear Model of Coregionalisation |
| Universal kriging / KED | External drift variables |
| Sequential Gaussian Simulation | Reproducible paths, multi-realisation |
| Space-time kriging | Sum-metric and product-sum ST models |
| Multiple Indicator Kriging / SIS | Categorical variables, three cross-variogram strategies |
| Spatially Varying Anisotropy | Per-block variogram |
| Cross-validation | Leave-one-out |
| Kriging weight reuse | Store and replay weights |
Installation
conda / mamba (recommended)
mamba env create -f environment.yml
mamba activate krigekit
pip
pip install -e ".[dev]" # after compiling the Fortran library
Compile the Fortran library first:
python build_lib.py # Linux/macOS (gfortran)
python build_lib.py --compiler ifx # Windows (Intel ifx)
See docs/installation.md for full details including
debug builds, --no-openmp, and docs dependencies.
Quick start
import numpy as np
from krigekit import Kriging
obs_coord = np.array([[0,0],[1,0],[0,1],[1,1],[0.5,0.5]], dtype=float)
obs_value = np.array([1.0, 2.0, 3.0, 4.0, 2.5])
grid_coord = np.mgrid[0:1.1:0.25, 0:1.1:0.25].reshape(2,-1).T
k = Kriging()
k.set_obs(ivar=1, coord=obs_coord, value=obs_value)
k.set_grid(coord=grid_coord)
k.set_vgm(ivar=1, jvar=1, vtype="sph", sill=1.0, a_major=1.0)
k.set_search()
k.solve()
df = k.get_result_df()
del k
For the full class API, co-kriging, SGSIM, space-time kriging, indicator simulation, and more, see the user guide and gallery examples.
Repository structure
krigekit/
├── src/
│ ├── libkriging/ Fortran kriging engine
│ ├── sparks/ Pilot-point kriging/SGSIM CLI
│ └── krigekit/ Python ctypes wrapper
├── examples/ Sphinx-Gallery example scripts
├── tests/ pytest test suite
├── test_data/ CSV/image data used by tests and examples
├── docs/ Sphinx documentation source
├── build_lib.py Fortran compile script
├── environment.yml conda/mamba environment
└── pyproject.toml pip package configuration
Contributing
- Fork the repository and create a feature branch.
- Add tests for any new behaviour.
- Run
pytestto confirm all tests pass. - Open a pull request.
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file krigekit-0.2.0-py3-none-win_amd64.whl.
File metadata
- Download URL: krigekit-0.2.0-py3-none-win_amd64.whl
- Upload date:
- Size: 756.5 kB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e1e1e18e7e42a43d46844147126d64430a0f7961191d3003d52aad27a0e91af
|
|
| MD5 |
878712fa3423b8fcd8065b75a1816dd2
|
|
| BLAKE2b-256 |
5416d5dfeb3501ee91f93ef94b73810554ef21e1db60e49f91df1db3f493ed83
|
Provenance
The following attestation bundles were made for krigekit-0.2.0-py3-none-win_amd64.whl:
Publisher:
build_wheels.yml on ougx/krigekit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
krigekit-0.2.0-py3-none-win_amd64.whl -
Subject digest:
3e1e1e18e7e42a43d46844147126d64430a0f7961191d3003d52aad27a0e91af - Sigstore transparency entry: 1799367980
- Sigstore integration time:
-
Permalink:
ougx/krigekit@2c3e8290c59ffc2ee8c1d147537aa21a4baf38d3 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/ougx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_wheels.yml@2c3e8290c59ffc2ee8c1d147537aa21a4baf38d3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file krigekit-0.2.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: krigekit-0.2.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ab919ce37a14b1af7464620ce68d4d8379459ff90a07f824963ea8bd022f197
|
|
| MD5 |
87976a6289eaec0beb8077ea806878f0
|
|
| BLAKE2b-256 |
6def73a107c74a6c6f8b4427ff8097b1b0773ecc41a339f45a76f63cb0729fa5
|
Provenance
The following attestation bundles were made for krigekit-0.2.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
build_wheels.yml on ougx/krigekit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
krigekit-0.2.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
2ab919ce37a14b1af7464620ce68d4d8379459ff90a07f824963ea8bd022f197 - Sigstore transparency entry: 1799366950
- Sigstore integration time:
-
Permalink:
ougx/krigekit@2c3e8290c59ffc2ee8c1d147537aa21a4baf38d3 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/ougx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_wheels.yml@2c3e8290c59ffc2ee8c1d147537aa21a4baf38d3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file krigekit-0.2.0-py3-none-macosx_15_0_x86_64.whl.
File metadata
- Download URL: krigekit-0.2.0-py3-none-macosx_15_0_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: Python 3, macOS 15.0+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
572643828db47ae59a4154722d2c5b29f3c61209858582ac1b540bf588d7c5d9
|
|
| MD5 |
c28fcbf28dcb2c6dfa9dc9e154ce35de
|
|
| BLAKE2b-256 |
3cca3d1ddb035efbdaa7d6f37fe6382fe3638df6b566a238b7d8669663b0a699
|
Provenance
The following attestation bundles were made for krigekit-0.2.0-py3-none-macosx_15_0_x86_64.whl:
Publisher:
build_wheels.yml on ougx/krigekit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
krigekit-0.2.0-py3-none-macosx_15_0_x86_64.whl -
Subject digest:
572643828db47ae59a4154722d2c5b29f3c61209858582ac1b540bf588d7c5d9 - Sigstore transparency entry: 1799368349
- Sigstore integration time:
-
Permalink:
ougx/krigekit@2c3e8290c59ffc2ee8c1d147537aa21a4baf38d3 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/ougx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_wheels.yml@2c3e8290c59ffc2ee8c1d147537aa21a4baf38d3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file krigekit-0.2.0-py3-none-macosx_14_0_arm64.whl.
File metadata
- Download URL: krigekit-0.2.0-py3-none-macosx_14_0_arm64.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf40a0b9de820308ec588d4ddbd6dee3c1ce9e0370c68111f1d215e07c74567d
|
|
| MD5 |
ce1b94b5aa68b53bfb321f093e1e2e68
|
|
| BLAKE2b-256 |
e4d60d3bcbd4eba7464e2c57cd1e5c970711afcc7b52a3b87e660623851e9d20
|
Provenance
The following attestation bundles were made for krigekit-0.2.0-py3-none-macosx_14_0_arm64.whl:
Publisher:
build_wheels.yml on ougx/krigekit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
krigekit-0.2.0-py3-none-macosx_14_0_arm64.whl -
Subject digest:
bf40a0b9de820308ec588d4ddbd6dee3c1ce9e0370c68111f1d215e07c74567d - Sigstore transparency entry: 1799367341
- Sigstore integration time:
-
Permalink:
ougx/krigekit@2c3e8290c59ffc2ee8c1d147537aa21a4baf38d3 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/ougx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_wheels.yml@2c3e8290c59ffc2ee8c1d147537aa21a4baf38d3 -
Trigger Event:
push
-
Statement type: