Note
Go to the end to download the full example code.
Creating a Local Data Source#
Create and save an offline dataset to use in an inference pipeline.
This example demonstrates how to:
Build a small offline dataset by fetching data and writing to a Zarr store
Load the local store as a data source for an inference pipeline with the Microsoft Aurora model
Run the deterministic workflow and plot results
# /// script
# dependencies = [
# "earth2studio[aurora] @ git+https://github.com/NVIDIA/earth2studio.git",
# "cartopy",
# ]
# ///
Set Up#
For this example, the following are needed:
Prognostic Model: Use the built-in Aurora 6-hour model
earth2studio.models.px.Aurora.Data source: Pull data from the WeatherBench2 data API
earth2studio.data.WB2ERA5.
import os
os.makedirs("outputs", exist_ok=True)
from dotenv import load_dotenv
load_dotenv()
from earth2studio.data import WB2ERA5, fetch_data
from earth2studio.models.px import Aurora
# Load the default model package which downloads the checkpoint from GCP
package = Aurora.load_default_package()
model = Aurora.load_model(package)
# Create the data source, cache is false
wb2 = WB2ERA5(cache=False, verbose=False)
Downloading aurora-0.25-static-z.npy: 0%| | 0.00/3.96M [00:00<?, ?B/s]
Downloading aurora-0.25-static-z.npy: 100%|██████████| 3.96M/3.96M [00:00<00:00, 28.0MB/s]
Downloading aurora-0.25-static-z.npy: 100%|██████████| 3.96M/3.96M [00:00<00:00, 27.4MB/s]
Downloading aurora-0.25-static-slt.npy: 0%| | 0.00/3.96M [00:00<?, ?B/s]
Downloading aurora-0.25-static-slt.npy: 100%|██████████| 3.96M/3.96M [00:00<00:00, 16.4MB/s]
Downloading aurora-0.25-static-slt.npy: 100%|██████████| 3.96M/3.96M [00:00<00:00, 16.2MB/s]
Downloading aurora-0.25-static-lsm.npy: 0%| | 0.00/3.96M [00:00<?, ?B/s]
Downloading aurora-0.25-static-lsm.npy: 100%|██████████| 3.96M/3.96M [00:00<00:00, 29.0MB/s]
Downloading aurora-0.25-static-lsm.npy: 100%|██████████| 3.96M/3.96M [00:00<00:00, 28.4MB/s]
Downloading aurora-0.25-pretrained.ckpt: 0%| | 0.00/4.68G [00:00<?, ?B/s]
Downloading aurora-0.25-pretrained.ckpt: 0%| | 10.0M/4.68G [00:00<01:11, 70.1MB/s]
Downloading aurora-0.25-pretrained.ckpt: 1%| | 50.0M/4.68G [00:00<00:21, 235MB/s]
Downloading aurora-0.25-pretrained.ckpt: 2%|▏ | 100M/4.68G [00:00<00:14, 329MB/s]
Downloading aurora-0.25-pretrained.ckpt: 3%|▎ | 150M/4.68G [00:00<00:12, 377MB/s]
Downloading aurora-0.25-pretrained.ckpt: 4%|▍ | 200M/4.68G [00:00<00:12, 400MB/s]
Downloading aurora-0.25-pretrained.ckpt: 5%|▌ | 250M/4.68G [00:00<00:11, 414MB/s]
Downloading aurora-0.25-pretrained.ckpt: 6%|▋ | 300M/4.68G [00:00<00:11, 420MB/s]
Downloading aurora-0.25-pretrained.ckpt: 7%|▋ | 350M/4.68G [00:00<00:10, 428MB/s]
Downloading aurora-0.25-pretrained.ckpt: 8%|▊ | 400M/4.68G [00:01<00:10, 437MB/s]
Downloading aurora-0.25-pretrained.ckpt: 9%|▉ | 450M/4.68G [00:01<00:10, 439MB/s]
Downloading aurora-0.25-pretrained.ckpt: 10%|█ | 500M/4.68G [00:01<00:10, 439MB/s]
Downloading aurora-0.25-pretrained.ckpt: 11%|█▏ | 550M/4.68G [00:01<00:10, 438MB/s]
Downloading aurora-0.25-pretrained.ckpt: 13%|█▎ | 600M/4.68G [00:01<00:10, 437MB/s]
Downloading aurora-0.25-pretrained.ckpt: 14%|█▎ | 650M/4.68G [00:01<00:10, 410MB/s]
Downloading aurora-0.25-pretrained.ckpt: 15%|█▍ | 700M/4.68G [00:01<00:10, 419MB/s]
Downloading aurora-0.25-pretrained.ckpt: 16%|█▌ | 750M/4.68G [00:01<00:09, 427MB/s]
Downloading aurora-0.25-pretrained.ckpt: 17%|█▋ | 800M/4.68G [00:02<00:09, 433MB/s]
Downloading aurora-0.25-pretrained.ckpt: 18%|█▊ | 850M/4.68G [00:02<00:09, 434MB/s]
Downloading aurora-0.25-pretrained.ckpt: 19%|█▉ | 900M/4.68G [00:02<00:09, 438MB/s]
Downloading aurora-0.25-pretrained.ckpt: 20%|█▉ | 950M/4.68G [00:02<00:09, 442MB/s]
Downloading aurora-0.25-pretrained.ckpt: 21%|██ | 0.98G/4.68G [00:02<00:08, 443MB/s]
Downloading aurora-0.25-pretrained.ckpt: 22%|██▏ | 1.03G/4.68G [00:02<00:08, 448MB/s]
Downloading aurora-0.25-pretrained.ckpt: 23%|██▎ | 1.07G/4.68G [00:02<00:08, 451MB/s]
Downloading aurora-0.25-pretrained.ckpt: 24%|██▍ | 1.12G/4.68G [00:02<00:08, 440MB/s]
Downloading aurora-0.25-pretrained.ckpt: 25%|██▌ | 1.17G/4.68G [00:03<00:09, 384MB/s]
Downloading aurora-0.25-pretrained.ckpt: 26%|██▌ | 1.21G/4.68G [00:03<00:09, 383MB/s]
Downloading aurora-0.25-pretrained.ckpt: 27%|██▋ | 1.25G/4.68G [00:03<00:09, 372MB/s]
Downloading aurora-0.25-pretrained.ckpt: 28%|██▊ | 1.29G/4.68G [00:03<00:10, 363MB/s]
Downloading aurora-0.25-pretrained.ckpt: 28%|██▊ | 1.33G/4.68G [00:03<00:10, 357MB/s]
Downloading aurora-0.25-pretrained.ckpt: 29%|██▉ | 1.37G/4.68G [00:03<00:10, 353MB/s]
Downloading aurora-0.25-pretrained.ckpt: 30%|███ | 1.41G/4.68G [00:03<00:09, 361MB/s]
Downloading aurora-0.25-pretrained.ckpt: 31%|███ | 1.45G/4.68G [00:03<00:09, 371MB/s]
Downloading aurora-0.25-pretrained.ckpt: 32%|███▏ | 1.48G/4.68G [00:03<00:09, 378MB/s]
Downloading aurora-0.25-pretrained.ckpt: 33%|███▎ | 1.52G/4.68G [00:04<00:09, 345MB/s]
Downloading aurora-0.25-pretrained.ckpt: 33%|███▎ | 1.56G/4.68G [00:04<00:09, 358MB/s]
Downloading aurora-0.25-pretrained.ckpt: 34%|███▍ | 1.60G/4.68G [00:04<00:08, 369MB/s]
Downloading aurora-0.25-pretrained.ckpt: 35%|███▌ | 1.64G/4.68G [00:04<00:10, 320MB/s]
Downloading aurora-0.25-pretrained.ckpt: 36%|███▌ | 1.68G/4.68G [00:04<00:09, 340MB/s]
Downloading aurora-0.25-pretrained.ckpt: 37%|███▋ | 1.72G/4.68G [00:04<00:08, 357MB/s]
Downloading aurora-0.25-pretrained.ckpt: 38%|███▊ | 1.76G/4.68G [00:04<00:08, 369MB/s]
Downloading aurora-0.25-pretrained.ckpt: 38%|███▊ | 1.80G/4.68G [00:04<00:08, 362MB/s]
Downloading aurora-0.25-pretrained.ckpt: 39%|███▉ | 1.84G/4.68G [00:05<00:08, 354MB/s]
Downloading aurora-0.25-pretrained.ckpt: 40%|████ | 1.88G/4.68G [00:05<00:08, 348MB/s]
Downloading aurora-0.25-pretrained.ckpt: 41%|████ | 1.91G/4.68G [00:05<00:08, 346MB/s]
Downloading aurora-0.25-pretrained.ckpt: 42%|████▏ | 1.95G/4.68G [00:05<00:08, 344MB/s]
Downloading aurora-0.25-pretrained.ckpt: 43%|████▎ | 1.99G/4.68G [00:05<00:08, 343MB/s]
Downloading aurora-0.25-pretrained.ckpt: 43%|████▎ | 2.03G/4.68G [00:05<00:08, 342MB/s]
Downloading aurora-0.25-pretrained.ckpt: 44%|████▍ | 2.07G/4.68G [00:05<00:08, 343MB/s]
Downloading aurora-0.25-pretrained.ckpt: 45%|████▌ | 2.11G/4.68G [00:05<00:08, 342MB/s]
Downloading aurora-0.25-pretrained.ckpt: 46%|████▌ | 2.15G/4.68G [00:06<00:07, 341MB/s]
Downloading aurora-0.25-pretrained.ckpt: 47%|████▋ | 2.19G/4.68G [00:06<00:07, 344MB/s]
Downloading aurora-0.25-pretrained.ckpt: 48%|████▊ | 2.23G/4.68G [00:06<00:07, 360MB/s]
Downloading aurora-0.25-pretrained.ckpt: 48%|████▊ | 2.27G/4.68G [00:06<00:06, 371MB/s]
Downloading aurora-0.25-pretrained.ckpt: 49%|████▉ | 2.30G/4.68G [00:06<00:06, 376MB/s]
Downloading aurora-0.25-pretrained.ckpt: 50%|█████ | 2.34G/4.68G [00:06<00:06, 365MB/s]
Downloading aurora-0.25-pretrained.ckpt: 51%|█████ | 2.38G/4.68G [00:06<00:06, 361MB/s]
Downloading aurora-0.25-pretrained.ckpt: 52%|█████▏ | 2.42G/4.68G [00:06<00:06, 357MB/s]
Downloading aurora-0.25-pretrained.ckpt: 53%|█████▎ | 2.46G/4.68G [00:07<00:07, 313MB/s]
Downloading aurora-0.25-pretrained.ckpt: 53%|█████▎ | 2.50G/4.68G [00:07<00:07, 329MB/s]
Downloading aurora-0.25-pretrained.ckpt: 54%|█████▍ | 2.54G/4.68G [00:07<00:06, 337MB/s]
Downloading aurora-0.25-pretrained.ckpt: 55%|█████▌ | 2.58G/4.68G [00:07<00:06, 354MB/s]
Downloading aurora-0.25-pretrained.ckpt: 56%|█████▌ | 2.62G/4.68G [00:07<00:06, 367MB/s]
Downloading aurora-0.25-pretrained.ckpt: 57%|█████▋ | 2.66G/4.68G [00:07<00:05, 375MB/s]
Downloading aurora-0.25-pretrained.ckpt: 58%|█████▊ | 2.70G/4.68G [00:07<00:05, 356MB/s]
Downloading aurora-0.25-pretrained.ckpt: 58%|█████▊ | 2.73G/4.68G [00:07<00:05, 361MB/s]
Downloading aurora-0.25-pretrained.ckpt: 59%|█████▉ | 2.77G/4.68G [00:07<00:05, 351MB/s]
Downloading aurora-0.25-pretrained.ckpt: 60%|██████ | 2.81G/4.68G [00:08<00:05, 341MB/s]
Downloading aurora-0.25-pretrained.ckpt: 61%|██████ | 2.85G/4.68G [00:08<00:06, 317MB/s]
Downloading aurora-0.25-pretrained.ckpt: 62%|██████▏ | 2.89G/4.68G [00:08<00:06, 306MB/s]
Downloading aurora-0.25-pretrained.ckpt: 63%|██████▎ | 2.93G/4.68G [00:08<00:05, 316MB/s]
Downloading aurora-0.25-pretrained.ckpt: 63%|██████▎ | 2.97G/4.68G [00:08<00:05, 323MB/s]
Downloading aurora-0.25-pretrained.ckpt: 64%|██████▍ | 3.01G/4.68G [00:08<00:05, 329MB/s]
Downloading aurora-0.25-pretrained.ckpt: 65%|██████▌ | 3.05G/4.68G [00:08<00:05, 332MB/s]
Downloading aurora-0.25-pretrained.ckpt: 66%|██████▌ | 3.09G/4.68G [00:08<00:05, 334MB/s]
Downloading aurora-0.25-pretrained.ckpt: 67%|██████▋ | 3.12G/4.68G [00:09<00:04, 337MB/s]
Downloading aurora-0.25-pretrained.ckpt: 68%|██████▊ | 3.16G/4.68G [00:09<00:04, 339MB/s]
Downloading aurora-0.25-pretrained.ckpt: 68%|██████▊ | 3.20G/4.68G [00:09<00:04, 340MB/s]
Downloading aurora-0.25-pretrained.ckpt: 69%|██████▉ | 3.24G/4.68G [00:09<00:04, 350MB/s]
Downloading aurora-0.25-pretrained.ckpt: 70%|███████ | 3.28G/4.68G [00:09<00:04, 350MB/s]
Downloading aurora-0.25-pretrained.ckpt: 71%|███████ | 3.33G/4.68G [00:09<00:03, 376MB/s]
Downloading aurora-0.25-pretrained.ckpt: 72%|███████▏ | 3.38G/4.68G [00:09<00:03, 398MB/s]
Downloading aurora-0.25-pretrained.ckpt: 73%|███████▎ | 3.43G/4.68G [00:09<00:03, 412MB/s]
Downloading aurora-0.25-pretrained.ckpt: 74%|███████▍ | 3.48G/4.68G [00:10<00:03, 426MB/s]
Downloading aurora-0.25-pretrained.ckpt: 75%|███████▌ | 3.53G/4.68G [00:10<00:02, 431MB/s]
Downloading aurora-0.25-pretrained.ckpt: 76%|███████▋ | 3.57G/4.68G [00:10<00:02, 440MB/s]
Downloading aurora-0.25-pretrained.ckpt: 77%|███████▋ | 3.62G/4.68G [00:10<00:02, 447MB/s]
Downloading aurora-0.25-pretrained.ckpt: 78%|███████▊ | 3.67G/4.68G [00:10<00:02, 441MB/s]
Downloading aurora-0.25-pretrained.ckpt: 79%|███████▉ | 3.72G/4.68G [00:10<00:02, 445MB/s]
Downloading aurora-0.25-pretrained.ckpt: 81%|████████ | 3.77G/4.68G [00:10<00:02, 451MB/s]
Downloading aurora-0.25-pretrained.ckpt: 82%|████████▏ | 3.82G/4.68G [00:10<00:02, 451MB/s]
Downloading aurora-0.25-pretrained.ckpt: 83%|████████▎ | 3.87G/4.68G [00:11<00:02, 408MB/s]
Downloading aurora-0.25-pretrained.ckpt: 84%|████████▎ | 3.92G/4.68G [00:11<00:01, 420MB/s]
Downloading aurora-0.25-pretrained.ckpt: 85%|████████▍ | 3.96G/4.68G [00:11<00:01, 432MB/s]
Downloading aurora-0.25-pretrained.ckpt: 86%|████████▌ | 4.01G/4.68G [00:11<00:01, 436MB/s]
Downloading aurora-0.25-pretrained.ckpt: 87%|████████▋ | 4.06G/4.68G [00:11<00:01, 436MB/s]
Downloading aurora-0.25-pretrained.ckpt: 88%|████████▊ | 4.11G/4.68G [00:11<00:01, 446MB/s]
Downloading aurora-0.25-pretrained.ckpt: 89%|████████▉ | 4.16G/4.68G [00:11<00:01, 413MB/s]
Downloading aurora-0.25-pretrained.ckpt: 90%|████████▉ | 4.20G/4.68G [00:11<00:01, 395MB/s]
Downloading aurora-0.25-pretrained.ckpt: 91%|█████████ | 4.24G/4.68G [00:11<00:01, 391MB/s]
Downloading aurora-0.25-pretrained.ckpt: 91%|█████████▏| 4.28G/4.68G [00:12<00:01, 392MB/s]
Downloading aurora-0.25-pretrained.ckpt: 92%|█████████▏| 4.32G/4.68G [00:12<00:00, 395MB/s]
Downloading aurora-0.25-pretrained.ckpt: 93%|█████████▎| 4.36G/4.68G [00:12<00:00, 394MB/s]
Downloading aurora-0.25-pretrained.ckpt: 94%|█████████▍| 4.39G/4.68G [00:12<00:00, 396MB/s]
Downloading aurora-0.25-pretrained.ckpt: 95%|█████████▍| 4.43G/4.68G [00:12<00:00, 397MB/s]
Downloading aurora-0.25-pretrained.ckpt: 96%|█████████▌| 4.47G/4.68G [00:12<00:00, 238MB/s]
Downloading aurora-0.25-pretrained.ckpt: 96%|█████████▋| 4.51G/4.68G [00:12<00:00, 270MB/s]
Downloading aurora-0.25-pretrained.ckpt: 97%|█████████▋| 4.55G/4.68G [00:13<00:00, 300MB/s]
Downloading aurora-0.25-pretrained.ckpt: 98%|█████████▊| 4.59G/4.68G [00:13<00:00, 326MB/s]
Downloading aurora-0.25-pretrained.ckpt: 99%|█████████▉| 4.63G/4.68G [00:13<00:00, 346MB/s]
Downloading aurora-0.25-pretrained.ckpt: 100%|█████████▉| 4.67G/4.68G [00:13<00:00, 360MB/s]
Downloading aurora-0.25-pretrained.ckpt: 100%|██████████| 4.68G/4.68G [00:13<00:00, 375MB/s]
Creating a Local Zarr Store from a Datasource#
Start with creating a local dataset from the WeatherBench2 data store. Since data sources return in-memory data arrays, there are a variety of ways this could be done. The following is a simple method using Earth2Studio IO objects to pack the requested data into a single Zarr store.
For this example, let’s download some data for a Microsoft aurora forecast.
from collections import OrderedDict
import numpy as np
from earth2studio.io import ZarrBackend
from earth2studio.utils.coords import split_coords
times = np.array(
[np.datetime64("2022-01-01T00:00:00"), np.datetime64("2022-01-01T06:00:00")]
)
variables = model.input_coords()["variable"]
zarr_path = "./outputs/19_wb2_dataset.zarr"
# Create Zarr store to pack data into
zb = ZarrBackend(file_name=zarr_path, backend_kwargs={"overwrite": True})
full_coords = OrderedDict(
[
("time", np.atleast_1d(times)),
("lead_time", np.array([np.timedelta64(0, "h")])),
("lat", np.linspace(90, -90, 721)),
("lon", np.linspace(0, 359.75, 1440)),
]
)
zb.add_array(full_coords, array_name=list(variables))
# Loop over timestamps, fetch data and write slices into the pre-created arrays
for t in np.atleast_1d(times):
x, coords = fetch_data(
wb2,
time=np.array([t]),
variable=variables,
lead_time=np.array([np.timedelta64(0, "h")]),
device="cpu",
)
xs, reduced_coords, var_names = split_coords(x, coords, dim="variable")
zb.write(xs, reduced_coords, array_name=list(var_names))
2026-05-18 02:52:43.660 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v400 at 2022-01-01T00:00:00
2026-05-18 02:52:43.661 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q150 at 2022-01-01T00:00:00
2026-05-18 02:52:43.661 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t850 at 2022-01-01T00:00:00
2026-05-18 02:52:43.662 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v150 at 2022-01-01T00:00:00
2026-05-18 02:52:43.662 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z300 at 2022-01-01T00:00:00
2026-05-18 02:52:43.662 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t700 at 2022-01-01T00:00:00
2026-05-18 02:52:43.663 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t300 at 2022-01-01T00:00:00
2026-05-18 02:52:43.663 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q400 at 2022-01-01T00:00:00
2026-05-18 02:52:43.663 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u600 at 2022-01-01T00:00:00
2026-05-18 02:52:43.664 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v50 at 2022-01-01T00:00:00
2026-05-18 02:52:43.664 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q50 at 2022-01-01T00:00:00
2026-05-18 02:52:43.664 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v200 at 2022-01-01T00:00:00
2026-05-18 02:52:43.665 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t500 at 2022-01-01T00:00:00
2026-05-18 02:52:43.665 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t100 at 2022-01-01T00:00:00
2026-05-18 02:52:43.666 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t50 at 2022-01-01T00:00:00
2026-05-18 02:52:43.666 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q500 at 2022-01-01T00:00:00
2026-05-18 02:52:43.666 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q1000 at 2022-01-01T00:00:00
2026-05-18 02:52:43.667 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v10m at 2022-01-01T00:00:00
2026-05-18 02:52:43.667 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z250 at 2022-01-01T00:00:00
2026-05-18 02:52:43.667 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u50 at 2022-01-01T00:00:00
2026-05-18 02:52:43.668 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z500 at 2022-01-01T00:00:00
2026-05-18 02:52:43.668 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t925 at 2022-01-01T00:00:00
2026-05-18 02:52:43.668 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v850 at 2022-01-01T00:00:00
2026-05-18 02:52:43.669 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v1000 at 2022-01-01T00:00:00
2026-05-18 02:52:43.670 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u10m at 2022-01-01T00:00:00
2026-05-18 02:52:43.670 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u150 at 2022-01-01T00:00:00
2026-05-18 02:52:43.670 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z1000 at 2022-01-01T00:00:00
2026-05-18 02:52:43.671 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u400 at 2022-01-01T00:00:00
2026-05-18 02:52:43.671 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t600 at 2022-01-01T00:00:00
2026-05-18 02:52:43.671 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u925 at 2022-01-01T00:00:00
2026-05-18 02:52:43.672 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: msl at 2022-01-01T00:00:00
2026-05-18 02:52:43.672 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q250 at 2022-01-01T00:00:00
2026-05-18 02:52:43.672 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z700 at 2022-01-01T00:00:00
2026-05-18 02:52:43.673 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z600 at 2022-01-01T00:00:00
2026-05-18 02:52:43.673 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v700 at 2022-01-01T00:00:00
2026-05-18 02:52:43.674 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q700 at 2022-01-01T00:00:00
2026-05-18 02:52:43.674 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u200 at 2022-01-01T00:00:00
2026-05-18 02:52:43.674 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q100 at 2022-01-01T00:00:00
2026-05-18 02:52:43.675 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t1000 at 2022-01-01T00:00:00
2026-05-18 02:52:43.675 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z50 at 2022-01-01T00:00:00
2026-05-18 02:52:43.675 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z400 at 2022-01-01T00:00:00
2026-05-18 02:52:43.676 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v500 at 2022-01-01T00:00:00
2026-05-18 02:52:43.676 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u250 at 2022-01-01T00:00:00
2026-05-18 02:52:43.676 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t2m at 2022-01-01T00:00:00
2026-05-18 02:52:43.677 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q200 at 2022-01-01T00:00:00
2026-05-18 02:52:43.677 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u850 at 2022-01-01T00:00:00
2026-05-18 02:52:43.677 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q850 at 2022-01-01T00:00:00
2026-05-18 02:52:43.678 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u1000 at 2022-01-01T00:00:00
2026-05-18 02:52:43.678 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v600 at 2022-01-01T00:00:00
2026-05-18 02:52:43.679 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z100 at 2022-01-01T00:00:00
2026-05-18 02:52:43.679 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q300 at 2022-01-01T00:00:00
2026-05-18 02:52:43.679 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q600 at 2022-01-01T00:00:00
2026-05-18 02:52:43.680 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q925 at 2022-01-01T00:00:00
2026-05-18 02:52:43.680 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z925 at 2022-01-01T00:00:00
2026-05-18 02:52:43.680 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t400 at 2022-01-01T00:00:00
2026-05-18 02:52:43.681 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v925 at 2022-01-01T00:00:00
2026-05-18 02:52:43.681 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v300 at 2022-01-01T00:00:00
2026-05-18 02:52:43.681 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z150 at 2022-01-01T00:00:00
2026-05-18 02:52:43.682 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v100 at 2022-01-01T00:00:00
2026-05-18 02:52:43.682 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z850 at 2022-01-01T00:00:00
2026-05-18 02:52:43.683 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u700 at 2022-01-01T00:00:00
2026-05-18 02:52:43.683 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t200 at 2022-01-01T00:00:00
2026-05-18 02:52:43.683 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u300 at 2022-01-01T00:00:00
2026-05-18 02:52:43.684 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u500 at 2022-01-01T00:00:00
2026-05-18 02:52:43.684 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z200 at 2022-01-01T00:00:00
2026-05-18 02:52:43.685 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u100 at 2022-01-01T00:00:00
2026-05-18 02:52:43.685 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t250 at 2022-01-01T00:00:00
2026-05-18 02:52:43.685 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t150 at 2022-01-01T00:00:00
2026-05-18 02:52:43.686 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v250 at 2022-01-01T00:00:00
2026-05-18 02:52:51.606 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v400 at 2022-01-01T06:00:00
2026-05-18 02:52:51.606 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q150 at 2022-01-01T06:00:00
2026-05-18 02:52:51.606 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t850 at 2022-01-01T06:00:00
2026-05-18 02:52:51.606 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v150 at 2022-01-01T06:00:00
2026-05-18 02:52:51.608 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z300 at 2022-01-01T06:00:00
2026-05-18 02:52:51.608 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t700 at 2022-01-01T06:00:00
2026-05-18 02:52:51.608 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t300 at 2022-01-01T06:00:00
2026-05-18 02:52:51.608 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q400 at 2022-01-01T06:00:00
2026-05-18 02:52:51.608 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u600 at 2022-01-01T06:00:00
2026-05-18 02:52:51.609 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v50 at 2022-01-01T06:00:00
2026-05-18 02:52:51.609 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q50 at 2022-01-01T06:00:00
2026-05-18 02:52:51.609 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v200 at 2022-01-01T06:00:00
2026-05-18 02:52:51.609 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t500 at 2022-01-01T06:00:00
2026-05-18 02:52:51.609 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t100 at 2022-01-01T06:00:00
2026-05-18 02:52:51.609 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t50 at 2022-01-01T06:00:00
2026-05-18 02:52:51.610 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q500 at 2022-01-01T06:00:00
2026-05-18 02:52:51.610 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q1000 at 2022-01-01T06:00:00
2026-05-18 02:52:51.610 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v10m at 2022-01-01T06:00:00
2026-05-18 02:52:51.610 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z250 at 2022-01-01T06:00:00
2026-05-18 02:52:51.610 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u50 at 2022-01-01T06:00:00
2026-05-18 02:52:51.610 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z500 at 2022-01-01T06:00:00
2026-05-18 02:52:51.610 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t925 at 2022-01-01T06:00:00
2026-05-18 02:52:51.611 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v850 at 2022-01-01T06:00:00
2026-05-18 02:52:51.611 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v1000 at 2022-01-01T06:00:00
2026-05-18 02:52:51.611 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u10m at 2022-01-01T06:00:00
2026-05-18 02:52:51.611 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u150 at 2022-01-01T06:00:00
2026-05-18 02:52:51.611 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z1000 at 2022-01-01T06:00:00
2026-05-18 02:52:51.611 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u400 at 2022-01-01T06:00:00
2026-05-18 02:52:51.611 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t600 at 2022-01-01T06:00:00
2026-05-18 02:52:51.612 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u925 at 2022-01-01T06:00:00
2026-05-18 02:52:51.612 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: msl at 2022-01-01T06:00:00
2026-05-18 02:52:51.612 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q250 at 2022-01-01T06:00:00
2026-05-18 02:52:51.612 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z600 at 2022-01-01T06:00:00
2026-05-18 02:52:51.612 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z850 at 2022-01-01T06:00:00
2026-05-18 02:52:51.612 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v700 at 2022-01-01T06:00:00
2026-05-18 02:52:51.613 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q700 at 2022-01-01T06:00:00
2026-05-18 02:52:51.613 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u200 at 2022-01-01T06:00:00
2026-05-18 02:52:51.613 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q100 at 2022-01-01T06:00:00
2026-05-18 02:52:51.613 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t1000 at 2022-01-01T06:00:00
2026-05-18 02:52:51.613 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z50 at 2022-01-01T06:00:00
2026-05-18 02:52:51.614 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z400 at 2022-01-01T06:00:00
2026-05-18 02:52:51.614 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v500 at 2022-01-01T06:00:00
2026-05-18 02:52:51.614 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u250 at 2022-01-01T06:00:00
2026-05-18 02:52:51.614 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t2m at 2022-01-01T06:00:00
2026-05-18 02:52:51.614 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q200 at 2022-01-01T06:00:00
2026-05-18 02:52:51.614 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u850 at 2022-01-01T06:00:00
2026-05-18 02:52:51.614 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q850 at 2022-01-01T06:00:00
2026-05-18 02:52:51.615 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u1000 at 2022-01-01T06:00:00
2026-05-18 02:52:51.615 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v600 at 2022-01-01T06:00:00
2026-05-18 02:52:51.615 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z100 at 2022-01-01T06:00:00
2026-05-18 02:52:51.615 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q300 at 2022-01-01T06:00:00
2026-05-18 02:52:51.615 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q600 at 2022-01-01T06:00:00
2026-05-18 02:52:51.615 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: q925 at 2022-01-01T06:00:00
2026-05-18 02:52:51.615 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z925 at 2022-01-01T06:00:00
2026-05-18 02:52:51.616 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t400 at 2022-01-01T06:00:00
2026-05-18 02:52:51.616 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v925 at 2022-01-01T06:00:00
2026-05-18 02:52:51.616 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v300 at 2022-01-01T06:00:00
2026-05-18 02:52:51.616 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z150 at 2022-01-01T06:00:00
2026-05-18 02:52:51.616 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v100 at 2022-01-01T06:00:00
2026-05-18 02:52:51.616 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z700 at 2022-01-01T06:00:00
2026-05-18 02:52:51.616 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u700 at 2022-01-01T06:00:00
2026-05-18 02:52:51.617 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t200 at 2022-01-01T06:00:00
2026-05-18 02:52:51.617 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u300 at 2022-01-01T06:00:00
2026-05-18 02:52:51.617 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u500 at 2022-01-01T06:00:00
2026-05-18 02:52:51.617 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: z200 at 2022-01-01T06:00:00
2026-05-18 02:52:51.617 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: u100 at 2022-01-01T06:00:00
2026-05-18 02:52:51.617 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t250 at 2022-01-01T06:00:00
2026-05-18 02:52:51.617 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: t150 at 2022-01-01T06:00:00
2026-05-18 02:52:51.618 | DEBUG | earth2studio.data.wb2:fetch_array:221 - Fetching WB2 zarr array for variable: v250 at 2022-01-01T06:00:00
Note that the Zarr store we just created can be used for more than just Earth2Studio inference pipelines. Open it with zarr or xarray to explore/process what you just downloaded.
import zarr
zg = zarr.group(store=zarr.storage.LocalStore(zarr_path))
print(zg.tree())
/
├── lat (721,) float64
├── lead_time (1,) timedelta64
├── lon (1440,) float64
├── msl (2, 1, 721, 1440) float32
├── q100 (2, 1, 721, 1440) float32
├── q1000 (2, 1, 721, 1440) float32
├── q150 (2, 1, 721, 1440) float32
├── q200 (2, 1, 721, 1440) float32
├── q250 (2, 1, 721, 1440) float32
├── q300 (2, 1, 721, 1440) float32
├── q400 (2, 1, 721, 1440) float32
├── q50 (2, 1, 721, 1440) float32
├── q500 (2, 1, 721, 1440) float32
├── q600 (2, 1, 721, 1440) float32
├── q700 (2, 1, 721, 1440) float32
├── q850 (2, 1, 721, 1440) float32
├── q925 (2, 1, 721, 1440) float32
├── t100 (2, 1, 721, 1440) float32
├── t1000 (2, 1, 721, 1440) float32
├── t150 (2, 1, 721, 1440) float32
├── t200 (2, 1, 721, 1440) float32
├── t250 (2, 1, 721, 1440) float32
├── t2m (2, 1, 721, 1440) float32
├── t300 (2, 1, 721, 1440) float32
├── t400 (2, 1, 721, 1440) float32
├── t50 (2, 1, 721, 1440) float32
├── t500 (2, 1, 721, 1440) float32
├── t600 (2, 1, 721, 1440) float32
├── t700 (2, 1, 721, 1440) float32
├── t850 (2, 1, 721, 1440) float32
├── t925 (2, 1, 721, 1440) float32
├── time (2,) datetime64
├── u100 (2, 1, 721, 1440) float32
├── u1000 (2, 1, 721, 1440) float32
├── u10m (2, 1, 721, 1440) float32
├── u150 (2, 1, 721, 1440) float32
├── u200 (2, 1, 721, 1440) float32
├── u250 (2, 1, 721, 1440) float32
├── u300 (2, 1, 721, 1440) float32
├── u400 (2, 1, 721, 1440) float32
├── u50 (2, 1, 721, 1440) float32
├── u500 (2, 1, 721, 1440) float32
├── u600 (2, 1, 721, 1440) float32
├── u700 (2, 1, 721, 1440) float32
├── u850 (2, 1, 721, 1440) float32
├── u925 (2, 1, 721, 1440) float32
├── v100 (2, 1, 721, 1440) float32
├── v1000 (2, 1, 721, 1440) float32
├── v10m (2, 1, 721, 1440) float32
├── v150 (2, 1, 721, 1440) float32
├── v200 (2, 1, 721, 1440) float32
├── v250 (2, 1, 721, 1440) float32
├── v300 (2, 1, 721, 1440) float32
├── v400 (2, 1, 721, 1440) float32
├── v50 (2, 1, 721, 1440) float32
├── v500 (2, 1, 721, 1440) float32
├── v600 (2, 1, 721, 1440) float32
├── v700 (2, 1, 721, 1440) float32
├── v850 (2, 1, 721, 1440) float32
├── v925 (2, 1, 721, 1440) float32
├── z100 (2, 1, 721, 1440) float32
├── z1000 (2, 1, 721, 1440) float32
├── z150 (2, 1, 721, 1440) float32
├── z200 (2, 1, 721, 1440) float32
├── z250 (2, 1, 721, 1440) float32
├── z300 (2, 1, 721, 1440) float32
├── z400 (2, 1, 721, 1440) float32
├── z50 (2, 1, 721, 1440) float32
├── z500 (2, 1, 721, 1440) float32
├── z600 (2, 1, 721, 1440) float32
├── z700 (2, 1, 721, 1440) float32
├── z850 (2, 1, 721, 1440) float32
└── z925 (2, 1, 721, 1440) float32
Execute the Workflow#
To use the saved dataset as a data source, we could create our own class that implements
the interface required by earth2studio.data.base.DataSource, which needs
just a __call__(time, variable) method.
However, since we used an IO backend from Earth2Studio we can use the
earth2studio.data.xr.InferenceOutputSource which is a convenience class
that supports the output of inference pipelines.
import earth2studio.run as run
from earth2studio.data import InferenceOutputSource
offline_source = InferenceOutputSource(zarr_path)
out_zarr_path = "./outputs/19_pangu_output.zarr"
io = ZarrBackend(file_name=out_zarr_path, backend_kwargs={"overwrite": True})
io = run.deterministic(
times[-1:],
4,
model,
offline_source,
io,
output_coords=OrderedDict({"variable": np.array(["msl"])}),
)
2026-05-18 02:52:59.308 | INFO | earth2studio.run:deterministic:78 - Running simple workflow!
2026-05-18 02:52:59.309 | INFO | earth2studio.run:deterministic:85 - Inference device: cuda
2026-05-18 02:53:00.386 | SUCCESS | earth2studio.run:deterministic:109 - Fetched data from InferenceOutputSource
2026-05-18 02:53:00.405 | INFO | earth2studio.run:deterministic:139 - Inference starting!
Running inference: 0%| | 0/5 [00:00<?, ?it/s]
Running inference: 40%|████ | 2/5 [00:03<00:05, 1.82s/it]
Running inference: 60%|██████ | 3/5 [00:07<00:05, 2.56s/it]
Running inference: 80%|████████ | 4/5 [00:10<00:02, 2.95s/it]
Running inference: 100%|██████████| 5/5 [00:14<00:00, 3.18s/it]
Running inference: 100%|██████████| 5/5 [00:14<00:00, 2.89s/it]
2026-05-18 02:53:14.856 | SUCCESS | earth2studio.run:deterministic:151 -
Inference complete
Post Processing#
The last step is to post-process our results.
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
plt.close("all")
projection = ccrs.Robinson()
fig, axes = plt.subplots(
2,
2,
subplot_kw={"projection": projection},
figsize=(12, 7),
constrained_layout=True,
)
axes = axes.ravel()
lon = io["lon"][:]
lat = io["lat"][:]
lead_steps = [1, 2, 3, 4] # 6h, 12h, 18h, 24h
for ax, step in zip(axes, lead_steps):
im = ax.pcolormesh(
lon,
lat,
io["msl"][0, step],
transform=ccrs.PlateCarree(),
cmap="PiYG",
)
ax.set_title(f"msl - Lead time: {6*step}h")
ax.coastlines()
ax.gridlines(draw_labels=False)
fig.colorbar(
im, ax=axes, orientation="horizontal", fraction=0.05, pad=0.07, label="msl"
)
plt.savefig("outputs/19_msl_1day.png", dpi=150)

Total running time of the script: (1 minutes 50.118 seconds)