Irrigation water balance calculator for wheat fields. Uses WAPOR-3 satellite data (AETI, rainfall, reference ET), Supabase irrigation records, and crop coefficients to compute daily water deltas per field.
git clone https://github.com/shorbaji/autoanton.git
cd autoantonuv syncWAPOR-3 raster data is fetched from Google Cloud Storage. Authenticate with:
gcloud auth application-default loginCreate a .env file in the project root:
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_PUBLISHABLE_KEY=your_publishable_key
fields.geojson— field boundaries (16 fields, A-1 through D-4)kc.csv— crop coefficient (Kc) values by date and field
Both are included in the repo.
Open ai.ipynb and run the cells. The notebook fetches data, caches it locally under data/, and calculates the water balance:
from utils import fetch_aeti, fetch_ret, fetch_rainfall, fetch_irrigations, fetch_kc, calculate_water_delta
planting_date = datetime.date(2025, 12, 10)
aeti = fetch_aeti(planting_date)
rainfall = fetch_rainfall(planting_date)
ret = fetch_ret(planting_date)
kc = fetch_kc()
irrigations = fetch_irrigations(field_ids=list(range(37, 53)), field_names=field_names)
water_delta = calculate_water_delta(irrigations, kc, rainfall, ret)Satellite rasters are cached in data/aeti/, data/rainfall_pcp/, and data/ret/ so subsequent runs skip the download.