> For the complete documentation index, see [llms.txt](https://docs.ladybug.tools/dragonfly-primer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ladybug.tools/dragonfly-primer/components/6_alternativeweather/run_urban_weather_generator.md).

# Run Urban Weather Generator

![](/files/-Ma9gLxRot9pOFmXuNwl)

![](/files/-Ma9gLxTgn_sHPW1E-gy) - [\[source code\]](https://github.com/ladybug-tools/dragonfly-grasshopper/blob/master/dragonfly_grasshopper/src//DF%20Run%20Urban%20Weather%20Generator.py)

Morph a rural or airport EPW to reflect the conditions within an urban street canyon. The properties of this urban street canyon are specified in the connected \_model.

For definitions of the inputs of the Urban Weather Generator, please see the UWG schema documentation (<https://www.ladybug.tools/uwg-schema/index.html>).

For a full list of publications on the Urban Weather Generator, see the MIT Urban Microclimate Group (<http://urbanmicroclimate.scripts.mit.edu/publications.php>).

## Inputs

* **model \[Required]**

  A Dragonfly Model to be used to morph the EPW for the urban area.&#x20;
* **epw\_file \[Required]**

  Full path to an .epw file. This is the rural or airport file that will be morphed to reflect the climate conditions within an urban canyon.&#x20;
* **sim\_par**

  A dragonfly UWG SimulationParameter object that describes all of the setting for the simulation. If None, some default simulation parameters will be used.&#x20;
* **folder**

  File path for the directory into which the the uwg JSON and morphed urban EPW will be written. If None, it will be written into the ladybug default\_epw\_folder within a subfolder bearing the name of the dragonfly Model.&#x20;
* **write \[Required]**

  Set to "True" to generate a UWG JSON from the connected \_model and parameters. This JSON can be edited and simulated by the UWG directly.&#x20;
* **run**

  Set to "True" to simulate the uwg\_json with the Urban Weather Generator (UWG) and morph the input EPW to account for urban heat island. This can also be the integer "2", which will run the UWG silently (without any batch windows).&#x20;

## Outputs

* **report**

  Reports, errors, warnings, etc.&#x20;
* **uwg\_json**

  Path to a fully-simulatable JSON file following the UWG schema. This contains all of the relevant Dragonfly Model properties and input parameters.&#x20;
* **urban\_epw**

  Path to the morphed EPW file output from the UWG, which represents urban heat island conditions within the street canyon.&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ladybug.tools/dragonfly-primer/components/6_alternativeweather/run_urban_weather_generator.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
