Convert EPW to CSV: What Changes, What Can Go Wrong, and When to Keep the Original

How EPW to CSV conversion works, which weather data and metadata can shift or be lost, and when to keep the original EPW file instead.

An EPW (EnergyPlus Weather) file is the plain-text weather format used by the EnergyPlus building simulation engine and read by many other energy and solar modeling tools. Each file describes one location, usually with one data row per hour. People convert EPW files to CSV so they can chart, filter or analyze the weather data in spreadsheets and data tools. This review explains what that conversion actually does, where meaning can quietly shift, and when the original file is the better choice.

Is converting EPW to CSV right for your use?

For analysis, charting, quality checks or sharing weather data with people who do not run simulations, a CSV version is usually the more practical format. The main benefit is a labeled, uniform table that general-purpose software can read without knowing the EPW specification.

The decisive tradeoff is context. A typical conversion drops or separates the EPW header, which holds the location, time zone, design conditions and other metadata, and it can alter how timestamps and missing values are represented. If you need to feed the data back into EnergyPlus or another simulation tool, or keep an authoritative archive copy, keep the original EPW. Treat the CSV as a companion file, not a replacement.

What the conversion actually changes

The word convert is slightly misleading here. An EPW file is already comma-separated text; opened in a text editor, every line is a list of comma-delimited values. Converting it to CSV does not change the encoding or the delimiter. It changes the structure, so the file behaves like a conventional table: one row of column names followed by data rows that all have the same layout.

An EPW file begins with eight header lines. Each starts with a keyword and has its own number of fields, so they do not line up with the data columns:

  • LOCATION: place name, region, country, data source, station identifier, latitude, longitude, time zone offset and elevation
  • DESIGN CONDITIONS: design-day values used for equipment sizing
  • TYPICAL/EXTREME PERIODS: representative and extreme weeks identified in the data
  • GROUND TEMPERATURES: monthly ground temperatures at one or more depths
  • HOLIDAYS/DAYLIGHT SAVINGS: leap-year flag, daylight saving period and holidays
  • COMMENTS 1 and COMMENTS 2: free-text notes about the source
  • DATA PERIODS: the number and span of data periods and records per hour

After the header come the data records. Each has 35 fields in a fixed order, and no row names them; a value's meaning comes entirely from its position, as defined in the EnergyPlus documentation. An hourly file covering a full non-leap year has 8,760 data rows.

Element | In the EPW file | In a typical converted CSV
Column names | None; meaning is defined by position | A header row naming each column, often with units
Location and metadata | Eight header lines at the top | Dropped, saved separately or kept as comment lines, depending on the tool
Date and time | Separate Year, Month, Day, Hour and Minute fields; Hour runs 1 to 24 | Kept as separate fields or merged into one timestamp
Missing values | Field-specific numeric placeholder codes | Kept as codes, or replaced with blanks or NaN, depending on the tool
Measured values | Numbers in fixed units | Should be identical unless the tool states it converts units

The measured values themselves should come through unchanged: the conversion relabels and rearranges data, it does not recalculate it. If a tool converts units, interpolates or fills gaps, it should say so explicitly. Anything it does not document is worth checking by comparing a few rows against the source file.

The 35 data fields, in order

  • 1-5: Year, Month, Day, Hour, Minute
  • 6: Data source and uncertainty flags (a text string, not a number)
  • 7: Dry bulb temperature (°C)
  • 8: Dew point temperature (°C)
  • 9: Relative humidity (%)
  • 10: Atmospheric station pressure (Pa)
  • 11: Extraterrestrial horizontal radiation (Wh/m²)
  • 12: Extraterrestrial direct normal radiation (Wh/m²)
  • 13: Horizontal infrared radiation intensity (Wh/m²)
  • 14: Global horizontal radiation (Wh/m²)
  • 15: Direct normal radiation (Wh/m²)
  • 16: Diffuse horizontal radiation (Wh/m²)
  • 17: Global horizontal illuminance (lux)
  • 18: Direct normal illuminance (lux)
  • 19: Diffuse horizontal illuminance (lux)
  • 20: Zenith luminance (Cd/m²)
  • 21: Wind direction (degrees)
  • 22: Wind speed (m/s)
  • 23: Total sky cover (tenths)
  • 24: Opaque sky cover (tenths)
  • 25: Visibility (km)
  • 26: Ceiling height (m)
  • 27: Present weather observation
  • 28: Present weather codes (a coded digit string)
  • 29: Precipitable water (mm)
  • 30: Aerosol optical depth (thousandths)
  • 31: Snow depth (cm)
  • 32: Days since last snowfall
  • 33: Albedo
  • 34: Liquid precipitation depth (mm)
  • 35: Liquid precipitation quantity (hours)

Where meaning can shift during conversion

Hour convention. EPW hours run from 1 to 24, and each value describes the hour ending at that time, so Hour 1 covers midnight to 1:00. A converter that builds timestamps by treating Hour as the start of the interval shifts every record by an hour. Hour 24 is also not a valid time in many date libraries, so tools either roll it to 00:00 of the next day or subtract one from every hour. Either approach is defensible if it is documented, but mixing conventions misaligns the weather data with other time series such as metered energy use.

Year field. Typical-year files are assembled from months taken from different historical years, and the Year column can reflect those source years. Merging Year, Month and Day into timestamps can therefore produce a sequence that jumps between years. Many workflows replace the year with a single nominal year before building timestamps; whatever you choose, record it.

Time zone. EPW data is in local standard time, and the time zone offset is stored only in the LOCATION header line. If the converter drops the header, the CSV no longer says which time zone its timestamps use. Daylight saving time is not applied to the data rows.

Missing values. EPW marks missing data with numeric placeholder codes that differ by field; for example, the documentation uses 99.9 for dry bulb temperature and 9999 for several radiation fields. If a CSV keeps these as ordinary numbers, averages and charts will be badly wrong. If the converter replaces them with blanks, that is usually more convenient, but the change should be documented. Check the EnergyPlus documentation for the EnergyPlus version that produced your file before relying on any specific code.

Text-like fields. The data source flags field is a string of letters and digits, and the present weather codes field is a digit string that can begin with zeros. Spreadsheets and some parsers may treat these as numbers, stripping leading zeros or rejecting the field. Import both as text.

Header metadata. Design conditions, ground temperatures and the data period definition matter to some simulations. A CSV containing only the hourly rows cannot be turned back into a complete, usable EPW file without that information.

Spreadsheet round-trips. Opening the file in a spreadsheet and saving it again can change number formatting, how dates are interpreted and, under some regional settings, the decimal and list separators. File size is rarely the problem: a year of hourly rows is far below the row limit of current spreadsheet applications. Automatic reformatting is the more common risk.

Will the CSV stay readable after copying or sharing?

Because both formats are plain text, copying, emailing or committing a CSV to version control preserves the characters exactly. The practical limits come from the software at the receiving end. Some regional spreadsheet settings expect semicolons rather than commas as the delimiter and may display the whole row in one column. If location names or comments contain non-ASCII characters, save the file as UTF-8 and confirm the recipient's software reads it that way.

For accessibility, a CSV with a descriptive header row is generally easier to work with than raw EPW data, because table-aware software can associate each cell with a column name instead of presenting a row of unlabeled numbers. Including units in the column names helps further. This review did not test any specific screen reader or assistive technology with converted weather files; if a particular tool matters for your audience, check its documentation or test it with your actual file.

For search and editing, named columns make filtering and formulas far simpler. Edits made in the CSV do not flow back into the EPW, though. If corrected data needs to go into a simulation, it has to be rebuilt into EPW format with the original header, and that step is itself a conversion worth verifying.

Share the original EPW alongside the CSV whenever recipients might run simulations, need the location and time zone metadata, or need to confirm the CSV against its source. If you share the CSV alone, add a short note stating the source file, the hour and timestamp convention, how missing values were handled, and the time zone.

Ways to convert

No specific converter was tested for this review, and no evidence was available on any particular product's accuracy, pricing or data handling. The options below are general approaches, not rankings.

  • EnergyPlus Weather Converter: the auxiliary weather utility distributed with EnergyPlus is documented as reading EPW and writing other formats, including CSV. Its CSV layout is not the same as a plain table of the data rows, so inspect the output before analyzing it.
  • Spreadsheet import: import the file as comma-delimited text, skip the first eight lines, set the flag and weather code columns to text, then add a header row yourself. This works for one-off jobs but requires typing column names correctly.
  • Scripting: a short Python script gives repeatable results. Libraries such as pvlib include an EPW reader that returns the hourly data and the header metadata separately, which helps preserve the location and time zone.
  • Online converters: convenient for single files. Their privacy and data retention practices cannot be judged from their appearance or marketing; read the stated policy before uploading project-specific or licensed weather data.

A minimal script that skips the header, names the 35 columns and keeps the two text fields as text looks like this. It deliberately leaves missing-value codes and the hour convention unchanged, so handle those explicitly afterward.

import pandas as pd

columns = [
    "year", "month", "day", "hour", "minute", "data_source_flags",
    "dry_bulb_c", "dew_point_c", "relative_humidity_pct",
    "station_pressure_pa", "extraterrestrial_horiz_wh_m2",
    "extraterrestrial_dni_wh_m2", "horiz_infrared_wh_m2",
    "ghi_wh_m2", "dni_wh_m2", "dhi_wh_m2",
    "global_horiz_illum_lux", "direct_normal_illum_lux",
    "diffuse_horiz_illum_lux", "zenith_luminance_cd_m2",
    "wind_direction_deg", "wind_speed_m_s",
    "total_sky_cover_tenths", "opaque_sky_cover_tenths",
    "visibility_km", "ceiling_height_m",
    "present_weather_observation", "present_weather_codes",
    "precipitable_water_mm", "aerosol_optical_depth",
    "snow_depth_cm", "days_since_last_snowfall",
    "albedo", "liquid_precip_depth_mm", "liquid_precip_quantity_hr",
]

# The first 8 lines are EPW header records, not data.
df = pd.read_csv(
    "weather.epw",
    skiprows=8,
    header=None,
    names=columns,
    dtype={"data_source_flags": str, "present_weather_codes": str},
)
df.to_csv("weather.csv", index=False)

Checking the result

  • The CSV has the expected number of data rows for the file's period and time step.
  • The first and last rows match the first and last data records in the EPW, value for value.
  • A handful of rows from the middle of the file match the source.
  • The timestamp or hour convention is known and written down.
  • Missing-value codes are either documented as kept or converted to blanks, not silently mixed with real data.
  • The flag and present weather code columns still contain their full strings, including any leading zeros.
  • The location, time zone and other header metadata are saved somewhere alongside the CSV.

Gaps in this review

This overview is based on the publicly documented EPW structure and general data-handling principles. It does not include hands-on tests of named converters, measured accuracy or speed, pricing, or verified privacy practices, and it makes no claims about how any specific screen reader or spreadsheet version handles converted files. Verify those points directly for the tools you plan to use.