Let $X$ be a quasi-projective variety. Suppose that we (perhaps partially, if either enough is known) compactify to $\bar{X}$ with $\bar{X}\setminus X=D$ is a divisor. Say that we know the canonical bundle $K_X$. Then $K_{\bar{X}}=K_X+nD$ for some $n$.
- Is $n$ always negative? The examples I'm thinking of are for $X=\mathcal{M}_g,\mathcal{A}_g$
- Is there a good method for computing this $n$?
In both cases, I'm particularly interested in finite covers of $\mathcal{M}_g,\mathcal{A}_g$ and other moduli spaces, if that helps to know how the variety is given.