zhangrenchao commited on
Commit
3654a86
·
verified ·
1 Parent(s): 109b0dc

Add English model card

Browse files
Files changed (1) hide show
  1. README.md +139 -0
README.md ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ tags:
6
+ - OneScience
7
+ - Earth Science
8
+ - GCM
9
+ - Neural Parameterization
10
+ - Stable Climate
11
+ frameworks: PyTorch
12
+ ---
13
+
14
+ <p align="center"><strong><span style="font-size: 30px;">NNCAM-Stable</span></strong></p>
15
+
16
+ # Model Introduction
17
+
18
+ NNCAM-Stable replaces atmospheric moist physics and radiation in a GCM with neural networks. It targets stable multiyear online climate simulation.
19
+
20
+ Paper: Stable climate simulations using a realistic general circulation model with neural network parameterizations for atmospheric moist physics and radiation processes
21
+ https://doi.org/10.5194/gmd-15-3923-2022
22
+
23
+ # Model Description
24
+
25
+ The model was proposed by teams from Tsinghua University and Scripps Institution of Oceanography. It was trained with two years of SPCAM data containing 122 column inputs and 68 tendency and radiation targets. It supports online CAM5.2 moist-physics and radiation parameterization and stable climate simulation.
26
+
27
+ # Use Cases
28
+
29
+ | Use Case | Description |
30
+ | :---: | :--- |
31
+ | Moist physics | Predict 30-level moisture and dry-static-energy tendencies. |
32
+ | Radiation emulation | Predict surface and top-of-atmosphere radiation fluxes. |
33
+ | Online stability | Validate long coupled simulations with neural parameterizations. |
34
+ | ModelScope/OneCode execution | Validate data, training, inference, climate metrics, and visualization. |
35
+ | Multi-GPU training | Start multi-process training through `torchrun`. |
36
+
37
+ # Usage Instructions
38
+
39
+ ```bash
40
+ hf download OneScience-Group/NNCAM-Stable --local-dir ./NNCAM-Stable
41
+ cd NNCAM-Stable
42
+ ```
43
+
44
+ ### Environment Dependencies
45
+
46
+ **Hardware Requirements**
47
+
48
+ - A GPU or DCU is recommended.
49
+ - A CPU can be used for connectivity validation with the default small-sample configuration.
50
+ - DCU users should install DTK 25.04.2 or a compatible OneScience-recommended version first.
51
+
52
+ **DCU Environment**
53
+
54
+ ```bash
55
+ # Activate DTK and Conda first
56
+ conda create -n onescience311 python=3.11 -y
57
+ conda activate onescience311
58
+ pip install onescience[earth-dcu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
59
+ ```
60
+
61
+ **GPU Environment**
62
+
63
+ ```bash
64
+ # Activate Conda first
65
+ conda create -n onescience311 python=3.11 -y libstdcxx-ng=12 libgcc-ng=12 gcc_linux-64=12 gxx_linux-64=12
66
+ conda activate onescience311
67
+ pip install onescience[earth-gpu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
68
+ ```
69
+
70
+ ### Training Data
71
+
72
+ The paper uses SPCAM simulations with 122 column inputs and 68 moist-physics and radiation outputs. Synthetic data preserve the full dimensions, 30 vertical levels, and three independent parameterization networks while reducing samples, width, and epochs.
73
+
74
+ ```bash
75
+ python scripts/fake_data.py
76
+ ```
77
+
78
+ ### Training
79
+
80
+ For single-process training, use:
81
+
82
+ ```bash
83
+ python scripts/train.py
84
+ ```
85
+
86
+ For multi-process training, use:
87
+
88
+ ```bash
89
+ torchrun --standalone --nproc_per_node=2 scripts/train.py
90
+ ```
91
+
92
+ Training results are saved to:
93
+
94
+ ```text
95
+ result/checkpoints/nncam_stable.pt
96
+ result/training/metrics.json
97
+ ```
98
+
99
+ ### Trained Weights
100
+
101
+ No weights are bundled under `weight/`. The code archive is available at https://doi.org/10.5281/zenodo.5596273 and the training data at https://doi.org/10.5281/zenodo.5625616; the paper does not list a separate directly loadable pretrained-weight file.
102
+
103
+ ### Inference
104
+
105
+ ```bash
106
+ python scripts/inference.py
107
+ ```
108
+
109
+ Inference produces 30 moisture tendencies, 30 dry-static-energy tendencies, and eight radiation fluxes. Results are saved to:
110
+
111
+ ```text
112
+ result/output/predictions.npz
113
+ ```
114
+
115
+ ### Evaluation and Visualization
116
+
117
+ ```bash
118
+ python scripts/result.py
119
+ ```
120
+
121
+ Evaluation reports overall RMSE and creates an output-profile figure. Results are saved to:
122
+
123
+ ```text
124
+ result/evaluation/metrics.json
125
+ result/evaluation/comparison.png
126
+ ```
127
+
128
+ # Official OneScience Information
129
+
130
+ | Platform | OneScience Main Repository | Skills Repository |
131
+ |---|---|---|
132
+ | Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
133
+ | GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |
134
+
135
+ # Citation and License
136
+
137
+ This repository is an independent engineering reproduction of the public NNCAM-Stable specifications.
138
+
139
+ SPCAM v2, NNCAM source code, model artifacts, and the training and test data remain subject to the licenses and terms of their respective archives.