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 Storm Surge Wind Reconciler

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

Prompt source

Original prompt text with formatting preserved for inspection.

67 lines
11 sections
No variables
1 code block
## Build
Extract marine 10-metre wind speeds from ERA5 reanalysis grids to reconstruct coastal storm exposure events. Correlate peak gust footprints against port asset schedules to resolve basis risk disputes.

## User
Marine Terminal Risk Assessor

## Workflow
1. Retrieve ERA5 10m u/v wind vector grids across coastal target coordinates.
2. Calculate sustained wind speeds and peak gust velocities during storm events.
3. Intersect wind vector contours with port infrastructure and crane asset locations.
4. Generate a structured windstorm reconciliation dossier quantifying anemometer basis discrepancies.

## Interface
Interactive wind vector timeline viewer, historical storm track overlays, and basis uncertainty discrepancy tables.

## Data
Use cdsapi to fetch ERA5 single levels surface wind variables over coastal bounding boxes or read sample NetCDF files.
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)
Interacts with cdsapi Client retrieve method querying reanalysis-era5-single-levels with 10m_u_component_of_wind and 10m_v_component_of_wind.

## Tools
ray-serve, cdsapi, netCDF4, uvicorn.
Distributes high-volume spatio-temporal NetCDF grid slicing across concurrent worker replicas for fast API responses.
Fast inference API endpoint paired with Ray distributed compute cluster or local multicore runtime.

## 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
- Reanalysis wind speeds correctly computed from vector components (u, v).
- Ray Serve endpoint responds to concurrent port coordinate reconciliation requests.
- Calculates delta between on-site anemometer readings and ERA5 grid cells.

## Starter Examples
```json
[
  {
    "input": {
      "terminal_id": "PORT-CRANE-EAST",
      "era5_u10": 24.5,
      "era5_v10": 18.2,
      "onsite_anemometer_ms": 32,
      "contract_trigger_ms": 28
    },
    "expected_output": {
      "terminal_id": "PORT-CRANE-EAST",
      "reanalysis_wind_speed_ms": 30.52,
      "trigger_exceeded": true,
      "basis_discrepancy_ms": 1.48,
      "settlement_confidence": "HIGH"
    }
  },
  {
    "input": {
      "terminal_id": "PORT-CRANE-WEST",
      "era5_u10": 14.1,
      "era5_v10": 9.5,
      "onsite_anemometer_ms": 18,
      "contract_trigger_ms": 28
    },
    "expected_output": {
      "terminal_id": "PORT-CRANE-WEST",
      "reanalysis_wind_speed_ms": 17,
      "trigger_exceeded": false,
      "basis_discrepancy_ms": 1,
      "settlement_confidence": "HIGH"
    }
  }
]
```

## Safety
Produces simulated wind reconciliation evidence; does not certify crane structural integrity or authorize insurance payouts.
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.