See global field.
Filter by codimension, then obstructions to extending over higher codimension things is measured by cohomology of the Function field :