Skip to content

Commit 891a4aa

Browse files
committed
Add detailed docstrings for WEATHER_KEYS, POA_KEYS, and TEMPERATURE_KEYS
1 parent ad6fce2 commit 891a4aa

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

pvlib/modelchain.py

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
from pvlib.tools import _build_kwargs
2020

2121
from pvlib._deprecation import deprecated
22+
# Keys used to detect input data and assign values to the appropriate
23+
# ModelChain attributes.
2224

23-
# keys that are used to detect input data and assign data to appropriate
24-
# ModelChain attribute
25-
26-
# For ModelChain.weather:
27-
# Maps weather-related input columns to the weather DataFrame.
28-
#: list[str]: Required or optional weather input columns.
25+
#: tuple[str]
26+
#: Weather-related input columns used by :class:`ModelChain` to populate
27+
#: ``ModelChain.weather``. Missing ``temp_air`` or ``wind_speed`` are
28+
#: automatically filled (20 °C and 0 m/s).
2929
WEATHER_KEYS = (
3030
'ghi', # Global Horizontal Irradiance (W/m^2)
3131
'dhi', # Diffuse Horizontal Irradiance (W/m^2)
@@ -35,24 +35,26 @@
3535
'precipitable_water' # Column precipitable water (cm)
3636
)
3737

38-
# For ModelChain.total_irrad:
39-
# Plane-of-array irradiance components.
40-
#: list[str]: Required POA irradiance input columns.
38+
#: tuple[str]
39+
#: Plane-of-array irradiance components used to populate
40+
#: ``ModelChain.total_irrad`` when running from POA input.
4141
POA_KEYS = (
4242
'poa_global', # Total plane-of-array irradiance (W/m^2)
43-
'poa_direct', # Direct normal POA irradiance (W/m^2)
43+
'poa_direct', # Direct POA irradiance (W/m^2)
4444
'poa_diffuse' # Diffuse POA irradiance (W/m^2)
4545
)
4646

47-
# Optional keys for temperature-specific inputs.
48-
# These override or supplement temperature models.
49-
#: list[str]: Temperature-related input columns.
47+
#: tuple[str]
48+
#: Temperature-related input columns that override or supplement the
49+
#: ModelChain temperature model. If ``cell_temperature`` is provided,
50+
#: the temperature model is skipped.
5051
TEMPERATURE_KEYS = (
5152
'module_temperature', # Back-surface module temperature (°C)
5253
'cell_temperature', # Direct cell temperature input (°C)
5354
)
55+
#: tuple[str]
56+
#: All supported input keys recognized by ModelChain.
5457
DATA_KEYS = WEATHER_KEYS + POA_KEYS + TEMPERATURE_KEYS
55-
5658
# these dictionaries contain the default configuration for following
5759
# established modeling sequences. They can be used in combination with
5860
# ModelChain, particularly they are used by the methods

0 commit comments

Comments
 (0)