> ## 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.

# Weather Integration

> Overlay real-time weather data from ECMWF, ERA5, NCEP, and regional models on your energy visualizations

## Understanding weather integration

Weather data is absolutely crucial for energy forecasting and operations. The Rebase Dashboard API integrates with major weather models to provide real-time and forecast data that you can overlay on your energy visualizations. This comprehensive integration enables advanced energy monitoring and forecasting capabilities.

## Creating weather layers

### Basic weather layer creation

```python theme={null}
# Create a weather layer
weather_layer = client.layers.create_layer(
    name="My Weather Layer",
    type="wl:RasterLayer",  # or "wl:ParticleLayer", "wl:IsolineLayer"
    weather_model_id="ECMWF_IFS",  # See available models below
    variable="WindSpeed",  # See available variables below
    altitude=10,  # See available altitudes below
    run_hour=12,  # Required for forecast models
    run_day="2025-01-15",  # Required for forecast models
    deckgl_props={
        "opacity": 0.7
    }
)
```

### Historical weather data (ERA5)

```python theme={null}
# Create a historical weather layer (no run parameters needed)
historical_layer = client.layers.create_layer(
    name="Historical Wind Data",
    type="wl:RasterLayer",
    weather_model_id="ERA5",
    variable="WindSpeed",
    altitude=10,
    deckgl_props={
        "opacity": 0.6
    }
)
```

## Available weather models

| Model ID                | Type       | Coverage  | Run Hours (UTC)                                                                      | Variables                                                                                     |
| ----------------------- | ---------- | --------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------- |
| `ECMWF_IFS`             | Global     | Worldwide | 0, 6, 12, 18                                                                         | WindSpeed, Temperature, Precipitation, Pressure, SolarRadiation, PrecipitationTypeAccumulated |
| `ECMWF_AIFS`            | Global AI  | Worldwide | 0, 6, 12, 18                                                                         | WindSpeed, Temperature, Precipitation, Pressure, SolarRadiation                               |
| `Rebase_AI`             | Global AI  | Worldwide | 0, 12                                                                                | WindSpeed, Temperature, Pressure                                                              |
| `NCEP_GFS`              | Global     | Worldwide | 0, 6, 12, 18                                                                         | WindSpeed, Temperature, RelativeHumidity, CloudCover, Precipitation, Pressure, SolarRadiation |
| `ERA5`                  | Historical | Worldwide | -                                                                                    | WindSpeed, Temperature, Pressure, CloudCover, RelativeHumidity, SolarRadiation                |
| `DWD_ICON-EU`           | Regional   | Europe    | 0, 3, 6, 9, 12, 15, 18, 21                                                           | WindSpeed, Temperature, RelativeHumidity, CloudCover, Precipitation, Pressure                 |
| `DWD_ICON-D2`           | Regional   | Germany   | 0, 3, 6, 9, 12, 15, 18, 21                                                           | WindSpeed, Temperature, RelativeHumidity, Pressure, CloudCover                                |
| `MeteoFrance_ARPEGE-EU` | Regional   | Europe    | 0, 6, 12, 18                                                                         | WindSpeed, Temperature, RelativeHumidity, Precipitation, Pressure                             |
| `MetNo_MEPS`            | Regional   | Nordic    | 0, 3, 6, 9, 12, 15, 18, 21                                                           | WindSpeed, Temperature, RelativeHumidity, Precipitation, Pressure                             |
| `MetNo_HIRESMEPS`       | Regional   | Nordic    | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 | WindSpeed, Temperature, RelativeHumidity, Precipitation, Pressure                             |

## Available variables and altitudes

### WindSpeed

| Model      | Available Altitudes                 | Units | Visualization Types |
| ---------- | ----------------------------------- | ----- | ------------------- |
| All models | 2m, 10m, 20m, 80m, 100m, 120m, 200m | m/s   | raster, particle    |

### Temperature

| Model      | Available Altitudes | Units | Visualization Types |
| ---------- | ------------------- | ----- | ------------------- |
| All models | 2m, 20m, 80m, 100m  | °C    | raster, isolines    |

### RelativeHumidity

| Model                  | Available Altitudes | Units | Visualization Types |
| ---------------------- | ------------------- | ----- | ------------------- |
| NCEP\_GFS              | 2m, 20m, 80m, 100m  | %     | raster              |
| DWD\_ICON-EU           | 2m, 20m, 80m, 100m  | %     | raster              |
| DWD\_ICON-D2           | 2m, 20m, 80m, 100m  | %     | raster              |
| MeteoFrance\_ARPEGE-EU | 2m, 20m, 80m, 100m  | %     | raster              |
| MetNo\_MEPS            | 2m, 20m, 80m, 100m  | %     | raster              |
| MetNo\_HIRESMEPS       | 2m, 20m, 80m, 100m  | %     | raster              |
| ERA5                   | 2m, 20m, 80m, 100m  | %     | raster              |

### CloudCover

| Model        | Available Altitudes                                  | Units | Visualization Types |
| ------------ | ---------------------------------------------------- | ----- | ------------------- |
| NCEP\_GFS    | Total, Low, Medium, High, 100m, 3000m, 9000m, 20000m | %     | raster              |
| DWD\_ICON-EU | Low, Medium, High                                    | %     | raster              |
| DWD\_ICON-D2 | Low, Medium, High                                    | %     | raster              |
| ERA5         | Total, Low, Medium, High                             | %     | raster              |

### Precipitation

| Model                  | Available Altitudes | Units | Visualization Types |
| ---------------------- | ------------------- | ----- | ------------------- |
| ECMWF\_IFS             | Surface             | mm    | raster              |
| ECMWF\_AIFS            | Surface             | mm    | raster              |
| NCEP\_GFS              | Surface             | mm    | raster              |
| DWD\_ICON-EU           | Surface             | mm    | raster              |
| MeteoFrance\_ARPEGE-EU | Surface             | mm    | raster              |
| MetNo\_MEPS            | Surface             | mm    | raster              |
| MetNo\_HIRESMEPS       | Surface             | mm    | raster              |

### Pressure

| Model      | Available Altitudes  | Units | Visualization Types |
| ---------- | -------------------- | ----- | ------------------- |
| All models | MSL (Mean Sea Level) | hPa   | raster, isolines    |

### SolarRadiation

| Model       | Available Altitudes | Units | Visualization Types |
| ----------- | ------------------- | ----- | ------------------- |
| ECMWF\_IFS  | Surface             | W/m²  | raster              |
| ECMWF\_AIFS | Surface             | W/m²  | raster              |
| NCEP\_GFS   | Surface             | W/m²  | raster              |
| ERA5        | Surface             | W/m²  | raster              |

### PrecipitationTypeAccumulated

| Model      | Available Altitudes | Units | Visualization Types |
| ---------- | ------------------- | ----- | ------------------- |
| ECMWF\_IFS | Surface             | mm    | raster              |

## Weather Model Requirements

### Forecast Models

* **Required**: `run_hour` and `run_day` (YYYY-MM-DD format)
* **Run Hours**: Varies by model (see table above)
* **Example**: `run_hour=12, run_day="2025-01-15"`

**Supported models**: ECMWF\_IFS, ECMWF\_AIFS, Rebase\_AI, NCEP\_GFS, DWD\_ICON-EU, DWD\_ICON-D2, MeteoFrance\_ARPEGE-EU, MetNo\_MEPS, MetNo\_HIRESMEPS

### Historical Models

* **Required**: None of `run_hour` or `run_day` (use frontend date range settings)
* **Example**: No run parameters needed

**Supported models**: ERA5

## Layer types

### Raster layers (wl:RasterLayer)

Most common type for continuous weather data like temperature, wind speed, and precipitation.

```python theme={null}
# Raster layer configuration
raster_layer = client.layers.create_layer(
    name="Wind Speed Raster",
    type="wl:RasterLayer",
    weather_model_id="ECMWF_IFS",
    variable="WindSpeed",
    altitude=10,
    run_hour=12,
    run_day="2025-01-15",
    deckgl_props={
        "opacity": 0.7
    }
)
```

### Isoline layers (wl:IsolineLayer)

Perfect for pressure, temperature contours, and other isoline data.

```python theme={null}
# Isoline layer configuration
isoline_layer = client.layers.create_layer(
    name="Pressure Isolines",
    type="wl:IsolineLayer",
    weather_model_id="ECMWF_IFS",
    variable="Pressure",
    altitude=0,
    run_hour=12,
    run_day="2025-01-15",
    deckgl_props={
        "opacity": 0.8
    }
)
```

### Particle layers (wl:ParticleLayer)

Great for wind direction visualization with animated particles.

```python theme={null}
# Particle layer configuration
particle_layer = client.layers.create_layer(
    name="Wind Direction Particles",
    type="wl:ParticleLayer",
    weather_model_id="ECMWF_IFS",
    variable="WindSpeed",
    altitude=10,
    run_hour=12,
    run_day="2025-01-15",
    deckgl_props={
        "opacity": 0.6
    }
)
```

## Creating weather map components

Once the desired weather layers have been created, the next step is to add them to a Map Component to visualize them:

```python theme={null}
# Create a map component with weather layers
weather_map_component = client.components.create_map(
    name="Wind Speed Forecast",
    config=MapConfig(
        latitude=55.2,
        longitude=3.5,
        zoom=6,
        map_style="mapbox://styles/mapbox/satellite-v9"
    ),
    layer_ids=[wind_speed_layer.id]  # Unified layer_ids array
)
```

### Multiple weather layers

Multiple weather variables can be combined in a single map:

```python theme={null}
# Map component with multiple weather layers
multi_weather_map = client.components.create_map(
    name="Comprehensive Weather View",
    config=MapConfig(
        latitude=55.2,
        longitude=3.5,
        zoom=6,
        map_style="mapbox://styles/mapbox/satellite-v9"
    ),
    layer_ids=[
        wind_speed_layer.id,
        temperature_layer.id,
        precipitation_layer.id
    ]  # All layers in unified array
)
```

### Combining weather and map layers

You can now combine weather layers with map layers in a single component:

```python theme={null}
# Create map and weather layers
wind_turbines_layer = client.layers.create_layer(
    name="Wind Turbines",
    type="ScatterPlotLayer",
    dataset_id=geospatial_dataset.id,
    deckgl_props={"radiusScale": 1000, "getFillColor": [0, 255, 0]}
)

wind_speed_layer = client.layers.create_layer(
    name="Wind Speed",
    type="wl:RasterLayer",
    weather_model_id="ECMWF_IFS",
    variable="WindSpeed",
    altitude=10,
    run_hour=12,
    run_day="2025-01-15"
)

# Combine both in a single map component
combined_map = client.components.create_map(
    name="Wind Farm with Weather",
    config={"latitude": 55.2, "longitude": 3.5, "zoom": 6},
    layer_ids=[wind_turbines_layer.id, wind_speed_layer.id]  # Both types in one array
)
```

## Weather layer management

### Creating weather layers

```python theme={null}
# Create a new weather layer
weather_layer = client.layers.create_layer(
    name="My Weather Layer",
    type="wl:RasterLayer",
    weather_model_id="ECMWF_IFS",
    variable="WindSpeed",
    altitude=10,
    run_hour=12,
    run_day="2025-01-15",
    deckgl_props={
        "opacity": 0.7
    }
)
```

### Updating weather layers

```python theme={null}
# Update weather layer properties (all parameters required)
updated_layer = client.layers.update_layer(
    layer_id,
    name="Updated Weather Layer",
    type="wl:RasterLayer",  # Required
    weather_model_id="ECMWF_IFS",  # Required
    variable="WindSpeed",  # Required
    altitude=10,  # Required
    deckgl_props={
        "opacity": 0.8
    }
)
```

### Retrieving weather layers

```python theme={null}
# Get all layers (both map and weather)
all_layers = client.layers.list_layers()

# Filter to get only weather layers
weather_layers = [layer for layer in all_layers if layer.type.startswith('wl:')]

# Get a specific layer
weather_layer = client.layers.get_layer(layer_id)
```

### Deleting weather layers

```python theme={null}
# Delete a weather layer (use with caution!)
client.layers.delete_layer(layer_id)
```

## Layer type reference

### Weather Layer Types

| Type               | Description                           | Required Fields                            |
| ------------------ | ------------------------------------- | ------------------------------------------ |
| `wl:RasterLayer`   | Raster weather data visualization     | `weather_model_id`, `variable`, `altitude` |
| `wl:ParticleLayer` | Particle-based weather visualization  | `weather_model_id`, `variable`, `altitude` |
| `wl:IsolineLayer`  | Contour/isoline weather visualization | `weather_model_id`, `variable`, `altitude` |

## Model Selection Guide

### For Global Applications

* **High Accuracy**: ECMWF\_IFS (gold standard)
* **AI-Powered**: ECMWF\_AIFS or Rebase\_AI
* **Frequent Updates**: NCEP\_GFS
* **Historical Analysis**: ERA5

### For European Applications

* **High Resolution**: DWD\_ICON-EU or MeteoFrance\_ARPEGE-EU
* **German Focus**: DWD\_ICON-D2
* **Frequent Updates**: DWD\_ICON-EU (every 3 hours)

### For Nordic Applications

* **Ensemble**: MetNo\_MEPS
* **High Resolution**: MetNo\_HIRESMEPS (hourly updates)

### For Energy Applications

* **Wind Energy**: Focus on WindSpeed at 100m altitude
* **Solar Energy**: Use SolarRadiation and CloudCover
* **Hydropower**: Precipitation and Temperature
* **Grid Operations**: Pressure and Temperature for load forecasting

## Important Limitations

* **No description field**: Weather layers only have a name, no description
* **No forecast hours**: Time range is controlled by run\_hour/run\_day for forecast models
* **No date ranges for ERA5**: Use frontend date range settings instead
* **Limited deckgl\_props**: Only basic DeckGL properties are supported
* **No layer controls**: Advanced layer controls are not implemented
* **Model-specific requirements**: Different models have different parameter requirements
* **Limited variables**: Not all weather variables may be available in all models
* **No custom color schemes**: Advanced color configurations are not supported

## Best practices

### Model selection

* Use ECMWF IFS for high-accuracy forecasts
* Use ERA5 for historical analysis
* Use NCEP GFS for frequent updates
* Consider model resolution for your area of interest

### Performance optimization

* Use appropriate layer types for your data
* Limit the number of weather layers per map
* Consider data update frequency
* Cache weather data for frequently accessed areas

### Data quality

* Validate weather data against observations
* Use multiple models for comparison
* Monitor forecast accuracy over time
* Implement proper error handling

## Next steps

Now that you understand weather integration, explore advanced features:

<CardGroup cols={2}>
  <Card title="Live Data" icon="bolt" href="/essentials/live-data">
    Connect real-time weather data sources.
  </Card>

  <Card title="Layers" icon="layer-group" href="/essentials/layers">
    Master advanced visualization techniques.
  </Card>

  <Card title="Delta Layers" icon="chart-line" href="/essentials/delta-layers">
    Visualize differences between forecast runs.
  </Card>

  <Card title="Customization" icon="palette" href="/essentials/customization">
    Customize weather layer appearance and behavior.
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Explore all weather endpoints and options.
  </Card>
</CardGroup>
