Hello i am new to PVlib,
i a tried to simulate a PV installation but i when i compare my results with this tools using the same Sarah weather data and parameters. I get different AC estimate from pvlib. Can someone help me understand what i am doin wrong.
With the PVlib code i get Ac Yield of 0.422 MWh while the online tools give me 382. MWh
Thanks in advance
here is my code
lat =13.306
long = -2.372#
alti =344# m
tz='Africa/Abidjan'
location = Location(latitude =lat, longitude = long, tz =tz,altitude = alti)
#print(location)
temperature_model_parameters = pvlib.temperature.TEMPERATURE_MODEL_PARAMETERS['sapm']['open_rack_glass_glass']
weather = pvlib.iotools.get_pvgis_tmy(lat, long, map_variables=True, outputformat='json')
module = sandia_modules['Canadian_Solar_CS5P_220M___2009_']
sapm_inverters = pvlib.pvsystem.retrieve_sam('cecinverter')
inverter = sapm_inverters['ABB__MICRO_0_25_I_OUTD_US_208__208V_']
system = PVSystem(surface_tilt = 17, surface_azimuth = 180,
module_parameters = module,inverter_parameters = inverter,
albedo =0.2,
temperature_model_parameters = temperature_model_parameters,
modules_per_string = 1, strings_per_inverter=1)
print(system.pvwatts_losses())
modelchain = ModelChain(system,location)
# Run the model with the weather data
modelchain.run_model(weather_df)
# Extract the AC energy output
ac_energy = modelchain.results.ac.sum()
# Convert to MWh for annual yield
annual_yield_mwh = ac_energy / 10**6 # Convert Wh to MWh
print(f"Annual energy yield: {annual_yield_mwh:.3f} MWh")