66from numpy .testing import assert_allclose
77
88from pvlib import temperature , tools
9+ from pvlib ._deprecation import pvlibDeprecationWarning
910
1011
1112@pytest .fixture
@@ -72,7 +73,7 @@ def test_pvsyst_cell_default():
7273
7374def test_pvsyst_cell_kwargs ():
7475 result = temperature .pvsyst_cell (900 , 20 , wind_speed = 5.0 , u_c = 23.5 ,
75- u_v = 6.25 , eta_m = 0.1 )
76+ u_v = 6.25 , module_efficiency = 0.1 )
7677 assert_allclose (result , 33.315 , 0.001 )
7778
7879
@@ -96,6 +97,13 @@ def test_pvsyst_cell_series():
9697 assert_series_equal (expected , result )
9798
9899
100+ def test_pvsyst_cell_eta_m_deprecated ():
101+ with pytest .warns (pvlibDeprecationWarning ):
102+ result = temperature .pvsyst_cell (900 , 20 , wind_speed = 5.0 , u_c = 23.5 ,
103+ u_v = 6.25 , eta_m = 0.1 )
104+ assert_allclose (result , 33.315 , 0.001 )
105+
106+
99107def test_faiman_default ():
100108 result = temperature .faiman (900 , 20 , 5 )
101109 assert_allclose (result , 35.203 , 0.001 )
@@ -215,24 +223,24 @@ def test_fuentes_timezone(tz):
215223
216224
217225def test_noct_sam ():
218- poa_global , temp_air , wind_speed , noct , eta_m_ref = (1000. , 25. , 1. , 45. ,
219- 0.2 )
226+ poa_global , temp_air , wind_speed , noct , module_efficiency = (
227+ 1000. , 25. , 1. , 45. , 0.2 )
220228 expected = 55.230790492
221229 result = temperature .noct_sam (poa_global , temp_air , wind_speed , noct ,
222- eta_m_ref )
230+ module_efficiency )
223231 assert_allclose (result , expected )
224232 # test with different types
225233 result = temperature .noct_sam (np .array (poa_global ), np .array (temp_air ),
226234 np .array (wind_speed ), np .array (noct ),
227- np .array (eta_m_ref ))
235+ np .array (module_efficiency ))
228236 assert_allclose (result , expected )
229237 dr = pd .date_range (start = '2020-01-01 12:00:00' , end = '2020-01-01 13:00:00' ,
230238 freq = '1H' )
231239 result = temperature .noct_sam (pd .Series (index = dr , data = poa_global ),
232240 pd .Series (index = dr , data = temp_air ),
233241 pd .Series (index = dr , data = wind_speed ),
234242 pd .Series (index = dr , data = noct ),
235- eta_m_ref )
243+ module_efficiency )
236244 assert_series_equal (result , pd .Series (index = dr , data = expected ))
237245
238246
@@ -242,7 +250,7 @@ def test_noct_sam_against_sam():
242250 # NOCT cell temperature model), with the only change being the soiling
243251 # loss is set to 0. Weather input is TMY3 for Phoenix AZ.
244252 # Values are taken from the Jan 1 12:00:00 timestamp.
245- poa_total , temp_air , wind_speed , noct , eta_m_ref = (
253+ poa_total , temp_air , wind_speed , noct , module_efficiency = (
246254 860.673 , 25 , 3 , 46.4 , 0.20551 )
247255 poa_total_after_refl = 851.458 # from SAM output
248256 # compute effective irradiance
@@ -259,7 +267,7 @@ def test_noct_sam_against_sam():
259267 array_height = 1
260268 mount_standoff = 4.0
261269 result = temperature .noct_sam (poa_total , temp_air , wind_speed , noct ,
262- eta_m_ref , effective_irradiance ,
270+ module_efficiency , effective_irradiance ,
263271 transmittance_absorptance , array_height ,
264272 mount_standoff )
265273 expected = 43.0655
@@ -268,14 +276,14 @@ def test_noct_sam_against_sam():
268276
269277
270278def test_noct_sam_options ():
271- poa_global , temp_air , wind_speed , noct , eta_m_ref = (1000. , 25. , 1. , 45. ,
272- 0.2 )
279+ poa_global , temp_air , wind_speed , noct , module_efficiency = (
280+ 1000. , 25. , 1. , 45. , 0.2 )
273281 effective_irradiance = 1100.
274282 transmittance_absorptance = 0.8
275283 array_height = 2
276284 mount_standoff = 2.0
277285 result = temperature .noct_sam (poa_global , temp_air , wind_speed , noct ,
278- eta_m_ref , effective_irradiance ,
286+ module_efficiency , effective_irradiance ,
279287 transmittance_absorptance , array_height ,
280288 mount_standoff )
281289 expected = 60.477703576
0 commit comments