Code for low-rank tensor analysis of precipitation and satellite–reference merging (IMERG + sparse CPC) over CONUS.
- Low-rank reconstruction — CP / PARAFAC factorization of spatiotemporal precipitation tensors, compared with matrix factorizations
- Tensor merging (CPC grid) — TMerge and baselines (linear, quantile mapping, MLP) that share low-rank factors to correct IMERG with sparse CPC
- Tensor merging (high-res) — same merging on the native IMERG grid
- Sensitivity analysis — effect of spatial coverage, period length, and observation fraction
I/O uses local data/ and results/ (repo_paths.py).
conda env create -f environment.yml
conda activate tmerge(or pip install -r requirements.txt)
IMERG download needs Earthdata login (env vars or ~/.netrc).
1. Data prep → data/
python data_prep/download_cpc.py
python data_prep/download_imerg.py
python data_prep/prep.py
python data_prep/train_combine_zarr.py2. Runs → results/
# Low-rank reconstruction
python run/completion/completion_multirun.py
# Tensor merging (CPC grid)
python run/merge_cpc_grid/merge_cpc_grid_full.py
python run/merge_cpc_grid/qm_run.py
# Tensor merging (IMERG-native)
python run/merge_high_res/full_runs.py
# Sensitivity analysis
python ablations/spatial.py
python ablations/temporal.py
python ablations/ratio.py3. Plots
Scripts in plots/ match each experiment folder and write figures under results/.