34
34
)
35
35
# update when full pvsyst models are known
36
36
PVSYST_CONFIG = dict (
37
- dc_model = 'pvsyst'
37
+ dc_model = 'pvsyst' , spectral_model = 'no_loss'
38
38
)
39
39
40
40
@@ -411,8 +411,9 @@ def with_pvwatts(cls, system, location,
411
411
Name of ModelChain instance.
412
412
413
413
**kwargs
414
- Arbitrary keyword arguments. Included for compatibility, but not
415
- used.
414
+ Parameters supplied here are passed to the ModelChain
415
+ constructor and take precedence over the default
416
+ configuration.
416
417
417
418
Examples
418
419
--------
@@ -437,16 +438,16 @@ def with_pvwatts(cls, system, location,
437
438
temperature_model: sapm_temp
438
439
losses_model: pvwatts_losses
439
440
"""
440
-
441
- kwargs .update (PVWATTS_CONFIG )
441
+ config = PVWATTS_CONFIG . copy ()
442
+ config .update (kwargs )
442
443
return ModelChain (
443
444
system , location ,
444
445
orientation_strategy = orientation_strategy ,
445
446
clearsky_model = clearsky_model ,
446
447
airmass_model = airmass_model ,
447
448
temperature_model = temperature_model ,
448
449
name = name ,
449
- ** kwargs
450
+ ** config
450
451
)
451
452
452
453
@classmethod
@@ -494,8 +495,9 @@ def with_sapm(cls, system, location,
494
495
Name of ModelChain instance.
495
496
496
497
**kwargs
497
- Arbitrary keyword arguments. Included for compatibility, but not
498
- used.
498
+ Parameters supplied here are passed to the ModelChain
499
+ constructor and take precedence over the default
500
+ configuration.
499
501
500
502
Examples
501
503
--------
@@ -522,8 +524,8 @@ def with_sapm(cls, system, location,
522
524
temperature_model: sapm_temp
523
525
losses_model: no_extra_losses
524
526
"""
525
-
526
- kwargs .update (SAPM_CONFIG )
527
+ config = SAPM_CONFIG . copy ()
528
+ config .update (kwargs )
527
529
return ModelChain (
528
530
system , location ,
529
531
orientation_strategy = orientation_strategy ,
@@ -532,7 +534,7 @@ def with_sapm(cls, system, location,
532
534
solar_position_method = solar_position_method ,
533
535
airmass_model = airmass_model ,
534
536
name = name ,
535
- ** kwargs
537
+ ** config
536
538
)
537
539
538
540
# update when full pvsyst models are known
@@ -581,8 +583,9 @@ def with_pvsyst(cls, system, location,
581
583
Name of ModelChain instance.
582
584
583
585
**kwargs
584
- Arbitrary keyword arguments. Included for compatibility, but not
585
- used.
586
+ Parameters supplied here are passed to the ModelChain
587
+ constructor and take precedence over the default
588
+ configuration.
586
589
587
590
Examples
588
591
--------
@@ -609,8 +612,8 @@ def with_pvsyst(cls, system, location,
609
612
temperature_model: sapm_temp
610
613
losses_model: no_extra_losses
611
614
"""
612
-
613
- kwargs .update (PVSYST_CONFIG )
615
+ config = PVSYST_CONFIG . copy ()
616
+ config .update (kwargs )
614
617
return ModelChain (
615
618
system , location ,
616
619
orientation_strategy = orientation_strategy ,
@@ -619,7 +622,7 @@ def with_pvsyst(cls, system, location,
619
622
solar_position_method = solar_position_method ,
620
623
airmass_model = airmass_model ,
621
624
name = name ,
622
- ** kwargs
625
+ ** config
623
626
)
624
627
625
628
def __repr__ (self ):
0 commit comments