TITLE: Is the $\ell$-adic cohomology of a non-proper variety unramified at good primes?
QUESTION [8 upvotes]: Let $X$ be a smooth variety of finite type over a number field $k$. Let $\overline{X} = X \times_{k} \overline{k}$, and let $\ell$ be a prime. It's well known that if $X$ is proper, then the étale cohomology groups $H^i_{et}(\overline{X}, \mathbb{Z}_{\ell})$ are unramified at any prime $\mathfrak{p} \nmid \ell$ at which $X$ has good reduction (and in fact are isomorphic as representations of $\operatorname{Gal}(\overline{K}_\mathfrak{p} / K_\mathfrak{p})$ to the étale cohomology groups of the special fibre).
Does this statement also hold if $X$ is not assumed to be proper? (I'm interested in the case of smooth affine varieties.) What about the weaker statement that $H^i_{et}(\overline{X}, \mathbb{Z}_{\ell})$ is unramified almost everywhere?
(I don't know a reference for the proof of the "well known" statement -- I couldn't find it in Milne's books or in SGA 4.5.)

REPLY [10 votes]: I think the weaker statement should be true.  Here's a sketch of an argument: by compactification theorems and resolution of singularities, there is a smooth proper
scheme $Y$ over $k$ containing $X$ as an open subscheme, such that $Y \setminus X$ is a
divisor $D$ with simple normal crossings.  Let $D_1, \dots, D_r$ be the irreducible components of $D$.  Then any $p$-fold intersection of the $D_i$'s is smooth and proper
over $k$.
There should be a spectral sequence, in terms of the etale cohomology of $\overline{Y}$ and that of the intersections of the $D_i$'s, that abuts to the etale cohomology of $\overline{X}$.  Thus the etale cohomology of $\overline{X}$ should be unramified at any prime of good reduction for $\overline{Y}$ and all of the intersections of the $D_i$'s.  I imagine you could also use this to show that at such primes the cohomology of $\overline{X}$
was isomorphic to the cohomology of the reduction.
David