Skip to content

Commit 1284e1e

Browse files
authored
Merge branch 'main' into polo-smm
2 parents c7b4589 + 9e267ca commit 1284e1e

File tree

16 files changed

+477
-24
lines changed

16 files changed

+477
-24
lines changed

docs/sphinx/source/reference/iotools.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ lower quality.
233233

234234
iotools.read_crn
235235

236-
237236
ECMWF ERA5
238237
^^^^^^^^^^
239238

@@ -244,6 +243,17 @@ A global reanalysis dataset providing weather and solar resource data.
244243

245244
iotools.get_era5
246245

246+
MERRA-2
247+
^^^^^^^
248+
249+
A global reanalysis dataset providing weather, aerosol, and solar irradiance
250+
data.
251+
252+
.. autosummary::
253+
:toctree: generated/
254+
255+
iotools.get_merra2
256+
247257

248258
Generic data file readers
249259
-------------------------

docs/sphinx/source/user_guide/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ This user guide is an overview and explains some of the key features of pvlib.
2626
modeling_topics/clearsky
2727
modeling_topics/weather_data
2828
modeling_topics/singlediode
29+
modeling_topics/temperature
2930

3031
.. toctree::
3132
:maxdepth: 2
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
.. _temperature:
2+
3+
Temperature models
4+
==================
5+
6+
pvlib provides a variety of models for predicting the operating temperature
7+
of a PV module from irradiance and weather inputs. These models range from
8+
simple empirical equations requiring just a few multiplications to more complex
9+
thermal balance models with numerical integration.
10+
11+
Types of models
12+
---------------
13+
14+
Temperature models predict one of two quantities:
15+
16+
- *module temperature*: the temperature as measured at the back surface
17+
of a PV module. Easy to measure, but usually marginally less
18+
than the cell temperature which determines efficiency.
19+
- *cell temperature*: the temperature of the PV cell itself. The relevant
20+
temperature for PV modeling, but almost never measured directly.
21+
22+
Temperature models estimate these quantities using inputs like incident
23+
irradiance, ambient temperature, and wind speed. Each model also takes
24+
a set of parameter values that represent how a PV module responds to
25+
those inputs.
26+
27+
Parameter values generally depend on both the PV
28+
module technologies, the mounting configuration of the module,
29+
and on any weather parameters that are not included in the model.
30+
Note that, despite models conventionally being associated with either
31+
cell or module temperature, it is actually the parameter values that determine
32+
which of the two temperatures are predicted, as they will produce the same
33+
type of temperature from which they were originally derived.
34+
35+
Another aspect of temperature models is whether they account for
36+
the thermal inertia of a PV module. Temperature models are either:
37+
38+
- *steady-state*: the module is assumed to have been at the specified operating
39+
conditions for a sufficiently long time for its temperature to reach
40+
equilibrium.
41+
- *transient*: the module's thermal inertia is included in the model,
42+
causing a lag in modeled temperature change following changes in the inputs.
43+
44+
Other effects that temperature models may consider include the
45+
photoconversion efficiency and radiative cooling.
46+
47+
The temperature models currently available in pvlib are summarized in the
48+
following table:
49+
50+
+----------------------------------------------+--------+------------+---------------------------------------------------------------------------+
51+
| Model | Type | Transient? | Weather inputs |
52+
| | | +----------------+---------------------+------------+-----------------------+
53+
| | | | POA irradiance | Ambient temperature | Wind speed | Downwelling IR [#f1]_ |
54+
+==============================================+========+============+================+=====================+============+=======================+
55+
| :py:func:`~pvlib.temperature.faiman` | either | |||| |
56+
+----------------------------------------------+--------+------------+----------------+---------------------+------------+-----------------------+
57+
| :py:func:`~pvlib.temperature.faiman_rad` | either | |||||
58+
+----------------------------------------------+--------+------------+----------------+---------------------+------------+-----------------------+
59+
| :py:func:`~pvlib.temperature.fuentes` | either ||||| |
60+
+----------------------------------------------+--------+------------+----------------+---------------------+------------+-----------------------+
61+
| :py:func:`~pvlib.temperature.generic_linear` | either | |||| |
62+
+----------------------------------------------+--------+------------+----------------+---------------------+------------+-----------------------+
63+
| :py:func:`~pvlib.temperature.noct_sam` | cell | |||| |
64+
+----------------------------------------------+--------+------------+----------------+---------------------+------------+-----------------------+
65+
| :py:func:`~pvlib.temperature.pvsyst_cell` | cell | |||| |
66+
+----------------------------------------------+--------+------------+----------------+---------------------+------------+-----------------------+
67+
| :py:func:`~pvlib.temperature.ross` | cell | ||| | |
68+
+----------------------------------------------+--------+------------+----------------+---------------------+------------+-----------------------+
69+
| :py:func:`~pvlib.temperature.sapm_cell` | cell | |||| |
70+
+----------------------------------------------+--------+------------+----------------+---------------------+------------+-----------------------+
71+
| :py:func:`~pvlib.temperature.sapm_module` | module | |||| |
72+
+----------------------------------------------+--------+------------+----------------+---------------------+------------+-----------------------+
73+
74+
.. [#f1] Downwelling infrared radiation.
75+
76+
In addition to the core models above, pvlib provides several other functions
77+
for temperature modeling:
78+
79+
- :py:func:`~pvlib.temperature.prilliman`: an "add-on" model that reprocesses
80+
the output of a steady-state model to apply transient effects.
81+
- :py:func:`~pvlib.temperature.sapm_cell_from_module`: a model for
82+
estimating cell temperature from module temperature.
83+
84+
85+
Model parameters
86+
----------------
87+
88+
Some temperature model functions provide default values for their parameters,
89+
and several additional sets of temperature model parameter values are
90+
available in :py:data:`pvlib.temperature.TEMPERATURE_MODEL_PARAMETERS`.
91+
However, these generic values may not be suitable for all modules and mounting
92+
configurations. It should be noted that using the default parameter values for each
93+
model generally leads to different modules temperature predictions. This alone
94+
does not mean one model is better than another; it's just evidence that the measurements
95+
used to derive the default parameter values were taken on different PV systems in different
96+
locations under different conditions.
97+
98+
Parameter values for one model (e.g. ``u0``, ``u1`` for :py:func:`~pvlib.temperature.faiman`)
99+
can be converted to another model (e.g. ``u_c``, ``u_v`` for :py:func:`~pvlib.temperature.pvsyst_cell`)
100+
using :py:class:`~pvlib.temperature.GenericLinearModel`.
101+
102+
Module-specific values can be obtained via testing, for example following
103+
the IEC 61853-2 standard for the Faiman model; however, such values still do not capture
104+
the dependency of temperature on system design and other variables.
105+
106+
Currently, pvlib provides no functionality for fitting parameter values
107+
using measured temperature.

docs/sphinx/source/whatsnew/v0.12.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Contributors
9494
* Adam R. Jensen (:ghuser:`AdamRJensen`)
9595
* Ioannis Sifnaios (:ghuser:`IoannisSifnaios`)
9696
* Will Holmgren (:ghuser:`wholmgren`)
97-
* Sophie Pelland (:ghuser:`solphie-pelland`)
97+
* Sophie Pelland (:ghuser:`sophie-pelland`)
9898
* Will Hobbs (:ghuser:`williamhobbs`)
9999
* Karel De Brabandere (:ghuser:`kdebrab`)
100100
* Kenneth J. Sauer (:ghuser:`kjsauer`)

docs/sphinx/source/whatsnew/v0.13.2.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ Deprecations
1818
Bug fixes
1919
~~~~~~~~~
2020

21-
2221
Enhancements
2322
~~~~~~~~~~~~
2423
* Add :py:func:`~pvlib.ivtools.sdm.fit_desoto_batzelis`, a function to estimate
@@ -43,12 +42,15 @@ Enhancements
4342
installed. (:issue:`2497`, :pull:`2571`)
4443
* Add :py:func:`~pvlib.iotools.get_era5`, a function for accessing
4544
ERA5 reanalysis data. (:pull:`2573`)
45+
* Add :py:func:`~pvlib.iotools.get_merra2`, a function for accessing
46+
MERRA-2 reanalysis data. (:pull:`2572`)
4647
* Add :py:func:`~pvlib.spectrum.spectral_factor_polo`, a function for estimating
4748
spectral mismatch factors for vertical PV façades. (:issue:`2406`, :pull:`2491`)
4849

4950
Documentation
5051
~~~~~~~~~~~~~
5152
* Provide an overview of single-diode modeling functionality in :ref:`singlediode`. (:pull:`2565`)
53+
* Provide an overview of temperature modeling functionality in :ref:`temperature`. (:pull:`2591`)
5254
* Fix typo in parameter name ``atmos_refract`` in :py:func:`pvlib.solarposition.spa_python`
5355
and :py:func:`pvlib.spa.solar_position`. (:issue:`2532`, :pull:`2592`)
5456

@@ -58,6 +60,8 @@ Testing
5860
* Add Python 3.14 to test suite. (:pull:`2590`)
5961
* Update pytest configuration in ``pyproject.toml`` to work with pytest 9.0.
6062
(:pull:`2596`)
63+
* Correct argument and value order in :py:func:`~pvlib.tests.ivtools.test_sde`,
64+
in tests of :py:func:`~pvlib.ivtools.sde._fit_sandia_cocontent`. (:issue:`2613`, :pull:`2615`)
6165

6266

6367
Benchmarking

pvlib/iotools/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@
4343
from pvlib.iotools.meteonorm import get_meteonorm_tmy # noqa: F401
4444
from pvlib.iotools.nasa_power import get_nasa_power # noqa: F401
4545
from pvlib.iotools.era5 import get_era5 # noqa: F401
46+
from pvlib.iotools.merra2 import get_merra2 # noqa: F401

pvlib/iotools/acis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,8 @@ def get_acis_station_data(station, start, end, trace_val=0.001,
413413
'climdiv,valid_daterange,tzo,network')
414414
}
415415
df, metadata = _get_acis(start, end, params, map_variables, url, **kwargs)
416-
df = df.replace("M", np.nan)
417-
df = df.replace("T", trace_val)
416+
df = df.mask(df == 'M', np.nan)
417+
df = df.mask(df == 'T', trace_val)
418418
df = df.astype(float)
419419
return df, metadata
420420

pvlib/iotools/era5.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@
1212
'sp': 'pressure',
1313
'ssrd': 'ghi',
1414
'tp': 'precipitation',
15+
'strd': 'longwave_down',
1516

1617
# long names
1718
'2m_dewpoint_temperature': 'temp_dew',
1819
'2m_temperature': 'temp_air',
1920
'surface_pressure': 'pressure',
2021
'surface_solar_radiation_downwards': 'ghi',
2122
'total_precipitation': 'precipitation',
23+
'surface_thermal_radiation_downwards': 'longwave_down',
2224
}
2325

2426

0 commit comments

Comments
 (0)