Skip to content

Commit 155ac77

Browse files
mangecoeurwholmgren
authored andcommitted
Correct spelling modelt to model #196 (#203)
* Correct spelling modelt to model #196 * Added changes to Whatsnew file
1 parent 28cc9fb commit 155ac77

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

docs/sphinx/source/whatsnew/v0.4.0.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ the API changes.
1111
API Changes
1212
~~~~~~~~~~~
1313

14-
14+
* In ``pvlib.irradiance.perez``, renamed argument ``modelt`` to ``model`` (:issue:`196`)
1515

1616
Enhancements
1717
~~~~~~~~~~~~
@@ -39,3 +39,4 @@ Code Contributors
3939
~~~~~~~~~~~~~~~~~
4040

4141
* Will Holmgren
42+
* Jonathan Chambers

pvlib/irradiance.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ def total_irrad(surface_tilt, surface_azimuth,
394394
elif model == 'perez':
395395
sky = perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
396396
solar_zenith, solar_azimuth, airmass,
397-
modelt=model_perez)
397+
model=model_perez)
398398
else:
399399
raise ValueError('invalid model selection {}'.format(model))
400400

@@ -965,7 +965,7 @@ def king(surface_tilt, dhi, ghi, solar_zenith):
965965

966966
def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
967967
solar_zenith, solar_azimuth, airmass,
968-
modelt='allsitescomposite1990'):
968+
model='allsitescomposite1990'):
969969
'''
970970
Determine diffuse irradiance from the sky on a tilted surface using
971971
one of the Perez models.
@@ -1108,7 +1108,7 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
11081108

11091109
# The various possible sets of Perez coefficients are contained
11101110
# in a subfunction to clean up the code.
1111-
F1c, F2c = _get_perez_coefficients(modelt)
1111+
F1c, F2c = _get_perez_coefficients(model)
11121112

11131113
F1 = (F1c[ebin, 0] + F1c[ebin, 1] * delta[ebin.index] +
11141114
F1c[ebin, 2] * z[ebin.index])
@@ -1140,14 +1140,14 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
11401140
return sky_diffuse
11411141

11421142

1143-
def _get_perez_coefficients(perezmodelt):
1143+
def _get_perez_coefficients(perezmodel):
11441144
'''
11451145
Find coefficients for the Perez model
11461146
11471147
Parameters
11481148
----------
11491149
1150-
perezmodelt : string (optional, default='allsitescomposite1990')
1150+
perezmodel : string (optional, default='allsitescomposite1990')
11511151
11521152
a character string which selects the desired set of Perez
11531153
coefficients. If model is not provided as an input, the default,
@@ -1296,7 +1296,7 @@ def _get_perez_coefficients(perezmodelt):
12961296
[1.4340, -3.9940, -0.4920, 0.4530, -2.3760, 0.1170],
12971297
[1.0070, -2.2920, -0.4820, 0.3900, -3.3680, 0.2290]], }
12981298

1299-
array = np.array(coeffdict[perezmodelt])
1299+
array = np.array(coeffdict[perezmodel])
13001300

13011301
F1coeffs = array.T[0:3].T
13021302
F2coeffs = array.T[3:7].T

0 commit comments

Comments
 (0)