File size: 5,099 Bytes
0d5371b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | model:
start_epoch: 0
max_epoch: 100
lr: 5e-4
beta_1: 0.9
beta_2: 0.95
weight_decay: 1e-5
warmup_epochs: 10
warmup_start_lr: 1e-8
eta_min: 1e-8
# Stormer architecture params
in_img_size: [128, 256] # 1.40625° resolution (lat, lon)
patch_size: 2
hidden_size: 1024
depth: 24
num_heads: 16
mlp_ratio: 4.0
# Training strategy
list_train_intervals: [6, 12, 24] # hours, randomly chosen per batch
steps: 1 # number of autoregressive rollout steps
val_lead_times: [6, 72] # lead times for validation (hours)
data_freq: 6 # data frequency (hours)
checkpoint_dir: "./data/checkpoints"
patience: 50
# Normalization constants directory (official Stormer .npz files)
normalize_dir: "./data/normalize/"
# 整个数据读取流程
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: [128, 256]
verbose: true
cache: false
# Stormer variables: 4 surface + 5 × 13 pressure levels = 69 variables
channels:
# Surface variables (4)
- "2m_temperature"
- "10m_u_component_of_wind"
- "10m_v_component_of_wind"
- "mean_sea_level_pressure"
# Geopotential at 13 pressure levels
- "geopotential_50"
- "geopotential_100"
- "geopotential_150"
- "geopotential_200"
- "geopotential_250"
- "geopotential_300"
- "geopotential_400"
- "geopotential_500"
- "geopotential_600"
- "geopotential_700"
- "geopotential_850"
- "geopotential_925"
- "geopotential_1000"
# U component of wind at 13 pressure levels
- "u_component_of_wind_50"
- "u_component_of_wind_100"
- "u_component_of_wind_150"
- "u_component_of_wind_200"
- "u_component_of_wind_250"
- "u_component_of_wind_300"
- "u_component_of_wind_400"
- "u_component_of_wind_500"
- "u_component_of_wind_600"
- "u_component_of_wind_700"
- "u_component_of_wind_850"
- "u_component_of_wind_925"
- "u_component_of_wind_1000"
# V component of wind at 13 pressure levels
- "v_component_of_wind_50"
- "v_component_of_wind_100"
- "v_component_of_wind_150"
- "v_component_of_wind_200"
- "v_component_of_wind_250"
- "v_component_of_wind_300"
- "v_component_of_wind_400"
- "v_component_of_wind_500"
- "v_component_of_wind_600"
- "v_component_of_wind_700"
- "v_component_of_wind_850"
- "v_component_of_wind_925"
- "v_component_of_wind_1000"
# Temperature at 13 pressure levels
- "temperature_50"
- "temperature_100"
- "temperature_150"
- "temperature_200"
- "temperature_250"
- "temperature_300"
- "temperature_400"
- "temperature_500"
- "temperature_600"
- "temperature_700"
- "temperature_850"
- "temperature_925"
- "temperature_1000"
# Specific humidity at 13 pressure levels
- "specific_humidity_50"
- "specific_humidity_100"
- "specific_humidity_150"
- "specific_humidity_200"
- "specific_humidity_250"
- "specific_humidity_300"
- "specific_humidity_400"
- "specific_humidity_500"
- "specific_humidity_600"
- "specific_humidity_700"
- "specific_humidity_850"
- "specific_humidity_925"
- "specific_humidity_1000"
# Short names for evaluation
variables:
- "t2m" # 2m temperature
- "u10" # 10m U wind component
- "v10" # 10m V wind component
- "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: [1.40625, 1.40625]
# 采样配置
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
|