Skip to main content
Loading navigation
Back to prompt library

Build a Coastal Windstorm Parametric Uncertainty Analyzer — implementation

Linked challenge: Build a Coastal Windstorm Parametric Uncertainty Analyzer

Prompt source

implementation63 lines11 sectionsNo variables1 code block
## Build
Evaluate parametric wind speed trigger ambiguity for coastal marine ports using ERA5 atmospheric reanalysis grids. Quantify trigger misclassification probability against synthetic station observations.

## User
Marine Terminal Risk Consultant

## Workflow
1. Define port asset coordinates and wind threshold triggers in meters per second.
2. Retrieve ERA5 10-meter wind components using Copernicus CDS API scripts.
3. Compute maximum sustained wind speeds and calculate spatial interpolation errors.
4. Quantify trigger uncertainty distributions and publish terminal risk memos.

## Interface
Interactive Python CLI and terminal plot view summarizing wind uncertainty distributions.

## Data
Execute CDS API calls for `reanalysis-era5-single-levels` wind variables or use synthetic NetCDF grid samples.
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)
Sets up `cdsapi.Client()` configuration and calls `cds.retrieve` for atmospheric variables with spatial bounding.

## Tools
ray-serve, cdsapi, numpy, scipy.
Ray Serve enables distributed parallel evaluation of parametric trigger simulations across thousands of asset coordinates.
Distributed compute cluster or multi-core local host for numeric simulations.

## 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
- Computes horizontal wind vector magnitude from u and v components accurately.
- Applies parametric trigger criteria with explicit confidence intervals.
- Logs trigger sensitivity variances across neighboring grid points.

## Starter Examples
```json
[
  {
    "input": {
      "port_code": "PORT-EAST-01",
      "u10_m_s": 24,
      "v10_m_s": 18,
      "trigger_threshold_m_s": 28
    },
    "expected_output": {
      "port_code": "PORT-EAST-01",
      "wind_speed_m_s": 30,
      "trigger_exceeded": true,
      "trigger_confidence": 0.94
    }
  },
  {
    "input": {
      "port_code": "PORT-EAST-02",
      "u10_m_s": 15,
      "v10_m_s": 12,
      "trigger_threshold_m_s": 28
    },
    "expected_output": {
      "port_code": "PORT-EAST-02",
      "wind_speed_m_s": 19.21,
      "trigger_exceeded": false,
      "trigger_confidence": 0.99
    }
  }
]
```

## Safety
Produces parametric simulation sensitivity metrics without issuing contractual settlement determinations.
Use mock external writes. Require human review before any real deployment.