General engineering
AuraScore 81/100

Solar Inverter Performance Extraction and Normalization Script

Build a high-throughput Python ETL script to parse solar array inverter logs and flag efficiency derates.

Use this prompt to create automated parsing scripts for renewable utility solar farms. It normalizes variable inverter log dumps, calculates weather-adjusted derate factors, and outputs clean tabular data for asset managers.

Template

Role: Principal Renewable Energy Software Engineer specializing in solar utility fleet analytics.

Context

  • Facility Name: {{solar_farm_name}}
  • Firmware Schema: {{inverter_firmware_version}}
  • Ingestion Directory: {{raw_log_storage_path}}
  • Irradiance Noise Threshold: {{irradiance_threshold_w_per_m2}} W/m²
  • Thermal Derating Coefficient: {{derate_factor_coefficient}} %/°C
  • Target Persistence URI: {{output_db_connection}}

Task

Create an automated Python data pipeline script that processes raw inverter log dumps from solar array hardware, adjusts performance calculations for ambient temperature loss, identifies underperforming strings, and populates normalized time-series database tables.

Method

  1. Iterate through {{raw_log_storage_path}} and discover unprocessed log batches matching {{inverter_firmware_version}} formatting.
  2. Discard nighttime records and low-light intervals where solar irradiance drops below {{irradiance_threshold_w_per_m2}}.
  3. Parse AC real power output, DC string voltage, DC current, and cell temperature readings.
  4. Calculate theoretical temperature-compensated power output using {{derate_factor_coefficient}} relative to standard 25°C test conditions.
  5. Compute performance ratio per inverter and flag any string yielding under 85% of theoretical capacity for {{solar_farm_name}}.
  6. Assemble normalized records containing calculated losses and hardware metadata into a structured batch dataframe.
  7. Connect to {{output_db_connection}} and perform idempotent batch upserts with transaction rollback on network failure.

Constraints

  • MUST handle unannounced column ordering variations in {{inverter_firmware_version}} logs without raising unhandled exceptions.
  • MUST NOT process log entries below {{irradiance_threshold_w_per_m2}} to prevent baseline skewing during dawn and dusk.
  • Code must provide robust file locking to prevent duplicate runs across parallel workers.
  • All database queries MUST use parameterized inputs to prevent injection vulnerabilities.

Output format

Provide the deliverable structured as follows:

  1. Pipeline Configuration Schema: Brief summary table of log fields and destination schema.
  2. Inverter ETL Script: Fully written Python script including data parsing, calculations, and database insertion.
  3. Scheduling Spec: Single-line cron schedule definition configured for automated hourly sweeps.

Self-review

  • Check that temperature derate arithmetic correctly uses {{derate_factor_coefficient}} against nominal 25°C baselines.
  • Verify database operations properly reference {{output_db_connection}} with connection pooling.
  • Confirm {{solar_farm_name}} is attached to all generated database audit records.
AuraScore breakdown
81/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering12/12 · Strong

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness3/5 · Adequate

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

developers
developers-general
energy-utilities
solar
renewables
etl