StormScope Meteosat FCI Nowcasting¶
StormScope inference workflow with MTG-I1 FCI satellite imagery.
This example will demonstrate how to run inference to generate nowcasts of Meteosat Third Generation (MTG-I1) FCI satellite imagery using StormScopeMeteosatEU, a generative diffusion model that predicts the next 10-minute FCI frame from a sliding window of recent observations.
In this example you will learn:
- How to instantiate
earth2studio.models.px.StormScopeMeteosatEU - Fetching FCI observations on the model grid through the model's default source
- Selecting a regional view for presentation
- Running iterative nowcasting
- Plotting an RGB composite of FCI channels with cartopy
Set Up¶
StormScopeMeteosatEU is a pure-observation nowcasting model: it requires no
external NWP conditioning. The only input is a sliding window of L
consecutive FCI frames ending at the analysis time.
The model runs on a crop of the 2 km FCI full-disk grid over Europe. Its
default_sources returns a earth2studio.data.MeteosatFCI source
that reads exactly that crop: the infrared channels at 2 km, and the visible
and near-infrared channels, which are only available at 1 km, averaged over
the 2x2 blocks of 1 km pixels that form each 2 km pixel.
EUMETSAT Data Store credentials must be available via the environment
variables EUMETSAT_CONSUMER_KEY and EUMETSAT_CONSUMER_SECRET, or in
the ~/.eumdac/credentials file.
import os
from datetime import datetime, timezone
os.makedirs("outputs", exist_ok=True)
from dotenv import load_dotenv
load_dotenv()
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
import numpy as np
import torch
from tqdm import tqdm
from earth2studio.data import fetch_data
from earth2studio.data.meteosat_fci import (
PERSPECTIVE_POINT_HEIGHT,
SEMI_MAJOR_AXIS,
SEMI_MINOR_AXIS,
)
from earth2studio.grids import Region
from earth2studio.models.px.stormscope_meteosat import StormScopeMeteosatEU
Load Model¶
Load StormScopeMeteosatEU from a package. region optionally selects a
[earth2studio.grids.Region][] box for
presentation. The model always runs on its full European domain, because its
networks are trained for that input size; a regional view crops the forecast
with crop_output.
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
# Region.box(west, south, east, north) in degrees, or None for the full domain.
region: Region | None = None # Example: Region.box(-5.0, 42.0, 10.0, 52.0)
package = StormScopeMeteosatEU.load_default_package()
model = StormScopeMeteosatEU.load_model(package=package, compile=True)
model = model.to(device)
model.eval()
if region is not None:
model = model.with_region(region)
Console output173 lines
Downloading config.yaml: 0%| | 0.00/438 [00:00<?, ?B/s]
Downloading config.yaml: 100%|██████████| 438/438 [00:00<00:00, 1.91kB/s]
Downloading config.yaml: 100%|██████████| 438/438 [00:00<00:00, 1.91kB/s]
Downloading StormscopeMTG-low.mdlus: 0%| | 0.00/1.14G [00:00<?, ?B/s]
Downloading StormscopeMTG-low.mdlus: 1%| | 10.0M/1.14G [00:01<02:02, 9.92MB/s]
Downloading StormscopeMTG-low.mdlus: 2%|▏ | 20.0M/1.14G [00:01<01:03, 19.1MB/s]
Downloading StormscopeMTG-low.mdlus: 3%|▎ | 30.0M/1.14G [00:01<00:45, 26.4MB/s]
Downloading StormscopeMTG-low.mdlus: 3%|▎ | 40.0M/1.14G [00:01<00:34, 34.2MB/s]
Downloading StormscopeMTG-low.mdlus: 4%|▍ | 50.0M/1.14G [00:01<00:28, 41.0MB/s]
Downloading StormscopeMTG-low.mdlus: 5%|▌ | 60.0M/1.14G [00:01<00:25, 44.9MB/s]
Downloading StormscopeMTG-low.mdlus: 6%|▌ | 70.0M/1.14G [00:02<00:21, 54.2MB/s]
Downloading StormscopeMTG-low.mdlus: 8%|▊ | 90.0M/1.14G [00:02<00:15, 75.4MB/s]
Downloading StormscopeMTG-low.mdlus: 9%|▉ | 110M/1.14G [00:02<00:11, 93.1MB/s]
Downloading StormscopeMTG-low.mdlus: 11%|█ | 130M/1.14G [00:02<00:10, 107MB/s]
Downloading StormscopeMTG-low.mdlus: 13%|█▎ | 150M/1.14G [00:02<00:09, 115MB/s]
Downloading StormscopeMTG-low.mdlus: 15%|█▍ | 170M/1.14G [00:02<00:08, 122MB/s]
Downloading StormscopeMTG-low.mdlus: 16%|█▋ | 190M/1.14G [00:03<00:08, 128MB/s]
Downloading StormscopeMTG-low.mdlus: 18%|█▊ | 210M/1.14G [00:03<00:11, 90.9MB/s]
Downloading StormscopeMTG-low.mdlus: 20%|█▉ | 230M/1.14G [00:03<00:13, 74.9MB/s]
Downloading StormscopeMTG-low.mdlus: 21%|██ | 240M/1.14G [00:03<00:13, 69.8MB/s]
Downloading StormscopeMTG-low.mdlus: 21%|██▏ | 250M/1.14G [00:04<00:14, 64.7MB/s]
Downloading StormscopeMTG-low.mdlus: 22%|██▏ | 260M/1.14G [00:04<00:13, 68.9MB/s]
Downloading StormscopeMTG-low.mdlus: 24%|██▍ | 280M/1.14G [00:04<00:11, 84.2MB/s]
Downloading StormscopeMTG-low.mdlus: 26%|██▌ | 300M/1.14G [00:04<00:09, 96.1MB/s]
Downloading StormscopeMTG-low.mdlus: 27%|██▋ | 320M/1.14G [00:04<00:08, 105MB/s]
Downloading StormscopeMTG-low.mdlus: 29%|██▉ | 340M/1.14G [00:04<00:07, 113MB/s]
Downloading StormscopeMTG-low.mdlus: 31%|███ | 360M/1.14G [00:05<00:07, 120MB/s]
Downloading StormscopeMTG-low.mdlus: 33%|███▎ | 380M/1.14G [00:05<00:06, 122MB/s]
Downloading StormscopeMTG-low.mdlus: 34%|███▍ | 400M/1.14G [00:05<00:08, 99.1MB/s]
Downloading StormscopeMTG-low.mdlus: 36%|███▌ | 420M/1.14G [00:05<00:09, 80.0MB/s]
Downloading StormscopeMTG-low.mdlus: 37%|███▋ | 430M/1.14G [00:06<00:10, 75.3MB/s]
Downloading StormscopeMTG-low.mdlus: 38%|███▊ | 440M/1.14G [00:06<00:11, 69.3MB/s]
Downloading StormscopeMTG-low.mdlus: 39%|███▊ | 450M/1.14G [00:06<00:10, 69.2MB/s]
Downloading StormscopeMTG-low.mdlus: 40%|████ | 470M/1.14G [00:06<00:08, 84.0MB/s]
Downloading StormscopeMTG-low.mdlus: 42%|████▏ | 490M/1.14G [00:06<00:07, 95.9MB/s]
Downloading StormscopeMTG-low.mdlus: 44%|████▎ | 510M/1.14G [00:06<00:06, 106MB/s]
Downloading StormscopeMTG-low.mdlus: 45%|████▌ | 530M/1.14G [00:07<00:07, 91.3MB/s]
Downloading StormscopeMTG-low.mdlus: 46%|████▌ | 540M/1.14G [00:07<00:08, 81.9MB/s]
Downloading StormscopeMTG-low.mdlus: 47%|████▋ | 550M/1.14G [00:07<00:08, 76.6MB/s]
Downloading StormscopeMTG-low.mdlus: 48%|████▊ | 560M/1.14G [00:07<00:08, 73.5MB/s]
Downloading StormscopeMTG-low.mdlus: 49%|████▉ | 570M/1.14G [00:07<00:08, 72.1MB/s]
Downloading StormscopeMTG-low.mdlus: 50%|████▉ | 580M/1.14G [00:08<00:08, 72.7MB/s]
Downloading StormscopeMTG-low.mdlus: 51%|█████▏ | 600M/1.14G [00:08<00:06, 89.9MB/s]
Downloading StormscopeMTG-low.mdlus: 53%|█████▎ | 620M/1.14G [00:08<00:05, 103MB/s]
Downloading StormscopeMTG-low.mdlus: 55%|█████▍ | 640M/1.14G [00:08<00:04, 111MB/s]
Downloading StormscopeMTG-low.mdlus: 56%|█████▋ | 660M/1.14G [00:08<00:04, 121MB/s]
Downloading StormscopeMTG-low.mdlus: 58%|█████▊ | 680M/1.14G [00:08<00:04, 126MB/s]
Downloading StormscopeMTG-low.mdlus: 60%|█████▉ | 700M/1.14G [00:08<00:03, 130MB/s]
Downloading StormscopeMTG-low.mdlus: 62%|██████▏ | 720M/1.14G [00:09<00:05, 91.7MB/s]
Downloading StormscopeMTG-low.mdlus: 63%|██████▎ | 740M/1.14G [00:09<00:06, 74.2MB/s]
Downloading StormscopeMTG-low.mdlus: 64%|██████▍ | 750M/1.14G [00:09<00:06, 69.1MB/s]
Downloading StormscopeMTG-low.mdlus: 65%|██████▌ | 760M/1.14G [00:10<00:06, 64.8MB/s]
Downloading StormscopeMTG-low.mdlus: 66%|██████▌ | 770M/1.14G [00:10<00:06, 63.3MB/s]
Downloading StormscopeMTG-low.mdlus: 68%|██████▊ | 790M/1.14G [00:10<00:05, 79.2MB/s]
Downloading StormscopeMTG-low.mdlus: 69%|██████▉ | 810M/1.14G [00:10<00:04, 92.6MB/s]
Downloading StormscopeMTG-low.mdlus: 71%|███████ | 830M/1.14G [00:10<00:03, 105MB/s]
Downloading StormscopeMTG-low.mdlus: 73%|███████▎ | 850M/1.14G [00:10<00:02, 114MB/s]
Downloading StormscopeMTG-low.mdlus: 74%|███████▍ | 870M/1.14G [00:11<00:02, 121MB/s]
Downloading StormscopeMTG-low.mdlus: 76%|███████▌ | 890M/1.14G [00:11<00:03, 89.9MB/s]
Downloading StormscopeMTG-low.mdlus: 78%|███████▊ | 910M/1.14G [00:11<00:02, 100MB/s]
Downloading StormscopeMTG-low.mdlus: 80%|███████▉ | 930M/1.14G [00:11<00:02, 84.2MB/s]
Downloading StormscopeMTG-low.mdlus: 80%|████████ | 940M/1.14G [00:12<00:03, 74.3MB/s]
Downloading StormscopeMTG-low.mdlus: 81%|████████▏ | 950M/1.14G [00:12<00:03, 71.5MB/s]
Downloading StormscopeMTG-low.mdlus: 82%|████████▏ | 960M/1.14G [00:12<00:03, 68.5MB/s]
Downloading StormscopeMTG-low.mdlus: 84%|████████▍ | 980M/1.14G [00:12<00:02, 84.1MB/s]
Downloading StormscopeMTG-low.mdlus: 86%|████████▌ | 0.98G/1.14G [00:12<00:01, 98.6MB/s]
Downloading StormscopeMTG-low.mdlus: 87%|████████▋ | 1.00G/1.14G [00:12<00:01, 108MB/s]
Downloading StormscopeMTG-low.mdlus: 89%|████████▉ | 1.02G/1.14G [00:13<00:01, 80.5MB/s]
Downloading StormscopeMTG-low.mdlus: 90%|████████▉ | 1.03G/1.14G [00:13<00:01, 71.8MB/s]
Downloading StormscopeMTG-low.mdlus: 91%|█████████ | 1.04G/1.14G [00:13<00:01, 67.3MB/s]
Downloading StormscopeMTG-low.mdlus: 92%|█████████▏| 1.04G/1.14G [00:14<00:01, 56.6MB/s]
Downloading StormscopeMTG-low.mdlus: 92%|█████████▏| 1.05G/1.14G [00:14<00:01, 52.6MB/s]
Downloading StormscopeMTG-low.mdlus: 93%|█████████▎| 1.06G/1.14G [00:14<00:01, 51.6MB/s]
Downloading StormscopeMTG-low.mdlus: 95%|█████████▍| 1.08G/1.14G [00:14<00:00, 70.3MB/s]
Downloading StormscopeMTG-low.mdlus: 97%|█████████▋| 1.10G/1.14G [00:14<00:00, 84.6MB/s]
Downloading StormscopeMTG-low.mdlus: 98%|█████████▊| 1.12G/1.14G [00:15<00:00, 98.0MB/s]
Downloading StormscopeMTG-low.mdlus: 100%|██████████| 1.14G/1.14G [00:15<00:00, 88.9MB/s]
Downloading StormscopeMTG-low.mdlus: 100%|██████████| 1.14G/1.14G [00:15<00:00, 80.2MB/s]
Downloading StormscopeMTG-high.mdlus: 0%| | 0.00/1.14G [00:00<?, ?B/s]
Downloading StormscopeMTG-high.mdlus: 1%| | 10.0M/1.14G [00:01<01:58, 10.2MB/s]
Downloading StormscopeMTG-high.mdlus: 2%|▏ | 20.0M/1.14G [00:01<01:02, 19.4MB/s]
Downloading StormscopeMTG-high.mdlus: 3%|▎ | 30.0M/1.14G [00:01<00:43, 27.2MB/s]
Downloading StormscopeMTG-high.mdlus: 3%|▎ | 40.0M/1.14G [00:01<00:35, 33.4MB/s]
Downloading StormscopeMTG-high.mdlus: 4%|▍ | 50.0M/1.14G [00:01<00:31, 37.6MB/s]
Downloading StormscopeMTG-high.mdlus: 5%|▌ | 60.0M/1.14G [00:02<00:27, 41.7MB/s]
Downloading StormscopeMTG-high.mdlus: 6%|▌ | 70.0M/1.14G [00:02<00:36, 31.7MB/s]
Downloading StormscopeMTG-high.mdlus: 7%|▋ | 80.0M/1.14G [00:02<00:32, 35.0MB/s]
Downloading StormscopeMTG-high.mdlus: 8%|▊ | 90.0M/1.14G [00:02<00:29, 38.5MB/s]
Downloading StormscopeMTG-high.mdlus: 9%|▊ | 100M/1.14G [00:03<00:28, 39.8MB/s]
Downloading StormscopeMTG-high.mdlus: 9%|▉ | 110M/1.14G [00:03<00:27, 40.4MB/s]
Downloading StormscopeMTG-high.mdlus: 10%|█ | 120M/1.14G [00:03<00:26, 42.0MB/s]
Downloading StormscopeMTG-high.mdlus: 11%|█ | 130M/1.14G [00:04<00:33, 32.9MB/s]
Downloading StormscopeMTG-high.mdlus: 12%|█▏ | 140M/1.14G [00:04<00:27, 38.6MB/s]
Downloading StormscopeMTG-high.mdlus: 13%|█▎ | 150M/1.14G [00:04<00:24, 44.2MB/s]
Downloading StormscopeMTG-high.mdlus: 14%|█▎ | 160M/1.14G [00:04<00:22, 46.4MB/s]
Downloading StormscopeMTG-high.mdlus: 15%|█▍ | 170M/1.14G [00:04<00:21, 49.8MB/s]
Downloading StormscopeMTG-high.mdlus: 15%|█▌ | 180M/1.14G [00:05<00:20, 51.5MB/s]
Downloading StormscopeMTG-high.mdlus: 16%|█▋ | 190M/1.14G [00:05<00:19, 53.5MB/s]
Downloading StormscopeMTG-high.mdlus: 17%|█▋ | 200M/1.14G [00:06<00:43, 23.6MB/s]
Downloading StormscopeMTG-high.mdlus: 18%|█▊ | 210M/1.14G [00:06<00:35, 28.5MB/s]
Downloading StormscopeMTG-high.mdlus: 19%|█▉ | 220M/1.14G [00:06<00:29, 33.6MB/s]
Downloading StormscopeMTG-high.mdlus: 20%|█▉ | 230M/1.14G [00:06<00:24, 39.7MB/s]
Downloading StormscopeMTG-high.mdlus: 21%|██ | 240M/1.14G [00:06<00:22, 43.8MB/s]
Downloading StormscopeMTG-high.mdlus: 21%|██▏ | 250M/1.14G [00:08<00:50, 19.2MB/s]
Downloading StormscopeMTG-high.mdlus: 22%|██▏ | 260M/1.14G [00:08<00:48, 19.7MB/s]
Downloading StormscopeMTG-high.mdlus: 23%|██▎ | 270M/1.14G [00:08<00:38, 24.7MB/s]
Downloading StormscopeMTG-high.mdlus: 24%|██▍ | 280M/1.14G [00:09<00:30, 30.5MB/s]
Downloading StormscopeMTG-high.mdlus: 25%|██▍ | 290M/1.14G [00:09<00:26, 34.7MB/s]
Downloading StormscopeMTG-high.mdlus: 26%|██▌ | 300M/1.14G [00:09<00:23, 39.3MB/s]
Downloading StormscopeMTG-high.mdlus: 27%|██▋ | 310M/1.14G [00:09<00:20, 43.2MB/s]
Downloading StormscopeMTG-high.mdlus: 27%|██▋ | 320M/1.14G [00:09<00:19, 46.1MB/s]
Downloading StormscopeMTG-high.mdlus: 29%|██▉ | 340M/1.14G [00:09<00:13, 65.9MB/s]
Downloading StormscopeMTG-high.mdlus: 31%|███ | 360M/1.14G [00:10<00:10, 84.1MB/s]
Downloading StormscopeMTG-high.mdlus: 33%|███▎ | 380M/1.14G [00:10<00:08, 99.7MB/s]
Downloading StormscopeMTG-high.mdlus: 34%|███▍ | 400M/1.14G [00:10<00:07, 112MB/s]
Downloading StormscopeMTG-high.mdlus: 36%|███▌ | 420M/1.14G [00:10<00:06, 122MB/s]
Downloading StormscopeMTG-high.mdlus: 38%|███▊ | 440M/1.14G [00:10<00:05, 130MB/s]
Downloading StormscopeMTG-high.mdlus: 39%|███▉ | 460M/1.14G [00:10<00:06, 113MB/s]
Downloading StormscopeMTG-high.mdlus: 41%|████ | 480M/1.14G [00:11<00:08, 88.0MB/s]
Downloading StormscopeMTG-high.mdlus: 42%|████▏ | 490M/1.14G [00:11<00:08, 86.5MB/s]
Downloading StormscopeMTG-high.mdlus: 43%|████▎ | 500M/1.14G [00:11<00:08, 81.5MB/s]
Downloading StormscopeMTG-high.mdlus: 44%|████▎ | 510M/1.14G [00:11<00:08, 80.3MB/s]
Downloading StormscopeMTG-high.mdlus: 45%|████▌ | 530M/1.14G [00:11<00:07, 94.3MB/s]
Downloading StormscopeMTG-high.mdlus: 47%|████▋ | 550M/1.14G [00:12<00:05, 108MB/s]
Downloading StormscopeMTG-high.mdlus: 49%|████▉ | 570M/1.14G [00:12<00:05, 120MB/s]
Downloading StormscopeMTG-high.mdlus: 50%|█████ | 590M/1.14G [00:12<00:06, 87.2MB/s]
Downloading StormscopeMTG-high.mdlus: 51%|█████▏ | 600M/1.14G [00:12<00:07, 76.0MB/s]
Downloading StormscopeMTG-high.mdlus: 52%|█████▏ | 610M/1.14G [00:12<00:08, 66.8MB/s]
Downloading StormscopeMTG-high.mdlus: 53%|█████▎ | 620M/1.14G [00:13<00:09, 61.7MB/s]
Downloading StormscopeMTG-high.mdlus: 54%|█████▍ | 630M/1.14G [00:13<00:09, 58.0MB/s]
Downloading StormscopeMTG-high.mdlus: 55%|█████▍ | 640M/1.14G [00:13<00:09, 55.4MB/s]
Downloading StormscopeMTG-high.mdlus: 56%|█████▋ | 660M/1.14G [00:13<00:06, 76.2MB/s]
Downloading StormscopeMTG-high.mdlus: 58%|█████▊ | 680M/1.14G [00:13<00:05, 94.1MB/s]
Downloading StormscopeMTG-high.mdlus: 60%|█████▉ | 700M/1.14G [00:14<00:04, 109MB/s]
Downloading StormscopeMTG-high.mdlus: 62%|██████▏ | 720M/1.14G [00:14<00:05, 85.4MB/s]
Downloading StormscopeMTG-high.mdlus: 62%|██████▏ | 730M/1.14G [00:14<00:05, 79.9MB/s]
Downloading StormscopeMTG-high.mdlus: 63%|██████▎ | 740M/1.14G [00:14<00:06, 74.0MB/s]
Downloading StormscopeMTG-high.mdlus: 64%|██████▍ | 750M/1.14G [00:14<00:06, 71.0MB/s]
Downloading StormscopeMTG-high.mdlus: 65%|██████▌ | 760M/1.14G [00:15<00:06, 68.8MB/s]
Downloading StormscopeMTG-high.mdlus: 66%|██████▌ | 770M/1.14G [00:15<00:05, 74.8MB/s]
Downloading StormscopeMTG-high.mdlus: 68%|██████▊ | 790M/1.14G [00:15<00:04, 95.6MB/s]
Downloading StormscopeMTG-high.mdlus: 69%|██████▉ | 810M/1.14G [00:15<00:03, 110MB/s]
Downloading StormscopeMTG-high.mdlus: 71%|███████ | 830M/1.14G [00:15<00:02, 123MB/s]
Downloading StormscopeMTG-high.mdlus: 73%|███████▎ | 850M/1.14G [00:15<00:04, 83.4MB/s]
Downloading StormscopeMTG-high.mdlus: 74%|███████▎ | 860M/1.14G [00:16<00:04, 74.9MB/s]
Downloading StormscopeMTG-high.mdlus: 74%|███████▍ | 870M/1.14G [00:16<00:04, 68.7MB/s]
Downloading StormscopeMTG-high.mdlus: 75%|███████▌ | 880M/1.14G [00:16<00:04, 63.8MB/s]
Downloading StormscopeMTG-high.mdlus: 76%|███████▌ | 890M/1.14G [00:16<00:04, 60.4MB/s]
Downloading StormscopeMTG-high.mdlus: 77%|███████▋ | 900M/1.14G [00:16<00:04, 64.1MB/s]
Downloading StormscopeMTG-high.mdlus: 79%|███████▊ | 920M/1.14G [00:17<00:03, 85.5MB/s]
Downloading StormscopeMTG-high.mdlus: 80%|████████ | 940M/1.14G [00:17<00:02, 103MB/s]
Downloading StormscopeMTG-high.mdlus: 82%|████████▏ | 960M/1.14G [00:17<00:01, 116MB/s]
Downloading StormscopeMTG-high.mdlus: 84%|████████▍ | 980M/1.14G [00:17<00:01, 128MB/s]
Downloading StormscopeMTG-high.mdlus: 86%|████████▌ | 0.98G/1.14G [00:17<00:01, 135MB/s]
Downloading StormscopeMTG-high.mdlus: 87%|████████▋ | 1.00G/1.14G [00:17<00:01, 140MB/s]
Downloading StormscopeMTG-high.mdlus: 89%|████████▉ | 1.02G/1.14G [00:18<00:01, 103MB/s]
Downloading StormscopeMTG-high.mdlus: 91%|█████████ | 1.04G/1.14G [00:18<00:01, 76.9MB/s]
Downloading StormscopeMTG-high.mdlus: 92%|█████████▏| 1.04G/1.14G [00:18<00:01, 70.8MB/s]
Downloading StormscopeMTG-high.mdlus: 92%|█████████▏| 1.05G/1.14G [00:18<00:01, 68.3MB/s]
Downloading StormscopeMTG-high.mdlus: 93%|█████████▎| 1.06G/1.14G [00:19<00:01, 63.6MB/s]
Downloading StormscopeMTG-high.mdlus: 95%|█████████▍| 1.08G/1.14G [00:19<00:00, 82.4MB/s]
Downloading StormscopeMTG-high.mdlus: 97%|█████████▋| 1.10G/1.14G [00:19<00:00, 97.9MB/s]
Downloading StormscopeMTG-high.mdlus: 98%|█████████▊| 1.12G/1.14G [00:19<00:00, 112MB/s]
Downloading StormscopeMTG-high.mdlus: 100%|██████████| 1.14G/1.14G [00:19<00:00, 123MB/s]
Downloading StormscopeMTG-high.mdlus: 100%|██████████| 1.14G/1.14G [00:19<00:00, 62.4MB/s]
Downloading metadata.nc: 0%| | 0.00/32.2M [00:00<?, ?B/s]
Downloading metadata.nc: 31%|███ | 10.0M/32.2M [00:01<00:03, 7.51MB/s]
Downloading metadata.nc: 62%|██████▏ | 20.0M/32.2M [00:01<00:00, 13.5MB/s]
Downloading metadata.nc: 93%|█████████▎| 30.0M/32.2M [00:01<00:00, 20.6MB/s]
Downloading metadata.nc: 100%|██████████| 32.2M/32.2M [00:01<00:00, 17.0MB/s]Fetch Initial Condition¶
We fetch an initial window of 6 consecutive FCI frames ending at the chosen
analysis time. fetch_data calls the data source at start_time +
lead_time for each lead-time offset defined by the model ([-50 min, -40
min, ..., 0 min] for a 6-frame window), and the model's default source
returns every channel on the model grid.
# Start time; replace with any time for which MTG-I1 FCI data is available.
# StormScopeMeteosatEU was trained on November 2024 - May 2026 data; start times
# should generally be outside that period.
start_time = np.datetime64(datetime(2026, 6, 30, 12, 0, 0, tzinfo=timezone.utc))
in_coords = model.input_coords()
x = fetch_data(
model.default_sources(),
time=np.array([start_time]),
variable=in_coords["variable"].values,
lead_time=in_coords["lead_time"].values,
device=device,
)
Console output65 lines
Downloading MTG products: 0%| | 0/1 [00:00<?, ?it/s]
2026-11-17 08:45:47.498 | INFO | earth2studio.data.meteosat_fci:_fetch_product:572 - Downloading MTG FCI product: W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-1C-RRAD-FDHSI-FD--x-x---x_C_EUMT_20260630111317_IDPFI_OPE_20260630111007_20260630111935_N__O_0068_0000
Downloading MTG products: 0%| | 0/1 [00:11<?, ?it/s]
Downloading MTG products: 100%|██████████| 1/1 [04:16<00:00, 256.63s/it]
Downloading MTG products: 100%|██████████| 1/1 [04:16<00:00, 256.64s/it]
Downloading MTG products: 0%| | 0/1 [00:00<?, ?it/s]
Downloading MTG products: 100%|██████████| 1/1 [00:00<00:00, 391.44it/s]
Downloading MTG products: 0%| | 0/1 [00:00<?, ?it/s]
2026-11-17 08:50:23.752 | INFO | earth2studio.data.meteosat_fci:_fetch_product:572 - Downloading MTG FCI product: W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-1C-RRAD-FDHSI-FD--x-x---x_C_EUMT_20260630112312_IDPFI_OPE_20260630112007_20260630112939_N__O_0069_0000
Downloading MTG products: 0%| | 0/1 [00:21<?, ?it/s]
Downloading MTG products: 100%|██████████| 1/1 [05:15<00:00, 315.38s/it]
Downloading MTG products: 100%|██████████| 1/1 [05:15<00:00, 315.39s/it]
Downloading MTG products: 0%| | 0/1 [00:00<?, ?it/s]
Downloading MTG products: 100%|██████████| 1/1 [00:00<00:00, 159.34it/s]
Downloading MTG products: 0%| | 0/1 [00:00<?, ?it/s]
2026-11-17 08:55:32.266 | INFO | earth2studio.data.meteosat_fci:_fetch_product:572 - Downloading MTG FCI product: W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-1C-RRAD-FDHSI-FD--x-x---x_C_EUMT_20260630113315_IDPFI_OPE_20260630113007_20260630113939_N__O_0070_0000
Downloading MTG products: 0%| | 0/1 [00:06<?, ?it/s]
Downloading MTG products: 100%|██████████| 1/1 [04:22<00:00, 262.98s/it]
Downloading MTG products: 100%|██████████| 1/1 [04:22<00:00, 262.98s/it]
Downloading MTG products: 0%| | 0/1 [00:00<?, ?it/s]
Downloading MTG products: 100%|██████████| 1/1 [00:00<00:00, 199.88it/s]
Downloading MTG products: 0%| | 0/1 [00:00<?, ?it/s]
2026-11-17 09:00:00.674 | INFO | earth2studio.data.meteosat_fci:_fetch_product:572 - Downloading MTG FCI product: W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-1C-RRAD-FDHSI-FD--x-x---x_C_EUMT_20260630114312_IDPFI_OPE_20260630114007_20260630114939_N__O_0071_0000
Downloading MTG products: 0%| | 0/1 [00:04<?, ?it/s]
Downloading MTG products: 100%|██████████| 1/1 [03:30<00:00, 210.50s/it]
Downloading MTG products: 100%|██████████| 1/1 [03:30<00:00, 210.50s/it]
Downloading MTG products: 0%| | 0/1 [00:00<?, ?it/s]
Downloading MTG products: 100%|██████████| 1/1 [00:00<00:00, 76.16it/s]
Downloading MTG products: 0%| | 0/1 [00:00<?, ?it/s]
2026-11-17 09:03:42.587 | INFO | earth2studio.data.meteosat_fci:_fetch_product:572 - Downloading MTG FCI product: W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-1C-RRAD-FDHSI-FD--x-x---x_C_EUMT_20260630115316_IDPFI_OPE_20260630115007_20260630115939_N__O_0072_0000
Downloading MTG products: 0%| | 0/1 [00:07<?, ?it/s]
Downloading MTG products: 100%|██████████| 1/1 [04:25<00:00, 265.97s/it]
Downloading MTG products: 100%|██████████| 1/1 [04:25<00:00, 265.97s/it]
Downloading MTG products: 0%| | 0/1 [00:00<?, ?it/s]
Downloading MTG products: 100%|██████████| 1/1 [00:00<00:00, 83.11it/s]
Downloading MTG products: 0%| | 0/1 [00:00<?, ?it/s]
2026-11-17 09:08:14.505 | INFO | earth2studio.data.meteosat_fci:_fetch_product:572 - Downloading MTG FCI product: W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-1C-RRAD-FDHSI-FD--x-x---x_C_EUMT_20260630120316_IDPFI_OPE_20260630120007_20260630120939_N__O_0073_0000
Downloading MTG products: 0%| | 0/1 [00:05<?, ?it/s]
Downloading MTG products: 100%|██████████| 1/1 [02:53<00:00, 173.37s/it]
Downloading MTG products: 100%|██████████| 1/1 [02:53<00:00, 173.37s/it]
Downloading MTG products: 0%| | 0/1 [00:00<?, ?it/s]
Downloading MTG products: 100%|██████████| 1/1 [00:00<00:00, 106.04it/s]Add Ensemble Dimension¶
The model expects input of shape (ensemble, time, lead_time, variable, y, x).
Up to GPU memory limits, ensemble_size can be increased to produce multiple
independent ensemble members in a single forward pass.
Execute the Nowcast¶
create_iterator handles the autoregressive rollout for us: each yielded
value advances the prediction by one 10-minute interval, starting with the
first forecast.
n_steps = 12 # 2 hours of 10-minute forecast steps
for step, x_pred in enumerate(tqdm(model.create_iterator(x), total=n_steps)):
if step == n_steps - 1:
break
Console output13 lines
0%| | 0/12 [00:00<?, ?it/s]
8%|▊ | 1/12 [00:39<07:14, 39.51s/it]
17%|█▋ | 2/12 [01:03<05:06, 30.61s/it]
25%|██▌ | 3/12 [01:28<04:09, 27.73s/it]
33%|███▎ | 4/12 [01:52<03:31, 26.41s/it]
42%|████▏ | 5/12 [02:17<02:59, 25.69s/it]
50%|█████ | 6/12 [02:41<02:31, 25.29s/it]
58%|█████▊ | 7/12 [03:05<02:05, 25.03s/it]
67%|██████▋ | 8/12 [03:30<01:39, 24.87s/it]
75%|███████▌ | 9/12 [03:55<01:14, 24.76s/it]
83%|████████▎ | 10/12 [04:19<00:49, 24.70s/it]
92%|█████████▏| 11/12 [04:44<00:24, 24.64s/it]
92%|█████████▏| 11/12 [05:08<00:28, 28.06s/it]Post Processing¶
Plot the final predicted FCI frame as a true-color RGB composite (VIS 0.6 /
0.5 / 0.4 µm) in geostationary projection. Off-Earth pixels are already set
to NaN by denormalize. For a regional view, crop_output crops the
forecast to the requested region.
rgb_channels = ["fci06vis", "fci05vis", "fci04vis"]
field = model.crop_output(x_pred).e2s.as_numpy().isel(ensemble=0, time=0, lead_time=0)
# here we approximately replicate EUMETSAT's recipe for "true-colour" RGB
rgb = (field.sel(variable=rgb_channels) / 24.0).clip(min=0, max=1) * 255
rgb = rgb.transpose("y", "x", "variable").values
rgb = np.interp(rgb, [0, 30, 60, 120, 190, 255], [0, 110, 160, 210, 240, 255]) / 255.0
proj = ccrs.Geostationary(
central_longitude=0.0,
satellite_height=PERSPECTIVE_POINT_HEIGHT,
globe=ccrs.Globe(semimajor_axis=SEMI_MAJOR_AXIS, semiminor_axis=SEMI_MINOR_AXIS),
sweep_axis="y",
)
# Pixel-edge extent in metres from the scan-angle labels; x increases westward.
x_angle, y_angle = field["x"].values, field["y"].values
dx, dy = abs(x_angle[1] - x_angle[0]), abs(y_angle[1] - y_angle[0])
extent = [
-(x_angle.max() + dx / 2) * PERSPECTIVE_POINT_HEIGHT,
-(x_angle.min() - dx / 2) * PERSPECTIVE_POINT_HEIGHT,
(y_angle.min() - dy / 2) * PERSPECTIVE_POINT_HEIGHT,
(y_angle.max() + dy / 2) * PERSPECTIVE_POINT_HEIGHT,
]
aspect = (extent[1] - extent[0]) / (extent[3] - extent[2])
fig_height = 8
fig = plt.figure(figsize=(fig_height * aspect, fig_height))
ax = fig.add_subplot(1, 1, 1, projection=proj)
ax.set_xlim(extent[0], extent[1])
ax.set_ylim(extent[2], extent[3])
ax.coastlines(color="white", linewidth=0.8)
# Rows run south to north and columns west to east, matching the extent.
im = ax.imshow(rgb, transform=proj, extent=extent, origin="lower")
valid_time = field["time"].values + field["lead_time"].values
valid_time = np.datetime_as_string(valid_time, unit="m").replace("T", " ")
lead_min = int(field["lead_time"].values / np.timedelta64(1, "m"))
ax.set_title(
f"StormScopeMeteosatEU — RGB\n" f"Valid {valid_time} UTC (+{lead_min} min)"
)
fig.tight_layout()
fig.savefig("outputs/04_stormscope_meteosat_example.png", dpi=150)
