Skip to content

Commit c8b8086

Browse files
KonstantinTrwholmgren
authored andcommitted
solar_position_method arg passed to basic_chain method wasn't used (#370)
* fix for issue #343 Now, passed 'offset' parameter are used instead of it's default value. * test for issue #343 * solar_position_method passed to basic_chain wasn't used causing execution of solarposition.get_solarposition with default 'nrel_numpy' value in all cases. * Update modelchain.py doc string fixes for modelchain.basic_chain function * Update v0.5.1.rst * Update v0.5.1.rst
1 parent 39c0862 commit c8b8086

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ API Changes
1010
Bug fixes
1111
~~~~~~~~~
1212
* Remove condition causing Overflow warning from clearsky.haurwitz
13+
* modelchain.basic_chain now correctly passes 'solar_position_method' arg to solarposition.get_solarposition
14+
* Doc string of modelchain.basic_chain was updated to describe args more accurately
1315

1416
Enhancements
1517
~~~~~~~~~~~~
@@ -26,3 +28,4 @@ Testing
2628
Contributors
2729
~~~~~~~~~~~~
2830
* Cliff Hansen
31+
* KonstantinTr

pvlib/modelchain.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ def basic_chain(times, latitude, longitude,
8080
Passed to system.get_irradiance.
8181
8282
solar_position_method : str, default 'nrel_numpy'
83-
Passed to location.get_solarposition.
83+
Passed to solarposition.get_solarposition.
8484
8585
airmass_model : str, default 'kastenyoung1989'
86-
Passed to location.get_airmass.
86+
Passed to atmosphere.relativeairmass.
8787
8888
altitude : None or float, default None
8989
If None, computed from pressure. Assumed to be 0 m
@@ -129,6 +129,7 @@ def basic_chain(times, latitude, longitude,
129129
longitude,
130130
altitude=altitude,
131131
pressure=pressure,
132+
method=solar_position_method,
132133
**kwargs)
133134

134135
# possible error with using apparent zenith with some models

0 commit comments

Comments
 (0)