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 a Wildfire Atmospheric Vapor Pressure Deficit Modeler

Format
Code-aware
Lines
74
Sections
11
Linked challenge
Build a Wildfire Atmospheric Vapor Pressure Deficit Modeler

Prompt source

Original prompt text with formatting preserved for inspection.

74 lines
11 sections
No variables
1 code block
## Build
Model atmospheric drying extremes using ERA5 surface temperature and dewpoint reanalysis grids. Quantify multi-day vapor pressure deficit anomalies to evaluate parametric wildfire season ignition risk.

## User
Forestry Risk Analyst

## Workflow
1. Extract 2m temperature and 2m dewpoint temperature fields from ERA5 CDS datasets.
2. Compute saturation and actual vapor pressure to derive daily Vapor Pressure Deficit (VPD).
3. Identify prolonged consecutive days exceeding 95th percentile VPD thresholds.
4. Generate a parametric trigger performance report illustrating historical payout distributions.

## Interface
Interactive CLI with ASCII charts and structured JSON outputs detailing VPD anomaly timelines.

## Data
Use cdsapi to retrieve 2m temperature and dewpoint data, or process synthetic multi-day meteorological arrays.
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)
Extracts temperature and dewpoint variables using cdsapi retrieve queries for ERA5 reanalysis single levels.

## Tools
optuna, cdsapi, scipy.
Optuna optimizes trigger thresholds to balance basis risk against historical fire occurrences.
Open-source local LLM or hosted Claude to generate parametric sensitivity summaries.

## 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
- Accurately computes saturation vapor pressure using standard Tetens formula.
- Computes daily maximum vapor pressure deficit (VPD) in kilopascals.
- Identifies periods where continuous extreme drying exceeds defined contract duration.

## Starter Examples
```json
[
  {
    "input": {
      "forest_tract_id": "OR-TIMBER-04",
      "threshold_vpd_kpa": 3,
      "duration_days": 3,
      "vpd_daily_kpa": [
        2.8,
        3.2,
        3.5,
        3.4,
        2.1
      ]
    },
    "expected_output": {
      "forest_tract_id": "OR-TIMBER-04",
      "trigger_met": true,
      "max_consecutive_extreme_days": 3,
      "peak_vpd_kpa": 3.5
    }
  },
  {
    "input": {
      "forest_tract_id": "OR-TIMBER-05",
      "threshold_vpd_kpa": 3.5,
      "duration_days": 3,
      "vpd_daily_kpa": [
        2.8,
        3.2,
        3.4,
        2.1
      ]
    },
    "expected_output": {
      "forest_tract_id": "OR-TIMBER-05",
      "trigger_met": false,
      "max_consecutive_extreme_days": 0,
      "peak_vpd_kpa": 3.4
    }
  }
]
```

## Safety
Outputs represent academic risk models and do not provide real-time forest fire warnings or binding contract payments.
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.