Skip to main content

Python APIs for hipims

This package provides python APIs for running the open source hydraulic model hipims-cuda. It also includes the hipims-io package for pre-processing and result visualisation. The full documentation is at https://pypims.readthedocs.io/en/latest/.

Installation

Before installing pypims, you need to install Cmake, NVIDIA CUDA Toolkit and the C++ compiler. Cmake can be simply installed by

pip install cmake

The CUDA Toolkit can be downloaded from the NVIDIA website. If you use Linux system, the C++ compiler 'GCC' is usually on the system as default. If you use windows, you should download and install Visual Studio. If there exists several different versions of CUDA Toolkits on your system, cmake may struggle to decide which one to use and return an error. In such a case, you need to define the CUDAToolkit_ROOT environmental varialble. On Linux, this can be done by

export CUDAToolkit_ROOT=<path to your cuda directory>

For example

export CUDAToolkit_ROOT=/usr/local/cuda-10.1

Once the aforementioned dependencies have been properly installed. Installing pypims is straightforward, simple type in the following in your terminal

pip install pypims

Running a demo

The flood simulation engine can be imported by

from pypims import flood

The inputs can be prepared by hipims-io. This package has already been included as part of pypims, you can import it by

from pypims import IO

A quick demonstration to prepare input files with attached sample data contaning the following files:

  • DEM.gz/.asc/.tif (essential file, in projected crs, map unit:m)
  • rain_mask.gz/.asc/.tif (optional file for setting rainfall, having the same crs with DEM)
  • rain_source.csv (optional file for setting rainfall rate in timeseries, unit:m/s]
  • landcover.gz/.asc/.tif (optional file for setting landcover-based parameters, having the same crs with DEM)
import os
from pypims.IO.demo_functions import demo_input
obj_in = demo_input() # create input object
obj_in.write_input_files() # create all input files

Once the inputs have all been prepared, the simulations can be started by

flood.run(obj_in.get_case_folder())

Metadata

Release files for pypims 0.0.3.1

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

Source distribution (sdist)

Source distribution for pypims 0.0.3.1
File Size Uploaded Provenance Actions
pypims-0.0.3.1.tar.gz 483.2 kB Without provenance Details for pypims-0.0.3.1.tar.gz

Release files / pypims-0.0.3.1.tar.gz

Download URL pypims-0.0.3.1.tar.gz
Size 483.2 kB
Tags Source
SHA-256 checksum
How to use checksums
85c1189dc20cd3b1dfa8cfe2c836cb13b7c19914c6f4a94f42b0dce2c1c2812a
BLAKE2b-256 checksum
How to use checksums
d68a41a89d35ee9c0ff20b8515f33fcbbc76975974247d2efa5c8318cc4b1707
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.13

Security for pypims 0.0.3.1

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.

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