VachelHu commited on
Commit
a8c16a6
1 Parent(s): 0ddbdab
README.md CHANGED
@@ -13,13 +13,13 @@ tags:
13
 
14
  This is an open-source solutions of global data-driven high-resolution weather forecasting, implemented and improved by [High-Flyer AI](https://www.high-flyer.cn/). It can compare with the ECMWF Integrated Forecasting System (IFS).
15
 
16
- See also: [Github repository](https://github.com/HFAiLab/FourCastNet) and [High-flyer AI's blog](https://www.high-flyer.cn/blog/fourcastnet/)
17
 
18
  Several cases:
19
 
20
- ![Typhoon track comparison](./wind_small.gif)
21
 
22
- ![Water vapour comparison](./precipitation_small.gif)
23
 
24
  For more cases about FourCastNet/GraphCast prediction, please have a look at [HF-Earth](https://www.high-flyer.cn/hf-earth/), a daily updated demo released by [High-Flyer AI](https://www.high-flyer.cn/en/).
25
 
@@ -32,12 +32,12 @@ You can load the weights `backbone.pt` and `precipitation.pt` to generate weathe
32
  ```python
33
  import xarray as xr
34
  import cartopy.crs as ccrs
35
- from afnonet import AFNONet # download the code from https://github.com/HFAiLab/FourCastNet/blob/master/model/afnonet.py
36
 
37
  backbone_model = AFNONet(img_size=[720, 1440], in_chans=20, out_chans=20, norm_layer=partial(nn.LayerNorm, eps=1e-6))
38
- backbone_model.load('./backbone.pt')
39
  precip_model = AFNONet(img_size=[720, 1440], in_chans=20, out_chans=1, norm_layer=partial(nn.LayerNorm, eps=1e-6))
40
- precip_model.load('./precipitation.pt')
41
 
42
  input_x = get_data('2023-01-01 00:00:00')
43
 
@@ -51,15 +51,4 @@ ax.coastlines(resolution='110m')
51
  plt.savefig('img.png')
52
  ```
53
 
54
- FourCastNet can predict 7 surface variables, plus 5 atmospheric variables at each of 3 or 4 pressure levels, for 21 variables total. The details of these variables follow the [paper](https://arxiv.org/abs/2202.11214).
55
-
56
- ## Description of Files
57
-
58
- `backbone.pt`
59
- + the weights of backbone model, 191MB, which is trained on 20 atmospheric variables from `1979-01` to `2022-12`.
60
-
61
- `precipitation.pt`
62
- + the weights of precipitation model, 187MB, which is trained on the variable `total_precipitation` from `1979-01` to `2022-12`.
63
-
64
- `infer2img.py`
65
- + Case code: load the above two weights to generate images of global weather prediction.
 
13
 
14
  This is an open-source solutions of global data-driven high-resolution weather forecasting, implemented and improved by [High-Flyer AI](https://www.high-flyer.cn/). It can compare with the ECMWF Integrated Forecasting System (IFS).
15
 
16
+ See also: [Github repository](https://github.com/HFAiLab/OpenCastKit) and [High-flyer AI's blog](https://www.high-flyer.cn/blog/opencast/)
17
 
18
  Several cases:
19
 
20
+ ![Typhoon track comparison](./pic/wind_small.gif)
21
 
22
+ ![Water vapour comparison](./pic/precipitation_small.gif)
23
 
24
  For more cases about FourCastNet/GraphCast prediction, please have a look at [HF-Earth](https://www.high-flyer.cn/hf-earth/), a daily updated demo released by [High-Flyer AI](https://www.high-flyer.cn/en/).
25
 
 
32
  ```python
33
  import xarray as xr
34
  import cartopy.crs as ccrs
35
+ from afnonet import AFNONet # download the code from https://github.com/HFAiLab/OpenCastKit/blob/master/model/afnonet.py
36
 
37
  backbone_model = AFNONet(img_size=[720, 1440], in_chans=20, out_chans=20, norm_layer=partial(nn.LayerNorm, eps=1e-6))
38
+ backbone_model.load('./weights/fourcastnet/backbone.pt')
39
  precip_model = AFNONet(img_size=[720, 1440], in_chans=20, out_chans=1, norm_layer=partial(nn.LayerNorm, eps=1e-6))
40
+ precip_model.load('./weights/fourcastnet/precipitation.pt')
41
 
42
  input_x = get_data('2023-01-01 00:00:00')
43
 
 
51
  plt.savefig('img.png')
52
  ```
53
 
54
+ FourCastNet can predict 7 surface variables, plus 5 atmospheric variables at each of 3 or 4 pressure levels, for 21 variables total. The details of these variables follow the [paper](https://arxiv.org/abs/2202.11214).
 
 
 
 
 
 
 
 
 
 
 
pic/precipitation_small.gif ADDED

Git LFS Details

  • SHA256: 384e89e1deafa039d743f87afaa5ee1a631825e6232ec6cddcbf3aa7241222ae
  • Pointer size: 132 Bytes
  • Size of remote file: 1.67 MB
pic/wind_small.gif ADDED

Git LFS Details

  • SHA256: 420b2a1df51c44cbe6c5db927ed6201a672997539e92d3ad04690e02ce8bdcc4
  • Pointer size: 132 Bytes
  • Size of remote file: 1.97 MB
weights/fourcastnet/backbone.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2e09df40f9970ca11329e34eef1b423aab9e79cefad89e7e0ab26c3253e89b1d
3
+ size 200121595
weights/fourcastnet/precipitation.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4ced06ed74c1dc4f061e4bf402c31c45e8d2f8b39e8ec71915ff7e1b1164d03b
3
+ size 195950331
weights/fourcastnet_plus/README.md ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ - zh
6
+ metrics:
7
+ - accuracy
8
+ tags:
9
+ - climate
10
+ ---
11
+
12
+ # OpenCastKit: an open-source solutions of global data-driven high-resolution weather forecasting
13
+
14
+ This is an open-source solutions of global data-driven high-resolution weather forecasting, implemented and improved by [High-Flyer AI](https://www.high-flyer.cn/). It can compare with the ECMWF Integrated Forecasting System (IFS).
15
+
16
+ See also: [Github repository](https://github.com/HFAiLab/OpenCastKit) and [High-flyer AI's blog](https://www.high-flyer.cn/blog/opencast/)
17
+
18
+ Several cases:
19
+
20
+ ![Typhoon track comparison](./pic/wind_small.gif)
21
+
22
+ ![Water vapour comparison](./pic/precipitation_small.gif)
23
+
24
+ For more cases about FourCastNet/GraphCast prediction, please have a look at [HF-Earth](https://www.high-flyer.cn/hf-earth/), a daily updated demo released by [High-Flyer AI](https://www.high-flyer.cn/en/).
25
+
26
+ ## Inference
27
+
28
+ ### FourCastNet
29
+
30
+ You can load the weights `backbone.pt` and `precipitation.pt` to generate weather predictions, as shown in the following pseudocode. The complete code is released at `./infer2img.py`.
31
+
32
+ ```python
33
+ import xarray as xr
34
+ import cartopy.crs as ccrs
35
+ from afnonet import AFNONet # download the code from https://github.com/HFAiLab/OpenCastKit/blob/master/model/afnonet.py
36
+
37
+ backbone_model = AFNONet(img_size=[720, 1440], in_chans=20, out_chans=20, norm_layer=partial(nn.LayerNorm, eps=1e-6))
38
+ backbone_model.load('./weights/fourcastnet/backbone.pt')
39
+ precip_model = AFNONet(img_size=[720, 1440], in_chans=20, out_chans=1, norm_layer=partial(nn.LayerNorm, eps=1e-6))
40
+ precip_model.load('./weights/fourcastnet/precipitation.pt')
41
+
42
+ input_x = get_data('2023-01-01 00:00:00')
43
+
44
+ pred_x = backbone_model(input_x) # input Xt, output Xt+1
45
+ pred_p = precip_model(pred_x) # input Xt+1, output Pt+1
46
+
47
+ plot_data = xr.Dataset([pred_x, pred_p])
48
+ ax = plt.axes(projection=ccrs.PlateCarree())
49
+ plot_data.plot(ax=ax, transform=ccrs.PlateCarree(), add_colorbar=False, add_labels=False, rasterized=True)
50
+ ax.coastlines(resolution='110m')
51
+ plt.savefig('img.png')
52
+ ```
53
+
54
+ FourCastNet can predict 7 surface variables, plus 5 atmospheric variables at each of 3 or 4 pressure levels, for 21 variables total. The details of these variables follow the [paper](https://arxiv.org/abs/2202.11214).
weights/graphcast/README.md ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ - zh
6
+ metrics:
7
+ - accuracy
8
+ tags:
9
+ - climate
10
+ ---
11
+
12
+ # OpenCastKit: an open-source solutions of global data-driven high-resolution weather forecasting
13
+
14
+ This is an open-source solutions of global data-driven high-resolution weather forecasting, implemented and improved by [High-Flyer AI](https://www.high-flyer.cn/). It can compare with the ECMWF Integrated Forecasting System (IFS).
15
+
16
+ See also: [Github repository](https://github.com/HFAiLab/OpenCastKit) and [High-flyer AI's blog](https://www.high-flyer.cn/blog/opencast/)
17
+
18
+ Several cases:
19
+
20
+ ![Typhoon track comparison](./pic/wind_small.gif)
21
+
22
+ ![Water vapour comparison](./pic/precipitation_small.gif)
23
+
24
+ For more cases about FourCastNet/GraphCast prediction, please have a look at [HF-Earth](https://www.high-flyer.cn/hf-earth/), a daily updated demo released by [High-Flyer AI](https://www.high-flyer.cn/en/).
25
+
26
+ ## Inference
27
+
28
+ ### FourCastNet
29
+
30
+ You can load the weights `backbone.pt` and `precipitation.pt` to generate weather predictions, as shown in the following pseudocode. The complete code is released at `./infer2img.py`.
31
+
32
+ ```python
33
+ import xarray as xr
34
+ import cartopy.crs as ccrs
35
+ from afnonet import AFNONet # download the code from https://github.com/HFAiLab/OpenCastKit/blob/master/model/afnonet.py
36
+
37
+ backbone_model = AFNONet(img_size=[720, 1440], in_chans=20, out_chans=20, norm_layer=partial(nn.LayerNorm, eps=1e-6))
38
+ backbone_model.load('./weights/fourcastnet/backbone.pt')
39
+ precip_model = AFNONet(img_size=[720, 1440], in_chans=20, out_chans=1, norm_layer=partial(nn.LayerNorm, eps=1e-6))
40
+ precip_model.load('./weights/fourcastnet/precipitation.pt')
41
+
42
+ input_x = get_data('2023-01-01 00:00:00')
43
+
44
+ pred_x = backbone_model(input_x) # input Xt, output Xt+1
45
+ pred_p = precip_model(pred_x) # input Xt+1, output Pt+1
46
+
47
+ plot_data = xr.Dataset([pred_x, pred_p])
48
+ ax = plt.axes(projection=ccrs.PlateCarree())
49
+ plot_data.plot(ax=ax, transform=ccrs.PlateCarree(), add_colorbar=False, add_labels=False, rasterized=True)
50
+ ax.coastlines(resolution='110m')
51
+ plt.savefig('img.png')
52
+ ```
53
+
54
+ FourCastNet can predict 7 surface variables, plus 5 atmospheric variables at each of 3 or 4 pressure levels, for 21 variables total. The details of these variables follow the [paper](https://arxiv.org/abs/2202.11214).