Skip to main content

Build Status Coverage Status

Python 3.6 Python 2.7 IronPython

uwg

The Urban Weather Generator (uwg) is a Python application for modeling the urban heat island effect. Specifically, it morphs rural EnergyPlus weather (.epw) files to reflect average conditions within the urban canyon using a range of properties including:

  • Building geometry (including building height, ground coverage, window:wall area, and facade:site area)
  • Building use (including program type, HVAC systems, and occupancy/equipment scheduling)
  • Cooling system heat rejection to the outdoors (for Summer)
  • Indoor heat leakage to the outdoors (for Winter)
  • Urban materials (including the thermal mass, albedo and emissivity of roads, walls, and roofs)
  • Anthropogenic heat from traffic (including traffic schedules)
  • Vegetation coverage (both trees and shrubs)
  • Atmospheric heat transfer from urban boundary and canopy layers

The original Urban Weather Generator was developed by Bruno Bueno for his PhD thesis at MIT. Since this time, it has been validated 3 times and has been enhanced by Aiko Nakano. In 2016, Joseph Yang also improved the engine and added a range of building templates.

This repository is a Python translation of the original MATLAB Urban Weather Generator.

Example

Here is a Python example that shows how to create and run an Urban Weather Generator object.

from uwg import UWG

# Define the .epw, .uwg paths to create an uwg object.
epw_path = "resources/SGP_Singapore.486980_IWEC.epw" # available in resources directory.


# Initialize the UWG model by passing parameters as arguments, or relying on defaults
model = UWG.from_param_args(epw_path=epw_path, bldheight=10, blddensity=0.5,
                            vertohor=0.8, grasscover=0.1, treecover=0.1, zone='1A')

# Uncomment these lines to initialize the UWG model using a .uwg parameter file
# param_path = "initialize_singapore.uwg"  # available in resources directory.
# model = UWG.from_param_file(param_path, epw_path=epw_path)

model.generate()
model.simulate()

# Write the simulation result to a file.
model.write_epw()

Installation

pip install uwg

QuickStart

import uwg

API Documentation

Local Development

  1. Clone this repo locally
git clone git@github.com:ladybug-tools/uwg

# or

git clone https://github.com/ladybug-tools/uwg
  1. Install dependencies:
cd uwg
pip install -r dev-requirements.txt
pip install -r requirements.txt
  1. Run Tests:
python -m pytest tests/
  1. Generate Documentation:
sphinx-apidoc -f -e -d 4 -o ./docs ./uwg
sphinx-build -b html ./docs ./docs/_build/docs

Metadata

Release files for uwg 5.8.13

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

Source distribution (sdist)

Source distribution for uwg 5.8.13
File Size Uploaded
uwg-5.8.13.tar.gz 12.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for uwg 5.8.13
File Interpreter ABI Platform
uwg-5.8.13-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 12.5 MB

Release files / uwg-5.8.13.tar.gz

Download URL uwg-5.8.13.tar.gz
Size 12.3 MB
Tags Source
SHA-256 checksum
How to use checksums
521a6a9bfe9b07359f36450ff059d28f463c21175c9443dd966b8e79dbc36bec
BLAKE2b-256 checksum
How to use checksums
e9b6243c2aa8c44e81a48fdedfcffc4f61b71f7500714e6d8ab131f85091e82a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.8.0 pkginfo/1.9.6 requests/2.31.0 requests-toolbelt/1.0.0 tqdm/4.66.1 CPython/3.7.17

Release files / uwg-5.8.13-py2.py3-none-any.whl

Download URL uwg-5.8.13-py2.py3-none-any.whl
Size 267.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
7921cb2dc4f0125f690ff8cfc270feca68110bdd441e607c5db899dc6e8f54b3
BLAKE2b-256 checksum
How to use checksums
4b9d875d5d8aed687f4b8070dd61c1c32cbcf80ba19b859a89388467dfa21d12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.8.0 pkginfo/1.9.6 requests/2.31.0 requests-toolbelt/1.0.0 tqdm/4.66.1 CPython/3.7.17

Release history Release notifications | RSS feed

This release

5.8.13 This release

2 release files

5.8.12

2 release files

5.8.10

2 release files

5.8.9

2 release files

5.8.8

2 release files

5.8.7

2 release files

5.8.6

2 release files

5.8.5

2 release files

5.8.4

2 release files

5.8.3

2 release files

5.8.2

2 release files

5.8.0

2 release files

5.7.0

2 release files

5.6.0

2 release files

5.5.0

2 release files

5.4.0

2 release files

5.3.4

2 release files

5.3.3

2 release files

5.3.2

2 release files

5.3.1

2 release files

5.3.0

2 release files

5.2.1

2 release files

5.2.0

2 release files

5.1.0

2 release files

5.0.1

2 release files

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