BEGIN Initialize Define topography, initialize flow field, tracers, etc FOR each time step DO Forward Step Calculate velocity time derivatives Calculate tracer field time derivatives Step forward state variables Re-evaluate density field Inversion Step Solve elliptic problem to ensure non-divergent flow.

END FOR END