-
Notifications
You must be signed in to change notification settings - Fork 231
Add Meteoformer for meteorological forecasting #1126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for your contribution! |
|
@zhangpu00000 感谢提交PR,请使用pre-commit对代码进行格式化 |
使用pre-commit对代码格式化。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感谢提交PR,代码没有大问题,几处细节还麻烦修改一下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meteoformer.yaml
examples/meteoformer/main.py
Outdated
| @@ -0,0 +1,149 @@ | |||
| # Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved. | |
| # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. |
examples/meteoformer/main.py
Outdated
| solver.eval() | ||
|
|
||
|
|
||
| @hydra.main(version_base=None, config_path="./conf", config_name="train.yaml") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @hydra.main(version_base=None, config_path="./conf", config_name="train.yaml") | |
| @hydra.main(version_base=None, config_path="./conf", config_name="meteoformer.yaml") |
ppsci/arch/meteoformer.py
Outdated
| hid_T: int = 256, | ||
| N_S: int = 4, | ||
| N_T: int = 4, | ||
| incep_ker: Tuple[int, ...] = [3, 5, 7, 11], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
默认参数不建议使用list这种可变类型,而是tuple
| incep_ker: Tuple[int, ...] = [3, 5, 7, 11], | |
| incep_ker: Tuple[int, ...] = (3, 5, 7, 11), |
ppsci/arch/meteoformer.py
Outdated
| groups: int = 8, | ||
| num_classes: int = 4, | ||
| ): | ||
| super(Meteoformer, self).__init__() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| super(Meteoformer, self).__init__() | |
| super().__init__() |
docs/zh/examples/meteoformer.md
Outdated
|
|
||
| 该模块使用两层Transformer,提取空间特征更新节点特征: | ||
|
|
||
| ``` py linenums="8" title="ppsci/arch/Meteoformer.py" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
本文档的linenums应该跟下方的代码引用起始位置一致,请全文检查一遍
add Climateformer model for climate prediction add docs for Climateformer add examples for Climateformer add era5climate_dataset for Climateformer
Changes for Climateformer
Revised Version of Climateformer for climate prediction
|
|
||
| import numpy as np | ||
| import paddle | ||
| import xarray as xr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
跟上一个PR类似,使用try对xarray进行处理
|
@zhangpu00000 顺便解决一下冲突 |
|
@zhangpu00000 |
refine import order
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM


PR types
Others
PR changes
Others
Describe
add Meteoformer model for meteorological forecasting
add docs for Meteoformer
add examples for Meteoformer
add era5meteo_dataset for Meteoformer