Skip to content

Commit cc39285

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

File tree

1 file changed

+7
-21
lines changed

1 file changed

+7
-21
lines changed

pvlib/modelchain.py

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,20 @@
55
library. With great power comes great responsibility: users should take
66
the time to read the source code for the module.
77
"""
8-
98
from functools import partial
109
import itertools
1110
import warnings
1211
import pandas as pd
1312
from dataclasses import dataclass, field
1413
from typing import Union, Tuple, Optional, TypeVar
15-
1614
from pvlib import pvsystem, iam
1715
import pvlib.irradiance # avoid name conflict with full import
1816
from pvlib.pvsystem import _DC_MODEL_PARAMS
1917
from pvlib.tools import _build_kwargs
20-
2118
from pvlib._deprecation import deprecated
22-
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.
19+
# Keys used to detect input data and assign values to the appropriate
20+
# ModelChain attributes.
21+
# Weather-related input columns for ModelChain.weather
2922
WEATHER_KEYS = (
3023
'ghi', # Global Horizontal Irradiance (W/m^2)
3124
'dhi', # Diffuse Horizontal Irradiance (W/m^2)
@@ -34,30 +27,23 @@
3427
'temp_air', # Ambient air temperature (°C)
3528
'precipitable_water' # Column precipitable water (cm)
3629
)
37-
38-
# For ModelChain.total_irrad:
39-
# Plane-of-array irradiance components.
40-
#: list[str]: Required POA irradiance input columns.
30+
# Plane-of-array irradiance input columns for ModelChain.total_irrad
4131
POA_KEYS = (
4232
'poa_global', # Total plane-of-array irradiance (W/m^2)
43-
'poa_direct', # Direct normal POA irradiance (W/m^2)
33+
'poa_direct', # Direct POA irradiance (W/m^2)
4434
'poa_diffuse' # Diffuse POA irradiance (W/m^2)
4535
)
46-
47-
# Optional keys for temperature-specific inputs.
48-
# These override or supplement temperature models.
49-
#: list[str]: Temperature-related input columns.
36+
# Temperature-related optional input columns for ModelChain
5037
TEMPERATURE_KEYS = (
5138
'module_temperature', # Back-surface module temperature (°C)
5239
'cell_temperature', # Direct cell temperature input (°C)
5340
)
41+
# All supported input keys combined
5442
DATA_KEYS = WEATHER_KEYS + POA_KEYS + TEMPERATURE_KEYS
55-
5643
# these dictionaries contain the default configuration for following
5744
# established modeling sequences. They can be used in combination with
5845
# ModelChain, particularly they are used by the methods
5946
# ModelChain.with_pvwatts, ModelChain.with_sapm, etc.
60-
6147
# pvwatts documentation states that it uses the following reference for
6248
# a temperature model: Fuentes, M. K. (1987). A Simplified Thermal Model
6349
# for Flat-Plate Photovoltaic Arrays. SAND85-0330. Albuquerque, NM:

0 commit comments

Comments
 (0)