Skip to content

Commit 5bf2eef

Browse files
committed
complete the docstring
1 parent 7ab38cd commit 5bf2eef

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

pvlib/temperature.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,10 @@ def noct(poa_global, temp_air, wind_speed, noct, eta_m_ref,
718718
effective_irradiance=None, transmittance_absorbtance=0.9,
719719
array_height=1, mount_standoff=3.5):
720720
'''
721+
Cell temperature model from the System Advisor Model (SAM).
722+
723+
The model is described in [1], Section 10.6.
724+
721725
Parameters
722726
----------
723727
poa_global : numeric
@@ -750,7 +754,7 @@ def noct(poa_global, temp_air, wind_speed, noct, eta_m_ref,
750754
array_height : int, default 1
751755
Height of array above ground in stories (one story is about 3m). Must
752756
be either 1 or 2. For systems elevated less than one story, use 1.
753-
If system is elevated more than two stories, use 2. [unitless]
757+
If system is elevated more than two stories, use 2.
754758
755759
mount_standoff : numeric, default 3.5
756760
Distance between array mounting and mounting surface. Use default
@@ -761,6 +765,17 @@ def noct(poa_global, temp_air, wind_speed, noct, eta_m_ref,
761765
cell_temperature : numeric
762766
Cell temperature. [C]
763767
768+
Raises
769+
------
770+
ValueError
771+
If array_height is an invalid value (must be 1 or 2).
772+
773+
References
774+
----------
775+
.. [1] Gilman, P., Dobos, A., DiOrio, N., Freeman, J., Janzou, S.,
776+
Ryberg, D., 2018, "SAM Photovoltaic Model Technical Reference
777+
Update", National Renewable Energy Laboratory Report
778+
NREL/TP-6A20-67399.
764779
'''
765780
if effective_irradiance is None:
766781
irr_ratio = 1.
@@ -772,7 +787,8 @@ def noct(poa_global, temp_air, wind_speed, noct, eta_m_ref,
772787
elif array_height == 2:
773788
wind_adj = 0.61 * wind_speed
774789
else:
775-
raise ValueError()
790+
raise ValueError(
791+
f'array_height must be 1 or 2, {array_height} was given')
776792

777793
noct_adj = noct + _adj_noct(mount_standoff)
778794
tau_alpha = transmittance_absorbtance * irr_ratio

0 commit comments

Comments
 (0)