Back to prompt library
Build an ERA5 Coastal Storm Surge Wind Reconciler — implementation
Linked challenge: Build an ERA5 Coastal Storm Surge Wind Reconciler
Prompt source
implementation67 lines11 sectionsNo variables1 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.