  Let $R$ be a commutative Noetherian ring. We introduce the notion of
localization functors $\lambda^W$ with cosupports in arbitrary subsets $W$ of
$\text{Spec}\, R$; it is a common generalization of localizations with respect
to multiplicatively closed subsets and left derived functors of ideal-adic
completion functors. We prove several results about the localization functors
$\lambda^W$, including an explicit way to calculate $\lambda^W$ by the notion
of Cech complexes. As an application, we can give a simpler proof of a
classical theorem by Gruson and Raynaud, which states that the projective
dimension of a flat $R$-module is at most the Krull dimension of $R$. As
another application, it is possible to give a functorial way to replace
complexes of flat $R$-modules or complexes of finitely generated $R$-modules by
complexes of pure-injective $R$-modules.
