Skip to main content

Python application for modeling the urban heat island effect.

Project description

Build Status Coverage Status

Python 2.7 Python 3.6

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

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

uwg-5.8.8.tar.gz (12.2 MB view details)

Uploaded Source

Built Distribution

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

uwg-5.8.8-py2.py3-none-any.whl (267.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file uwg-5.8.8.tar.gz.

File metadata

  • Download URL: uwg-5.8.8.tar.gz
  • Upload date:
  • Size: 12.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12

File hashes

Hashes for uwg-5.8.8.tar.gz
Algorithm Hash digest
SHA256 b66896bed1a2794df314e8d2ccc160f1ed85d84d7be925b3975379e92d58a9a3
MD5 a9ca57bca8f56f5b2574a5bc7d8f5277
BLAKE2b-256 802e44fae0142ab9428b3fe3d34687dd30c0968f8f94f2436280bbb6afa11411

See more details on using hashes here.

File details

Details for the file uwg-5.8.8-py2.py3-none-any.whl.

File metadata

  • Download URL: uwg-5.8.8-py2.py3-none-any.whl
  • Upload date:
  • Size: 267.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12

File hashes

Hashes for uwg-5.8.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1493c06e4d3b1a21957646ab9133848dd37bb057f7e7bcee2146741ec45ae52a
MD5 abca7be3416d0eef4f05fbd771625378
BLAKE2b-256 7000e7a3c54748ef52c5cf2fd6451745119539e1323d9db372aaa2f3532bc796

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