CoolFace
Datasetpublic

souravsud/wind-cfd-trial

Wind Flow Over Complex Terrain Dataset A large-scale dataset of steady-state RANS wind flow simulations over real-world complex terrain, designed for training machine learning models for wind resource assessment and atmospheric flow prediction. Overview Parameter Value Number of terrain locations ~1000 Wind directions per terrain 2 (random) Total simulation cases ~10,000 Cropped grid per case ~298 × 298 × 64 Horizontal resolution (AOI) ~30 m… See the full description on the dataset page: https://huggingface.co/datasets/souravsud/wind-cfd-trial.

sourceHugging Facecc-by-4.0updated 6mo agoView on Hugging Face
0likes32downloads
Dataset Card

Wind Flow Over Complex Terrain Dataset

A large-scale dataset of steady-state RANS wind flow simulations over real-world complex terrain, designed for training machine learning models for wind resource assessment and atmospheric flow prediction.

Overview

ParameterValue
Number of terrain locations~1000
Wind directions per terrain2 (random)
Total simulation cases~10,000
Cropped grid per case~298 × 298 × 64
Horizontal resolution (AOI)~30 m
Vertical extent~500 m AGL
Flow variablesU (3-component), p, k, ε
Surface variablesDEM, roughness (z₀), height AGL
Reference wind speed10 m/s at 100 m height
Atmospheric stabilityNeutral
SolverOpenFOAM simpleFoam (RANS, k-ε)
FormatZarr (xarray-compatible)

Quick Start

Load a single case

python
import xarray as xr

ds = xr.open_zarr("data/case_name.zarr")

# 3D wind field
Ux = ds['Ux'].values  # (ni, nj, nk) array, m/s
Uy = ds['Uy'].values
Uz = ds['Uz'].values

# Terrain
dem = ds['dem'].values        # (ni, nj), meters above sea level
z0 = ds['roughness'].values   # (ni, nj), aerodynamic roughness in meters

# Height above ground
h_agl = ds['h_agl'].values    # (ni, nj, nk), meters

# Metadata
print(ds.attrs['case_id'])
print(ds.attrs['rotation_deg'])   # wind direction
print(ds.attrs['converged'])      # simulation convergence flag

Load from Hugging Face directly

python
from huggingface_hub import hf_hub_download
import xarray as xr
import os

# Download a single case
local_path = hf_hub_download(
    repo_id="souravsud/wind-terrain-cfd",
    filename="data/case_name.zarr",
    repo_type="dataset",
    local_dir="./cache/"
)

ds = xr.open_zarr("./cache/data/case_name.zarr")

PyTorch DataLoader

See examples/02_dataloader_pytorch.py for a ready-to-use torch.utils.data.Dataset class.

Data Description

Per-case Zarr store contents

VariableShapeUnitsDescription
X(ni, nj, nk)mUTM easting of cell centre
Y(ni, nj, nk)mUTM northing of cell centre
Z(ni, nj, nk)mElevation above MSL
Ux(ni, nj, nk)m/sVelocity x-component (UTM east)
Uy(ni, nj, nk)m/sVelocity y-component (UTM north)
Uz(ni, nj, nk)m/sVelocity z-component (vertical)
p(ni, nj, nk)m²/s²Kinematic pressure (p/ρ)
k(ni, nj, nk)m²/s²Turbulent kinetic energy
epsilon(ni, nj, nk)m²/s³Turbulent dissipation rate
dem(ni, nj)mGround elevation (MSL)
roughness(ni, nj)mAerodynamic roughness length z₀
h_agl(ni, nj, nk)mHeight above ground level

Coordinate system

  • X, Y: UTM coordinates. The EPSG code is stored in ds.attrs['utm_epsg'].
  • Z: Absolute elevation above mean sea level (MSL), not height above ground.
  • h_agl: Pre-computed height above ground: h_agl[i,j,k] = Z[i,j,k] - dem[i,j].
  • The mesh is terrain-following (curvilinear). At each (i,j) column, Z increases with k but follows the terrain surface. Horizontal coordinates vary slightly with k.

Velocity scaling

All simulations use a reference velocity of 10 m/s at 100 m height under neutral atmospheric stability. Since the governing equations (incompressible RANS) are linear in velocity for neutral conditions, results can be scaled to any reference wind speed:

python
V_ref_desired = 8.0  # m/s
scale = V_ref_desired / 10.0

U_scaled = U_dataset * scale
p_scaled = p_dataset * scale**2
k_scaled = k_dataset * scale**2
epsilon_scaled = epsilon_dataset * scale**3

This is a feature, not a limitation — it means the dataset effectively covers all wind speeds.

Wind direction

Each case has a specific wind direction stored in ds.attrs['rotation_deg']. This is the angle (in degrees) by which the terrain was rotated to align the inlet boundary with the desired wind direction. The velocity components (Ux, Uy) are in the rotated UTM frame corresponding to that case.

Convergence quality

Each case includes convergence information:

  • ds.attrs['converged']: Boolean flag (True if all residuals < 10⁻³)
  • ds.attrs['residual_Ux'], ds.attrs['residual_p'], etc.: Final residual per field
  • ds.attrs['iterations']: Number of solver iterations

The metadata/case_index.csv file contains convergence data for all cases, allowing easy filtering.

Dataset Structure

wind-terrain-cfd/
├── README.md                    # This file
├── data/
│   ├── case_0001.zarr/          # One Zarr store per simulation
│   ├── case_0002.zarr/
│   └── ...
├── metadata/
│   ├── case_index.csv           # Master index (lat, lon, wind_dir, converged, ...)
│   └── dataset_summary.json     # Aggregate statistics
└── examples/
    ├── 01_load_single_case.py
    ├── 02_dataloader_pytorch.py
    └── 03_velocity_scaling.py

Generation Pipeline

The dataset was generated using an automated pipeline:

  1. 1.Terrain fetching: terrain-fetcher — downloads DEM (Copernicus GLO-30) and land cover (ESA WorldCover) data
  2. 2.Mesh generation: terrain_following_mesh_generator — structured terrain-following mesh for OpenFOAM
  3. 3.Boundary conditions: ABL_BC_generator — neutral atmospheric boundary layer inlet profiles
  4. 4.Job management: taskManager — SLURM job submission and monitoring
  5. 5.Orchestration: CFD-dataset — end-to-end pipeline coordination

Citation

If you use this dataset in your research, please cite:

bibtex
@dataset{sud2026windterrain,
  author = {Sud, Sourav},
  title = {Wind Flow Over Complex Terrain Dataset},
  year = {2026},
  publisher = {Hugging Face},
  url = {https://huggingface.co/datasets/souravsud/wind-terrain-cfd}
}

License

This dataset is released under the CC BY 4.0 license.