Skip to main content

Calculate waterdepths for 3Di results.

Project description

threedidepth

Calculate waterdepths for 3Di results.

  • Interpolated or gridcell-constant waterlevels

  • Interfaces with threediresults via threedigrid

  • Progress indicator support

  • Low memory consumption

For the interpolated mode, the ‘lizard’-method is used. For a detailed description, read the docstring for the LizardLevelCalculator.

Installation

Make sure GDAL is available as (from osgeo import gdal)

$ pip install threedidepth

Usage

From the cli:

$ threedidepth gridadmin.h5 results_3di.nc dem.tif waterdepth.tif

Or python:

>>> threedidepth.calculate_waterdepth(...)

Development installation with docker-compose

For development, clone the repository and use a docker-compose setup:

$ docker-compose build --build-arg uid=`id -u` --build-arg gid=`id -g` lib
$ docker-compose up --no-start
$ docker-compose start
$ docker-compose exec lib bash

Create a virtualenv:

# note that Dockerfile prepends .venv/bin to $PATH
(docker)$ virtualenv .venv --system-site-packages

Install dependencies & package and run tests:

(docker)$ pip install -r requirements.txt
(docker)$ pip install -e .[test]
(docker)$ pytest

Update packages:

(docker)$ rm -rf .venv
(docker)$ virtualenv .venv --system-site-packages
(docker)$ pip install -e .
(docker)$ pip freeze | grep -v threedidepth > requirements.txt

Changelog of threedidepth

0.3 (2021-02-10)

  • Reorder to match the lizard triangulation.

0.2 (2020-12-10)

  • Implemented lizard method and set it as default.

0.1.2 (2020-09-21)

  • Fix off-by-one-pixel nodgrid.

0.1.1 (2020-09-11)

  • Fix flipped nodgrid.

0.1 (2020-09-03)

  • First version.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

threedidepth-0.3.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

threedidepth-0.3-py2.py3-none-any.whl (12.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file threedidepth-0.3.tar.gz.

File metadata

  • Download URL: threedidepth-0.3.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.24.0 setuptools/41.6.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.9

File hashes

Hashes for threedidepth-0.3.tar.gz
Algorithm Hash digest
SHA256 1a271e130396fd38855142f99eec5139611b464ecac6625050773382493dad7b
MD5 6c6072e85fae20a64cb8cfeff27ef71e
BLAKE2b-256 e575e10fe675f40dd792062c6367aa04248ff32c68c055a83e27c6cee7deef9a

See more details on using hashes here.

File details

Details for the file threedidepth-0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: threedidepth-0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.24.0 setuptools/41.6.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.9

File hashes

Hashes for threedidepth-0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 dd703ea0b321039a683bd904fecb9baae444470b47bdf0591f77e360d95e5893
MD5 bdc9a43d7ad9288355a219779559665b
BLAKE2b-256 67240d7dd11b61e30be7e9a75ef459d37fc06db1a111e9ddbe11120fedcf7c62

See more details on using hashes here.

Supported by

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