Skip to content

Commit 5f5efe3

Browse files
committed
solar_postion/irradiation: remove atmospheric insolation
1 parent 73a2472 commit 5f5efe3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

atlite/pv/irradiation.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

atlite/pv/solar_position.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def SolarPosition(ds, time_shift="0H"):
6161
if rvs.issubset(set(ds.data_vars)):
6262
solar_position = ds[rvs]
6363
solar_position = solar_position.rename(
64-
{v: v.replace("solar_: ", "") for v in rvs}
64+
{v: v.replace("solar_", "") for v in rvs}
6565
)
6666
return solar_position
6767

0 commit comments

Comments
 (0)