@@ -315,11 +315,11 @@ def beam_component(surface_tilt, surface_azimuth,
315
315
316
316
# ToDo: how to best structure this function? wholmgren 2014-11-03
317
317
def total_irrad (surface_tilt , surface_azimuth ,
318
- solar_zenith , solar_azimuth ,
318
+ apparent_zenith , azimuth ,
319
319
dni , ghi , dhi , dni_extra = None , airmass = None ,
320
320
albedo = .25 , surface_type = None ,
321
321
model = 'isotropic' ,
322
- model_perez = 'allsitescomposite1990' ):
322
+ model_perez = 'allsitescomposite1990' , ** kwargs ):
323
323
'''
324
324
Determine diffuse irradiance from the sky on a
325
325
tilted surface.
@@ -359,7 +359,8 @@ def total_irrad(surface_tilt, surface_azimuth,
359
359
360
360
Returns
361
361
-------
362
- DataFrame with columns ``'total', 'beam', 'sky', 'ground'``.
362
+ DataFrame with columns ``'poa_global', 'poa_direct',
363
+ 'poa_sky_diffuse', 'poa_ground_diffuse'``.
363
364
364
365
References
365
366
----------
@@ -370,6 +371,9 @@ def total_irrad(surface_tilt, surface_azimuth,
370
371
371
372
pvl_logger .debug ('planeofarray.total_irrad()' )
372
373
374
+ solar_zenith = apparent_zenith
375
+ solar_azimuth = azimuth
376
+
373
377
beam = beam_component (surface_tilt , surface_azimuth ,
374
378
solar_zenith , solar_azimuth , dni )
375
379
@@ -396,12 +400,15 @@ def total_irrad(surface_tilt, surface_azimuth,
396
400
397
401
ground = grounddiffuse (surface_tilt , ghi , albedo , surface_type )
398
402
399
- total = beam + sky + ground
403
+ diffuse = sky + ground
404
+ total = beam + diffuse
400
405
401
- all_irrad = pd .DataFrame ({'total' : total ,
402
- 'beam' : beam ,
403
- 'sky' : sky ,
404
- 'ground' : ground })
406
+ all_irrad = pd .DataFrame ()
407
+ all_irrad ['poa_global' ] = total
408
+ all_irrad ['poa_direct' ] = beam
409
+ all_irrad ['poa_diffuse' ] = diffuse
410
+ all_irrad ['poa_sky_diffuse' ] = sky
411
+ all_irrad ['poa_ground_diffuse' ] = ground
405
412
406
413
return all_irrad
407
414
0 commit comments