Case 01 · Scientific computing & HPC
Re-engineering an ocean transport model in Fortran/OpenMP, now for sediment too
IHCantabria · Oceanology Group · 2023 – present · Santander, Spain
50×
more particles
The constraint
IH-TESEO is the group's hydrocarbon-spill model: Fortran, OpenMP, Lagrangian particles carrying weathering chemistry. Its particle budget was the ceiling on every study it was used for — resolving slick boundaries and filaments around complex coastlines requires high particle density. Increasing capacity required preserving numerical precision and physical behavior exactly, ensuring weathering chemistry results remained identical to the original model.
What I did
- Re-engineered the particle core so the model simulates ~50× more particles than its predecessor, with the weathering processes fully validated against the original with full numerical accuracy.
- Reworked the parallel execution in OpenMP so existing simulations finish up to 4× faster while scaling to substantially larger particle ensembles.
- Implemented netCDF input and output, so runs now interoperate directly with standard ocean-data and geospatial tooling (xarray, GDAL, QGIS) without bespoke converters.
- Wrote the model's automated test suite and wired it into CI/CD with GitHub Actions — regression-guarding the numerics on every commit.
What I am building now
The same engine is being extended beyond hydrocarbons into sediment transport — hindered settling and bedload transport. Hindered settling depends on the local concentration of particles, and a purely Lagrangian model has no concentration field of its own.
So I implemented a Lagrangian → Eulerian → Lagrangian framework: particles are binned onto a grid to produce the Eulerian fields the concentration-dependent physics needs, the process is evaluated there, and the result is carried back onto the particles. Lagrangian resolution is preserved where trajectories matter, while the model gains awareness of the plume around each particle.
Outcome
Higher-resolution hydrocarbon-spill studies run reliably, model outputs integrate directly into standard analysis stacks, and automated CI tests catch numerical regressions before code merges. The same foundation now carries a second class of physics.
FIG. 1 — Capacity and runtime, before and after. Bars are drawn to the figures I can defend; the capacity bar is scaled so the predecessor stays visible.