Read an EPW file in to a pandas dataframe.
Note that values contained in the metadata dictionary are unchanged from the EPW file.
EPW files are commonly used by building simulation professionals and are widely available on the web. For example via: https://energyplus.net/weather , http://climate.onebuilding.org or http://www.ladybug.tools/epwmap/
filename (String) – Can be a relative file path, absolute file path, or url.
coerce_year (None or int, default None) – If supplied, the year of the data will be set to this value. This can be a useful feature because EPW data is composed of data from different years. Warning: EPW files always have 365*24 = 8760 data rows; be careful with the use of leap years.
data (DataFrame) – A pandas dataframe with the columns described in the table below. For more detailed descriptions of each component, please consult the EnergyPlus Auxiliary Programs documentation 1
metadata (dict) – The site metadata available in the file.
The returned structures have the following fields.
default identifier, not used
state, province or region (if available)
site country code
type of original data source
A pandas datetime index. NOTE, times are set to local standard time (daylight savings is not included). Days run from 0-23h to comply with PVLIB’s convention.
Year, from original EPW file. Can be overwritten using coerce function.
Month, from original EPW file.
Day of the month, from original EPW file.
Hour of the day from original EPW file. Note that EPW’s convention of 1-24h is not taken over in the index dataframe used in PVLIB.
Minute, from original EPW file. Not used.
Data source and uncertainty flags. See 1, chapter 2.13
Dry bulb temperature at the time indicated, deg C
Dew-point temperature at the time indicated, deg C
Relative humidity at the time indicated, percent
Station pressure at the time indicated, Pa
Extraterrestrial horizontal radiation recv’d during 60 minutes prior to timestamp, Wh/m^2
Extraterrestrial normal radiation recv’d during 60 minutes prior to timestamp, Wh/m^2
Horizontal infrared radiation recv’d during 60 minutes prior to timestamp, Wh/m^2
Direct and diffuse horizontal radiation recv’d during 60 minutes prior to timestamp, Wh/m^2
Amount of direct normal radiation (modeled) recv’d during 60 minutes prior to timestamp, Wh/m^2
Amount of diffuse horizontal radiation recv’d during 60 minutes prior to timestamp, Wh/m^2
Avg. total horizontal illuminance recv’d during the 60 minutes prior to timestamp, lx
Avg. direct normal illuminance recv’d during the 60 minutes prior to timestamp, lx
Avg. horizontal diffuse illuminance recv’d during the 60 minutes prior to timestamp, lx
Avg. luminance at the sky’s zenith during the 60 minutes prior to timestamp, cd/m^2
Wind direction at time indicated, degrees from north (360 = north; 0 = undefined,calm)
Wind speed at the time indicated, m/s
Amount of sky dome covered by clouds or obscuring phenomena at time stamp, tenths of sky
Amount of sky dome covered by clouds or obscuring phenomena that prevent observing the sky at time stamp, tenths of sky
Horizontal visibility at the time indicated, km
Height of cloud base above local terrain (7777=unlimited), meter
Indicator for remaining fields: If 0, then the observed weather codes are taken from the following field. If 9, then missing weather is assumed.
Present weather code, see , chapter 18.104.22.168
Total precipitable water contained in a column of unit cross section from earth to top of atmosphere, cm. Note that some old *_TMY3.epw files may have incorrect unit if it was retrieved from www.energyplus.net.
The broadband aerosol optical depth per unit of air mass due to extinction by aerosol component of atmosphere, unitless
Snow depth in centimeters on the day indicated, (999 = missing data)
Number of days since last snowfall (maximum value of 88, where 88 = 88 or greater days; 99 = missing data)
The ratio of reflected solar irradiance to global horizontal irradiance, unitless
The amount of liquid precipitation observed at indicated time for the period indicated in the liquid precipitation quantity field, millimeter
The period of accumulation for the liquid precipitation depth field, hour