Skip to main content

threedigrid-builder

Github Actions status PyPI

Generate a 3Di simulation grid from a model schematisation.

Usage

This library converts a model schematisation to a 3Di simulation grid. This can be done using a single function that reads data from an SQLite and TIFF and then outputs the generated grid into a Geopackage or HDF5 file:

>>> from threedigrid_builder import make_gridadmin
>>> sqlite_path = "/path/to/model.sqlite"
>>> dem_path = "/path/to/dem.tiff"
>>> out_path = "grid.gpkg"  # or "something.h5" for HDF5 output
>>> make_gridadmin(sqlite_path, dem_path, out_path)

Alternatively, the generated grid can be output in-memory:

>>> make_gridadmin(sqlite_path, dem_path)
{'nodes': {'id': array([   1,    2,    3, ..., 7903, 7904, 7905], dtype=int32), ...}

Installation

This package is distributed as source and binary wheels on PyPI. The currently supported platforms are Windows, Linux, and OSX, all 64 bit versions only.

First install sqlite and spatialite libraries, e.g. on Ubuntu:

$ sudo apt-get install sqlite3 libsqlite3-mod-spatialite

For raster input, GDAL is required to be present. We omitted these from the dependencies because installation of GDAL depends on your platform an on your personal perference. One option is to install gdal using apt-get, and then pygdal with a matching version:

$ sudo apt-get libgdal-dev $ pip install pygdal=={your gdal version}.*

The current platform version of GDAL can be retrieved by:

$ gdalinfo –version

Install the threedigrid-builder:

$ pip install threedigrid-builder

For output into a file for the 3Di calculationcore, enable gridadmin output:

$ pip install threedigrid-builder[gridadmin]

For output into Geopackage for display in e.g. QGis, enable gpkg output:

$ pip install threedigrid-builder[gpkg]

The command line interface requires Typer:

$ pip install threedigrid-builder[cli]

Development

Clone the repo and fetch the LFS objects:

$ git lfs fetch origin refs/remotes/origin/master

Install the build tools:

$ sudo apt install cmake gfortran

Install platform dependencies:

$ sudo apt-get update && sudo apt-get install --yes --no-install-recommends libgdal-dev sqlite3 libsqlite3-mod-spatialite

Create and activate a virtual environment:

$ python -m venv ./venv
$ source ./venv/bin/activate

Install the dependencies. For your distribution, check the dependency matrix in .github/workflows/test.yml. For example:

$ pip install --upgrade pip wheel scikit-build-core setuptools numpy
$ pip install .[test,gridadmin] --no-cache-dir --no-build-isolation GDAL[numpy]==$(gdal-config --version)

Now you should be able to run the tests:

$ pytest
$ pytest integration_tests

For VSCode, optionally select the python interpreter corresponding to the virtual environment.

Only build the Fortran files:

$ ./build.sh

Metadata

Release files for threedigrid-builder 1.25.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for threedigrid-builder 1.25.8
File Size Uploaded Provenance Actions
threedigrid_builder-1.25.8.tar.gz 70.1 MB Without provenance Details for threedigrid_builder-1.25.8.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for threedigrid-builder 1.25.8
File Actions
threedigrid_builder-1.25.8-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details for threedigrid_builder-1.25.8-cp314-cp314t-win_amd64.whl
threedigrid_builder-1.25.8-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for threedigrid_builder-1.25.8-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
threedigrid_builder-1.25.8-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for threedigrid_builder-1.25.8-cp314-cp314-win_amd64.whl
threedigrid_builder-1.25.8-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for threedigrid_builder-1.25.8-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
threedigrid_builder-1.25.8-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for threedigrid_builder-1.25.8-cp313-cp313-win_amd64.whl
threedigrid_builder-1.25.8-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for threedigrid_builder-1.25.8-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
threedigrid_builder-1.25.8-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for threedigrid_builder-1.25.8-cp312-cp312-win_amd64.whl
threedigrid_builder-1.25.8-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for threedigrid_builder-1.25.8-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
threedigrid_builder-1.25.8-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for threedigrid_builder-1.25.8-cp311-cp311-win_amd64.whl
threedigrid_builder-1.25.8-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for threedigrid_builder-1.25.8-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
threedigrid_builder-1.25.8-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for threedigrid_builder-1.25.8-cp310-cp310-win_amd64.whl
threedigrid_builder-1.25.8-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for threedigrid_builder-1.25.8-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Total release size: 927.3 MB

Release files / threedigrid_builder-1.25.8.tar.gz

Download URL threedigrid_builder-1.25.8.tar.gz
Size 70.1 MB
Tags Source
SHA-256 checksum
How to use checksums
951aeec40a2429774139ae9a728d1abce7d20bdc7a01a45118ffa331cce7df0a
BLAKE2b-256 checksum
How to use checksums
c86622a80aae86942883014721a71137923fe903cca164b86317e7c9c79b46b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / threedigrid_builder-1.25.8-cp314-cp314t-win_amd64.whl

Download URL threedigrid_builder-1.25.8-cp314-cp314t-win_amd64.whl
Size 71.8 MB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
8b40ef4b14d36451f6238885692074d0892179a6ad81bb00bc368467effef539
BLAKE2b-256 checksum
How to use checksums
6eb4d6f4eeef51b2f12f577eddb579ae6e6c29f792be923a103abcff12309cb2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / threedigrid_builder-1.25.8-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL threedigrid_builder-1.25.8-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 71.2 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
bdacd9d18035faaf6ba1b630cdcbe1f7f1f2bbf880ce9efa44c09e29b8e9df4f
BLAKE2b-256 checksum
How to use checksums
6c8d98499f8ee9e83385fd976693397302f74060ec3b97a15ceecfcb889165ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / threedigrid_builder-1.25.8-cp314-cp314-win_amd64.whl

Download URL threedigrid_builder-1.25.8-cp314-cp314-win_amd64.whl
Size 71.8 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
c6716350ab087c1296c9722d1c8b61da3faa45d620e838f33697abc4c46f7e23
BLAKE2b-256 checksum
How to use checksums
56baf612f1ef4d1d4c0e9b469819725d2642a483e8bc7241dd1bc8ef0a68fb5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / threedigrid_builder-1.25.8-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL threedigrid_builder-1.25.8-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 71.2 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
1738715a4deaa15ec998e5d82782603ea179bc7c12f71daed7730abc72ed2a43
BLAKE2b-256 checksum
How to use checksums
8912f5f88145d0986a9756a0875cdf6bf59054c9af0eacc3a51007df84a52220
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / threedigrid_builder-1.25.8-cp313-cp313-win_amd64.whl

Download URL threedigrid_builder-1.25.8-cp313-cp313-win_amd64.whl
Size 71.7 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
385b9db4bdf14c61ff1618da5238d6515e2817148e6cee8311b0a13d39608306
BLAKE2b-256 checksum
How to use checksums
a78fdf1014ef774b7cb4f77c183591696edc1271fd206dfc3655c3340a1cc25e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / threedigrid_builder-1.25.8-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL threedigrid_builder-1.25.8-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 71.2 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ac746e4ff3d8ecc2fdb48aa10e587bee051a09764713cc1c6cad7dc6e9ba51d8
BLAKE2b-256 checksum
How to use checksums
ea73ae27699b251798431f7696a618b5bc15b6fad0326d9033bb0c0348258560
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / threedigrid_builder-1.25.8-cp312-cp312-win_amd64.whl

Download URL threedigrid_builder-1.25.8-cp312-cp312-win_amd64.whl
Size 71.7 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
29e1057f1f4cee3806f0509eb3fd047a39d2c9461f764771c6799cf8c2d6313a
BLAKE2b-256 checksum
How to use checksums
940e66a321bdbe8c14cb5719078e4547ada54bd6ae3c07fe2d6c978987ab4e6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / threedigrid_builder-1.25.8-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL threedigrid_builder-1.25.8-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 71.2 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
09dcb081336704fec71bb1833325eb04d93d2540cf0cac303f98f1d5f703ac69
BLAKE2b-256 checksum
How to use checksums
a643b5f30bbdb6c2e8b2a5378b49daa38e8024064b62952dae66531d076c01a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / threedigrid_builder-1.25.8-cp311-cp311-win_amd64.whl

Download URL threedigrid_builder-1.25.8-cp311-cp311-win_amd64.whl
Size 71.6 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
8fc8efea2df25289da021815405b1cfd0e17f69c273fa868692c3ef1bb0f9214
BLAKE2b-256 checksum
How to use checksums
0f69b91772c7f7422023a23418f0214d5a6f4bcfa3ff14ef6016bd263454683a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / threedigrid_builder-1.25.8-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL threedigrid_builder-1.25.8-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 71.2 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
dea640750ac18c92e80d6a45f2fbda9e45b493320352936801ce6ed867acd126
BLAKE2b-256 checksum
How to use checksums
3827bdb88427de1c4182b5cc65180f9d7145646b013bebe74097e879b6145f2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / threedigrid_builder-1.25.8-cp310-cp310-win_amd64.whl

Download URL threedigrid_builder-1.25.8-cp310-cp310-win_amd64.whl
Size 71.5 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
aa1cffd73fdcaf21ddbe2ee3952276f828633a9165abadb180ad111c052098e9
BLAKE2b-256 checksum
How to use checksums
29ed4b12c880e50dab7412f0f50788d83e7c6c11a3de989f9fccc875f8e2220f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / threedigrid_builder-1.25.8-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL threedigrid_builder-1.25.8-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 71.2 MB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
0d8c282cc21bc8d41bb7481dd486ed4f5c46e7dc7559819492e0cec920b0e0d5
BLAKE2b-256 checksum
How to use checksums
f81835192cd78aa2abadf0d6238ab655693a132aa412575cf7fca94a34cca507
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for threedigrid-builder 1.25.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.25.8 This release

13 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page