threedidepth


Namethreedidepth JSON
Version 0.6.3 PyPI version JSON
download
home_pagehttps://github.com/nens/threedidepth
SummaryCalculate waterdepths for 3Di results.
upload_time2024-03-22 08:21:22
maintainerNone
docs_urlNone
authorArjan Verkerk
requires_python>=3.5
licenseBSD license
keywords threedidepth
VCS
bugtrack_url
requirements appdirs asn1crypto cached-property cryptography distlib filelock GDAL h5netcdf h5py idna keyring keyrings.alt numpy pycrypto pygobject pyxdg scipy SecretStorage six threedigrid virtualenv
Travis-CI No Travis.
coveralls test coverage No coveralls.
            threedidepth
============

Calculate waterdepths for 3Di results. For results of type 'raw' the variable
's1' is used as waterlevel. For results of type 'aggregate', the variable
's1_max' is used as waterlevel.

* 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`.

For the maximum waterlevel calculation, the maximum waterlevel for each point
is taken before the interpolation is applied. This can lead to situations where
the highest waterlevel for a pixel for a certain timestep is higher than the
maximum waterlevel for the pixel.


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.6.3 (2024-03-22)
------------------

- Fix no_data_value is undefined.


0.6.2 (2024-03-14)
------------------

- Assign a default value if no_data_value is undefined.


0.6.1 (2023-07-11)
------------------

- Add release action for automatic upload to GitHub and PyPI.


0.6.0 (2023-07-10)
------------------

- Update dependency versions
- Add support for calculating maximum waterlevel as well as per timestep.


0.5 (2021-07-02)
----------------

- Added support for result type 'aggregate'.

- Got rid of NetCDF4 dependency by using h5netcdf.

- Fix coordinates of NetCDF output. (#17)


0.4 (2021-03-23)
----------------

- Enabled multiple calculation steps.

- Added netCDF output option.


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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/nens/threedidepth",
    "name": "threedidepth",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.5",
    "maintainer_email": null,
    "keywords": "threedidepth",
    "author": "Arjan Verkerk",
    "author_email": "arjan.verkerk@nelen-schuurmans.nl",
    "download_url": "https://files.pythonhosted.org/packages/ec/25/99c31151d55a69bf0cf109690e552b99e2a3cd44f7cbfefa60153cc991eb/threedidepth-0.6.3.tar.gz",
    "platform": null,
    "description": "threedidepth\n============\n\nCalculate waterdepths for 3Di results. For results of type 'raw' the variable\n's1' is used as waterlevel. For results of type 'aggregate', the variable\n's1_max' is used as waterlevel.\n\n* Interpolated or gridcell-constant waterlevels\n* Interfaces with threediresults via `threedigrid`\n* Progress indicator support\n* Low memory consumption\n\nFor the interpolated mode, the 'lizard'-method is used. For a detailed\ndescription, read the docstring for the `LizardLevelCalculator`.\n\nFor the maximum waterlevel calculation, the maximum waterlevel for each point\nis taken before the interpolation is applied. This can lead to situations where\nthe highest waterlevel for a pixel for a certain timestep is higher than the\nmaximum waterlevel for the pixel.\n\n\nInstallation\n------------\n\nMake sure GDAL is available as (`from osgeo import gdal`)\n\n$ pip install threedidepth\n\n\nUsage\n-----\n\nFrom the cli::\n\n    $ threedidepth gridadmin.h5 results_3di.nc dem.tif waterdepth.tif\n\n\nOr python::\n\n    >>> threedidepth.calculate_waterdepth(...)\n\n\nDevelopment installation with Docker Compose\n--------------------------------------------\n\nFor development, clone the repository and use a docker compose setup::\n\n    $ docker compose build --build-arg uid=`id -u` --build-arg gid=`id -g` lib\n    $ docker compose up --no-start\n    $ docker compose start\n    $ docker compose exec lib bash\n\nCreate a virtualenv::\n\n    # note that Dockerfile prepends .venv/bin to $PATH\n    (docker)$ virtualenv .venv --system-site-packages\n\nInstall dependencies & package and run tests::\n\n    (docker)$ pip install -r requirements.txt\n    (docker)$ pip install -e .[test]\n    (docker)$ pytest\n\nUpdate packages::\n    \n    (docker)$ rm -rf .venv\n    (docker)$ virtualenv .venv --system-site-packages\n    (docker)$ pip install -e .\n    (docker)$ pip freeze | grep -v threedidepth > requirements.txt\n\n\nChangelog of threedidepth\n=========================\n\n\n0.6.3 (2024-03-22)\n------------------\n\n- Fix no_data_value is undefined.\n\n\n0.6.2 (2024-03-14)\n------------------\n\n- Assign a default value if no_data_value is undefined.\n\n\n0.6.1 (2023-07-11)\n------------------\n\n- Add release action for automatic upload to GitHub and PyPI.\n\n\n0.6.0 (2023-07-10)\n------------------\n\n- Update dependency versions\n- Add support for calculating maximum waterlevel as well as per timestep.\n\n\n0.5 (2021-07-02)\n----------------\n\n- Added support for result type 'aggregate'.\n\n- Got rid of NetCDF4 dependency by using h5netcdf.\n\n- Fix coordinates of NetCDF output. (#17)\n\n\n0.4 (2021-03-23)\n----------------\n\n- Enabled multiple calculation steps.\n\n- Added netCDF output option.\n\n\n0.3 (2021-02-10)\n----------------\n\n- Reorder to match the lizard triangulation.\n\n\n0.2 (2020-12-10)\n----------------\n\n- Implemented lizard method and set it as default.\n\n\n0.1.2 (2020-09-21)\n------------------\n\n- Fix off-by-one-pixel nodgrid.\n\n\n0.1.1 (2020-09-11)\n------------------\n\n- Fix flipped nodgrid.\n\n\n0.1 (2020-09-03)\n----------------\n\n- First version.\n",
    "bugtrack_url": null,
    "license": "BSD license",
    "summary": "Calculate waterdepths for 3Di results.",
    "version": "0.6.3",
    "project_urls": {
        "Homepage": "https://github.com/nens/threedidepth"
    },
    "split_keywords": [
        "threedidepth"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "afdb70bdf58fba21f1043db3bfada43c2c15c7246c7077859429e36abc43b171",
                "md5": "d3b99fe400a05f356af29288febcec87",
                "sha256": "ce9028e6c7a6de0f9452912d4a5864347d60c0a694b0a0e2c89a5aab8556a07f"
            },
            "downloads": -1,
            "filename": "threedidepth-0.6.3-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d3b99fe400a05f356af29288febcec87",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.5",
            "size": 14451,
            "upload_time": "2024-03-22T08:21:21",
            "upload_time_iso_8601": "2024-03-22T08:21:21.761180Z",
            "url": "https://files.pythonhosted.org/packages/af/db/70bdf58fba21f1043db3bfada43c2c15c7246c7077859429e36abc43b171/threedidepth-0.6.3-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ec2599c31151d55a69bf0cf109690e552b99e2a3cd44f7cbfefa60153cc991eb",
                "md5": "530ea96c5a403a1aa5398c94a4430a0c",
                "sha256": "bb2dbf5acb33191c63fe2ec1ff84cc5191158a0dc339529c9817ee43604cc778"
            },
            "downloads": -1,
            "filename": "threedidepth-0.6.3.tar.gz",
            "has_sig": false,
            "md5_digest": "530ea96c5a403a1aa5398c94a4430a0c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.5",
            "size": 20798,
            "upload_time": "2024-03-22T08:21:22",
            "upload_time_iso_8601": "2024-03-22T08:21:22.917918Z",
            "url": "https://files.pythonhosted.org/packages/ec/25/99c31151d55a69bf0cf109690e552b99e2a3cd44f7cbfefa60153cc991eb/threedidepth-0.6.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-22 08:21:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nens",
    "github_project": "threedidepth",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "appdirs",
            "specs": [
                [
                    "==",
                    "1.4.4"
                ]
            ]
        },
        {
            "name": "asn1crypto",
            "specs": [
                [
                    "==",
                    "1.5.1"
                ]
            ]
        },
        {
            "name": "cached-property",
            "specs": [
                [
                    "==",
                    "1.5.2"
                ]
            ]
        },
        {
            "name": "cryptography",
            "specs": [
                [
                    "==",
                    "40.0.2"
                ]
            ]
        },
        {
            "name": "distlib",
            "specs": [
                [
                    "==",
                    "0.3.6"
                ]
            ]
        },
        {
            "name": "filelock",
            "specs": [
                [
                    "==",
                    "3.12.0"
                ]
            ]
        },
        {
            "name": "GDAL",
            "specs": [
                [
                    "==",
                    "3.4.1"
                ]
            ]
        },
        {
            "name": "h5netcdf",
            "specs": [
                [
                    "==",
                    "1.1.0"
                ]
            ]
        },
        {
            "name": "h5py",
            "specs": [
                [
                    "==",
                    "3.8.0"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.4"
                ]
            ]
        },
        {
            "name": "keyring",
            "specs": [
                [
                    "==",
                    "23.13.1"
                ]
            ]
        },
        {
            "name": "keyrings.alt",
            "specs": [
                [
                    "==",
                    "4.2.0"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "1.24.3"
                ]
            ]
        },
        {
            "name": "pycrypto",
            "specs": [
                [
                    "==",
                    "2.6.1"
                ]
            ]
        },
        {
            "name": "pygobject",
            "specs": [
                [
                    "==",
                    "3.44.1"
                ]
            ]
        },
        {
            "name": "pyxdg",
            "specs": [
                [
                    "==",
                    "0.28"
                ]
            ]
        },
        {
            "name": "scipy",
            "specs": [
                [
                    "==",
                    "1.10.1"
                ]
            ]
        },
        {
            "name": "SecretStorage",
            "specs": [
                [
                    "==",
                    "3.3.3"
                ]
            ]
        },
        {
            "name": "six",
            "specs": [
                [
                    "==",
                    "1.16.0"
                ]
            ]
        },
        {
            "name": "threedigrid",
            "specs": [
                [
                    "==",
                    "2.0.5"
                ]
            ]
        },
        {
            "name": "virtualenv",
            "specs": [
                [
                    "==",
                    "20.23.0"
                ]
            ]
        }
    ],
    "lcname": "threedidepth"
}
        
Elapsed time: 0.50078s