Skip to main content
Loading navigation
Back to prompt library

Build a CLIMADA Coastal Flood Asset Risk Modeler — implementation

Linked challenge: Build a CLIMADA Coastal Flood Asset Risk Modeler

Prompt source

implementation63 lines11 sectionsNo variables1 code block
## Build
Assess coastal infrastructure resilience against projected storm surge events using the CLIMADA modeling framework. Quantify expected asset damage from simulated extreme weather scenarios to formulate municipal hazard adaptation strategies.

## User
Coastal Infrastructure Resilience Specialist

## Workflow
1. Retrieve historical or probabilistic tropical cyclone and storm surge hazard sets from the CLIMADA data API.
2. Load port and energy asset coordinates as custom exposures and define asset-specific vulnerability functions.
3. Calculate probabilistic impact metrics, such as expected annual damage, by combining hazard, exposure, and vulnerability.
4. Output structured asset vulnerability summaries with aggregated damage projections and risk exposure tiers.

## Interface
Command-line tool generating structured JSON/CSV vulnerability reports alongside visualizations of surge hazard impacts.

## Data
Query the CLIMADA Data API for relevant tropical cyclone storm surge hazard grids. Maintain local CSV or GeoJSON of critical coastal infrastructure for exposures.
Starter examples below are synthetic. They are not downloaded records.

## Source
[CLIMADA impact modeling](https://raw.githubusercontent.com/CLIMADA-project/climada_python/main/README.md)
Leverages the CLIMADA python library to fetch hazard data, model custom exposures, and execute impact calculations for risk assessment.

## Tools
pydantic-ai, climada, pandas, geopandas.
Orchestrates the data retrieval and impact assessment tasks while structuring output vulnerability reports into strictly typed schemas.
Language model supporting strict schema enforcement for generating spatial hazard mitigation briefs and structuring report outputs.

## 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
- Successfully fetches storm surge hazard matrices via the CLIMADA API.
- Defines and computes impact combinations applying vulnerability functions against asset exposures.
- Outputs a valid dataset detailing expected damages and structured exposure tier classifications for each asset.

## Starter Examples
```json
[
  {
    "input": {
      "facility_id": "PORT-DOCK-88",
      "asset_value_usd": 5000000,
      "hazard_scenario": "100_year_surge",
      "calculated_damage_usd": 250000
    },
    "expected_output": {
      "facility_id": "PORT-DOCK-88",
      "damage_ratio": 0.05,
      "exposure_tier": "MODERATE",
      "adaptation_recommendation": "IMPROVE_DRAINAGE_AND_ELEVATE_EQUIPMENT"
    }
  },
  {
    "input": {
      "facility_id": "ENERGY-SUBSTATION-02",
      "asset_value_usd": 12000000,
      "hazard_scenario": "100_year_surge",
      "calculated_damage_usd": 4800000
    },
    "expected_output": {
      "facility_id": "ENERGY-SUBSTATION-02",
      "damage_ratio": 0.4,
      "exposure_tier": "CRITICAL",
      "adaptation_recommendation": "CONSTRUCT_SEAWALL_REVETMENT"
    }
  }
]
```

## Safety
Supplies advisory spatial risk modeling metrics; does not replace licensed geotechnical, civil engineering, or actuarial surveys.
Use mock external writes. Require human review before any real deployment.