Question-and-Answer Resource for the Building Energy Modeling Community
Get s tarted with the Help page

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

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 close merge delete

Sort by » oldest newest most voted

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.

more

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.

more

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.

more

more

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!

( 2015-02-18 16:38:37 -0600 )edit