Skip to content

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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

zhangpu00000
Copy link

@zhangpu00000 zhangpu00000 commented Mar 31, 2025

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

Copy link

paddle-bot bot commented Mar 31, 2025

Thanks for your contribution!

@HydrogenSulfate
Copy link
Collaborator

@zhangpu00000 感谢提交PR,请使用pre-commit对代码进行格式化
image

使用pre-commit对代码格式化。
Copy link
Collaborator

@HydrogenSulfate HydrogenSulfate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢提交PR,代码没有大问题,几处细节还麻烦修改一下

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meteoformer.yaml

@@ -0,0 +1,149 @@
# Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved.
# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.

solver.eval()


@hydra.main(version_base=None, config_path="./conf", config_name="train.yaml")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@hydra.main(version_base=None, config_path="./conf", config_name="train.yaml")
@hydra.main(version_base=None, config_path="./conf", config_name="meteoformer.yaml")

hid_T: int = 256,
N_S: int = 4,
N_T: int = 4,
incep_ker: Tuple[int, ...] = [3, 5, 7, 11],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

默认参数不建议使用list这种可变类型,而是tuple

Suggested change
incep_ker: Tuple[int, ...] = [3, 5, 7, 11],
incep_ker: Tuple[int, ...] = (3, 5, 7, 11),

groups: int = 8,
num_classes: int = 4,
):
super(Meteoformer, self).__init__()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
super(Meteoformer, self).__init__()
super().__init__()


该模块使用两层Transformer,提取空间特征更新节点特征:

``` py linenums="8" title="ppsci/arch/Meteoformer.py"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

本文档的linenums应该跟下方的代码引用起始位置一致,请全文检查一遍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants