MathOverflow will be down for maintenance for approximately 3 hours, starting Monday evening (06/24/2013) at approximately 9:00 PM Eastern time (UTC-4).
show/hide this revision's text 3 Shrink Y rather then suppose X CM.

Your hypothesis imply that $\omega_{Y/S}$ is an invertible sheaf (because $Y\to S$ is locally complete intersection), and .

(EDIT) As $f$ is finite and flat (because at points of codimension $Y$ 1$ ($Y$ is regularnormal) (add the assumption and we are only interested on codimension 1 cycles, we can restrict $Y$ and suppose that $X$ f$ is Cohen-Macaulay here)flat. Therefore

Then the dualizing sheaf $\omega_{X/Y}$ is invetible and you have the adjunction formula $$\omega_{X/S}=f^*\omega_{Y/S} \otimes\omega_{X/Y}.$$ The sheaf $\omega_{X/Y}$ is trivial out side of $B$ because $f$ is étale out side of $B$. It can be identified with the sheaf $\mathcal{Hom}_{O_Y}(f_{*}O_{X}, O_{Y})$.

Write $\omega_{X/Y}=O_X(D)$ for some Cartier divisor $D$ on $X$. Its support is contained in $f^{-1}(B)$. For any point $\eta$ of $X$ over a generic point $\xi$ of $B$, the stalk of $\omega_{X/Y}$ at $\eta$ is given by the different ideal of the extension of discrete valuation rings $O_{X,\eta}/O_{Y, \xi}$. The valuation of the different is known to be the ramification index $e_{\eta/\xi}$ minus $1$ when the ramification is tame and bigger or equal to $e_{\eta/\xi}$ otherwise (see Serre: Local fields). So the support of $D$ is equal to $f^{-1}(B)$ and is the ramification locus by definition.

In short, the coefficient of $R_f=D$ at the Zariski closure of $\eta$ is the valuation of the different ideal of $O_{X,\eta}/O_{Y, \xi}$. As for the computation, you can pass to the completions. A finite extension of complete DVR $R'/R$ is monogenous if the residue extension ($k(\eta)/k(\xi)$ in your case) is separable. If $R'=R[\theta]$, and $P(T)\in R[T]$ is the minimal polynomial of $\theta$, then the different ideal is generated by $P'(\theta)$. See Serre's book for more details.

show/hide this revision's text 2 Suppose $X$ is CM.

Your hypothesis imply that $\omega_{Y/S}$ is an invertible sheaf (because $Y\to S$ is locally complete intersection), and $f$ is finite and flat (because $Y$ is regular)regular) (add the assumption that $X$ is Cohen-Macaulay here). Therefore the dualizing sheaf $\omega_{X/Y}$ is invetible and you have the adjunction formula $$\omega_{X/S}=f^*\omega_{Y/S} \otimes\omega_{X/Y}.$$ The sheaf $\omega_{X/Y}$ is trivial out side of $B$ because $f$ is étale out side of $B$. It can be identified with the sheaf $\mathcal{Hom}_{O_Y}(f_{*}O_{X}, O_{Y})$.

Write $\omega_{X/Y}=O_X(D)$ for some Cartier divisor $D$ on $X$. Its support is contained in $f^{-1}(B)$. For any point $\eta$ of $X$ over a generic point $\xi$ of $B$, the stalk of $\omega_{X/Y}$ at $\eta$ is given by the different ideal of the extension of discrete valuation rings $O_{X,\eta}/O_{Y, \xi}$. The valuation of the different is known to be the ramification index $e_{\eta/\xi}$ minus $1$ when the ramification is tame and bigger or equal to $e_{\eta/\xi}$ otherwise (see Serre: Local fields). So the support of $D$ is equal to $f^{-1}(B)$ and is the ramification locus by definition.

In short, the coefficient of $R_f=D$ at the Zariski closure of $\eta$ is the valuation of the different ideal of $O_{X,\eta}/O_{Y, \xi}$. As for the computation, you can pass to the completions. A finite extension of complete DVR $R'/R$ is monogenous if the residue extension ($k(\eta)/k(\xi)$ in your case) is separable. If $R'=R[\theta]$, and $P(T)\in R[T]$ is the minimal polynomial of $\theta$, then the different ideal is generated by $P'(\theta)$. See Serre's book for more details.

show/hide this revision's text 1

Your hypothesis imply that $\omega_{Y/S}$ is an invertible sheaf (because $Y\to S$ is locally complete intersection), and $f$ is finite and flat (because $Y$ is regular). Therefore the dualizing sheaf $\omega_{X/Y}$ is invetible and you have the adjunction formula $$\omega_{X/S}=f^*\omega_{Y/S} \otimes\omega_{X/Y}.$$ The sheaf $\omega_{X/Y}$ is trivial out side of $B$ because $f$ is étale out side of $B$. It can be identified with the sheaf $\mathcal{Hom}_{O_Y}(f_{*}O_{X}, O_{Y})$.

Write $\omega_{X/Y}=O_X(D)$ for some Cartier divisor $D$ on $X$. Its support is contained in $f^{-1}(B)$. For any point $\eta$ of $X$ over a generic point $\xi$ of $B$, the stalk of $\omega_{X/Y}$ at $\eta$ is given by the different ideal of the extension of discrete valuation rings $O_{X,\eta}/O_{Y, \xi}$. The valuation of the different is known to be the ramification index $e_{\eta/\xi}$ minus $1$ when the ramification is tame and bigger or equal to $e_{\eta/\xi}$ otherwise (see Serre: Local fields). So the support of $D$ is equal to $f^{-1}(B)$ and is the ramification locus by definition.

In short, the coefficient of $R_f=D$ at the Zariski closure of $\eta$ is the valuation of the different ideal of $O_{X,\eta}/O_{Y, \xi}$. As for the computation, you can pass to the completions. A finite extension of complete DVR $R'/R$ is monogenous if the residue extension ($k(\eta)/k(\xi)$ in your case) is separable. If $R'=R[\theta]$, and $P(T)\in R[T]$ is the minimal polynomial of $\theta$, then the different ideal is generated by $P'(\theta)$. See Serre's book for more details.