Skip to content

Conversation

@zhangpu00000
Copy link
Contributor

@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

@paddle-bot
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应该跟下方的代码引用起始位置一致,请全文检查一遍


import numpy as np
import paddle
import xarray as xr
Copy link
Collaborator

Choose a reason for hiding this comment

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

跟上一个PR类似,使用try对xarray进行处理

@HydrogenSulfate
Copy link
Collaborator

@zhangpu00000 顺便解决一下冲突

@HydrogenSulfate
Copy link
Collaborator

@zhangpu00000
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.

LGTM

@HydrogenSulfate HydrogenSulfate merged commit ba0bfce into PaddlePaddle:develop Oct 24, 2025
4 of 5 checks passed
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