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 Coastal Surge Wind Exposure Reconciler

Format
Code-aware
Lines
90
Sections
11
Linked challenge
Build an ERA5 Coastal Surge Wind Exposure Reconciler

Prompt source

Original prompt text with formatting preserved for inspection.

90 lines
11 sections
No variables
1 code block
## Build
Simulate coastal wind hazards by retrieving 10-meter wind vectors from ECMWF ERA5 reanalysis grids. Quantify structural drag exceedance to evaluate parametric contract triggers for maritime terminal infrastructure.

## User
Parametric Risk Analyst

## Workflow
1. Define CDS API retrieval payloads for ERA5 10m wind gust components over coastal coordinates.
2. Execute mock CDS API queries and ingest simulated netCDF atmospheric grid parameters.
3. Calculate continuous wind force curves against parametric wind speed settlement tiers.
4. Publish trigger probability distributions and basis risk warnings to underwriting engineers.

## Interface
FastAPI service with a React terminal showing anemometer synthetic curves, ERA5 grids, and trigger gates.

## Data
Use cdsapi Python client test scripts with locally cached ERA5 netCDF extracts.
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)
Utilize cdsapi.Client retrieve syntax targeting ERA5 variable parameters and date ranges.

## Tools
ray-serve, cdsapi, xarray, pydantic.
Ray Serve orchestrates distributed parallel calculations across multiple reanalysis grid tiles.
Local Python execution runtime with hosted LLM for basis risk synthesis.

## 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
- Constructs compliant cdsapi retrieve dictionary with variable and pressure level parameters.
- Calculates resultant wind speeds from vector components correctly.
- Determines parametric tier activation with clear threshold comparisons.

## Starter Examples
```json
[
  {
    "input": {
      "asset_id": "PORT-TX-01",
      "coordinates": [
        29.3,
        -94.8
      ],
      "trigger_threshold_knots": 64,
      "era5_wind_records": [
        {
          "time": "2023-09-08T00:00:00Z",
          "u10": 28.5,
          "v10": 21
        },
        {
          "time": "2023-09-08T03:00:00Z",
          "u10": 34,
          "v10": 26
        }
      ]
    },
    "expected_output": {
      "asset_id": "PORT-TX-01",
      "max_wind_speed_knots": 83.2,
      "trigger_breached": true,
      "trigger_tier": "TIER_2_MAJOR_GALE",
      "basis_risk_flags": []
    }
  },
  {
    "input": {
      "asset_id": "PORT-FL-09",
      "coordinates": [
        25.7,
        -80.2
      ],
      "trigger_threshold_knots": 64,
      "era5_wind_records": [
        {
          "time": "2023-10-01T12:00:00Z",
          "u10": 15,
          "v10": 10
        }
      ]
    },
    "expected_output": {
      "asset_id": "PORT-FL-09",
      "max_wind_speed_knots": 35,
      "trigger_breached": false,
      "trigger_tier": "NONE",
      "basis_risk_flags": [
        "BELOW_MINIMUM_TRIGGER_THRESHOLD"
      ]
    }
  }
]
```

## Safety
Simulates contract thresholds strictly as mathematical scenarios without authorizing monetary transfers.
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.