  We construct a logarithmic model of connections on smooth quasi-projective
$n$-dimensional geometrically irreducible varieties defined over an
algebraically closed field of characteristic $0$. It consists of a good
compactification of the variety together with $(n+1)$ lattices on it which are
stabilized by log differential operators, and compute algebraically de Rham
cohomology. The construction is derived from the existence of good
Deligne-Malgrange lattices, a theorem of Kedlaya and Mochizuki which consists
first in eliminating the turning points. Moreover, we show that a logarithmic
model obtained in this way, called a good model, yields a formula predicted by
Michael Groechenig, computing the class of the characteristic variety of the
underlying D-module in the $K$-theory group of the variety.

Algebraic Geometry