FengWu / conf /config.yaml
OneScience's picture
Upload folder using huggingface_hub
2251db8 verified
Raw
History Blame Contribute Delete
7.17 kB
model:
start_epoch: 0
max_epoch: 1
lr: 1E-3
num_blocks: 8
patch_size: [4, 4]
embed_dim: 192
num_heads: [6, 12, 12, 6]
window_size: [2, 6, 12]
pressure_level: 37
checkpoint_dir: "./data/checkpoints"
patience: 50
# 整个数据读取流程
datapipe:
name: "ERA5"
task: "weather_forecasting"
# dataset设定
dataset:
type: "hdf5"
data_dir: './data/' # "$ONESCIENCE_DATASETS_DIR/ERA5/newh5/"
train_time: [2000, 2001]
val_time: [2002]
test_time: [2003]
img_size: [721, 1440]
verbose: true
cache: false
# 气象变量
channels: ['10m_u_component_of_wind', '10m_v_component_of_wind', '2m_temperature', 'mean_sea_level_pressure',
'geopotential_1', 'geopotential_2', 'geopotential_3', 'geopotential_5', 'geopotential_7',
'geopotential_10', 'geopotential_20', 'geopotential_30', 'geopotential_50', 'geopotential_70',
'geopotential_100', 'geopotential_125', 'geopotential_150', 'geopotential_175', 'geopotential_200',
'geopotential_225', 'geopotential_250', 'geopotential_300', 'geopotential_350', 'geopotential_400',
'geopotential_450', 'geopotential_500', 'geopotential_550', 'geopotential_600', 'geopotential_650',
'geopotential_700', 'geopotential_750', 'geopotential_775', 'geopotential_800', 'geopotential_825',
'geopotential_850', 'geopotential_875', 'geopotential_900', 'geopotential_925', 'geopotential_950',
'geopotential_975', 'geopotential_1000',
'relative_humidity_1', 'relative_humidity_2', 'relative_humidity_3', 'relative_humidity_5', 'relative_humidity_7',
'relative_humidity_10', 'relative_humidity_20', 'relative_humidity_30', 'relative_humidity_50', 'relative_humidity_70',
'relative_humidity_100', 'relative_humidity_125', 'relative_humidity_150', 'relative_humidity_175', 'relative_humidity_200',
'relative_humidity_225', 'relative_humidity_250', 'relative_humidity_300', 'relative_humidity_350', 'relative_humidity_400',
'relative_humidity_450', 'relative_humidity_500', 'relative_humidity_550', 'relative_humidity_600', 'relative_humidity_650',
'relative_humidity_700', 'relative_humidity_750', 'relative_humidity_775', 'relative_humidity_800', 'relative_humidity_825',
'relative_humidity_850', 'relative_humidity_875', 'relative_humidity_900', 'relative_humidity_925', 'relative_humidity_950',
'relative_humidity_975', 'relative_humidity_1000',
'u_component_of_wind_1', 'u_component_of_wind_2', 'u_component_of_wind_3', 'u_component_of_wind_5', 'u_component_of_wind_7',
'u_component_of_wind_10', 'u_component_of_wind_20', 'u_component_of_wind_30', 'u_component_of_wind_50', 'u_component_of_wind_70',
'u_component_of_wind_100', 'u_component_of_wind_125', 'u_component_of_wind_150', 'u_component_of_wind_175', 'u_component_of_wind_200',
'u_component_of_wind_225', 'u_component_of_wind_250', 'u_component_of_wind_300', 'u_component_of_wind_350', 'u_component_of_wind_400',
'u_component_of_wind_450', 'u_component_of_wind_500', 'u_component_of_wind_550', 'u_component_of_wind_600', 'u_component_of_wind_650',
'u_component_of_wind_700', 'u_component_of_wind_750', 'u_component_of_wind_775', 'u_component_of_wind_800', 'u_component_of_wind_825',
'u_component_of_wind_850', 'u_component_of_wind_875', 'u_component_of_wind_900', 'u_component_of_wind_925', 'u_component_of_wind_950',
'u_component_of_wind_975', 'u_component_of_wind_1000',
'v_component_of_wind_1', 'v_component_of_wind_2', 'v_component_of_wind_3', 'v_component_of_wind_5', 'v_component_of_wind_7',
'v_component_of_wind_10', 'v_component_of_wind_20', 'v_component_of_wind_30', 'v_component_of_wind_50', 'v_component_of_wind_70',
'v_component_of_wind_100', 'v_component_of_wind_125', 'v_component_of_wind_150', 'v_component_of_wind_175', 'v_component_of_wind_200',
'v_component_of_wind_225', 'v_component_of_wind_250', 'v_component_of_wind_300', 'v_component_of_wind_350', 'v_component_of_wind_400',
'v_component_of_wind_450', 'v_component_of_wind_500', 'v_component_of_wind_550', 'v_component_of_wind_600', 'v_component_of_wind_650',
'v_component_of_wind_700', 'v_component_of_wind_750', 'v_component_of_wind_775', 'v_component_of_wind_800', 'v_component_of_wind_825',
'v_component_of_wind_850', 'v_component_of_wind_875', 'v_component_of_wind_900', 'v_component_of_wind_925', 'v_component_of_wind_950',
'v_component_of_wind_975', 'v_component_of_wind_1000',
'temperature_1', 'temperature_2', 'temperature_3', 'temperature_5', 'temperature_7',
'temperature_10', 'temperature_20', 'temperature_30', 'temperature_50', 'temperature_70',
'temperature_100', 'temperature_125', 'temperature_150', 'temperature_175', 'temperature_200',
'temperature_225', 'temperature_250', 'temperature_300', 'temperature_350', 'temperature_400',
'temperature_450', 'temperature_500', 'temperature_550', 'temperature_600', 'temperature_650',
'temperature_700', 'temperature_750', 'temperature_775', 'temperature_800', 'temperature_825',
'temperature_850', 'temperature_875', 'temperature_900', 'temperature_925', 'temperature_950',
'temperature_975', 'temperature_1000',
]
variables:
- "u10" # 10m U wind component
- "v10" # 10m V wind component
- "t2m" # 2m temperature
- "msl" # Mean sea level pressure
- "z500" # Geopotential at 500 hPa
- "t850" # Temperature at 850 hPa
# 时间配置
time_range: ["2000-01-01", "2020-12-31"]
time_steps: 1
time_res: 6
# 空间配置
spatial_resolution: [0.25, 0.25]
# 采样配置
num_samples: -1 # -1 表示使用全部数据
shuffle: true
random_seed: 42
# 领域特定配置
extra:
levels: [500, 850, 1000]
lat_range: [-90, 90]
lon_range: [0, 360]
# 数据转换配置
transforms:
- type: "Normalize"
params:
mean: [0.0, 0.0, 288.0, 101325.0, 50000.0, 270.0]
std: [5.0, 5.0, 15.0, 1000.0, 5000.0, 10.0]
keys: ["input", "target"]
- type: "ToTensor"
params:
keys: null # null表示转换所有numpy数组
# 其他配置
# DataLoader配置
dataloader:
mask_dtype: "float32"
batch_size: 1
num_workers: 1
pin_memory: true
drop_last: true
shuffle: false # 使用sampler时设为false
prefetch_factor: 2
persistent_workers: true
# 分布式配置
distributed:
enabled: true
sampler: "DistributedSampler"
rank: 0
world_size: 4
shuffle: true
seed: 42
drop_last: true