GT-Post provides preprocessing and postprocessing tools for Delft3D-Geotool simulation models. It runs as a containerized service that can be orchestrated by Radix.
The container uses entrypoint.sh to coordinate job execution. It supports three job modes controlled by the JOB_MODE environment variable.
| Mode | Description | Input | Output |
|---|---|---|---|
preprocess |
Generates Delft3D input files from templates | Payload JSON with ini_parameters |
main_dir/orch-{id}/preprocess/ |
process |
Runs during simulation (incremental processing) | main_dir/orch-{id}/simulation/ |
Same directory (in-place) |
postprocess |
Runs after simulation completes | main_dir/orch-{id}/simulation/ |
Same directory (in-place) |
| Variable | Default | Description |
|---|---|---|
JOB_MODE |
postprocess |
Job mode: preprocess, process, or postprocess |
WORK_DIR |
./tmp/work |
Temporary working directory |
MAIN_DIR |
./tmp/main |
Final storage location for artifacts |
ARGS_FOLDER |
./tmp/args |
Directory containing the payload JSON file |
The entrypoint expects a JSON payload file at ${ARGS_FOLDER}/payload:
{
"orchestration_id": "S123",
"run_id": "R001",
"ini_parameters": {
"template": { "value": "River_dominated_delta" },
"basinslope": { "value": 0.04 },
"simstoptime": { "value": 320.5 }
}
}orchestration_id(ororchestrationId) — used to build folder pathsrun_id(orrunId) — used for preprocess work directory namingini_parameters(oriniParameters) — converted toinput.inifor preprocessing
After running jobs, the following structure is created:
main_dir/
└── orch-{orchestration_id}/
├── preprocess/
│ ├── input/ # Input files (including input.ini)
│ └── output/ # Generated Delft3D files
└── simulation/ # Simulation output (used by process/postprocess)
# Build the image
docker build -t gtpost:latest .
# Run preprocess
docker run --rm \
-e JOB_MODE=preprocess \
-e WORK_DIR=/tmp/work \
-e MAIN_DIR=/tmp/main \
-e ARGS_FOLDER=/args \
-v ./work:/tmp/work \
-v ./main:/tmp/main \
-v ./args:/args:ro \
gtpost:latest
# Run postprocess (after simulation has written to main_dir/orch-{id}/simulation/)
docker run --rm \
-e JOB_MODE=postprocess \
-e MAIN_DIR=/tmp/main \
-e ARGS_FOLDER=/args \
-v ./main:/tmp/main \
-v ./args:/args:ro \
gtpost:latest| Code | Description |
|---|---|
| 0 | Success |
| 2 | Failed to extract IDs from payload |
| 3 | Payload handler failed |
| 4 | Failed to copy input artifacts |
| 5 | Failed to copy output artifacts |
| 6 | Process mode missing orchestration_id |
| 7 | Postprocess mode missing orchestration_id |
| 8 | Unknown JOB_MODE |
This repository uses GitHub Actions for CI and container image publishing. See docs/ci-cd.md for full details (tests, release-please integration, and the reusable build-and-publish workflow).