Latest update: Solcast data access simplified with pvlib

22 December 2023

New pvlib version for a more seamless Solcast data integration

Solcast is powering more than 200GW of solar assets worldwide. As the utilization of solar data grows increasingly diverse and innovative, our team is dedicated to delivering this data more seamlessly and effortlessly.

In their latest update, pvlib has released pvlib.iotools.solcast, a tool designed to fetch Solcast's comprehensive weather data directly within the pvlib ecosystem.

For those already using pvlib for advanced PV power modelling, pvlib users engaged in advanced PV power modeling, this integration means a more efficient workflow, enhanced by Solcast's precise weather data—a resource that our team and customers use daily.

To request Solcast data, you can sign up for a commercial toolkit or request a quote through our pricing page to set up an extended evaluation.

Get started faster

Install it in your python environment with:

pip install -U pvlib>=0.10.3

How it works

Here's an example usage:

  • Fetch Solcast Weather and irradiance data:
from pvlib.iotools import solcast
solcast_weather, metadata = solcast.get_solcast_historic(
    latitude=51.178882, longitude=-1.826215,  # unmetered location "Stonehenge"
    start="2023-06-18 00:00", end="2023-06-20 00:00",
    output_parameters=["ghi", "dni", "dhi", "air_temp"],
    period="PT5M",
    terrain_shading=True,
    api_key=TOP_SECRET_API_KEY_I_AM_NOT_LEAKING,
)
solcast_weather.plot(title="Solcast Irradiance and Weather Data via pvlib")

solcast_weather_data.png

  • Run through pvlib Modelchain:
import pvlib
from pvlib.pvsystem import PVSystem
from pvlib.location import Location
from pvlib.modelchain import ModelChain

location = Location(latitude=51.178882, longitude=-1.826215)

system = PVSystem(
    surface_tilt=45, surface_azimuth=140,
    module_parameters={'pdc0': 100, 'gamma_pdc': -0.004},
    inverter_parameters={'pdc0': 80},
    temperature_model_parameters={'a': -3.47, 'b': -0.0594, 'deltaT': 3},
)

model_chain = ModelChain(system, location, aoi_model='physical', spectral_model='no_loss')
model_chain.run_model(solcast_weather)
model_chain.results.ac.plot(title="pvlib PV Power from Solcast Data", ylabel="MW")

pvlib_power.png

Available data through pvlib.iotools.solcast:

Harry Woods

Harry Woods

Author

Harry is our Head of Marketing, and works with our customers and industry partners to discover and share the new and innovative applications of Solcast data that are being built every day inside the Solar Industry. He holds a Bachelor of Laws and Bachelor of Arts and has experience in Go-To-Market working with complex enterprise grade technology solutions ranging from Ethical AI to Telecommunications.