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

Using more than one weather file in PAT

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

Phylroy Lopez's avatar

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
3

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

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

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
else
  runner.registerError("Did not find #{weather_file_name} in paths described in OSW file.")
  return false
end

# 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

Comments

Pretty neat implementation.. I may write something similar for postal codes in Canada.

Phylroy Lopez's avatar Phylroy Lopez  ( 2018-05-24 09:46:44 -0600 )edit

seems like when the measure is running, it is trying to file the weather file name whatever we put in the PAT and match it in certain directory. So what is a typical weather file , does it mean any chunk of the weather file address can represent weather file name? Does it need a weather file folder saved in a certain location? what is the folder location that this measure is trying to search for ?

Brianna's avatar Brianna  ( 2023-06-14 20:34:23 -0600 )edit

Your Answer

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

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

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

Seen: 298 times

Last updated: May 18 '18