|
5 | 5 | library. With great power comes great responsibility: users should take |
6 | 6 | the time to read the source code for the module. |
7 | 7 | """ |
8 | | - |
9 | 8 | from functools import partial |
10 | 9 | import itertools |
11 | 10 | import warnings |
12 | 11 | import pandas as pd |
13 | 12 | from dataclasses import dataclass, field |
14 | 13 | from typing import Union, Tuple, Optional, TypeVar |
15 | | - |
16 | 14 | from pvlib import pvsystem, iam |
17 | 15 | import pvlib.irradiance # avoid name conflict with full import |
18 | 16 | from pvlib.pvsystem import _DC_MODEL_PARAMS |
19 | 17 | from pvlib.tools import _build_kwargs |
20 | | - |
21 | 18 | 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 |
29 | 22 | WEATHER_KEYS = ( |
30 | 23 | 'ghi', # Global Horizontal Irradiance (W/m^2) |
31 | 24 | 'dhi', # Diffuse Horizontal Irradiance (W/m^2) |
|
34 | 27 | 'temp_air', # Ambient air temperature (°C) |
35 | 28 | 'precipitable_water' # Column precipitable water (cm) |
36 | 29 | ) |
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 |
41 | 31 | POA_KEYS = ( |
42 | 32 | '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) |
44 | 34 | 'poa_diffuse' # Diffuse POA irradiance (W/m^2) |
45 | 35 | ) |
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 |
50 | 37 | TEMPERATURE_KEYS = ( |
51 | 38 | 'module_temperature', # Back-surface module temperature (°C) |
52 | 39 | 'cell_temperature', # Direct cell temperature input (°C) |
53 | 40 | ) |
| 41 | +# All supported input keys combined |
54 | 42 | DATA_KEYS = WEATHER_KEYS + POA_KEYS + TEMPERATURE_KEYS |
55 | | - |
56 | 43 | # these dictionaries contain the default configuration for following |
57 | 44 | # established modeling sequences. They can be used in combination with |
58 | 45 | # ModelChain, particularly they are used by the methods |
59 | 46 | # ModelChain.with_pvwatts, ModelChain.with_sapm, etc. |
60 | | - |
61 | 47 | # pvwatts documentation states that it uses the following reference for |
62 | 48 | # a temperature model: Fuentes, M. K. (1987). A Simplified Thermal Model |
63 | 49 | # for Flat-Plate Photovoltaic Arrays. SAND85-0330. Albuquerque, NM: |
|
0 commit comments