Why depth, dimension, etc? Recently I came across a paper by Stephen McAdam "GRADE SCHEMES AND GRADE FUNCTIONS" (Transactions of the American Mathematical Society, Vol. 288, No. 2 (Apr., 1985), pp.
563-590). So far I have just skimmed it, but from what I've understood he tries to set up unified axiomatic approach to study codimension, depth, asymptotic grade, etc. All these functions can be considered as monotone functions from the poset of prime ideals $P$ of the ring into the natural numbers satisfying certain properties (see Lemma 1.2 and Theorem 2.4 in the paper).
I wonder is it possible to recover (if not fully, then to some extent) the poset $P$ from knowledge of such functions? i.e. does there exist a theorem (in poset theory?) which states that study of $P$ is equivalent to study of "grade functions" whose abstract characterization is given in the paper.
More interestingly, I would like to know what is the meaning of such functions in terms of category of $R$-modules. There are some answers in this direction, see for example http://arxiv.org/abs/1202.5605 (CLASSIFICATION OF RESOLVING SUBCATEGORIES AND GRADE
CONSISTENT FUNCTIONS HAILONG DAO AND RYO TAKAHASHI). I have not read this paper either.
I have asked a similar question here: Characterizing Posets by Functions Into Natural Numbers
Thanks!
 A: If $F$ is a set of order preserving functions from a poset $P$ into ${\bf N}$, then you automatically have $$x \leq y \quad\Rightarrow\quad (\forall f \in F)(f(x) \leq f(y)).$$ The condition to get the converse is: for every $x,y \in P$ with $x \not\leq y$ there must exist $f \in F$ with $f(x) > f(y)$. Under that condition you can recover the ordering on $P$ from $F$.
Since you're not telling us what $F$ is, it's impossible to give a more definite answer than that. You must answer the question, if $A$ and $B$ are prime ideals of a ring and $A$ is not contained in $B$, does there exist a function $f$ into the natural numbers "with certain properties" such that $f(A) > f(B)$? If the answer is always yes, then you can recover $P$ from those functions, if not, then you can't.
A: A problem with the first question is that the definition of grade function in McAdam involves some ring-theoretic concepts. For example, I do not see how to express condition (iii) of Theorem 2.4 (about conforming pairs) just using the poset. So your first question is not (yet) well-defined. 
About the second question, "categorifying" such functions. I think it is possible. In particular, when $R$ is Cohen-Macaulay, then $\text{grade}(P) =\text{heigh}(P)$ for any prime, thus by Theorem 2.4 any grade function (restricting to $\text{Spec} R$) will be grade-consistent in the sense of the second reference. By the results there, these functions will classify certain subcategories of $\text{PD}(R)$, the category of f.g modules with finite projective dimension.  
As a simplest non-trivial example, let's look at $R= k[x]$, $k$ any field. Note that $\text{PD}(R)$ will just be $\text{mod}(R)$. Then any grade function $f: \text{Spec} R \to \mathbb N$ will have to satisfy: $f(0)=0$, $f(P)=0$ for $P\in V$, a finite subset of $\text{MaxSpec}\ R$, and $f(P)=1$ other wise. Such function is uniquely determined by $V$. 
Then these functions bijectively correspond to the resolving subcategories:
$$X_V = \{M\in \text{mod}(R) | M \ \text{is locally free on V}\} $$  
via the following  rule: a category $X$ defines the function:
$$f_X(P) = \max \{\text{pd}_{R_P} M_P | M \in X \} $$
