Skip to main content
Back to Prompt Library
implementation

Build the application

Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.

Linked challenge: Build an ERA5 Wildfire Extreme Heat Index Modeler

Format
Code-aware
Lines
71
Sections
11
Linked challenge
Build an ERA5 Wildfire Extreme Heat Index Modeler

Prompt source

Original prompt text with formatting preserved for inspection.

71 lines
11 sections
No variables
1 code block
## Build
Model compound heatwave and dry air anomalies using ERA5 reanalysis pressure level parameters. Detect prolonged wildfire ignition windows and quantify parametric trigger uncertainty for forestry assets.

## User
Forestry Risk Modeler

## Workflow
1. Retrieve ERA5 2-metre temperature and relative humidity grids via cdsapi.
2. Compute cumulative Vapor Pressure Deficit (VPD) across commercial timber stands.
3. Identify high-risk ignition windows exceeding historical 95th percentile anomalies.
4. Simulate parametric trigger sensitivity and calculate trigger uncertainty bands.

## Interface
Thermal anomaly timeline dashboard with threshold trigger sliders and PDF summary export.

## Data
Execute cdsapi python client requests for ERA5 atmospheric variables or load bundled sample NetCDF files in sandbox.
Starter examples below are synthetic. They are not downloaded records.

## Source
[Copernicus Climate Data Store client](https://raw.githubusercontent.com/ecmwf/cdsapi/master/README.rst)
Executes cdsapi.Client retrieve queries for ERA5 variables including temperature and pressure levels.

## Tools
optuna, cdsapi, pandas, scipy.
Optimizes trigger threshold boundaries to balance contract basis risk and false positive trigger occurrences.
Requires standard Python 3.10+ execution environment with optimization packages and API LLM for report generation.

## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.

## Acceptance
- Calculates Vapor Pressure Deficit from ERA5 temperature and dewpoint values.
- Optuna hyperparameter study converges on optimal threshold parameter bounds.
- Yields confidence intervals capturing trigger misclassification uncertainty.

## Starter Examples
```json
[
  {
    "input": {
      "forest_tract_id": "TIMBER-NORTH-04",
      "era5_max_temp_k": 312.4,
      "dewpoint_temp_k": 281.2,
      "consecutive_extreme_days": 9
    },
    "expected_output": {
      "forest_tract_id": "TIMBER-NORTH-04",
      "vpd_kpa": 3.82,
      "ignition_window_risk": "EXTREME",
      "simulated_trigger_fired": true,
      "confidence_interval": [
        0.88,
        0.96
      ]
    }
  },
  {
    "input": {
      "forest_tract_id": "TIMBER-NORTH-05",
      "era5_max_temp_k": 298.1,
      "dewpoint_temp_k": 289.4,
      "consecutive_extreme_days": 1
    },
    "expected_output": {
      "forest_tract_id": "TIMBER-NORTH-05",
      "vpd_kpa": 0.94,
      "ignition_window_risk": "NOMINAL",
      "simulated_trigger_fired": false,
      "confidence_interval": [
        0.02,
        0.08
      ]
    }
  }
]
```

## Safety
Performs retrospective risk modeling only; provides no real-time life safety evacuation orders or underwriting commitments.
Use mock external writes. Require human review before any real deployment.

Adaptation plan

Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.

Keep stable

Hold the task contract and output shape stable so generated implementations remain comparable.

Tune next

Update libraries, interfaces, and environment assumptions to match the stack you actually run.

Verify after

Test failure handling, edge cases, and any code paths that depend on hidden context or secrets.