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.
Here is a Python example that shows how to create and run an Urban Weather Generator object. The example script is available at resources/uwg_example.py. Run it through your command prompt in the main uwg directory with the following: python -m resources.uwg_example
from uwg import uwg
# Define the .epw, .uwg filenames to create an uwg object.
# uwg will look for the .epw file in the uwg/resources/epw folder,
# and the .uwg file in the uwg/resources/parameters folder.
epw_filename = "SGP_Singapore.486980_IWEC.epw" # .epw file name
param_filename = "initialize_singapore.uwg" # .uwg file name
# Initialize the UWG object and run the simulation
uwg_ = uwg(epw_filename, param_filename)
uwg_.run()
pip install uwg
import uwg
- Clone this repo locally
git clone git@github.com:ladybug-tools/uwg
# or
git clone https://github.com/ladybug-tools/uwg
- Install dependencies:
cd uwg
pip install -r dev-requirements.txt
pip install -r requirements.txt
- Run Tests:
python -m pytest tests/
- Generate Documentation:
sphinx-apidoc -f -e -d 4 -o ./docs ./uwg
sphinx-build -b html ./docs ./docs/_build/docs