Western Water Use Management Modeling

The Enhanced Soil and Crop (ESC) Model

WWUMM Navigation

OPEN SOURCE • GO • POSTGRESQL • MODFLOW

The Enhanced Soil and Crop (ESC) Model

Revolutionizing Pumping and Recharge Calculations for Data-Driven Water Management Policies and Decisions

Imagine having a super-smart, high-speed calculator that takes complex land-use data, weather records, crop needs, and canal deliveries — then instantly figures out exactly how much ground water is pumped from wells and how much water recharges the aquifer across the entire southern Nebraska Panhandle. That’s the Enhanced Soil and Crop (ESC) Model — the powerful engine behind the Western Water Use Management Modeling (WWUMM).

Developed by Adaptive Resources, Inc. and sponsored by the North Platte and South Platte Natural Resources Districts, the ESC Model transforms raw data into the well-pumping (WEL) and recharge (RCH) files that MODFLOW needs. It’s fast, transparent, and built for the future.

What Makes the ESC Model Special?

The ESC Model is a modern command-line tool written in the lightning-fast GO programming language (created by Google in 2006). It replaced the older 2014 FORTRAN-based system with a cleaner, more maintainable design that uses databases instead of cumbersome text files. The entire project is open-source on GitHub, so anyone can review the code, download executables, or even contribute improvements.

Go Language Icon

Why GO Language?

GO was chosen for its blazing speed, excellent maintainability, and built-in ability to create self-documenting code. This means the model’s inner workings are automatically turned into easy-to-read online documentation — perfect for students, researchers, and water managers who want to understand exactly how the calculations work.

Open Source Icon

Open Source & Transparent

Everything lives on GitHub! You can view the full change log, download ready-to-run executables for Windows, Mac, and Linux, and even submit improvements. This open approach builds trust and lets the water-management community keep making the model better together.

VIEW ON GITHUB

Database Revolution: From Text Files to Smart Storage

One of the biggest upgrades is the move to a PostgreSQL database with full spatial capabilities. Instead of wrestling with large GIS shapefiles and intermediate text files, the ESC Model pulls raw data directly from organized database tables.

SCHEMAS
  • np & sp — North & South Platte NRD-specific data (land use, wells, parcels)
  • rswb — Crop coefficients, weather stations, irrigation efficiency
  • sw — Canals, diversions, conveyance losses
  • public — Shared data like crops, model cells, outside-area pumping/recharge
Database Icon

Why Databases Are a Game-Changer

No more error-prone pre-processing steps or massive text files! Everything lives in one reliable, version-controlled place. This makes the model faster, more accurate, and far easier to update when new data arrives.

Spatial Magic Icon

Spatial Magic

Every table has a “geom” field with real geographic shapes. The model can instantly match parcels, wells, and canals to any grid size — giving water managers incredible flexibility and precision.

Every table includes geometry fields, so the model works seamlessly with both the old 40-acre grid and modern unstructured MODFLOW 6 grids.

How the ESC Model Works

The modeling process is elegant and thorough:

  1. 1
    CropSIM Integration

    The ESC Model first loads results from the separate Python-based CropSIM tool (which calculates crop water needs, including the updated winter wheat/fallow cycle).

  2. 2
    Surface Water First

    It processes daily canal diversions, removes excess flows, calculates monthly deliveries per acre, and determines canal return flows.

  3. 3
    Parcel-by-Parcel Water Balance

    For every irrigated and dryland parcel, the model calculates irrigation demand, surface water applied, ground water pumped (measured or simulated), and return flows to the aquifer.

  4. 4
    Natural Areas

    Any land not covered by parcels is treated as natural vegetation.

  5. 5
    Final Outputs

    Recharge and pumping totals are aggregated by model cell, then written to a clean SQLite output database. From that database, the ESC Model can instantly generate the exact WEL (pumping) and RCH (recharge) files needed by the ground water model, plus GeoJSON files for mapping.

Parcel Power Icon

Parcel Power

Instead of calculating at the model cell right away, the ESC Model keeps whole parcels intact as long as possible. This produces cleaner water-balance checks and makes it much easier to spot and fix any issues.

ESC Model Operations (CLI Commands)

The entire system runs from a single executable file with four simple commands. Users simply provide a description and the path to CropSIM results — everything else is handled automatically.

AVAILABLE COMMANDS
runModel

Full 1997–2020 simulation

runSteadyState

Historical steady-state run

mfFiles

Create MODFLOW files from results

qcResults

Quality-control checks

EXAMPLE USAGE
./esc runModel "2020 Final Run" ./cropsim_results/

The model outputs a timestamped SQLite database (results<timestamp>.sqlite), log files, WEL/RCH files, and GeoJSON for visualization.

Key Improvements Over Previous Models

  • More realistic crop handling (separate fallow and winter wheat every year)
  • Pasture areas now use a dedicated pasture crop; everything else defaults to natural vegetation
  • Simplified yet more accurate surface-water accounting (no unnecessary StateMOD complexity)
  • Consistent canal-loss calculations across the entire system
  • Switch from cell-based to parcel-based modeling
Canal Recharge Icon

Smarter Surface Water

The old complex StateMOD network was replaced with a streamlined system using real historical diversions, application efficiency, and canal losses. The result? More accurate recharge numbers with far less complexity.

📈 INTERACTIVE DATA EXPLORER

Explore ESC Model Outputs

Interactive visualization of ground water pumping and aquifer recharge generated by the Enhanced Soil and Crop (ESC) Model. "Total Irrigated Pumping" is the sum of Ground Water Only + Commingled Irrigated Pumping. Use the year range controls to zoom into specific time periods.

ESC Model Output Data • North Platte & South Platte NRDs

Ready for the Future

The ESC Model delivers fast, transparent, and highly accurate pumping and recharge data that powers the entire Western Water Use Management Modeling effort. It’s a shining example of how modern open-source tools, smart databases, and thoughtful design can help us better understand — and sustainably manage — one of Nebraska’s most precious resources: its ground water.

This tool keeps getting better with every update, and because it’s open source, the community can continue to refine it for years to come.

Highly Technical Repository & Implementation Details

The complete source code for the 2020 WWUM/ESC Model is available in the open-source GitHub repository at https://github.com/Longitude103/wwum2020 (archived read-only since February 2024). The repository is organized into clean, modular Go packages that reflect the logical separation of concerns:

cmd/
CLI command definitions and entry points
Using standard flag package with structured command handling
database/
PostgreSQL + PostGIS connection logic
Spatial queries and reusable PL/pgSQL functions
parcels/
Core parcel water-balance calculations
Soil-type handling and monthly NIR processing
wells/
Well aggregation & pumping attribution
Measured vs simulated, post-1997 rules
rchFiles/
Recharge file generation
Parcel-to-cell distribution logic
qc/
Quality control routines
Result validation
Modular Design Icon

Modular Design Made Simple

Each folder (package) handles one clear job — like a well-organized toolbox. This makes the code easier to read, test, and improve over time. Even if you’re new to programming, you can explore one folder at a time and quickly see how everything fits together.

OUTPUTS
  • ✅ results<timestamp>.sqlite
  • ✅ WEL and RCH MODFLOW files
  • ✅ GeoJSON for QGIS visualization
  • ✅ Detailed log files
TECHNOLOGIES
Go PostgreSQL PostGIS SQLite3 Docker MODFLOW 6
PLATFORMS
Windows AMD64
macOS (Intel + ARM64)
Linux AMD64

+ Full Docker support for reproducible builds
Docker Icon

Docker for Easy Testing

With Docker, anyone can spin up the exact same development environment in seconds — no matter what operating system they use. This removes the “it works on my machine” problem and makes collaboration much smoother.

Built for the Long Haul Icon

Built for the Long Haul

This clean, modular, and fully auditable architecture isn’t just powerful — it’s designed to grow with us. Every package, spatial function, and output format is ready for future enhancements, making the ESC Model a rock-solid foundation for next-generation ground water modeling across the southern Nebraska Panhandle.

Explore the Full Source Code

Cross-platform binaries • Complete documentation • Community contributions welcome