Skip to content

Commit d55cf78

Browse files
committed
replace ir_down with longwave_down
1 parent 080a84b commit d55cf78

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

pvlib/pvsystem.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ def get_iam(self, aoi, iam_model='physical'):
414414

415415
@_unwrap_single_value
416416
def get_cell_temperature(self, poa_global, temp_air, wind_speed, model,
417-
effective_irradiance=None, ir_down=None):
417+
effective_irradiance=None, longwave_down=None):
418418
"""
419419
Determine cell temperature using the method specified by ``model``.
420420
@@ -438,7 +438,7 @@ def get_cell_temperature(self, poa_global, temp_air, wind_speed, model,
438438
The irradiance that is converted to photocurrent in W/m^2.
439439
Only used for some models.
440440
441-
ir_down: numeric or tuple of numeric, optional
441+
longwave_down: numeric or tuple of numeric, optional
442442
Downwelling infrared radiation from the sky, measured on a
443443
horizontal surface in W/m^2. Only used in ``'faiman_rad'`` model.
444444
@@ -464,16 +464,18 @@ def get_cell_temperature(self, poa_global, temp_air, wind_speed, model,
464464
# Not used for all models, but Array.get_cell_temperature handles it
465465
effective_irradiance = self._validate_per_array(effective_irradiance,
466466
system_wide=True)
467-
ir_down = self._validate_per_array(ir_down, system_wide=True)
467+
longwave_down = self._validate_per_array(longwave_down,
468+
system_wide=True)
468469

469470
return tuple(
470471
array.get_cell_temperature(poa_global, temp_air, wind_speed,
471-
model, effective_irradiance, ir_down)
472+
model, effective_irradiance,
473+
longwave_down)
472474
for array, poa_global, temp_air, wind_speed, effective_irradiance,
473-
ir_down
475+
longwave_down
474476
in zip(
475477
self.arrays, poa_global, temp_air, wind_speed,
476-
effective_irradiance, ir_down
478+
effective_irradiance, longwave_down
477479
)
478480
)
479481

@@ -1215,7 +1217,7 @@ def get_iam(self, aoi, iam_model='physical'):
12151217
raise ValueError(model + ' is not a valid IAM model')
12161218

12171219
def get_cell_temperature(self, poa_global, temp_air, wind_speed, model,
1218-
effective_irradiance=None, ir_down=None):
1220+
effective_irradiance=None, longwave_down=None):
12191221
"""
12201222
Determine cell temperature using the method specified by ``model``.
12211223
@@ -1240,7 +1242,7 @@ def get_cell_temperature(self, poa_global, temp_air, wind_speed, model,
12401242
The irradiance that is converted to photocurrent in W/m^2.
12411243
Only used for some models.
12421244
1243-
ir_down: numeric, optional
1245+
longwave_down: numeric, optional
12441246
Downwelling infrared radiation from the sky, measured on a
12451247
horizontal surface in W/m^2. Only used in ``'faiman_rad'`` model.
12461248
@@ -1287,7 +1289,7 @@ def get_cell_temperature(self, poa_global, temp_air, wind_speed, model,
12871289
self.temperature_model_parameters)
12881290
elif model == 'faiman_rad':
12891291
func = functools.partial(temperature.faiman_rad,
1290-
ir_down=ir_down)
1292+
longwave_down=longwave_down)
12911293
required = ()
12921294
optional = _build_kwargs(['u0', 'u1',
12931295
'sky_view', 'emissivity'],

tests/test_pvsystem.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ def test_PVSystem_faiman_celltemp(mocker):
495495

496496

497497
def test_PVSystem_faiman_rad_celltemp(mocker):
498-
ir_down = 50 # arbitrary value
498+
longwave_down = 50 # arbitrary value
499499
# default values, u0 and u1 being adjusted in same proportion as in
500500
# https://www.osti.gov/servlets/purl/1884890/ (not suggested, just example)
501501
u0, u1 = 25.0*0.86, 6.84*0.88
@@ -509,10 +509,11 @@ def test_PVSystem_faiman_rad_celltemp(mocker):
509509
temps = 25
510510
irrads = 1000
511511
winds = 1
512-
out = system.get_cell_temperature(irrads, temps, winds, ir_down=ir_down,
512+
out = system.get_cell_temperature(irrads, temps, winds,
513+
longwave_down=longwave_down,
513514
model='faiman_rad')
514515
temperature.faiman_rad.assert_called_once_with(irrads, temps, winds,
515-
ir_down, u0, u1,
516+
longwave_down, u0, u1,
516517
sky_view, emissivity)
517518
assert_allclose(out, 48.6, atol=1e-1)
518519

0 commit comments

Comments
 (0)