Skip to main content

Generate a 3Di simulation grid from a model schematisation.

Project description

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_grid
>>> sqlite_path = "/path/to/model.sqlite"
>>> dem_path = "/path/to/dem.tiff"
>>> out_path = "grid.gpkg"  # or "something.h5" for HDF5 output
>>> make_grid(sqlite_path, dem_path, out_path)

Installation

This package is distributed as binary only, because its (Fortran) source code is proprietary. The only currently supported platform is Linux.

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

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

Then 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]

Changelog of threedigrid-builder

0.1.2 (2021-04-28)

  • Added public API with 1 function: threedigrid_builder.make_grid.

0.1.1 (2021-04-20)

  • Fixed automatic PyPI upload.

0.1.0 (2021-04-20)

  • Partially ported functionality from inpy (generate 3di files, makegrid): 1D channel grid (including calculation_type and bottom_level), and 2D open water grid.

  • Added gridadmin and geopackage output.

  • Breaking change: the interpolation between cross section locations (channels) now also extrapolates for lines and nodes that are not in between two connection nodes. This happens only if the channel has at least 2 cross section locations. When extrapolatic, the line.cross_weight is less than 0 or greater than 1.

  • Breaking change: missing or empty values in float datasets in the output gridadmin are now denoted by NaN (not-a-number) instead of -9999.0.

  • Breaking change: integers in the output gridadmin are now always 32-bit (instead of sometimes 32-bit and sometimes 64-bit).

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

File details

Details for the file threedigrid_builder-0.1.2-cp39-cp39-manylinux1_x86_64.whl.

File metadata

  • Download URL: threedigrid_builder-0.1.2-cp39-cp39-manylinux1_x86_64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for threedigrid_builder-0.1.2-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 6c6233c0ad81efa0ee652aa2e6642946e35bafd471a14c2a9d02ca20958e31cb
MD5 14a20b6360b53e6f38fab9493d320fd1
BLAKE2b-256 5f4d1709da45f217b4a65328f3f6b0b8fb635e5d8c04e075b5ba941163554645

See more details on using hashes here.

File details

Details for the file threedigrid_builder-0.1.2-cp39-cp39-manylinux1_i686.whl.

File metadata

  • Download URL: threedigrid_builder-0.1.2-cp39-cp39-manylinux1_i686.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for threedigrid_builder-0.1.2-cp39-cp39-manylinux1_i686.whl
Algorithm Hash digest
SHA256 24c0e24440326e852fbcfb46878e09dca8e6bd3add09f37c94f1b5eb5f63337d
MD5 2f69f82689001c00956da10fec6d5e91
BLAKE2b-256 cc932df3ebcfc25a966175d2b7a90b122ca8d7da995ceccb63aea7bd29ae350c

See more details on using hashes here.

File details

Details for the file threedigrid_builder-0.1.2-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: threedigrid_builder-0.1.2-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for threedigrid_builder-0.1.2-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 182c3aa30372553f462ac41bfba3d72c2b3b6f126cae1c7abcb2db03397319ca
MD5 badb84fbc7fd13914bb687c968a29049
BLAKE2b-256 4d973dd204a8849b2a1e15bdfbe0cf4bd184609a99de1aea547f12b41dc0da2e

See more details on using hashes here.

File details

Details for the file threedigrid_builder-0.1.2-cp38-cp38-manylinux1_i686.whl.

File metadata

  • Download URL: threedigrid_builder-0.1.2-cp38-cp38-manylinux1_i686.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for threedigrid_builder-0.1.2-cp38-cp38-manylinux1_i686.whl
Algorithm Hash digest
SHA256 849f3bd8b8c404833ef44587dd1cc89c75c3836bf796b56810690091504c7556
MD5 d293d0e4f8d8e157334ef67dafc394c7
BLAKE2b-256 ef1d84e124d30567c2999c6aeb30da35370a6faf8b62a7641d3aa58ffa441ba9

See more details on using hashes here.

File details

Details for the file threedigrid_builder-0.1.2-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: threedigrid_builder-0.1.2-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for threedigrid_builder-0.1.2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 6d6b7363bc5954878b90f0ae8121be03e8e335097bc037dea34d93c886888152
MD5 5ff30f9be3e60620ca4d040dd38bf185
BLAKE2b-256 26324a72402ca862c3e3bb594fab0de41bb9e9c101d87a4ff097eb633c11df16

See more details on using hashes here.

File details

Details for the file threedigrid_builder-0.1.2-cp37-cp37m-manylinux1_i686.whl.

File metadata

  • Download URL: threedigrid_builder-0.1.2-cp37-cp37m-manylinux1_i686.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for threedigrid_builder-0.1.2-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 24e19362f6ffb910d24dda3ab85e6446cbc90fa9765c656b42b468940ab2a4ff
MD5 ca5ede60e866557b0fdcdb084b9cac0f
BLAKE2b-256 c99ebe95e203b3b65c8e98842a112c7647255fc59962b9e50f317261e3a6aa62

See more details on using hashes here.

File details

Details for the file threedigrid_builder-0.1.2-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: threedigrid_builder-0.1.2-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for threedigrid_builder-0.1.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 fe2eef26bccf7dcb6c69566a7753fd70aba0303501eb0a181b1c09256729d541
MD5 67a164da0c719870b5504f0f7eea14bc
BLAKE2b-256 73912f673aba2b9a5679224fac67736334aadb4a6cbee57bd1e30635fda86af7

See more details on using hashes here.

File details

Details for the file threedigrid_builder-0.1.2-cp36-cp36m-manylinux1_i686.whl.

File metadata

  • Download URL: threedigrid_builder-0.1.2-cp36-cp36m-manylinux1_i686.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for threedigrid_builder-0.1.2-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 21471cfd3eae7c61bf3bd09aafad1d4758c4f12308f8c1d6bb10718e32e561f8
MD5 e7203cc642cf19cf730d5a7f4cea1149
BLAKE2b-256 798be0b58dce09f7b47e089b38b0f683185aaae274f6ea6b8349001b54169401

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page