# ============================================================================
#  SHARED SETTINGS OF THE ROUND 7 RUNS (runs from the AdaPBS L4 gdirs on v8).
#  Sourced by submit_ens.sh and run_ens_slurm.sh.
# ============================================================================

source /home/www/fmaussion/runs/lmr_2025/lmr_gdirs_v8_202610/common.sh

R7_DIR=/home/www/fmaussion/runs/lmr_2025/round7
# The OGGM of the AdaPBS calibration (fmaussion/oggm@adapbs: master 5e9f1332
# + speed-ups #2024/#2025 + adapbs; the same model output as 5e9f1332)
OGGM_REPO=https://github.com/fmaussion/oggm.git
OGGM_COMMIT=50c97b88669598c0822abd562041e32dd375dc66

# The gdirs: AdaPBS L4 tree on the v8 experiment V8_EXP
V8_EXP=pf3.5_mf5_lam12
ADAPBS_TREE=${ADAPBS_TREE:-pf3.5_mf5_lam12_adapbs}
TREE_URL=https://cluster.klima.uni-bremen.de/~fmaussion/runs/lmr_2025/lmr_gdirs_v8_202610/adapbs/$ADAPBS_TREE/

# The forcing
LAPREC=lmr_BE_on_all_laprec_v20261031
HIST_URL=$DATA_URL/$LAPREC                         # T (strand symlinks) + LAPrec P
NAT_URL=$DATA_URL/$LAPREC/nat                      # LAPrec-resampled NAT P
NAT_T_URL=${NAT_T_URL:-$DATA_URL/lmr_seas_fullsplit_oldBE_newnat}  # NAT T (v2 of 2026-10-17); override for shifted NAT

RUN_CHUNK_SIZE=100
RUN_N_CHUNKS=40
RUN_CPUS=8
LOCAL_PY=/home/users/fmaussion/.miniforge3/envs/oggm_env/bin/python

# --- permutation runs (round7/perm/, conditional attribution) -----------------
STATES_DIR=$V8_DIR/states
STATES_URL_BASE=https://cluster.klima.uni-bremen.de/~fmaussion/runs/lmr_2025/lmr_gdirs_v8_202610/states
PERM_YS=1850
PERM_STATES="23 7 83 169 118"   # the 1850 NAT volume quantiles of ens_v8_adapbs_a5v10
PERM_CHUNK_SIZE=100
PERM_N_CHUNKS=40
PERM_BATCH_SIZE=20              # NAT members per task (x 5 states)
PERM_CPUS=8 ; PERM_TIME=08:00:00
