Wind resource layers — multi-variable windowed read (live)¶
One download() call can fetch several Global Wind Atlas layers for the same
bounding box. Each is read windowed from its remote Cloud-Optimized GeoTIFF
(only the AOI transfers), and download() returns one written GeoTIFF per layer.
Here we pull the mean wind speed, the IEC-class-2 turbine capacity factor, and the
air density at 100 m for a small box near DTU (Denmark) and compare them.
Runs live against public figshare (no credentials).
from pathlib import Path
import numpy as np
from pyramids.dataset import Dataset
from earthlens.earthlens import EarthLens
2026-06-28 01:20:50 | INFO | pyramids.base.config | Logging is configured.
Fetch three wind layers at once¶
Pass several layer ids in variables=; the backend resolves each against the
catalog and fetches it by its transport (all three here are vsicurl windowed
reads). The returned list has one GeoTIFF path per requested layer, in order.
layers = ["wind_100m", "capacity_factor_iec2", "air_density_100m"]
paths = EarthLens(
data_source="solar-wind-atlas",
variables=layers,
lat_lim=[55.0, 55.5],
lon_lim=[12.0, 12.5],
path="wind_layers_out",
).download(progress_bar=False)
for layer, path in zip(layers, paths):
print(f"{layer:22s} -> {path.name}")
2026-06-28 01:20:52.276 | INFO | earthlens.solar_wind_atlas.backend:_fetch_one_layer:256 - solar_wind_atlas wind_100m: windowed /vsicurl read https://ndownloader.figshare.com/files/17247017
2026-06-28 01:20:55.174 | INFO | earthlens.solar_wind_atlas.backend:_fetch_one_layer:256 - solar_wind_atlas capacity_factor_iec2: windowed /vsicurl read https://ndownloader.figshare.com/files/17281778
2026-06-28 01:20:55.988 | INFO | earthlens.solar_wind_atlas.backend:_fetch_one_layer:256 - solar_wind_atlas air_density_100m: windowed /vsicurl read https://ndownloader.figshare.com/files/17281898
2026-06-28 01:20:56.906 | INFO | earthlens.solar_wind_atlas.backend:_log_attribution:313 - solar_wind_atlas attribution: Global Wind Atlas 3.0, © Technical University of Denmark (DTU) / World Bank (ESMAP). Licensed CC-BY-4.0.
wind_100m -> wind_100m.tif capacity_factor_iec2 -> capacity_factor_iec2.tif air_density_100m -> air_density_100m.tif
Inspect each layer¶
Read every written GeoTIFF back with pyramids and summarise its value range. All three share the same EPSG:4326 grid and AOI; only the quantity differs.
rows = []
for layer, path in zip(layers, paths):
ds = Dataset.read_file(str(path))
a = np.asarray(ds.read_array(), dtype='float64')
finite = a[np.isfinite(a)]
rows.append((layer, ds.columns, ds.rows, round(float(finite.min()), 3), round(float(finite.mean()), 3), round(float(finite.max()), 3)))
import pandas as pd
pd.DataFrame(rows, columns=['layer', 'cols', 'rows', 'min', 'mean', 'max'])
| layer | cols | rows | min | mean | max | |
|---|---|---|---|---|---|---|
| 0 | wind_100m | 201 | 201 | 7.452 | 8.648 | 9.656 |
| 1 | capacity_factor_iec2 | 201 | 201 | 0.462 | 0.568 | 0.647 |
| 2 | air_density_100m | 201 | 201 | 1.218 | 1.232 | 1.234 |
What the numbers say¶
wind_100mis the mean wind speed at 100 m in m/s.capacity_factor_iec2is the fraction of rated output an IEC-class-2 turbine would average here (0-1) — it tracks the wind speed.air_density_100m(kg/m3) scales the power a turbine extracts at a given speed.
Because all three are read windowed from their global COGs, fetching three layers
for a small box still transfers only a few hundred KB each — not the multi-GB
global files. (Global Solar Atlas layers like ghi would instead download their
full ~2.7 GB archive once, then crop locally.)