Skip to main content

pyQES

PyPI version Python versions License: GPL v3 Platforms

Version: 2.3.2 · Python: ≥ 3.10 · License: GPL-3.0-only

Python bindings for the Quick Environmental Simulation (QES) C++ suite — QES-Winds, QES-Plume, and QES-Fire.

The C++ core lives in the qes-core git submodule (fork of UtahEFD/QES-Public, branch develop_pyqes). This repository ships the pybind11 wrappers, the pyQES package, examples, and GitHub Actions for wheels / PyPI.

GPU: NVIDIA GPU with Compute Capability 7.0+ (CUDA wheel on Linux). CPU builds work without CUDA.


Table of contents


Features

  • Run QES-Winds from Python (config / XML / JSON), with optional DEM / buildings preprocessing
  • Export wind magnitude to georeferenced GeoTIFF (pywinds.to_tif)
  • Run QES-Plume on winds + turbulence NetCDF fields
  • Run coupled QES-Fire (optional smoke plume)
  • Pydantic v2 config models, XML/JSON I/O, geospatial helpers
  • Prebuilt CPU wheels for Linux, macOS (arm64), and Windows; optional Linux CUDA wheel

Compatibility

Package version 2.3.2
Python 3.10 · 3.11 · 3.12 · 3.13
OS (CPU wheels) Linux x86_64 (manylinux_2_28) · macOS arm64 (deployment target 14.0+) · Windows AMD64
GPU wheel Linux CUDA (cp312), NVIDIA CC ≥ 7.0
Build system scikit-build-core ≥ 1.0 · CMake ≥ 3.18 · C++17 · pybind11 ≥ 2.12

Runtime dependencies

Extra Packages Role
(core) pydantic≥2, numpy Config models & arrays
geo rasterio, pyproj, geopandas DEM / buildings preprocessing, GeoTIFF export
io netCDF4 NetCDF helpers

Native libraries (from-source builds)

Boost (program-options, date-time, property-tree, optional), NetCDF-C++, GDAL — install via system packages or the included vcpkg manifest (vcpkg.json).


Installation

From PyPI

pip install pyqes

# optional extras
pip install "pyqes[geo]"      # geospatial preprocessing / GeoTIFF
pip install "pyqes[io]"       # NetCDF helpers
pip install "pyqes[geo,io]"   # both
# with uv
uv add pyqes
uv add "pyqes[geo,io]"

Verify:

import pyQES
print(pyQES.__version__)  # e.g. 2.3.2

From source

git clone --recursive https://github.com/rupeelab17/pyQES.git
cd pyQES

Native deps (Boost, NetCDF-C++, GDAL) — pick one:

# macOS (Homebrew)
brew install boost netcdf-cxx gdal

# Linux (Ubuntu / Debian)
sudo apt install libboost-all-dev libnetcdf-dev libnetcdf-c++4-dev \
  libnetcdf-cxx-legacy-dev libgdal-dev netcdf-bin cmake

# Debian Trixie (e.g. python:3.13-slim-trixie): libnetcdf-cxx-legacy-dev
# is not packaged — use only libnetcdf-dev and libnetcdf-c++4-dev:
# sudo apt install libboost-all-dev libnetcdf-dev libnetcdf-c++4-dev \
#   libgdal-dev netcdf-bin cmake

# Windows (vcpkg — recommended; needs Visual Studio / MSVC)
git clone https://github.com/microsoft/vcpkg.git
.\vcpkg\bootstrap-vcpkg.bat
$env:VCPKG_ROOT = (Resolve-Path .\vcpkg).Path
# CMAKE_ARGS is picked up by scikit-build-core / uv sync
$env:CMAKE_ARGS = "-DCMAKE_TOOLCHAIN_FILE=$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"

Alternatively on any OS, use the repo vcpkg.json manifest (same toolchain as the CI wheels).

# Editable install + extras ([uv](https://docs.astral.sh/uv/))
uv sync --extra geo --extra io

Always clone or pull with submodules:

git pull --recurse-submodules
# or
git submodule update --init --recursive

Build from source

Requirements beyond Python:

  • C++17 compiler
  • CMake ≥ 3.18
  • Git with submodule support
  • Native libs: Boost, NetCDF-C++, GDAL (or vcpkg via the repo manifest)
# after clone --recursive
uv sync --extra geo --extra io
# or
pip install -e ".[geo,io]"

Wheels are built with cibuildwheel (see Continuous integration).


Quick start

From a QES XML file

from pyQES import pywinds

result = pywinds.run(
    xml="examples/umep_workflow/qes/umep_larochelle.xml",
    dem="examples/umep_workflow/DEM_clip.tif",
    buildings_src="examples/umep_workflow/buildings.shp",
    buildings_mask="examples/umep_workflow/mask.shp",
    solver="cpu",
    work_dir="/tmp/qes_out",
)
print(result.winds_out)

Sensor paths referenced in the XML (e.g. sensor_umep.xml) are resolved relative to the XML directory. Set auto_preprocess=False to use the file as-is without DEM / buildings preprocessing.

From a Python config

from pyQES import pywinds
from pyQES.util.config import WindsParameters, SensorParameters, TimeSeries

params = WindsParameters()
params.simulation_parameters.dem = "path/to/DEM.tif"
params.simulation_parameters.cell_size = (2.0, 2.0, 0.5)
params.simulation_parameters.halo_x = 40.0
params.simulation_parameters.halo_y = 40.0
params.simulation_parameters.domain_rotation = 0.0  # must be 0
params.buildings_params.shp_file = "path/to/buildings.shp"

sensor = SensorParameters(
    time_series=[TimeSeries(speed=3.0, direction=270.0, height=10.0, site_z0=0.24)]
)
result = pywinds.run(config=params, sensor=sensor, solver="cpu", work_dir="/tmp/qes_out")
print(result.winds_out)

# optional GeoTIFF of |V| at 1.5 m AGL (needs pyqes[geo,io])
tif = pywinds.to_tif(z=1.5)
print(tif)

pywinds.run accepts exactly one of config, xml, or json (or none, with keyword overrides). Solvers: "cpu" / "gpu" (or the QES integer code).


Package layout

Module Role
pyQES.pywinds QES-Winds — run(...), to_tif(...)
pyQES.pyplume QES-Plume — run(xml=..., winds_file=..., turb_file=...)
pyQES.pyfire Coupled QES-Fire — run(...) (+ optional plume_xml)
pyQES.util Pydantic config, XML/JSON I/O, paths, geo helpers, NetCDF→GeoTIFF
pyQES._winds / _plume / _fire / _util Compiled pybind11 extensions

Config models live in pyQES.util.config: WindsParameters, SimulationParameters, SensorParameters, TimeSeries, etc.


Examples

Sample La Rochelle / UMEP inputs: examples/umep_workflow/ (DEM, buildings, mask, QES XML).

uv run python examples/run_winds_demo.py
uv run python examples/run_winds_demo.py --speed 5 --direction 180
uv run python examples/umep_workflow/run_qeswinds.py
uv run python examples/umep_workflow/run_qeswinds_args.py --speed 5 --direction 180

Fetch DEM / buildings / mask from a WGS84 bbox via pymdurs (IGN, France + network), then run QES-Winds:

uv sync --extra geo --extra io
uv pip install pymdurs
uv run python examples/pymdurs_workflow/run_from_bbox.py
uv run python examples/pymdurs_workflow/run_from_bbox.py \
  --bbox=-1.152704,46.181627,-1.139893,46.18699 --to-tif

Development

uv sync --extra geo --extra io

# lint / typecheck
uv run ruff check pyQES tests examples
uv run mypy

# fast unit tests (no full solver run)
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run pytest tests -m "not slow"

# end-to-end winds run (compiled extension + example data)
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run pytest tests -m slow

Dev tools (via [dependency-groups] dev): pytest, pytest-cov, ruff, mypy, plus the geo / io extras.


Continuous integration

Workflow Role
ci.yml Ruff, mypy, pure-Python pytest
wheels.yml CPU wheels — Linux / macOS / Windows · cp310–cp313 · sdist
cuda-build.yml Linux CUDA wheel (cp312)
publish.yml Publish to PyPI on v* tags

Updating the QES core

git submodule update --remote qes-core
git add qes-core
git commit -m "Bump qes-core"

Links

Homepage / source https://github.com/rupeelab17/pyQES
PyPI https://pypi.org/project/pyqes/
QES documentation https://qes-documentation.readthedocs.io/en/latest
QES core (submodule) https://github.com/rupeelab17/QES-Public
Upstream QES https://github.com/UtahEFD/QES-Public

License

GPL-3.0-only — see LICENSE.

QES core: see qes-core/LICENSE.

Download files

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

Source Distribution

pyqes-2.3.2.tar.gz (454.2 kB view details)

Uploaded Source

Built Distributions

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

pyqes-2.3.2-cp313-cp313-win_amd64.whl (20.7 MB view details)

Uploaded CPython 3.13Windows x86-64

pyqes-2.3.2-cp313-cp313-manylinux_2_28_x86_64.whl (77.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

pyqes-2.3.2-cp313-cp313-macosx_14_0_arm64.whl (60.5 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

pyqes-2.3.2-cp312-cp312-win_amd64.whl (20.7 MB view details)

Uploaded CPython 3.12Windows x86-64

pyqes-2.3.2-cp312-cp312-manylinux_2_28_x86_64.whl (77.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

pyqes-2.3.2-cp312-cp312-macosx_14_0_arm64.whl (60.5 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

pyqes-2.3.2-cp311-cp311-win_amd64.whl (20.7 MB view details)

Uploaded CPython 3.11Windows x86-64

pyqes-2.3.2-cp311-cp311-manylinux_2_28_x86_64.whl (77.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

pyqes-2.3.2-cp311-cp311-macosx_14_0_arm64.whl (60.5 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

pyqes-2.3.2-cp310-cp310-win_amd64.whl (20.7 MB view details)

Uploaded CPython 3.10Windows x86-64

pyqes-2.3.2-cp310-cp310-manylinux_2_28_x86_64.whl (77.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

pyqes-2.3.2-cp310-cp310-macosx_14_0_arm64.whl (60.5 MB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

File details

Details for the file pyqes-2.3.2.tar.gz.

File metadata

  • Download URL: pyqes-2.3.2.tar.gz
  • Upload date:
  • Size: 454.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pyqes-2.3.2.tar.gz
Algorithm Hash digest
SHA256 3e7ed73bd5777f94e8757c2c8ddfee861075b0a127fbfb57b905d8793cbca165
MD5 246f84002772e20fec69a7145284c16d
BLAKE2b-256 8f682ac2d9b6c6cc64bb3fdf70c1a9f31309bd5724a062208576d2bc57338e54

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyqes-2.3.2.tar.gz:

Publisher: publish.yml on rupeelab17/pyQES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyqes-2.3.2-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pyqes-2.3.2-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 20.7 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pyqes-2.3.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f4bb888a808386fd62b261bd34be75219a626a892ee4f47f525a912b8a145fa1
MD5 02c603710be80b092a96798743c36576
BLAKE2b-256 7a796900238bc763847143113a02103e6419d299974c697a5aef8c2bcd676af0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyqes-2.3.2-cp313-cp313-win_amd64.whl:

Publisher: publish.yml on rupeelab17/pyQES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyqes-2.3.2-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyqes-2.3.2-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f0f9c08cdf5b2d1c79483f9039cabc66c688af3210927d0a7064c0d893536bd9
MD5 96e74ceb87bd820caae83de1501895cf
BLAKE2b-256 f8d1df233ae58b1eaf3e115ee32b50bf6178e2c73643b6db408bdb22dad5d528

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyqes-2.3.2-cp313-cp313-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on rupeelab17/pyQES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyqes-2.3.2-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pyqes-2.3.2-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 bb22f6c87a19d0bc75de8c761663317f47341c6afca261933496ce3fe983ce54
MD5 19b5185ecb7d3eb6c79fc91a855ed860
BLAKE2b-256 f62dbe75d4aaef80c1c08e5f2919b7ca6af0d8f0e2621dd8255cd648645257b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyqes-2.3.2-cp313-cp313-macosx_14_0_arm64.whl:

Publisher: publish.yml on rupeelab17/pyQES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyqes-2.3.2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pyqes-2.3.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 20.7 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pyqes-2.3.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b9e015e5590e95072ed8f406592041c30656a0f6f19d76a8a834c9f757cb3c1c
MD5 04d0ecf86bf50f64b5b3f1aad537a2e7
BLAKE2b-256 6908acee9508876994c50958d8bcc55fa402bd4a06b27f91b00815b73e93b545

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyqes-2.3.2-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on rupeelab17/pyQES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyqes-2.3.2-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyqes-2.3.2-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f46275289954650ff86eed33f8df0d38c1652cc9337ccd7f3a0ea4d0b4885baf
MD5 c9258b3c8263396dfa923a8160ab61f4
BLAKE2b-256 5ba65689f07bd1f35a2deae0f7ba8ab6f6be6bf70af04d4cdb9d31128995e6d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyqes-2.3.2-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on rupeelab17/pyQES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyqes-2.3.2-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pyqes-2.3.2-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 65e5ca0f84462b2ba07464688ddffaaf22f12eb270ff9ab7ad5f205a072914e3
MD5 616f03b233584b22eb134a24b9fb08ca
BLAKE2b-256 dc9f1c647b8602006031218b1318e984ae6c3744c885ba8da3d424955456d8c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyqes-2.3.2-cp312-cp312-macosx_14_0_arm64.whl:

Publisher: publish.yml on rupeelab17/pyQES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyqes-2.3.2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pyqes-2.3.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 20.7 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pyqes-2.3.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f0175d33b50f0ce5051d53c81f9797fb0c4eb27e637d4b8813df309c98be7f62
MD5 5c301ba8c7803f4ded30c2dbb9d94e7a
BLAKE2b-256 ca56833013861d2f0ae6954a158c8e72866590afdb35c40bf896631864732cc8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyqes-2.3.2-cp311-cp311-win_amd64.whl:

Publisher: publish.yml on rupeelab17/pyQES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyqes-2.3.2-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyqes-2.3.2-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5801afd64809ca201f8dcba42d5b06fad2c2e8614480684599993328b64517f7
MD5 0c6d214bf6cc77a2cbf91f99e514cdb5
BLAKE2b-256 492eea7a28cf823358cec3cb849118cb6224fe84caea64a3f728d1194327df71

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyqes-2.3.2-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on rupeelab17/pyQES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyqes-2.3.2-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pyqes-2.3.2-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 d26205bcf00d17aeb9886a3974c2f899df120cdba4ab4f247f4ad70b1b3944d2
MD5 c0098e8b3ff6fe09352a5611fc49351e
BLAKE2b-256 e6789296dbab10f741fd405059b1eef1eb99a920ece4ec8f6aacaba4743eaadb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyqes-2.3.2-cp311-cp311-macosx_14_0_arm64.whl:

Publisher: publish.yml on rupeelab17/pyQES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyqes-2.3.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pyqes-2.3.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 20.7 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pyqes-2.3.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f27f5ed4afc005239c840e8cf89d0178d06b2908fd88e7d2856d4b2e80c9a17d
MD5 962149a9df085c656ff767528ea1feb7
BLAKE2b-256 67169794503074df77fa3b130a71d8d993ba52592f386fb5f83548de7440ebf2

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyqes-2.3.2-cp310-cp310-win_amd64.whl:

Publisher: publish.yml on rupeelab17/pyQES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyqes-2.3.2-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyqes-2.3.2-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 331d91fdf62a3ea1d8c94c88586a37cf9fbdfa467e91f82e347c416ff4062c80
MD5 622aa964e4cea0900860ecd8e19c148b
BLAKE2b-256 febd29d06a073ff6b717ad575602994165ce9b8af06809c90f0b8b4e1db2e2f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyqes-2.3.2-cp310-cp310-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on rupeelab17/pyQES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyqes-2.3.2-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pyqes-2.3.2-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 28cc6225ed19dd9d8f54cf0bb4123d815e599ee80b9f63b36186dee1148cf684
MD5 1fe746c3327bf501ca07d6e3170d058d
BLAKE2b-256 e01aadcf5a160797d09865eca723ede36cad88b6d1d427c51076b2f333044ff3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyqes-2.3.2-cp310-cp310-macosx_14_0_arm64.whl:

Publisher: publish.yml on rupeelab17/pyQES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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