Science

Interactive scientific research

Interactive browser demonstrations of key computational methods from my doctoral, master's, and engineering theses: spectral wave–vortex decomposition in ocean models, Lorentz trajectory integration in a Penning trap, and spectral clustering on non-linear manifolds.

3 interactive demos Real-time computation Physics & graph theory

Ph.D. / CICESE · Ensenada, Mexico · 2018 – 2023

Telling internal waves apart from the flow they hide in

On the interaction between balanced motions and internal gravity waves in Eastern Boundary Currents.
The ocean's kinetic energy is carried by two populations with completely different dynamics — slow, nearly-geostrophic balanced motions (eddies and jets) and fast internal gravity waves. They occupy the same water, so no map can separate them. The wavelength–frequency plane can.

Theoretical wave–vortex dispersion boundary

A mode-1 internal wave has to satisfy its dispersion relation, which puts a hard floor under the wave band at the inertial frequency f:

ω² = f² + c₁²k²
f = 2Ω sin φ  ·  c₁ ≈ 2.5 m s⁻¹  ·  k = 2π/λ

Nothing below that curve can be a freely propagating gravity wave, so everything below it is balanced motion. Because f scales with sin φ, the boundary moves with latitude — which is exactly why a global simulation needs the filter re-derived rather than applied once.

INERTIAL FREQ. f1.000 cpd
INERTIAL PERIOD24.0 h

Internal gravity waves Balanced motions f = 2Ω sin φ

The science

  • Studied the interaction between balanced motions and internal gravity waves in Eastern Boundary Currents — regions where both are energetic and the exchange between them matters.
  • Designed a spectral filtering method in wavelength–frequency space to partition the flow into its wave and balanced components.
  • Worked from LLC4320, a high-resolution global ocean simulation, at scales where the two regimes genuinely overlap.

The engineering underneath

  • Built an ETL pipeline over roughly 2 TB of simulation output, using out-of-core chunking to process large netCDF volumes efficiently.
  • Parallel, out-of-core processing with Dask and xarray over netCDF, bounding the analysis by disk I/O rather than RAM.
  • The analysis was fundamentally a distributed data-processing challenge, bridging numerical physics with scalable data engineering.

RELATED — production applications of similar techniques: a ~20k-simulation coastal digital twin and an operational forecast pipeline.

Applied / Numerical ocean modelling

Numerical ocean modelling in practice

Profiling model performance, maintaining physical and numerical validity, and building automated execution pipelines for operational forecasting.

Hydrodynamics & transport

  • ROMS and Delft3D for circulation; SFINCS for coastal and estuarine flooding in a country-wide climate digital twin.
  • IH-TESEO for Lagrangian transport — hydrocarbon weathering chemistry, and now sediment transport (hindered settling, bedload) on a Lagrangian↔Eulerian framework I built for it.
  • Statistical analysis of dispersion under varying initial and seasonal conditions.

REFERENCEre-engineered particle core in Fortran/OpenMP

HPC & parallelism

  • OpenMP shared-memory parallelism in Fortran, plus GCC and Intel toolchains, CMake and Make.
  • SLURM job arrays for large ensembles — automated job submission, failure retries, and output reduction.
  • Numba and Dask for hot loops and distributed arrays in Python.

REFERENCE~20k simulations scheduled and reduced

Geospatial & data

  • netCDF as the primary data format — reading, writing, and integrating into numerical pipelines.
  • GDAL for raster generation, reprojection and rescaling; QGIS for downstream spatial analysis.
  • GeoPandas, xarray, pandas for data pipelines between model outputs and figures.

REFERENCEdaily operational forecast products

Reproducibility as a requirement

  • Docker images for ROMS, Delft3D and SFINCS, ensuring portable runs across environments.
  • Automated tests in CI to protect against numerical regression.
  • Version-controlled configurations and parameters for fully reproducible runs.

REFERENCECI-guarded numerics in IH-TESEO

M.Sc. / CINVESTAV-IPN · Mexico City · 2011 – 2013

A Penning trap, perturbed by a rotating magnetic field

Penning trap in a rotating magnetic field and its coherent states.
A quantum-mechanical study of a charged particle in an ideal Penning trap with an additional rotating field: I derived its coherent states, ladder operators and eigenvalues, then validated the time evolution of position and momentum numerically. The simulation below is that validation step — the classical trajectory, integrated live with RK4.

Confinement is a competition

The trap's electrostatic quadrupole confines along z but pushes the particle outwards radially. Only the axial magnetic field holds it in — so the trap works exactly when the cyclotron frequency beats the axial one:

x″ = (ωz²/2)x + ωcy′ − ωbsin(Ωt)z′
y″ = (ωz²/2)y − ωcx′ + ωbcos(Ωt)z′
z″ = −ωz²z + ωb(x′sin Ωt − y′cos Ωt)
stable ⟺ ωc² > 2ωz²

Raising ωz beyond this threshold destabilises the radial confinement, demonstrating the operational boundary of the trap.

TRAPSTABLE
MODIFIED CYCLOTRON ω₊
MAGNETRON ω₋

Integrated with classical RK4 at Δt = 0.005, eight substeps per frame, in non-dimensional units. The radial trace is the familiar epitrochoid: a slow magnetron drift carrying a fast cyclotron gyration, modulated here by the rotating field.

B.Eng. / UPIITA-IPN · Mexico City · 2006 – 2011

Quantum spectral clustering — and why k-means cannot win

A quantum data clustering algorithm based on spectral theory.
I designed a quantum variant of spectral clustering with theoretically constant runtime — a unitary operator built from the image's symmetric Laplacian matrix — and demonstrated it on image segmentation with classical k-means as post-processing. Below is the classical core of that method, computed here, with plain k-means run on the same points for comparison.

Graph-based vs. coordinate-based clustering

Because the two interleaved crescents are not linearly separable, standard k-means fails to separate them and cuts through both moons. Spectral clustering builds a similarity graph and partitions the data using the graph Laplacian's eigenvectors.

Wij = exp(−‖xi−xj‖² / 2σ²)
Lsym = I − D−½ W D−½
split on sign of D−½v₂  ·  v₂ by deflated power iteration

The second eigenvector is the whole trick — and it is exactly the step my thesis replaced with a unitary operator. Everything around it stays the same.

View
SPECTRAL ACCURACY
K-MEANS ACCURACY
λ₂ (Lsym)
POINTS

When affinity scale σ exceeds ≈ 0.25, edges between the two crescents increase, reducing community separability and demonstrating the parameter sensitivity of spectral graph methods.