read_epw {eplusr}R Documentation

Read and Parse EnergyPlus Weather File (EPW)

Description

read_epw() parses an EPW file and returns an Epw object. The parsing process is extremely inspired by [EnergyPlus/WeatherManager.cc] with some simplifications. For more details on Epw, please see Epw class.

Usage

read_epw(path, encoding = "unknown")

Arguments

path

A path of an EnergyPlus EPW file.

encoding

The file encoding of input IDD. Should be one of "unknown", ⁠"Latin-1" and ⁠"UTF-8"⁠. The default is ⁠"unknown"' which means that the file is encoded in the native encoding.

Value

An Epw object.

Author(s)

Hongyuan Jia

See Also

Epw class

Examples

## Not run: 
# read an EPW file from EnergyPlus v8.8 installation folder
if (is_avail_eplus(8.8)) {
    path_epw <- file.path(
        eplus_config(8.8)$dir,
        "WeatherData",
        "USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw"
   )
   read_epw(path_epw)
}

# read an EPW file from EnergyPlus website
path_base <- "https://energyplus.net/weather-download"
path_region <- "north_and_central_america_wmo_region_4/USA/CA"
path_file <- "USA_CA_San.Francisco.Intl.AP.724940_TMY3/USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw"
path_epw <- file.path(path_base, path_region, path_file)
read_epw(path_epw)

## End(Not run)


[Package eplusr version 0.16.2 Index]