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

Revision history [back]

Place your weather file next to your osm, and run this OSW:

{
  "seed_file": "Model (IECC 2015 & ASHRAE 90-1-2013 - RTU-FPB).osm",
  "weather_file": "USA_TX_Corpus.Christi.NAS.722515_TMY3.epw",
  "steps": [
  ]
}

Place You can try placing your weather file next to your osm, .osm, and run this OSW:

{
  "seed_file": "Model (IECC 2015 & ASHRAE 90-1-2013 - RTU-FPB).osm",
  "weather_file": "USA_TX_Corpus.Christi.NAS.722515_TMY3.epw",
  "steps": [
  ]
}

This will overwrite the weather file actually used by the model, so beware.

You can try placing your weather file next to your .osm, and run this OSW:

{
  "seed_file": "Model (IECC 2015 & ASHRAE 90-1-2013 - RTU-FPB).osm",
  "weather_file": "USA_TX_Corpus.Christi.NAS.722515_TMY3.epw",
  "steps": [
  ]
}

This will overwrite the weather file actually used by the model, so beware.

You can try placing your weather file next to your .osm, and run this OSW:

{
  "seed_file": "Model (IECC 2015 & ASHRAE 90-1-2013 - RTU-FPB).osm",
  "weather_file": "USA_TX_Corpus.Christi.NAS.722515_TMY3.epw",
  "steps": [
 [  ]
}

This will overwrite the weather file actually used by the model, so beware.

You can try placing your weather file next to your .osm, and run this OSW:

{
  "seed_file": "Model (IECC 2015 & ASHRAE 90-1-2013 - RTU-FPB).osm",
  "weather_file": "USA_TX_Corpus.Christi.NAS.722515_TMY3.epw",
  "steps": [  ]
}

This will overwrite the weather file actually used by the model, so beware.


Test 1: provide a file that is in the same folder:

I created an empty.osm model, didn't not set a weather file. (I opened a terminal, loaded ruby bindings, and just did model = OpenStudio::Model::Model.new then model.save('empty.osm'). I put a weather file next to it in the same folder, USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw. Created a test.osw:

{
  "seed_file": "empty.osm",
  "weather_file": "USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw",
}

Here's the content of my folder:

$ ls
USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw
empty.osm
test.osw

Then $ openstudio run -w test.osw

Worked perfectly.

As you can see, stepsisn't required (it works with it though).


Test 2: provide a file_paths argument

Only changed the OSW:

{
  "file_paths": ["/Applications/EnergyPlus-8-7-0/WeatherData/"],
  "seed_file": "empty.osm",
  "weather_file": "USA_VA_Sterling-Washington.Dulles.Intl.AP.724030_TMY3.epw",
}

The Sterling weather file is NOT in the current directory, but it is in the directory I pointed for "file_paths".

Worked perfectly too.

Note that you can also have relative paths (compared to root, if root isn't set, that's the directory containing the osw. See the JSON Schema


Test 3: set the weather file in the OSM itself.

I opened empty.osm and set the weather file to another EPW (Tampa).

[4] TestOSW(main)> puts model.weatherFile.get
OS:WeatherFile,
  {9b78b8e8-0d6e-4674-b157-cd24f9a09e21}, !- Handle
  Tampa International Ap,                 !- City
  FL,                                     !- State Province Region
  USA,                                    !- Country
  TMY3,                                   !- Data Source
  722110,                                 !- WMO Number
  27.97,                                  !- Latitude {deg}
  -82.53,                                 !- Longitude {deg}
  -5,                                     !- Time Zone {hr}
  6,                                      !- Elevation {m}
  file:USA_FL_Tampa.Intl.AP.722110_TMY3.epw, !- Url
  847DE5F2;                               !- Checksum

The weather file, as expected, got copied to ./empty/files/USA_FL_Tampa.Intl.AP.722110_TMY3.epw.

Changed OSW to:

{
  "seed_file": "empty.osm",
  "steps": []
}

=> Did not work.:

$ openstudio run -w test.osw
[09:44:54.432491 ERROR] Found error in state 'initialization' with message ["Weather file 'USA_FL_Tampa.Intl.AP.722110_TMY3.epw' specified but cannot be found::/ruby/2.2.0/gems/openstudio-workflow-1.3.1/lib/openstudio/workflow/jobs/run_initialization.rb:158:in `perform'\n:/ruby/2.2.0/gems/openstudio-workflow-1.3.1/lib/openstudio/workflow/run.rb:261:in `step'\n:/ruby/2.2.0/gems/openstudio-workflow-1.3.1/lib/openstudio/workflow/run.rb:210:in `run'\n:/openstudio_cli.rb:804:in `execute'\n:/openstudio_cli.rb:620:in `execute'\n:/openstudio_cli.rb:1517:in `<main>'\neval:85:in `eval'\neval:85:in `require_embedded_absolute'\neval:70:in `block in require'\neval:64:in `each'\neval:64:in `require'\neval:2:in `<main>'"]}

I think it should work, so I'd consider that a bug.