Wfreader

Wrapper for SAM Simulation Core model: cmod_wfreader.cpp

Creating an Instance

There are three methods to create a new instance of a PySAM module. Using default populates the newclass’ attributes with default values specific to a config. Each technology-financialconfiguration corresponds to a SAM GUI configuration. Using new creates an instance with empty attributes. The wrap function allows compatibility with PySSC, for details, refer to PySSC.

Wfreader model description

Wfreader

PySAM.Wfreader.default(config) → Wfreader

Use financial config-specific default attributes

PySAM.Wfreader.from_existing(data, optional config) → Wfreader

Share underlying data with an existing PySAM class. If config provided, default attributes are loaded otherwise.

PySAM.Wfreader.new() → Wfreader
PySAM.Wfreader.wrap(ssc_data_t) → Wfreader

Use existing PySSC data

Warning

Do not call PySSC.data_free on the ssc_data_t provided to wrap

Functions

class PySAM.Wfreader.Wfreader

This class contains all the variable information for running a simulation. Variables are grouped together in the subclasses as properties. If property assignments are the wrong type, an error is thrown.

assign(dict) → None

Assign attributes from nested dictionary, except for Outputs

nested_dict = { 'Weather Reader': { var: val, ...}, ...}

execute(int verbosity) → None

Execute simulation with verbosity level 0 (default) or 1

export() → dict

Export attributes into nested dictionary

value(name, optional value) → Union[None, float, dict, sequence, str]

Get or set by name a value in any of the variable groups.

WeatherReader Group

class PySAM.Wfreader.Wfreader.WeatherReader
assign() → None

Assign attributes from dictionary

WeatherReader_vals = { var: val, ...}

export() → dict

Export attributes into dictionary

file_name

local weather file path

Constraints: LOCAL_FILE

Required: True

Type:str
header_only

read header only [0/1]

Constraints: BOOLEAN

Required: If not provided, assumed to be 0

Type:float

Outputs Group

class PySAM.Wfreader.Wfreader.Outputs
assign() → None

Assign attributes from dictionary

Outputs_vals = { var: val, ...}

export() → dict

Export attributes into dictionary

albedo

Ground Reflectance [frac]

Type:sequence
annual_albedo

Average albedo

Type:float
annual_beam

Average daily beam normal [kWh/m2/day]

Type:float
annual_diffuse

Average daily diffuse [kWh/m2/day]

Type:float
annual_global

Average daily global horizontal [kWh/m2/day]

Type:float
annual_snow

Maximum snow depth [cm]

Type:float
annual_tdry

Average dry bulb temperature [‘C]

Type:float
annual_wspd

Average wind speed [m/s]

Type:float
beam

Beam Normal Irradiance [W/m2]

Type:sequence
city

City

Type:str
country

Country

Type:str
day

Day [dy]

Type:sequence
description

Description

Type:str
diffuse

Diffuse Horizontal Irradiance [W/m2]

Type:sequence
elev

Elevation [m]

Type:float
format

File format

Type:str
global

Global Horizontal Irradiance [W/m2]

Type:sequence
hour

Hour [hr]

Type:sequence
lat

Latitude [deg]

Type:float
location

Location ID

Type:str
lon

Longitude [deg]

Type:float
minute

Minute [min]

Type:sequence
month

Month [mn]

Type:sequence
nrecords

Number of records

Type:float
poa

Plane of Array Irradiance [W/m2]

Type:sequence
pres

Atmospheric Pressure [millibar]

Type:sequence
rhum

Relative Humidity [%]

Type:sequence
snow

Snow Depth [cm]

Type:sequence
source

Source

Type:str
start

Start [sec]

Type:float
state

State

Type:str
step

Step [sec]

Type:float
tdew

Temperature Dew Point [‘C]

Type:sequence
tdry

Temperature Dry Bulb [‘C]

Type:sequence
twet

Temperature Wet Bulb [‘C]

Type:sequence
tz

Time zone [hr]

Type:float
url

URL

Type:str
wdir

Wind Direction [deg]

Type:sequence
wspd

Wind Speed [m/s]

Type:sequence
year

Year [yr]

Type:sequence