Skip to content

Commit dd2c0d8

Browse files
committed
Add detailed docstrings for WEATHER_KEYS, POA_KEYS, and TEMPERATURE_KEYS
1 parent 6c93b71 commit dd2c0d8

File tree

1 file changed

+26
-11
lines changed

1 file changed

+26
-11
lines changed

pvlib/modelchain.py

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,35 @@
2222

2323
# keys that are used to detect input data and assign data to appropriate
2424
# ModelChain attribute
25-
# for ModelChain.weather
26-
WEATHER_KEYS = ('ghi', 'dhi', 'dni', 'wind_speed', 'temp_air',
27-
'precipitable_water')
2825

29-
# for ModelChain.total_irrad
30-
POA_KEYS = ('poa_global', 'poa_direct', 'poa_diffuse')
26+
# For ModelChain.weather:
27+
# Maps weather-related input columns to the weather DataFrame.
28+
#: list[str]: Required or optional weather input columns.
29+
WEATHER_KEYS = (
30+
'ghi', # Global Horizontal Irradiance (W/m^2)
31+
'dhi', # Diffuse Horizontal Irradiance (W/m^2)
32+
'dni', # Direct Normal Irradiance (W/m^2)
33+
'wind_speed', # Wind speed (m/s)
34+
'temp_air', # Ambient air temperature (°C)
35+
'precipitable_water' # Column precipitable water (cm)
36+
)
3137

32-
# Optional keys to communicate temperature data. If provided,
33-
# 'cell_temperature' overrides ModelChain.temperature_model and sets
34-
# ModelChain.cell_temperature to the data. If 'module_temperature' is provided,
35-
# overrides ModelChain.temperature_model with
36-
# pvlib.temperature.sapm_cell_from_module
37-
TEMPERATURE_KEYS = ('module_temperature', 'cell_temperature')
38+
# For ModelChain.total_irrad:
39+
# Plane-of-array irradiance components.
40+
#: list[str]: Required POA irradiance input columns.
41+
POA_KEYS = (
42+
'poa_global', # Total plane-of-array irradiance (W/m^2)
43+
'poa_direct', # Direct normal POA irradiance (W/m^2)
44+
'poa_diffuse' # Diffuse POA irradiance (W/m^2)
45+
)
3846

47+
# Optional keys for temperature-specific inputs.
48+
# These override or supplement temperature models.
49+
#: list[str]: Temperature-related input columns.
50+
TEMPERATURE_KEYS = (
51+
'module_temperature', # Back-surface module temperature (°C)
52+
'cell_temperature', # Direct cell temperature input (°C)
53+
)
3954
DATA_KEYS = WEATHER_KEYS + POA_KEYS + TEMPERATURE_KEYS
4055

4156
# these dictionaries contain the default configuration for following

0 commit comments

Comments
 (0)