Local cohomological dimension of algebraic varieties