# Seasonal Drought Forecast Implementation Notes This workspace follows `README` and `Dr_SFC_More_simple.docx`. Current implemented deliverable: - Stage 1 climatology generation from `/home/tanpv/Data/562_VNU/0.25_VN/For_BC/lead__01_BL_Test_VN.nc`. - Outputs are written under `/home/tanpv/Progs/CLI/Dr_SFC_GD1/outputs/Clim/`: - `Obs_Monthly_Clim.nc` - `Mod_Monthly_Clim.nc` Important interpretation: - `Obs_Monthly_Clim.nc` uses observed baseline `1983-01..2020-12`. - `Mod_Monthly_Clim.nc` uses the LT-specific baseline described in the DOCX: - LT1: `1983-02..2021-01` - LT2: `1983-03..2021-02` - LT3: `1983-04..2021-03` - LT4: `1983-05..2021-04` - LT5: `1983-06..2021-05` - LT6: `1983-07..2021-06` - Model climatology is currently the mean of the RegCM and clWRF climatologies. Later Stage 1 AI training will replace this with the Stack/Ensemble corrected climatology when the bias-correction models are available. Additional implemented deliverables: - Stage 1 parallel bias-correction task generation: `manifests/stage1_bc_tasks.jsonl` contains 2,880 tasks. - Stage 1 BC task execution: each task trains one AI member and writes `_bc.nc`, `model.joblib`, and `metrics.json`. - Stage 1 ensemble generation: combines national members and regional mosaics into `pr_bc_ens.nc` / `t2_bc_ens.nc` products. - Slurm scripts are configured for 120 concurrent array tasks, matching 6 nodes x 20 cores/node. Dependency update: - `xgboost==2.1.4` is installed in the Python user site `/home/tanpv/.local/lib/python3.9/site-packages`. Tasks named `xgboost` now use real `xgboost.XGBRegressor`. - The system glibc is older than 2.28, so this machine should keep using the compatible `manylinux2014` XGBoost wheel unless the OS is upgraded. Stage 2 operational SPEI event maps: - `dr_sfc.stage2_spei_probability` reads all six lead-level operational `pr`/`t2` member products for a forecast date. - It writes `Dr_SFC_GD2/outputs/Operational/YYYYMMDD/spei_probability_operational.nc`. - Probability categories follow the DOCX thresholds exactly: W1 `SPEI >= 0.5`, W2 `SPEI >= 1.0`, W3 `SPEI >= 1.5`, D0 `-0.5 < SPEI < 0.5`, D1 `SPEI <= -0.5`, D2 `SPEI <= -1.0`, D3 `SPEI <= -1.5`. - D/W threshold probabilities are cumulative for W1/W2/W3 and D1/D2/D3; D0 is the neutral interval. Stage 1 SPEI verification maps: - `dr_sfc.stage1_spei_verification` compares Stage 1 `spei_ens` against `spei_obs` from `spei_stage1.nc`. - It writes `Dr_SFC_GD1/outputs/SPEI/lead/spei_event_verification_maps.nc` for each lead. - Map dimensions are `scale x category x period x metric x lat x lon`; periods are `train`, `validation`, and `all`; metrics are `POD`, `POFD`, `FAR`, `FBI`, `CSI`, and `PC`. - Categories use the exact threshold definitions: W1 `SPEI >= 0.5`, W2 `SPEI >= 1.0`, W3 `SPEI >= 1.5`, D0 `-0.5 < SPEI < 0.5`, D1 `SPEI <= -0.5`, D2 `SPEI <= -1.0`, D3 `SPEI <= -1.5`.