> ## Documentation Index
> Fetch the complete documentation index at: https://docs-beta.rebase.energy/llms.txt
> Use this file to discover all available pages before exploring further.

# Delta Layers

> Visualize differences between weather forecast runs using specialized delta variables

## What are delta layers?

Delta layers highlight how a weather forecast has changed between two model runs. They build on the same `wl:*` weather layers but use special variable names to describe the comparison you want to visualize.

Use delta layers when you need to:

* Track how the latest forecast differs from the previous run
* Compare the current run against yesterday's day-ahead forecast
* Spot sudden changes in temperature, wind speed, or other weather variables

## Variable naming convention

Delta layers rely on the `variable` field to describe the comparison target:

| Delta type    | Variable format example   | Meaning                                          |
| ------------- | ------------------------- | ------------------------------------------------ |
| Standard      | `WindSpeed`               | Raw forecast value (not a delta)                 |
| Previous run  | `DeltaPrevRun:WindSpeed`  | Difference between current run and previous run  |
| Day-ahead run | `DeltaDayAhead:WindSpeed` | Difference between current run and day-ahead run |

> ⚠️ The part after the colon must be a valid base variable name (`WindSpeed`, `Temperature`, etc.).

## Creating a delta layer

Delta layers use the same SDK call as regular weather layers. Simply change the `variable` value to one of the delta formats.

```python theme={null}
# Difference vs the previous forecast run
wind_delta_prev_run = client.layers.create_layer(
    name="WindSpeed Δ vs previous run",
    type="wl:RasterLayer",
    weather_model_id="ECMWF_IFS",
    variable="DeltaPrevRun:WindSpeed",
    altitude=100,
    run_hour=12,
    run_day="2025-01-15",
    deckgl_props={
        "opacity": 0.8,
    }
)
```

```python theme={null}
# Difference vs the day-ahead run
temperature_delta_day_ahead = client.layers.create_layer(
    name="Temperature Δ vs day-ahead",
    type="wl:RasterLayer",
    weather_model_id="ECMWF_IFS",
    variable="DeltaDayAhead:Temperature",
    altitude=2,
    run_hour=12,
    run_day="2025-01-15",
    deckgl_props={
        "opacity": 0.75
    }
)
```

## Supported layer types

Delta variables use the `wl:RasterLayer`, regardless of which weather variable is used for the comparison.

## Best practices

* **Pick the right comparison**: Use `DeltaPrevRun` for short-term monitoring and `DeltaDayAhead` for day-ahead bidding or re-forecast analysis.
* **Label clearly**: Include the delta type in the layer `name` to clarify the context when many different layers are used.
* **Combine with base layers**: Pair delta layers with the original forecast layer to provide full context, for example with two map components side by side.

## Next steps

<CardGroup cols={2}>
  <Card title="Weather Integration" icon="cloud" href="/essentials/weather-integration">
    Learn how weather models and variables work.
  </Card>

  <Card title="Layers" icon="layer-group" href="/essentials/layers">
    See how weather layers fit into the broader layer system.
  </Card>
</CardGroup>
