Physics-guided AI for geohazards
Project description
Physics-guided AI for Geohazards
GeoPrior-v3 is an open, reproducible research codebase for physics-guided machine learning in geohazard forecasting and risk assessment. Today, it focuses on land subsidence via GeoPriorSubsNet; next, it expands toward landslides and broader geohazard regimes.
✨ Why GeoPrior?
GeoPrior is built to answer practical scientific questions:
- Physics-consistent forecasting — Can predictions respect governing constraints (e.g., consolidation / groundwater dynamics)?
- Generalization across cities/regions — Can one workflow adapt to different regimes with a consistent packaging strategy?
- Uncertainty that supports decisions — How reliable are forecast intervals, and where do risks concentrate?
- Reproducibility — Can reviewers and researchers re-run results end-to-end (GitHub + Code Ocean)?
🔭 Scope & Roadmap
Current focus
- Land subsidence forecasting with GeoPriorSubsNet v3.2
- Physics residual monitoring + learned closures (e.g., effective parameters)
Planned
- Landslide forecasting modules (susceptibility + triggers + dynamics)
- Multi-hazard risk analytics (composable workflows and diagnostics)
📥 Installation
From PyPI (recommended)
pip install geoprior-v3
This installs GeoPrior and the scientific Python stack it depends on. Python 3.10+ is supported (available soon).
Development install (editable)
git clone https://github.com/earthai-tech/geoprior-v3.git
cd geoprior-v3
pip install -e .[dev]
The [dev] extra installs testing and tooling dependencies
(e.g., pytest, coverage, black, ruff).
⚡ Quick Start
1) Import + logging
import geoprior as gp
from geoprior.logging import get_logger, initialize_logging
initialize_logging(verbose=False)
log = get_logger(__name__)
log.info("GeoPrior logging is ready.")
2) Initialize a project config
GeoPrior now exposes a family-based CLI.
The root entry point is geoprior, and dedicated shortcuts are also
available for the run, build, and plot families.
geoprior-init --help
geoprior --help
geoprior-run --help
geoprior-build --help
To create nat.com/config.py interactively:
geoprior-init
3) Use the CLI families
The canonical root form is:
geoprior run <command> [args]
geoprior build <command> [args]
geoprior plot <command> [args]
Family-specific entry points avoid repeating the family name:
geoprior-run <command> [args]
geoprior-build <command> [args]
geoprior-plot <command> [args]
Examples:
geoprior run stage1-preprocess
geoprior-run stage2-train --help
geoprior build full-inputs-npz --help
geoprior-build physics-payload-npz --help
geoprior-run sm3-suite --preset tau50 --help
Compact CLI command table
| Family | Command | Purpose |
|---|---|---|
run |
stage1-preprocess |
Stage-1 preprocessing and artifact export. |
run |
stage2-train |
Train the main GeoPrior model. |
run |
stage3-tune |
Hyperparameter tuning workflow. |
run |
stage4-infer |
Inference, evaluation, and export from trained runs. |
run |
stage5-transfer |
Cross-city transfer evaluation. |
run |
sensitivity |
Run physics or lambda sensitivity workflows. |
run |
sm3-identifiability |
Run one SM3 synthetic identifiability experiment. |
run |
sm3-suite |
Launch preset SM3 regime suites such as tau50 or both50. |
run |
offset-diagnostics |
Run SM3 log-offset diagnostics. |
build |
full-inputs-npz |
Merge Stage-1 split input NPZ files into one union NPZ. |
build |
physics-payload-npz |
Export a physics payload NPZ from a trained model and inputs. |
build |
external-validation-metrics |
Compute borehole or external validation metrics. |
build |
external-validation-fullcity |
Build the full-city validation workflow end to end. |
build |
assign-boreholes |
Assign validation boreholes to the nearest city cloud. |
build |
add-zsurf-from-coords |
Merge elevation lookup tables and add z_surf to tabular data. |
build |
sm3-collect-summaries |
Combine per-regime SM3 summary CSV files into one table. |
Typical usage:
geoprior run stage1-preprocess
geoprior run stage2-train
geoprior build full-inputs-npz
geoprior-build external-validation-metrics --help
geoprior-run sm3-suite --preset tau50
4) Reproduce paper-style workflows
A typical end-to-end workflow is organized as:
- Stage-1 preprocessing
- Stage-2 training
- Stage-3 tuning
- Stage-4 inference
- Stage-5 transfer evaluation
- supplementary build and diagnostic commands
Example:
geoprior run stage1-preprocess
geoprior run stage2-train
geoprior run stage4-infer --help
geoprior build external-validation-metrics --help
geoprior build sm3-collect-summaries --help
A slightly more concise version is:
3) Backward-compatible legacy scripts
For reproducibility and legacy workflows, helper scripts are
still available under scripts/.
A typical workflow includes:
- preprocessing
- training
- evaluation and figure generation
These script-based entry points remain supported. For example:
python -m scripts plot-physics-fields --help
python -m scripts plot-sm3-identifiability --help
python -m scripts make-exposure --help
For Code Ocean users: see
codeocean/README.mdandcodeocean/run.sh.
🧪 Reproducibility
GeoPrior-v3 is designed for end-to-end reproducible science.
- Stable configs via
nat.com/config.pyand CLI overrides - Deterministic pipeline stages exposed through
geoprior run ... - Reusable artifact builders exposed through
geoprior build ... - Capsule-friendly execution via
codeocean/
If you publish results, please pin:
- the GeoPrior version (tag / release)
- config files used
- CLI commands invoked
- environment definition (e.g.,
environment.yml)
📚 Documentation
Documentation is under active development.
-
Landing page (coming soon):
https://earthai-tech.github.io/geoprior-v3/ -
Meanwhile, start with:
docs/reproducibility.mdgeoprior --helpgeoprior-run --helpgeoprior-build --help- inline API docstrings
💻 GeoPrior 3.0 Forecaster App
The GeoPrior research core is openly available to support reproducible scientific research.
In addition, GeoPrior includes the GeoPrior 3.0 Forecaster App, which offers a complete GUI-based application workflow built on top of the research framework. This application version is maintained separately from the public repository, which focuses on the core scientific and reproducible modules.
For access to the GeoPrior 3.0 Forecaster App, please contact the author directly.
- App tutorial: https://youtu.be/JtOpX5lv4iw
- Example simulation run: https://youtu.be/nCouLQQFpQg
🙌 Contributing
Contributions are welcome.
- Check the Issues tracker for bugs or ideas.
- Fork the repository.
- Create a new branch for your feature/fix.
- Add tests when applicable.
- Open a Pull Request.
Please see CONTRIBUTING.md for details.
📜 License
GeoPrior-v3 is distributed under the Apache License 2.0.
See LICENSE and NOTICE for details.
Note: GeoPrior-v3 may include a small number of files adapted from
other earthai-tech repositories under their original licenses
(e.g., BSD-3-Clause). See third_party/licenses/.
📞 Contact & Support
- Bug reports & feature requests: GitHub Issues
- Author: Laurent Kouadio — https://lkouadio.com/
- Email: etanoyau@gmail.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file geoprior_v3-3.2.0rc2.tar.gz.
File metadata
- Download URL: geoprior_v3-3.2.0rc2.tar.gz
- Upload date:
- Size: 2.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
954ee1b905970df29e0442ef74191921cb42d3734d0b0110d30e1b040c36da85
|
|
| MD5 |
85a3d79db18358945dba10fd2311f69c
|
|
| BLAKE2b-256 |
afa3bfe9b91475dd45277e39eef5db507e9f1e69b87e8fbf385aacfbce7b9c2f
|
File details
Details for the file geoprior_v3-3.2.0rc2-py3-none-any.whl.
File metadata
- Download URL: geoprior_v3-3.2.0rc2-py3-none-any.whl
- Upload date:
- Size: 2.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2b11dbd7d0dc6b2075f8997bc03997b680c7d96ddff3caf12cab8706bf75de4
|
|
| MD5 |
bc9c8bfe05ca3e9b7aad60a7e24ac8bc
|
|
| BLAKE2b-256 |
8ec0a16ba9074648d3bc37ddfc4cab9065178b7d51e1888f766e0bb594f9ac61
|