@@ -20,7 +20,7 @@ def DiffuseHorizontalIrrad(ds, solar_position, clearsky_model, influx):
2020 # Lauret et al. (2013):http://dx.doi.org/10.1016/j.renene.2012.01.049
2121
2222 sinaltitude = sin (solar_position ["altitude" ])
23- atmospheric_insolation = solar_position [ "atmospheric insolation " ]
23+ influx_toa = ds [ "influx_toa " ]
2424
2525 if clearsky_model is None :
2626 clearsky_model = (
@@ -29,7 +29,7 @@ def DiffuseHorizontalIrrad(ds, solar_position, clearsky_model, influx):
2929
3030 # Reindl 1990 clearsky model
3131
32- k = influx / atmospheric_insolation # clearsky index
32+ k = influx / influx_toa # clearsky index
3333 # k.values[k.values > 1.0] = 1.0
3434 # k = k.rename('clearsky index')
3535
@@ -82,7 +82,7 @@ def TiltedDiffuseIrrad(ds, solar_position, surface_orientation, direct, diffuse)
8282 # Hay-Davies Model
8383
8484 sinaltitude = sin (solar_position ["altitude" ])
85- atmospheric_insolation = solar_position [ "atmospheric insolation " ]
85+ influx_toa = ds [ "influx_toa " ]
8686
8787 cosincidence = surface_orientation ["cosincidence" ]
8888 surface_slope = surface_orientation ["slope" ]
@@ -94,7 +94,7 @@ def TiltedDiffuseIrrad(ds, solar_position, surface_orientation, direct, diffuse)
9494 f = sqrt (direct / influx ).fillna (0.0 )
9595
9696 # anisotropy factor
97- A = direct / atmospheric_insolation
97+ A = direct / influx_toa
9898
9999 # geometric factor
100100 R_b = cosincidence / sinaltitude
@@ -159,7 +159,7 @@ def TiltedIrradiation(
159159 altitude_threshold = 1.0 ,
160160):
161161
162- influx_toa = solar_position [ "atmospheric insolation " ]
162+ influx_toa = ds [ "influx_toa " ]
163163
164164 def clip (influx , influx_max ):
165165 # use .data in clip due to dask-xarray incompatibilities
0 commit comments