Skip to main content
Loading navigation
Back to prompt library

Build an ERA5 Coastal Surge Wind Exposure Reconciler — implementation

Linked challenge: Build an ERA5 Coastal Surge Wind Exposure Reconciler

Prompt source

implementation90 lines11 sectionsNo variables1 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.