A high-performance interactive GIS visualisation dashboard for regional oceanographic NetCDF models. The application calculates and renders sea surface height contours, temperature/salinity levels, and 3D current velocity vectors over multiple depth layers and time steps with South African coastal land-masking support.
- Database: MongoDB — Stores product regions, model members, and variable group configurations.
- Backend: FastAPI / Python (Containerised) — Performs lazy-load operations on NetCDF files (
xarray), computes dynamic percentiles, extracts contours using a dedicated process pool, and generates velocity vector fields. - Frontend: React / Vite / Deck.gl (Host-run) — Renders the interactive map interface, layers, timeline playback, and administrative dashboard.
Ensure the deployment environment has the following installed:
- Docker & Docker Compose (v2)
- Node.js (v18+) and npm
Copy .env.example to .env if you wish to override local data paths:
cp .env.example .env- Local Machine: Set
DATA_DIR=/home/dylan/srv/test_ocean_models/andPORT=8081(or another port if 8080 is in use) in.env. - Production Server: Leave
DATA_DIRandPORTunset or empty —docker-compose.ymldefaults automatically to/mnt/ocims-somisana/public-facing/and port8080.
Build and start containerised services (MongoDB, FastAPI backend, and Cache Warmer) in detached mode:
docker compose up -d --build- Verify Container Status:
docker compose ps
- Check Backend Logs:
docker compose logs -f backend
- Custom Ports: By default, MongoDB is exposed on port
27017and the backend is exposed on port8080(or your configured${PORT}). You can customize these mappings via.env.
Use the admin creation CLI tool to manage admin credentials.
docker exec -it ocean-backend python3 -m backend.create_admin_userdocker exec -it ocean-backend python3 -m backend.create_admin_user -u admin -p mysecretpassword.venv/bin/python -m backend.create_admin_userThe frontend resolves API requests dynamically based on the browser address.
cd frontend
npm install
npm run dev -- --host --port 5173cd frontend
npm install
npm run build
npx serve -s dist -l 5173- Place any NetCDF
.ncfiles in your configuredDATA_DIR(or root path). - Configure dataset variable groups, titles, and NetCDF file paths via the Admin Portal link in the top right corner of the dashboard interface.