File size: 2,487 Bytes
f798323
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
pipeline_tag: other
library_name: onnxruntime
tags:
  - cfd
  - wind-simulation
  - terrain-model
  - onnx
  - fluid-dynamics
license: cc-by-nc-4.0
language: en
---

# FuXi-CFD Model

## Overview

This repository accompanies the paper:

**Reconstructing fine-scale 3D wind fields with terrain-informed machine learning**

It provides the pre-trained FuXi-CFD model used in the study, exported in ONNX format, together with a complete inference example.

**Version:** v1.0  
**Framework:** ONNX (runtime inference)  

---

## Model Description

FuXi-CFD is a terrain-informed deep learning model designed to reconstruct fine-scale three-dimensional wind fields from coarse atmospheric inputs and high-resolution terrain information.

### Model Inputs

The model expects an `inputs.npz` file containing:

- `dem` — terrain elevation (300 × 300, float32, meters)
- `roughness` — surface roughness length (300 × 300, float32, meters)
- `u_100m` — coarse zonal wind at 100 m (9 × 9, float32, m s⁻¹)
- `v_100m` — coarse meridional wind at 100 m (9 × 9, float32, m s⁻¹)

All variables must be provided in physical units (no normalization applied by the user).  
Normalization parameters used during training are included in `normalization/`.

### Model Outputs

The model produces a file `prediction.npz` containing:

- `u` — zonal wind component (27, 300, 300), m s⁻¹  
- `v` — meridional wind component (27, 300, 300), m s⁻¹  
- `w` — vertical wind component (27, 300, 300), m s⁻¹  
- `k` — turbulent kinetic energy (27, 300, 300), m² s⁻²  

The vertical levels correspond to the 27 non-uniform heights described in the associated dataset documentation.

---

## Quick Start (Inference Example)

```bash
cd inference_example
python scripts/infer.py \
  --model ../model/fuxicfd_model.onnx \
  --input data/inputs.npz \
  --output data/prediction.npz
```

Outputs are saved as `data/prediction.npz` with keys: `u, v, w, k`.

---

## Repository Structure

- `model/` — exported ONNX weights  
- `inference_example/` — complete preprocessing → inference → postprocessing pipeline  
  - `normalization/` — training-time normalization parameters  
  - `scripts/` — runnable inference scripts
  - `utils/` — helper functions

---

## License

CC BY-NC 4.0

---

## Citation

If you use this model, please cite:

Lin, C., et al. *Reconstructing fine-scale 3D wind fields with terrain-informed machine learning*, Nature Communications (2026).