Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BuildResidential Weather File Support #347

Open
DavidGoldwasser opened this issue May 23, 2022 · 7 comments
Open

BuildResidential Weather File Support #347

DavidGoldwasser opened this issue May 23, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@DavidGoldwasser
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
This is a feature to better support using BuildResidential for locations not included in the hpxml-measures weather files that ship with the OpenStuido CLI and example projects made from it.
https://github.com/urbanopt/urbanopt-cli/tree/develop/example_files/resources/hpxml-measures/weather

Describe the solution you'd like
URBANopt projects generally expect weather files at the top of the project that are user supplied.
https://github.com/urbanopt/urbanopt-cli/tree/develop/example_files/weather

Describe alternatives you've considered
Currently I have to add custom weather files to the resoources/hpxml-measures/weather directory in addition to at the top of the project for commercial features that don't use BuildResidential. It would be nice if BuildResidential measure can be enhanced with alternate locations for weather files or only look for weather files at the not locations, and do not ship extra locations.

Additional context
Long term it could be nice if the BuildResidential and these restores, are included as a measure gem. When I update repo with project made with UO 0.7.1 to use with UO 0.8.0 I had to update almost 700 files either in the measure or the resources. All other non-custom measures except this are defined by the gem version being used. Here a copy is added to the project and manually updated. I'm happy to make a separate issue out of this.

@DavidGoldwasser
Copy link
Collaborator Author

For reference, the path to top of project weather files is included in file_paths in the osw "/Users/user_name/Documents/github/my_project/mappers/../weather/",

If BuildResidential uses runner.findFile it can get the weather file from any path included. This is how ChangeBuildingLocation gets weather file out of user argument. User argument tis just a file name without any path.
https://github.com/NREL/openstudio-common-measures-gem/blob/develop/lib/measures/ChangeBuildingLocation/measure.rb#L157

@joseph-robertson
Copy link
Collaborator

joseph-robertson commented May 24, 2022

Hmm... For urbanopt-example-geojson-project, the residential workflow does look in example_project/weather for EPW files. For example, the features in example_project_combined.json find USA_NY_Buffalo-Greater.Buffalo.Intl.AP.725280_TMY3.epw in example_project/weather (it does not exist in example_project/resources/hpxml-measures/weather).

I would expect the same for urbanopt-cli; that the residential workflow would look in example_files/weather for EPW files.

Do you see an error when you don't add custom weather files to resources/hpxml-measures/weather?

@DavidGoldwasser

@DavidGoldwasser
Copy link
Collaborator Author

Here is the error I see. This in my project.

VT_MONTPELIER-AP_726145_TY3A.epw' could not be found.\n/Users/dgoldwas/Documents/github/nrel/uo-rrs/resources/hpxml-measures/HPXMLtoOpenStudio/measure.rb:181:in `process_weather'\n/Users/dgoldwas/Documents/github/nrel/uo-rrs/resources/hpxml-measures/HPXMLtoOpenStudio/measure.rb:148:in `run'\n/Users/dgoldwas/Documents/github/nrel/uo-rrs/resources/meta_measure.rb:225:in `run_measure'\n/Users/dgoldwas/Documents/github/nrel/uo-rrs/resources/meta_measure.rb:105:in

It looks like it tries three alternate locations before it fails
https://github.com/urbanopt/urbanopt-example-geojson-project/blob/develop/example_project/resources/hpxml-measures/HPXMLtoOpenStudio/measure.rb#L166-L179

I thought I had mine structured like example project but something must be different?

@kflemin
Copy link
Contributor

kflemin commented May 25, 2022

@DavidGoldwasser, is there a typo in that weather file name? the ending looks suspicious. Shouldn't it be: USA_VT_Montpelier.AP.726145_TMY3.epw

@DavidGoldwasser
Copy link
Collaborator Author

@kflemin that is the correct name, it was project specific and doesn't match name of files we typically have. I"ll play around a bit. I'm running with the UrbanOpt CLI, wondering if that might be different than using rake task, and if it matters what directory I'm in in terminal.

@joseph-robertson
Copy link
Collaborator

I think I may know what this could be. Like you said, something perhaps related to relative paths and what directory you're running from or where the run directory for each feature ends up. I'll see if I can set absolute weather file paths in the hpxml so we can avoid any possible relative path problems.

Currently, the weather file (relative) path stored in the hpxml file is always of the form ../../../weather/xxx.epw. Meaning, it expects the folder structure to always be, e.g., example_project/run/baseline_scenario/14/in.xml. Therefore, three folders up from the parent directory of the hpxml (i.e., 14) is example_project. I believe urbanopt-cli has the same structure.

@DavidGoldwasser
Copy link
Collaborator Author

Another approach here is to lean no runner.findFile and then the template osw file can have the weather directory in file_paths

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants