# S2S-FM-VN starting design (working hypothesis, NOT locked). Deviate where # evidence says so and record the evidence in docs/decision_log.md. architecture: pipeline: > ECMWF cf coarse LT0-45 -> [local branch, large-scale branch] each (variable/level encoder -> spatial encoder) -> cross-scale fusion -> temporal/lead encoder over Z0..Z45 -> Z_S2S -> 0.25-deg VN decoder (+static/climatology) -> daily & weekly outputs spatial_encoder: "small Swin / hierarchical ViT / ConvNeXt+attention (TBC)" embeddings: [variable, pressure_level, lead_time, calendar_season] do_not_collapse_trajectory: true # keep Z0..Z45, no single global vector backbone: "one shared backbone; optional lead-regime adapters (LT0-10,11-25,26-45) and region adapters" no_per_lead_or_per_region_backbones: true size: prototype_params_M: [5, 10] base_params_M: [15, 30] # only if skill/stability/compute justify track: [params, gpu_mem, train_time, infer_time, disk, checkpoint_size] pretraining: # self-supervised, coarse space ONLY never_reconstruct_interpolated_025: true masks: [variable_level, spatial_patch, lead_time_single, lead_time_interval, combinations] loss: "L = l_var*L_var + l_space*L_space + l_time*L_time (add a term only if it helps)" outputs: daily: [Tx_hat, P_EHD] weekly_W1_W6: {count_distribution: "P(N=0..7)", optional_direct: [P_EHE_WEEK, P_HW2_WEEK]} derived: ["E[N]=sum k P(N=k)", "P(EHE)=1-P(N=0)", "P(HW2)=1-P(N=0)-P(N=1)"] W7: "mask classes 5-7 or horizon-aware head" consistency_check: "daily P(EHD) head vs weekly count head; report inconsistency" finetune_loss: [huber_or_mae_Tx, bce_or_focal_daily_EHD, categorical_or_ordinal_counts, brier_calibration, optional_episode_terms] normalisation: "absolute + lead/calendar-dependent anomalies; fitted on TRAINING years only" temporal_alignment: rule: "valid_date = initialization_date + lead_day; align by actual date, never array index" utc_vs_local: "obs Tx is local (UTC+7) day max; ECMWF maxima UTC; LT0 may be partial. Define + unit-test."