TITLE: More upper/lower semi-continuous functions in (algebraic) geometry?
QUESTION [12 upvotes]: The notion of upper/lower semi-continuity is sometimes encountered in algebraic geometry.
Here by upper semi-continuity one means a function on a topological space $f:X\rightarrow S$ with value in some ordered topological space (like the field of real numbers), such that $\lim\sup_{x\rightarrow y}f(x)\leq f(y)$. Intuitively, for points $x$ that are close to a given point $y$, may the value $f(x)$ "exceeds" $f(y)$, the difference should be "small" and "vanishes" as $x$ approaches $y$. And lower semi-continuity means the opposite, namely replace "$\leq$" by "$\geq$".
Among the typical examples one thinks of the dimension function: let $k$ be a base field, and $X$ be a locally finite type $k$-scheme. The function $$x\in X \mapsto \dim_xX$$ is upper semi-continuous, where by $\dim_xX$ is understood to be the combinatory dimension of $X$ at $x$, namely the length of chains of inclusions of irreducible closed subschemes $$x\in X_1\subsetneq X_2\subsetneq \cdots\subsetneq X_d=X$$
There seems to be a lot of examples of such upper/lower semi-continuous functions in geometry counting certain "discrete invariants", especially those related to stratifications of spaces. It'll be great to have the list extended in mathoverflow.
I hope this question is well-posed...

REPLY [2 votes]: Seshadri constants (see arXiv:0810.0728) are lower semicontinuous. 
This fact is of course related to J.C. Ottem's example, but (a priori) it is not "the same". I believe that there is not a single coherent F giving the same stratification that the Seshadri constant gives (you could get it by a sequence of coherent F, or using non-coherent F, trivially.)