Welcome to the Solar Forecasting project! This document will introduce you to the key concepts and knowledge needed to contribute effectively.
- Introduction to Solar Forecasting
- Coding Style
- What is NWP Data?
- Understanding Zarr Format
- Target Data: What is UK PVlive?
- Basics of Machine Learning for Solar Forecasting
- Datasets for Solar Forecasting
- APIs and Data Retrieval
- Data Pipelines for Solar Forecasting
- Benchmarks and Comparisons
- Geographical Adaptability
- Key Tools and Technologies
- Common Terminology
- Helpful Knowledge and Skills
- How This Project Fits into Renewable Energy
- Development and Testing Guide
Solar forecasting is the process of predicting the amount of solar energy that will be generated over a specific period. Understanding this helps optimize renewable energy systems and integrate them with the grid.
To ensure code quality and maintain consistency, we follow the Open Climate Fix (OCF) Coding Style. All contributors are expected to adhere to these standards.
- Formatting: Use
black
with a line length of 100 characters. - Linting: Run
ruff
to catch and fix style violations. - Docstrings: Write Google-style docstrings for all functions, classes, and modules.
- Pre-commit Hooks: Install pre-commit hooks to automatically format and lint your code before commits.
Refer to the full OCF Coding Style Guide for detailed instructions.
Numerical Weather Prediction (NWP) data uses mathematical models of the atmosphere and oceans to forecast weather. It predicts various atmospheric conditions such as temperature, pressure, wind speed, humidity, precipitation type and amount, cloud cover, and sometimes even surface conditions and air quality—all of which are crucial for solar forecasting.
https://en.wikipedia.org/wiki/Numerical_weather_prediction
zarr is a relatively new, cloud-based data format designed to improve access to N-dimensional arrays. It provides an effective way to store large N-dimensional data in the cloud, with access facilitated through predefined chunks. Zarr can be viewed as the cloud-based counterpart to HDF5/NetCDF files, as it follows a similar data model. However, unlike NetCDF or HDF5, which store data in a single file, Zarr organizes data as a directory containing compressed binary files for chunks of data, alongside metadata stored in external JSON files.
The semantic mapping from the NetCDF Data Model to the Zarr Data Model is as follows:
NetCDF Data Model | Zarr V2 Data Model |
---|---|
File | Store |
Group | Group |
Variable | Array |
Attribute | User Attribute |
Dimension | Not supported as a native feature |
A Zarr array can be stored in any storage system that supports a key/value interface. In this system:
A key is an ASCII string. A value is an arbitrary sequence of bytes. Supported operations include: Read: Retrieve the sequence of bytes associated with a key. Write: Set the sequence of bytes associated with a key. Delete: Remove a key/value pair. Currently, Zarr V2 is the stable version, while Zarr V3 is considered experimental. https://wiki.earthdata.nasa.gov/display/ESO/Zarr+Format
UK PVlive provides national solar generation data, accessible via API, and is maintained by the University of Sheffield. This dataset serves as a reliable "ground truth" for training and evaluating solar forecasting models.
- National Solar Generation Data: Offers estimates of real-time solar photovoltaic (PV) generation across the UK.
- Granularity: Provides data at both national and regional levels, allowing for detailed analysis.
- Frequency: Updated every 30 minutes, ensuring near real-time data availability for forecasting and validation.
- Capacity Data: Includes information on installed PV capacity, which is crucial for normalizing generation data.
- Historical Data: Offers access to historical records for long-term analysis and model training.
- API Access: Enables automated data retrieval, simplifying integration with machine learning pipelines.
- Ground Truth for Model Training: Serves as a reliable dataset to validate solar forecasting models.
- Capacity Trend Analysis: Tracks changes in installed PV capacity over time to analyze the growth of solar energy adoption.
- Benchmarking: Provides a baseline for comparing forecasting models against observed solar generation.
UK PVlive is a critical resource for solar forecasting because it combines high-quality, timely data with extensive historical records. Its regional and national-level granularity enables robust analysis and supports model generalization.
For more information, visit the PVlive website or explore their API documentation for data access.
This project applies core machine learning (ML) principles to the domain of solar forecasting. Below is an overview of the essential concepts, tailored to this project:
- Data Preparation: Preparing datasets by splitting them into training, validation, and testing sets is fundamental. Refer to the Data Pipelines for Solar Forecasting section for details on batch creation and pipeline design.
- Feature Engineering: Identifying and transforming input variables (e.g., solar irradiance, temperature, and cloud cover) into meaningful features for the ML model. See Common Terminology for definitions of relevant features.
- Model Selection: Choosing models like Convolutional Neural Networks (CNNs) for spatial data or transformers for advanced pattern recognition. Refer to Machine Learning Terms for details on architectures.
- Evaluation: Using metrics such as MAE, RMSE, and R² to assess model performance. See Machine Learning Terms for metric descriptions.
- Optimization: Applying techniques like gradient descent and regularization to improve model performance. Refer to Optimization and Cost Functions for more information.
For contributors unfamiliar with these concepts, the Machine Learning Terms section provides a glossary of key terms to get started.
Datasets form the backbone of solar forecasting by providing the historical and real-time data required for model training and evaluation. This project leverages a variety of datasets, including weather, solar generation, and climate data.
For a detailed list of datasets and their descriptions, please refer to the Datasets Guide.
APIs play a crucial role in fetching real-time and historical data required for solar forecasting. This section outlines key concepts and resources for retrieving data such as solar generation, capacity, and weather information.
-
PVlive API Target Data: What is UK PVlive?
-
Weather APIs Accessing weather data is critical for creating feature-rich datasets. Commonly used APIs include:
- Met Office DataPoint: Provides UK-specific weather data, including forecasts, observations, and warnings. Data is available in JSON or XML formats for easy integration. Learn more.
- Copernicus Atmosphere Monitoring Service (CAMS): Offers aerosol, cloud, and solar radiation data, with high-resolution forecasts and reanalysis datasets. Learn more.
- European Centre for Medium-Range Weather Forecasts (ECMWF): Provides global atmospheric data and reanalysis datasets, including ERA5, for solar radiation and historical weather data. Learn more.
- OpenWeatherMap: Offers current and historical weather data, including temperature, cloud cover, and wind speed, with global coverage. Learn more.
- Meteomatics API: Provides high-resolution gridded weather data, including solar radiation, temperature, and wind speed, suitable for UK and European applications. Learn more.
-
Satellite Data APIs Satellite imagery and radiance data are invaluable for analyzing cloud cover and solar irradiance:
- Copernicus Atmosphere Monitoring Service (CAMS): Provides satellite-based aerosol, cloud, and solar radiation data. Learn more.
- NASA’s POWER API: Offers meteorological and solar datasets tailored for renewable energy applications, including European regions. Learn more.
- EUMETSAT: Europe’s satellite-based service providing weather and climate data, including cloud cover and solar radiation products. Learn more.
- API Keys: Most APIs require authentication via an API key. Store keys securely using environment variables or secret management tools.
- Rate Limits: Adhere to API usage policies to avoid exceeding request limits. Use caching to minimize repeated calls for the same data.
- Batching Requests: For large datasets, make batched requests to ensure efficient retrieval within rate limits.
- Data Normalization: Standardize data from multiple sources to ensure consistency in units (e.g., W/m² for solar irradiance).
- Set Up API Clients: Use Python libraries like
requests
,httpx
, or specific SDKs provided by the API services. - Query Data: Fetch solar and weather data using appropriate endpoints.
- Save Locally: Store retrieved data in formats like CSV, JSON, or cloud-based storage like Zarr.
- Integrate with Pipelines: Use the retrieved data to create features or targets for machine learning models.
- Python Libraries:
requests
orhttpx
for making HTTP requests.pandas
for data manipulation and storage.
- API Testing Tools:
- Postman or cURL for testing API endpoints before integration.
By effectively leveraging APIs like PVlive and weather services, contributors can build robust datasets for solar forecasting and improve model accuracy.
Explore how pipelines prepare and batch data for machine learning models, making training and testing efficient.
Understand the importance of benchmarking and how our models compare to existing solutions.
This project won't be limited to the UK eventually. Learn how it can be adapted to other regions and data sources.
Familiarize yourself with tools like Python, pandas, and open-source libraries like ocf-datasample
.
Below is a glossary of key terms that might be useful when working on this project:
- Solar Irradiance: The power per unit area received from the Sun in the form of electromagnetic radiation, measured in watts per square meter (W/m²).
- Photovoltaic (PV): A method of generating electricity by converting sunlight directly into electricity using solar panels.
- Solar Panel Efficiency: The ratio of the electrical output of a solar panel to the incident sunlight energy, expressed as a percentage.
- Capacity Factor: The ratio of actual energy produced by a solar PV system to the maximum possible energy it could produce over a given period.
- Global Horizontal Irradiance (GHI): Total solar radiation received on a horizontal surface.
- Global Tilted Irradiance (GTI): The total solar irradiance received on a tilted surface, accounting for direct, diffuse, and reflected components. It is essential for designing and evaluating the performance of tilted photovoltaic systems.
- Direct Normal Irradiance (DNI): Solar radiation received directly from the Sun at a perpendicular angle.
- Diffuse radiation: Refers to solar radiation that reaches the Earth's surface after being scattered by molecules, aerosols, or clouds in the atmosphere.
- Diffuse Horizontal Irradiance (DHI): Solar radiation received indirectly due to scattering in the atmosphere.
- Solar Zenith Angle: The angle between the Sun and a line perpendicular to the Earth's surface; influences solar irradiance.
- Numerical Weather Prediction (NWP): The use of mathematical models to simulate atmospheric processes and predict future weather conditions.
- Gridded Data: Data arranged in a regular, grid-like structure, where each cell or grid point represents a specific geographical area and contains corresponding data values (e.g., temperature, solar irradiance, or wind speed).
- Global Forecast System (GFS): A global NWP model produced by the National Weather Service that provides weather forecasts up to 16 days in advance.
- European Centre for Medium-Range Weather Forecasts (ECMWF): An independent intergovernmental organization that produces highly accurate medium-range weather forecasts.
- Model Resolution: The spatial and temporal granularity of an NWP model, usually measured in kilometers or degrees.
- Initialization: The process of incorporating current observational data into a model to start a forecast.
- Boundary Conditions: Data input to a weather model defining conditions at the edges of the modeled area.
- ERA5: A global reanalysis dataset produced by ECMWF, providing hourly data on weather, atmospheric conditions, and other variables. It is widely used in climate research and weather model training due to its high spatial and temporal resolution.
- UFS Replay: Historical weather data reanalyzed with the Unified Forecast System (UFS), often used to train or test weather forecasting models.
- ECMWF IFS (Integrated Forecast System): A live numerical weather prediction model from ECMWF, delivering global forecasts for various atmospheric variables.
- ARCO-ERA5: A variant of ERA5 dataset tailored for specific applications, often preprocessed to streamline analysis.
- OCF DWD Archive: Historical weather data from the German Weather Service (DWD), curated by Open Climate Fix for renewable energy and forecasting applications.
- Geostationary: A satellite orbit where the satellite remains fixed relative to a specific point on Earth’s surface, providing continuous observation of the same region. Commonly used in weather monitoring and solar radiation measurement.
- Geospatial Data: Information about objects, events, or phenomena on Earth's surface, represented by geographic coordinates and often used in mapping and analysis.
- Latitude: The angular distance of a location north or south of the equator, measured in degrees. Important for determining solar angles and irradiance.
- Longitude: The angular distance of a location east or west of the prime meridian, measured in degrees. Used in conjunction with latitude to pinpoint geographic locations.
- Spatial Resolution: The level of detail in a geospatial dataset, often defined by the size of the grid cells or pixels representing the data. Higher resolution provides more detail but requires more storage and processing power.
- Temporal Resolution: The frequency at which data is collected or updated over time, important for capturing changes in weather or solar irradiance.
- Digital Elevation Model (DEM): A 3D representation of Earth's surface, showing elevation data. DEMs are used in solar modeling to account for shading and terrain effects.
- Remote Sensing: The acquisition of information about Earth's surface using satellites or aircraft. Remote sensing is critical for gathering data on cloud cover, aerosols, and solar radiation.
- Coordinate Reference System (CRS): A system used to define how geographic data is projected onto a flat surface, ensuring spatial data is accurately mapped and analyzed.
- Raster Data: A type of geospatial data stored in a grid format, where each cell contains a value representing a specific property (e.g., temperature, irradiance, or elevation).
- Vector Data: A type of geospatial data that represents geographic features using points, lines, and polygons, often used for mapping boundaries, roads, and other discrete features.
- Topographic Shading: The effect of terrain features (e.g., mountains, hills) on sunlight exposure, influencing solar irradiance calculations.
- GeoJSON: A format for encoding geographic data structures in JSON, often used for sharing and visualizing geospatial data on the web.
- GIS (Geographic Information System): A system designed to capture, store, manipulate, analyze, and visualize spatial or geographic data, widely used in solar and weather forecasting.
- Great Circle Distance: The shortest distance between two points on a sphere, useful for calculating distances between locations on Earth.
- Solar Declination Angle: The angle between the Sun's rays and the equatorial plane, varying throughout the year and influencing solar irradiance calculations.
- Albedo: The reflectivity of a surface, important for understanding how much sunlight is absorbed or reflected by the Earth. Surfaces with high albedo, such as snow and ice, reflect more sunlight, while darker surfaces absorb more.
- Aerosols: Tiny particles or liquid droplets suspended in the atmosphere that affect solar radiation by scattering or absorbing sunlight. They play a significant role in cloud formation and can influence local and global temperatures.
- Greenhouse Gases: Atmospheric gases, such as carbon dioxide (CO₂), methane (CH₄), and water vapor (H₂O), that trap heat in the Earth's atmosphere and contribute to global warming.
- Atmospheric Pressure: The force exerted by the weight of the atmosphere above a given point, measured in hectopascals (hPa) or millibars (mb). It affects weather patterns and the movement of air masses.
- Relative Humidity: The amount of water vapor in the air compared to the maximum amount the air can hold at a given temperature, expressed as a percentage. It influences cloud formation and precipitation.
- Dew Point: The temperature at which air becomes saturated with moisture and water vapor condenses into dew, clouds, or fog.
- Radiative Forcing: The change in the energy balance of the Earth’s atmosphere due to factors like greenhouse gases, aerosols, and changes in solar irradiance. It is a key concept in climate change studies.
- Turbidity: A measure of the atmosphere's clarity, influenced by aerosols, dust, and pollution. High turbidity reduces the amount of solar radiation reaching the Earth's surface.
- Ozone Layer: A layer of ozone (O₃) in the stratosphere that absorbs the majority of the Sun’s harmful ultraviolet radiation. Changes in the ozone layer can impact solar irradiance measurements.
- Wind Shear: A change in wind speed or direction over a short distance in the atmosphere. It can influence cloud formation, storm development, and the dispersal of aerosols.
- Thermal Inversion: A phenomenon where a layer of warm air traps cooler air near the Earth's surface, preventing vertical mixing. It can lead to increased pollution and reduced solar irradiance at the surface.
- Cloud Cover: The fraction of the sky obscured by clouds, typically expressed as a percentage.
- Spatial Homogeneity in cloud classification refers to the uniformity or consistency in the structure and appearance of clouds over a given spatial area. When clouds exhibit spatial homogeneity, they appear relatively uniform in terms of their texture, brightness, and structure across the entire observed area.
- The World Meteorological Organization (WMO) classifies clouds into the following types based on their appearance and altitude. These are grouped into three main altitude categories: high, middle, and low clouds.
- Cirrus (Ci): Wispy, hair-like clouds composed of ice crystals, often indicating fair weather.
- Cirrostratus (Cs): Thin, veil-like clouds covering the sky, often producing a halo around the Sun or Moon.
- Cirrocumulus (Cc): Small, white, patchy clouds without shading, often arranged in rows or ripples.
- Altostratus (As): Gray or blue-gray clouds covering the sky, usually associated with continuous rain or snow.
- Altocumulus (Ac): White or gray clouds in patches or layers, often with shading, signaling changing weather.
- Stratus (St): Uniform gray clouds covering the entire sky, often producing drizzle or mist.
- Stratocumulus (Sc): Low, lumpy clouds, typically covering most of the sky with breaks of blue.
- Nimbostratus (Ns): Thick, dark clouds producing steady precipitation and obscuring the Sun.
- Cumulus (Cu): Fluffy, white clouds with a flat base, often indicating fair weather when small.
- Cumulonimbus (Cb): Towering thunderstorm clouds with an anvil-shaped top, capable of producing heavy rain, lightning, and severe weather.
- Contrails (Ct): Man-made clouds formed by aircraft exhaust.
- Pyrocumulus: Clouds formed by intense heat, such as from wildfires or volcanic eruptions.
For more details, refer to the WMO Cloud Identification Guide.
-
Ground Truth: Data collected on-site (e.g., solar generation data from PV systems) used to validate predictions.
-
Weather Station: A facility with instruments and equipment to measure atmospheric conditions such as temperature, humidity, and wind speed.
-
Time Series Data: Data points collected or recorded at time-ordered intervals, often used in forecasting.
-
Reanalysis Data: A blend of observational data and model output to create a consistent historical record of atmospheric variables. Examples include ERA5 and UFS Replay datasets.
-
Gridded Data: Data represented in a regular grid structure, where each cell corresponds to a specific geographic area. Common in weather and climate datasets for efficient analysis.
-
NetCDF (Network Common Data Form): A self-describing, machine-independent data format designed for storing and sharing array-oriented scientific data. Commonly used in meteorology, oceanography, and other geosciences, NetCDF supports large datasets and includes metadata for describing the data's structure and meaning.
-
HDF5 (Hierarchical Data Format version 5): A versatile data model that supports the storage of large, complex datasets in a hierarchical structure. HDF5 is widely used for scientific computing, offering high performance, scalability, and the ability to handle large amounts of data efficiently.
-
GRIB (GRIdded Binary): A concise data format commonly used in meteorology to store historical and forecast weather data. GRIB files are optimized for large datasets, representing grid-based information such as temperature, wind speed, and precipitation. They are often used by Numerical Weather Prediction (NWP) models and are known for their efficient storage and compression.
-
Power Units:
- Watt (W): The basic unit of power in the International System of Units (SI), representing one joule per second.
- Kilowatt (kW): Equal to 1,000 watts, commonly used to measure the capacity of small solar systems.
- Megawatt (MW): Equal to 1,000 kilowatts or one million watts, used for larger solar farms and power plants.
- Gigawatt (GW): Equal to 1,000 megawatts or one billion watts, used to represent national or regional energy capacities.
- Terawatt (TW): Equal to 1,000 gigawatts or one trillion watts, often used for global energy capacity.
- Petawatt (PW): Equal to 1,000 terawatts or one quadrillion watts, applicable for global-scale discussions.
-
Energy vs. Power:
- Power: The rate at which energy is produced or consumed, typically measured in watts (W).
- Energy: The total amount of work performed over time, measured in watt-hours (Wh), kilowatt-hours (kWh), etc.
-
Capacity Factor: The ratio of actual energy produced by a system to the maximum possible energy it could produce over a given period.
-
Irradiance vs. Insolation:
- Irradiance: The power of solar radiation received per unit area (W/m²).
- Insolation: The total energy received over a given time, typically measured in kilowatt-hours per square meter (kWh/m²).
-
PV Capacity: The maximum amount of power that a photovoltaic system can generate under ideal conditions, often measured in megawatts (MW).
- Grid Supply Point (GSP): A location where electricity is transferred from the transmission network to the distribution network, serving as a critical node in the power grid.
- Peak Load: The maximum power demand in a given period, often used to assess system capacity and ensure reliability during high-demand times.
- Base Load: The minimum level of demand on an electrical grid over a 24-hour period. It is typically supplied by reliable, continuous sources like nuclear or coal-fired power plants.
- Load Factor: The ratio of the average load over a given period to the peak load during that same period, indicating the efficiency of grid usage.
- Frequency Regulation: The process of maintaining the grid's operating frequency (e.g., 50 Hz in Europe or 60 Hz in the US) within acceptable limits to ensure stable power delivery.
- Distributed Energy Resources (DERs): Small-scale power generation or storage units, such as rooftop solar panels and batteries, connected to the distribution network.
- Interconnection: The linkage of two or more electricity systems to enable power exchange and enhance reliability.
- Curtailment: The reduction of power output from renewable energy sources (e.g., solar or wind) due to oversupply or grid limitations.
- Net Metering: A billing mechanism that allows consumers who generate their own electricity (e.g., via rooftop solar panels) to send excess power back to the grid in exchange for credits on their electricity bill.
- Smart Grid: An advanced electricity network that uses digital technology to monitor and manage the flow of electricity, improving efficiency and reliability.
- Reactive Power: Power that oscillates between the source and the load, necessary for maintaining voltage levels in the grid.
- Transformer: A device used in the grid to step up or step down voltage levels for efficient power transmission and distribution.
- Grid Resilience: The ability of the power grid to recover quickly from disruptions, such as natural disasters or cyberattacks.
- Voltage Drop: A reduction in voltage as electricity travels through transmission and distribution lines, influenced by the resistance of the lines and the distance from the source.
- Power Factor: A measure of how effectively electrical power is converted into useful work output. A power factor of 1 indicates maximum efficiency.
- Black Start: The process of restoring the grid after a complete shutdown, using backup power sources to start key components.
- Feature Engineering: The process of selecting, modifying, and transforming raw data into features suitable for machine learning models.
- Train-Test Split: Dividing data into training and testing subsets to evaluate model performance.
- Validation: Using a subset of data to tune model hyperparameters and prevent overfitting.
- Cross-Validation: A technique for assessing model performance by splitting data into multiple training and testing subsets.
- Mean Absolute Error (MAE): A common metric for evaluating forecasting accuracy by measuring the average magnitude of errors. Lower values indicate better model performance.
- Root Mean Square Error (RMSE): Measures the standard deviation of prediction errors, giving higher weight to large errors. Lower RMSE values indicate better performance.
- R² Score (Coefficient of Determination): Indicates how well the model predictions approximate the real data. An R² of 1 means perfect prediction; values closer to 0 indicate weaker predictive performance.
- Mean Bias Error (MBE): Measures the average bias in model predictions, indicating whether predictions are systematically overestimating or underestimating.
- Precision: In classification tasks, the ratio of true positive predictions to the total predicted positives. Indicates the accuracy of positive predictions.
- Recall (Sensitivity): The ratio of true positives to the actual positives in the dataset. Measures the ability to capture all relevant instances.
- F1 Score: The harmonic mean of precision and recall, providing a balanced metric for evaluating model performance in classification.
- Cost Function: A function that measures the difference between the predicted and actual values, guiding the optimization process. Examples include:
- Mean Squared Error (MSE): Commonly used in regression tasks.
- Cross-Entropy Loss: Frequently used in classification tasks.
- Gradient Descent: An optimization algorithm used to minimize the cost function by iteratively adjusting the model parameters in the direction of the steepest descent.
- Learning Rate: A hyperparameter that determines the step size during gradient descent. A smaller rate ensures convergence but may slow down training.
- Stochastic Gradient Descent (SGD): A variation of gradient descent where a single data point or a small batch is used to compute gradients, making the optimization process faster.
- Adam Optimizer: An advanced optimization algorithm combining the benefits of momentum and adaptive learning rates for efficient gradient descent.
- Regularization: Techniques to prevent overfitting by adding a penalty to the cost function. Examples:
- L1 Regularization (Lasso): Encourages sparsity in the model by shrinking less important coefficients to zero.
- L2 Regularization (Ridge): Penalizes large coefficients to make the model more generalizable.
- Masking: A technique used to ignore certain parts of input data during model training or inference. For example, in transformers, masking ensures that certain tokens or parts of the input sequence are not considered.
- Overfitting: A situation where the model performs well on the training data but fails to generalize to unseen data due to excessive complexity.
- Underfitting: Occurs when a model is too simple to capture the underlying patterns in the data, resulting in poor performance on both training and testing datasets.
- Early Stopping: A technique to prevent overfitting by halting training when the model's performance on the validation set stops improving.
- Batch Size: The number of samples processed before the model updates its parameters during training.
- Convolutional Neural Network (CNN): A type of neural network designed to process data with a grid-like structure, such as images. CNNs are particularly useful for image classification, segmentation, and pattern detection.
- Transformer: A deep learning architecture that relies on self-attention mechanisms, widely used in natural language processing and increasingly in computer vision tasks.
- Supervised Learning: A machine learning paradigm where the model learns from labeled data, meaning each input has a corresponding output.
- Self-Supervised Learning: A learning paradigm where the model generates labels or tasks from the data itself, enabling training without explicit human-labeled data.
- Reinforcement Learning (RL): A learning paradigm where an agent learns to make decisions by interacting with an environment and receiving rewards or penalties based on its actions.
- Confusion Matrix: A table used in classification tasks to visualize the performance of a model by showing true positives, true negatives, false positives, and false negatives.
- Loss Curve: A plot showing the value of the cost function during training to monitor convergence and detect overfitting.
- Learning Curve: A plot showing model performance (e.g., accuracy, loss) against training progress, often used to assess whether a model is underfitting or overfitting.
- Grid Search: An exhaustive search over a manually specified set of hyperparameter values to find the optimal configuration.
- Random Search: A more efficient method that randomly samples hyperparameter values to find good configurations.
- Bayesian Optimization: A probabilistic approach to hyperparameter tuning that models the relationship between hyperparameters and model performance to find optimal settings.
- Black: A Python code formatter used for maintaining consistent code style.
- Ruff: A fast Python linter that helps enforce coding standards.
- Pre-commit Hooks: Tools that automatically check or modify code before it is committed to a repository.
Contributing to this project doesn’t require expertise in all areas 😅. We need volunteers with skills or interest in some of the following domains to help us build different parts of the project. Plus, there’s plenty of opportunity to learn as you go!
- Python Programming: Familiarity with Python for data analysis, API's, and machine learning workflows.
- Version Control: Experience with Git and GitHub for collaboration and maintaining code quality.
- Data Formats: Understanding of data formats like Zarr, JSON, and CSV, and how to interact with them programmatically.
- Data Acquisition: Experience in retrieving large-scale datasets from APIs, cloud storage, or public repositories.
- Data Pipelines: Building and maintaining pipelines for data transformation, cleaning, and preparation.
- Cloud Storage: Expertise in managing data in cloud-optimized formats like Zarr, NetCDF, or HDF5.
- Database Management: Familiarity with databases for large-scale data, such as PostgreSQL, and working with vector databases for embeddings.
- Performance Optimization: Skills in improving data retrieval and processing speed, especially with gridded or geospatial data.
- Data Manipulation: Proficiency with libraries like
pandas
,numpy
, orxarray
for transforming and analyzing datasets. - Data Visualization: Ability to use tools like
matplotlib
orseaborn
to interpret and present data insights. - Numerical Weather Prediction (NWP) Data: Familiarity with gridded datasets and their use in weather and solar forecasting.
- Model Training: Understanding the basics of training machine learning models, including feature engineering, train-test splitting, and evaluation.
- Evaluation Metrics: Knowledge of metrics like MAE, RMSE, and R² for assessing model performance.
- Neural Network Architectures: Familiarity with models like CNNs and transformers, or a willingness to learn.
- Weather Forecasting: Understanding of Numerical Weather Prediction (NWP) models, weather patterns, and atmospheric science.
- Solar Energy: Knowledge of solar irradiance, photovoltaic systems, and energy metrics like capacity factor or GHI/DNI.
- Climate Science: Familiarity with climate datasets, terms like albedo and aerosols, and their implications for solar energy forecasting.
- Geospatial Analysis: Proficiency in working with geospatial data, coordinate systems, and tools like GIS.
- API's: Experience working with APIs to retrieve data (e.g., PVlive, OpenWeatherMap, CAMS).
- Cloud Storage: Basic understanding of cloud-optimized formats like Zarr for managing large datasets.
- Geospatial Data: Understanding of concepts like gridded data, coordinate reference systems (CRS), and GIS tools.
- Climate and Atmospheric Science: Knowledge of terms like albedo, aerosols, and solar irradiance, or a willingness to learn their significance.
- Open Source Development: Willingness to collaborate in an open-source environment, including code reviews and documentation updates.
- Documentation: Ability to write clear and concise documentation for code and processes to support other contributors.
This project values both existing expertise and a learner's mindset. Contributors who are eager to learn and apply new skills are highly encouraged to join!
The transition to renewable energy is one of the most significant challenges—and opportunities—of our time. Solar energy is at the forefront of this movement, offering a clean, abundant, and sustainable alternative to fossil fuels. This project aims to accelerate that transition by improving the accuracy and accessibility of solar forecasting, empowering communities, businesses, and governments to make smarter energy decisions.
- Enhancing Grid Reliability: Accurate solar forecasting helps balance energy supply and demand, reducing reliance on fossil fuel backups and preventing grid instability.
- Maximizing Solar Potential: By predicting solar generation more effectively, we can make better use of installed solar capacity and encourage further adoption of solar technology.
- Empowering Decision-Making: Solar forecasts provide critical insights for energy planners, operators, and consumers, enabling smarter choices in energy storage, distribution, and usage.
- Global Impact: As we expand this project to other regions, we contribute to a worldwide effort to reduce carbon emissions and solve climate change.
This project isn’t just about technology—it’s about building a community of innovators, engineers, and visionaries who share a passion for sustainability. Together, we can:
- Support the global transition to clean energy!
- Create open-source tools that benefit everyone, from local communities to international organizations!
- Inspire others to join the renewable energy movement!
By contributing to this project, you’re not just writing code or analyzing data—you’re making a meaningful impact on the planet and helping pave the way to a sustainable future for many generations to come. 🌍✨
This guide outlines how to maintain code quality and test functionality using ruff
, black
, and pytest
.
To ensure consistent coding style and catch common issues, use the following tools:
-
Ruff: A fast Python linter.
- Run Ruff to check for linting errors:
ruff check .
- Automatically fix errors where possible:
ruff check . --fix
- Run Ruff to check for linting errors:
-
Black: A Python code formatter.
- Format your code with Black:
black .
- Format your code with Black:
Use pytest
to ensure the project works as expected:
- Run all tests:
pytest
Thank you for joining us on this journey to advance solar forecasting and renewable energy solutions!