Python client library for SunSolve p90 analysis service
Project description
SunSolve P90 Analysis Client
A Python client library for connecting to the SunSolve P90 analysis service via gRPC. This package enables photovoltaic system P90 analysis with comprehensive uncertainty modeling and Monte Carlo simulations.
Features
- Direct gRPC Connection: Secure, efficient communication with SunSolve P90 service
- Uncertainty Analysis: Apply probability distributions to solar resource, system losses, and operational parameters
- Multi-Year Simulations: Support for both Typical Mean Year (TMY) and multi-year actual datasets
- Comprehensive Error Handling: Custom exception classes for different error scenarios
- Type Safety: Full type annotations for better development experience
- Weather Data Support: Load data from PVW files and CSV formats
Quick Start
Installation
pip install sunsolve-p90-client
Prerequisites
- Python 3.12+
- SunSolve account with P90 Analysis subscription (sign up here)
- Network access to SunSolve servers
Basic Usage
from pvl_p90_client.client.p90_client import P90Client
from pvl_p90_client.grpcclient.uncertaintyMessages_pb2 import DistributionInput
from pvl_p90_client.helpers import pvl_login
from pvl_p90_client.helpers.request_helpers import (
build_distribution,
build_gaussian_distribution,
build_request,
load_weather_data_from_pvw_file,
)
# Connect to the P90 analysis service
with P90Client() as client:
# Authenticate with your SunSolve credentials (prompts for username/password)
credentials = pvl_login.login()
# Load weather data from a PVW file (Typical Mean Year format)
weather_data = load_weather_data_from_pvw_file("../data/sydney.pvw") or []
# Add uncertainty distribution for Global Horizontal Irradiance (GHI)
# This adds ±5% variation to solar irradiance values
distributions = [
build_distribution(
input=DistributionInput.GHI,
sim_to_sim_distribution=build_gaussian_distribution(1.0, 0.05)
)
]
# Create a minimal request with weather data and basic uncertainty
# This uses default system parameters and simulation settings
request = build_request(time_step_data=weather_data, distributions=distributions)
# Send the analysis request and receive results
summary, used_inputs = client.send_request(request, credentials, timeout=90.0)
# Display results
if summary:
print(f"Analysis complete! Generated {len(summary.YearlyPValue)} yearly P-values")
for pvalue in summary.YearlyPValue: # Show all years
print(f" Year {pvalue.Year}: P{pvalue.P} = {pvalue.P50Deviation:.4f}")
else:
print("No analysis results received")
What This Package Does
The SunSolve P90 Analysis Client enables you to:
- Run Monte Carlo Simulations: Calculate P-values (probability of exceedance) for photovoltaic energy production
- Apply Uncertainty Distributions: Model variability in solar resource, system performance, and operational factors
- Process Weather Data: Import and analyze weather datasets in multiple formats
- Get Probabilistic Results: Receive P5, P10, P50, P90, P95 confidence intervals for energy production
Uncertainty Modeling
Apply probability distributions to key parameters:
- Solar Resource: GHI, temperature, wind speed variations
- System Performance: Module mismatch, inverter efficiency, soiling losses
- Operational Factors: Degradation rates, availability, curtailment
Results
Get comprehensive probabilistic analysis including:
- P-Values: Probability of exceedance levels (P5, P10, P50, P90, P95)
- Yearly Projections: Multi-year degradation modeling
- Monte Carlo Statistics: Distribution analysis across thousands of simulations
Support & Documentation
- Documentation: docs.sunsolve.com/en/p90/
- Getting Started: P90 Analysis Guide
- Contact: sunsolve.info/contact/
Note: This package requires a SunSolve account with P90 Analysis subscription. Visit sunsolve.info to get started.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sunsolve_p90_client-0.2.0.224.tar.gz.
File metadata
- Download URL: sunsolve_p90_client-0.2.0.224.tar.gz
- Upload date:
- Size: 30.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91da48ea4647dd742a87bc1b143a8a8a758b4758ed6bc7298d03b8d00d1f30a7
|
|
| MD5 |
9477402a4ad359363d02f77a23cc8be6
|
|
| BLAKE2b-256 |
14622f5161b02d149e2a7a264de1b69861f0483c484c0ae164946b6cad3901eb
|
File details
Details for the file sunsolve_p90_client-0.2.0.224-py3-none-any.whl.
File metadata
- Download URL: sunsolve_p90_client-0.2.0.224-py3-none-any.whl
- Upload date:
- Size: 34.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f03d747b2723f197152682c302149be2c7af5e7c97c25be07a4435ed9e46e0a
|
|
| MD5 |
c44b83fe4e262a51b744f05350541ae7
|
|
| BLAKE2b-256 |
5be088c4a213d030ac1061fc649a16ac76980b2325da0e615c90312773cb528b
|