Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Using more than one weather file in PAT

asked 2018-05-17 10:45:25 -0500

Phylroy Lopez gravatar image

In the old OpenStudio Spreadsheet, you were able to load more than one weather file, or other resources into the analysis. Is there a similar was to do this in PAT? If we relate this to a measure.. what would the relative path be to access these resources from a measure?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-05-17 15:53:27 -0500

updated 2018-05-18 00:21:44 -0500

The basic approach in PAT, is to add multiple EPW files to the folder below "Default Weather File" on the measure options tab as described here.

On the design alternatives tab, for each design alternative you can choose a unique seed model and weather file as described here.

I often do as you suggest and add a measure to the workflow to change the weather file, as this allows me to not only change the epw, but also the design days, climate zone, and water main temperatures. Change Building Location measure on BCL expects the user to provide the weather file name without a path. You can manually set climate zone or that can be inferred from the stat file. The recently updated version uses a 2x only method runner.workflow.findFile(weather_file_name) that looks in a number of locations described in the OSW file. You should manualy copy the epw, ddy, and stat file of the same name to the "weather" directory for the PAT project. The new method in context is shown below.

# get variables
weather_file_name = runner.getStringArgumentValue('weather_file_name', user_arguments)
climate_zone = runner.getStringArgumentValue('climate_zone', user_arguments)

# find weather file
osw_file = runner.workflow.findFile(weather_file_name)
if osw_file.is_initialized
  weather_file = osw_file.get.to_s
  runner.registerError("Did not find #{weather_file_name} in paths described in OSW file.")
  return false

# Parse the EPW
epw_file = OpenStudio::Weather::Epw.load(weather_file)

The Get Site from Building Component Library measure takes a zipcode for the user argument. It then downloads the closest site component from BCL and adds it two your project.

If you go to algorithmic mode you can add "Additional Analysis Files" as described here. This will copy files external to you project into the analysis when it is sent to the server to run. It is a nice way to have shared resources across PAT projects. As a note, while you have to go to algorithmic mode to set this up; once you switch back to manual analysis mode measures will still have access to those files.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer


Question Tools

1 follower


Asked: 2018-05-17 10:45:25 -0500

Seen: 42 times

Last updated: 2 days ago