WeatherFileReader

class iesve.WeatherFileReader

Bases: object

Interface for working with weather files (fwt and epw formats).

Basic usage:

1wea_file = iesve.WeatherFileReader()
2result = wea_file.open_weather_file( 'WashingtonTMY2.fwt' )
3assert result > 0, 'Error opening weather file.'


close() None

Close weather file


get_results(type: int | weather_variable, start_day: int, end_day: int) ndarray[Any, dtype[float32]] | None

Read a variable out of the weather file

Parameters:
Returns:

Chosen data. See

iesve.weather_variable for unit

Return type:

Optional[npt.NDArray[numpy.float32]]


open_weather_file(filename: str) int

Load a weather file indicated by filename. Returns > 0 on success, <= 0 on error


feb29: bool

True if year has February 29th (leap year), false otherwise


lat: float

Weather site latitude


long: float

Weather site longitude


site: str

Weather site description


solar_rad_convention: str

Solar rad convention


start_weekday: str

First day of the year


time_convention: str

Time convention


time_zone: float

Weather site time zone (hours ahead of GMT)


year: int

Weather data start year



Enums

class iesve.weather_variable(*values)

Bases: IntEnum

Variable used in iesve.WeatherFileReader.get_results()

Units of value returned stated below


atmospheric_pressure = 9

Pa


cloud_cover = 1

Oktas


dew_point_temperature = 14

°C


diffuse_horizontal_radiation = 6

W/m²


direct_normal_radiation = 5

W/m²


dry_bulb_temperature = 3

°C


global_radiation = 13

W/m²


humidity_ratio = 12

kg/kg


max_adaptive_temperature = 16

°C


relative_humidity = 11

%


running_mean_temperature = 15

°C


solar_altitude = 7

Degrees


solar_azimuth = 8

Degrees


wet_bulb_temperature = 4

°C


wind_direction = 2

Degrees


wind_speed = 10

m/s