Automated pipeline for processing and transcoding scientific tsunami simulation data into real-time visualization formats.
This repository contains the backend logic for ProyecTsu, a system designed to bridge the gap between numerical tsunami models (GeoClaw) and interactive 3D visualizations.
The pipeline automates the ingestion of raw scientific data (NetCDF/ASCII), orchestrates the generation of fine-grid outputs (fgout), and transcodes complex fluid dynamics data into optimized binary formats capable of being rendered at >30 FPS in game engines.
- Automated Orchestration: Logic handled by
build_pipeline.pyto manage GeoClaw simulation parameters programmatically. - Data Transcoding: Converts floating-point scientific data into 16-bit .raw (Little-Endian) heightmaps for direct GPU consumption.
- Metadata Generation: Automatically creates a
manifest.jsoncontract containing coordinates, resolution, and simulation bounds for the frontend. - Topography Processing: Normalizes
tt3bathymetry/topography files into standardized binary formats.
- Core: Python 3.x
- Simulation Engine: GeoClaw (Clawpack)
- Image Processing: PIL (Python Imaging Library)
- Data Format: Binary RAW (UInt16), JSON
Follow these steps to process a new simulation for the visualizer:
Open build_pipeline.py and configure the target path for your GeoClaw simulation data. Ensure the path points to the directory containing your output files.
Copy the export_tt3_exact.py script into your specific simulation folder.
Run the script to export the exact topography data:
python export_tt3_exact.pyCopy the extract_heightmaps.py script into the same simulation folder.
Run the script to process the fluid dynamics frames:
python extract_heightmaps.pyVerify the output generation:
- Check that the
frames/folder contains the sequence of generated images. - Ensure the topography file was created successfully.
- Crucial: Open
manifest.jsonand verify that the metadata (coordinates, time steps) matches your simulation parameters.
Once verified, move the entire output folder to the Unity project's StreamingAssets directory.
🔗 Frontend Repository: View the Unity 3D Visualizer
Note: Source code comments and variable names may appear in Spanish as this project originated in a Latin American academic context.