<jupyter_start><jupyter_text>Shade profiles Site 1 Site 2 Site 3 Site 4<jupyter_code># additional data

# albedo
alpha = 0.4

# module azimuth
Am = 180

# module tilt angle
theta = 35
am = 90 - theta

# Sky view factors for the sites 1-4
SVF = [0.8151, 0.6304, 0.6077, 0.3661]
import numpy as np
# cos of angle of irradiance

df['cos_AOI'] = np.cos(np.radians(am)) * np.cos(np.radians(df['as'])) *\
                       np.cos(np.radians(Am - df['As'])) + np.sin(np.radians(am)) * np.sin(np.radians(df['as']))

df.columns
# Direct irradiance
df['Gdirect_Site1'] = df['DNI']*df['cos_AOI']*df['SF_Site1']
df['Gdirect_Site2'] = df['DNI']*df['cos_AOI']*df['SF_Site2']
df['Gdirect_Site3'] = df['DNI']*df['cos_AOI']*df['SF_Site3']
df['Gdirect_Site4'] = df['DNI']*df['cos_AOI']*df['SF_Site4']

# Diffuse irradiance
df['Gdiffuse_Site1'] = SVF[0] * df['DHI']
df['Gdiffuse_Site2'] = SVF[1] * df['DHI']
df['Gdiffuse_Site3'] = SVF[2] * df['DHI']
df['Gdiffuse_Site4'] = SVF[3] * df['DHI']

# Albedo irradiance
df['Galbedo_Site1'] = df['GHI'] * alpha * (1 - SVF[0])
df['Galbedo_Site2'] = df['GHI'] * alpha * (1 - SVF[1])
df['Galbedo_Site3'] = df['GHI'] * alpha * (1 - SVF[2])
df['Galbedo_Site4'] = df['GHI'] * alpha * (1 - SVF[3])

# Total irradiance
df['G_Site1'] = df['Gdirect_Site1'] + df['Gdiffuse_Site1'] + df['Galbedo_Site1']
df['G_Site2'] = df['Gdirect_Site2'] + df['Gdiffuse_Site2'] + df['Galbedo_Site2']
df['G_Site3'] = df['Gdirect_Site3'] + df['Gdiffuse_Site3'] + df['Galbedo_Site3']
df['G_Site4'] = df['Gdirect_Site4'] + df['Gdiffuse_Site4'] + df['Galbedo_Site4']
# Energy calculation
E_site1 = np.sum(df['G_Site1'])
E_site2 = np.sum(df['G_Site2'])
E_site3 = np.sum(df['G_Site3'])
E_site4 = np.sum(df['G_Site4'])
E_site1, E_site2, E_site3, E_site4<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup