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

OpenStudio/Elements error on EPW with missing line break after last line

asked 2022-12-02 10:28:03 -0600

bbrannon4's avatar

updated 2022-12-02 17:27:05 -0600

I've just found out that if an EPW file does not have a line break after the 8760th hour, OpenStudio and Elements have an issue (you can see in Elements that it's just missing the last row, and OpenStudio says there is an issue reading the middle of the weather file). EnergyPlus and IES-VE do not seem to have this problem. I'm just curious if there is something in the definition of an EPW file that requires this last line break, or it's potentially something that could be fixed in OS? (it's abviosuly not a big deal for a single file, but has broader implications for me)

Thanks

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2022-12-02 11:03:25 -0600

updated 2022-12-02 11:06:51 -0600

Others can jump in here but the sources for the EPW definition that I am aware of would consist of:

  • The technical paper by Crawley, Hand, and Lawrie (1999) "Improving the Weather Information Available to Simulation Programs" (link)
  • The relevant parts of the EnergyPlus documentation (link)
  • Behavior of reference programs such as the Weather Converter Program (that ships with EnergyPlus) and the EnergyPlus simulator itself

Beyond that, looking at CSV specifications such as the following are helpful since EPW is essentially a CSV file:

  • csv-spec (link)
  • RFC 4180 - Common Format and MIME Type for Comma-Separated Values (CSV) Files (link)

Since you mention that EnergyPlus does not have a problem here, I would consider this to be an issue with the Elements parser itself (which seeks to read/write EnergyPlus compliant EPW files) and will file this in Element's issue tracker (as a disclaimer, I am one of the developers of the Elements software). In addition, from the csv-spec (and RFC 4180), we see:

Though it is RECOMMENDED, the last record in a file is not required to have a ending line break.

Beyond the above, I don't think the EPW file format has a rigorous formal computer grammar associated with it that goes to this level of detail which is why these subtle differences can occur.

Thank you for catching this and reporting it.

edit flag offensive delete link more

Comments

Thank you Michael, that's really helpful context. I will update my workflows to always include a line break at the end, and it will also be great to have that fixed in Elements/OS as so many people are creating their own weather files these day.

bbrannon4's avatar bbrannon4  ( 2022-12-02 11:06:11 -0600 )edit
1

answered 2022-12-04 11:41:14 -0600

lklawrie's avatar

You can also find the EPW specification here. I would think that the main weather converter would always have a link break on the last line.

https://climate.onebuilding.org/paper...


Linda

FIBPSA, FASHRAE https://climate.onebuilding.org - free repository of climate data for building simulation Climate.onebuilding is a FREE service not supported by any outside organization or government agency.

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

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 2022-12-02 10:28:03 -0600

Seen: 147 times

Last updated: Dec 04 '22