# Single source of settings for every chapter. Chapters read this file; they never
# hard-code paths, areas or periods.

paths:
  # All data paths must be OUTSIDE OneDrive (GRASS writes thousands of small files and a
  # SQLite database; sync locks corrupt them).
  grassdata: E:/grassdata
  downloads: E:/temp/pgca/downloads
  outputs: E:/temp/pgca/outputs
  # One small NetCDF per variable-year for the active AOI (Chapter 3 builds them)
  staged: E:/temp/pgca/staged
  # Optional local AgERA5 archive, layout {var}/agera5_{var}_{year}.nc. Set to null if you
  # download through the CDS API instead.
  agera5_archive: E:/temp/agera5

grass:
  project: pgca_agera5
  epsg: 4326

# Areas of interest. Edges sit on the AgERA5 grid: cell centres are multiples of 0.1 deg,
# so cell edges end in .05. n/s/w/e are EDGES, not centres.
aoi:
  ntt:          # teaching area: Nusa Tenggara Timur (rectangle, not the official boundary)
    n: -7.95
    s: -11.15
    w: 118.85
    e: 125.25
  sumba:        # cross-check against the eddi repo
    n: -9.15
    s: -10.45
    w: 118.85
    e: 120.95
  indonesia:    # scale-up
    n: 6.55
    s: -11.55
    w: 94.95
    e: 141.55
active_aoi: ntt
res: 0.1

period:
  start: "1979-01-01"
  end: "2025-12-31"      # 2026 is partial and variables end on different dates
teaching_years: [2015, 2016]   # Chapter 3 imports these unless run_full is true
baseline: [1991, 2020]   # provisional, open method question M2

agera5:
  dataset: sis-agrometeorological-indicators
  version: "2_0"
  # short name -> CDS request (variable, statistic), the NetCDF variable inside the file,
  # the archive folder, and the STRDS semantic type (descriptive metadata, Chapter 3)
  variables:
    tmax:  {cds: 2m_temperature,          statistic: 24_hour_maximum, nc: Temperature_Air_2m_Max_24h,        archive: t2mmax, semantic: max}
    tmin:  {cds: 2m_temperature,          statistic: 24_hour_minimum, nc: Temperature_Air_2m_Min_24h,        archive: t2mmin, semantic: min}
    tdew:  {cds: 2m_dewpoint_temperature, statistic: 24_hour_mean,    nc: Dew_Point_Temperature_2m_Mean_24h, archive: t2mdp, semantic: mean}
    ws10:  {cds: 10m_wind_speed,          statistic: 24_hour_mean,    nc: Wind_Speed_10m_Mean_24h,           archive: ws10m, semantic: mean}
    srad:  {cds: solar_radiation_flux,    statistic: null,            nc: Solar_Radiation_Flux,              archive: srad, semantic: sum}
    et0:   {cds: reference_evapotranspiration, statistic: null,       nc: ReferenceET_PenmanMonteith_FAO56,  archive: refet, semantic: sum}

# Long jobs (multi-year imports, full ET0 and EDDI runs) only run when this is true.
run_full: false
