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

How do you make an energy plus input file from real weather data?

asked 2015-02-18 12:58:58 -0500

Amanda's avatar

updated 2017-05-29 17:43:12 -0500

We have taken TMY3 data, saved it as .csv in the EnergyPlus weather converter add-on, then replaced the temperatures with our own. We are now trying to save it as a .epw.

First it complained about our .def file, so we created the following. Now it complains "Error occurred in processing" the csv file. Any help would be much appreciated.

Here is our .def file:

&location

City='Rochester'

StateProv='NY'

Country='USA'

InLat=43.1656

InLong=77.6114

InTime=-5

InElev=154

InWMO=725290

/
edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
8

answered 2015-02-19 07:04:38 -0500

updated 2015-02-19 07:05:58 -0500

First, I don't know what exactly you're trying to achieve, but if you are planning on just replacing the temperatures with real ones and leaving the rest of the parameters intact, it'll be aberrant and ultimately useless because there are physical relationships with other parameters.

Otherwise, if your initial file was an EPW, and you saved it as an EnergyPlus CSV format using the Weather Converter Program and replaced values in there, it should be straightforward to convert it back to EPW. Only other, non EnergyPlus, CSV files need a DEF file.

The full document of the Weather Converter Program is in the "Auxiliary Programs" documentation that comes with EnergyPlus.

Alternatively, you can always use Elements or order AMY weather files from selected vendors. See this thread on Unmet Hours for more information.

edit flag offensive delete link more
6

answered 2015-02-19 12:39:33 -0500

Joe Huang's avatar

updated 2015-02-19 12:44:01 -0500

Totally agree with what Julien wrote. Weather data are not random numbers thrown together, there is a lot of synchronization between the different elements, and in the worst case you could even produce a weather file that's physically impossible, like having the dewpoint higher than the dry bulb and relative humidities greater than 100 or less than 0. There are also many subtle and not so subtle relationships between the temperature, wind speed, and solar radiation that I don't even want to get into.

My recommendation is that you find all the weather data elements for the same period and location as your dry bulb temperatures. These days such data are amply available from various sources, starting from the National Climatic Data Center and a whole host of weather-related web sites. One of the unintended consequences of the government (DOE, DOC) making typical year data (TMYX) readily available is the false impression that such data are plentiful while actual year data are not. The reality is the opposite, a typical year file can only be created if there are 10-25 years of historical data.

edit flag offensive delete link more
3

answered 2015-02-22 14:29:08 -0500

updated 2015-03-05 15:25:17 -0500

QUICK CHECK for "error occurred in processing csv file": * maybe input data format deviates from your DEF file specification, or your DEF file specifications are illegal. (cf. DEF file examples in documentation), e.g. DataElements=... and and corresponding DataUnits=... need to be specified. * if the csv data file contains column names you need to specify number of records to NumRecordsToSkip=1 in the DEF file, if there is more information in lines preceding the data increase NumRecordsToSkip number accordingly.

GENERAL HOW-TO for PREPARING A CUSTOM INPUT FILE FOR THE EPW WEATHER CONVERTER:

(1) make sure that in your csv file you really have a table of weather data only (e.g. dry bulb temperature, wet bulb temperature, humidity,....) (2) your def file looks as if incomplete: you also need to specify here what data the weather converter will find in every column, in which physical units and what conversion factors to apply on the input (cf. EP Auxiliary Programs documentation)

It may be necessary to convert the original time data into the required time format for the epw weather converter (yyy,mm,dd,hh, min). If the data are incomplete regarding certain time steps you will probably need to fill in some interpolated or default values in the csv table (preferably done with an appropriately coded script). If certain physical data (e.g. solar radiation) are missing, the weather converter may be able to create estimates automatically for a complete epw file.

If the available data do not comprise numerical values for sky cover but only verbal descriptions of sky condition, clouds etc., and if solar radiation data are missing, you will need to create a numerical estimate for sky cover. In the case of METAR data, - although not very accurate - a reasonable method seems to set sky cover values according to CAVOK=0, SKC=0, CLR=0, FEW=1.5/8, SCT=3.5/8, BKN=6/8, OVC=1.0 in each sky layer and to assign overall sky cover fraction to the maximum from all reported layers. (cf. a paper by James Tobin, J.W. Nielsen-Gammon, Texas A&M University, 2010)

Another complication may arise, if your weather data refer to e.g. 3 time steps per hour, but not regularly. (some hours with two measurements, some with three). In this case I have observed that the weather converter crashes, if you have specified 2 time steps per hour (without having checked that the weather data really conform to this). For preparation of data for the weather converter in this case you will need to extract a selection of the data that strictly conforms to the 2-time-step/hour rhythm. This also is best done by writing a script which automates the task.

edit flag offensive delete link more
1

answered 2015-02-18 15:46:16 -0500

@Amanda. See this thread. Does this answer your question?

edit flag offensive delete link more

Comments

Unfortunately, it does not. That's where I got the idea to do epw --> csv --> epw, but the csv --> epw step doesn't seem to be working for us if we edit the csv at all. Thanks!

Amanda's avatar Amanda  ( 2015-02-18 16:38:37 -0500 )edit

Your Answer

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

Add Answer

Careers

Question Tools

4 followers

Stats

Asked: 2015-02-18 12:58:58 -0500

Seen: 4,524 times

Last updated: Mar 05 '15