Constructing rational functions with ramification locus the  divisor of some $n$-form I'm still busy learning the theory of linear systems for compact Riemann surfaces. If the answer to the following question is negative, then there might not be any point in continuing.
Let $X$ be a compact connected Riemann surface and let $\omega$ be an $n$-form on $X$. That is,  $\omega$ is a global section of the canonical sheaf $\omega_X^{\otimes n}$.
Now, let $D$ be the divisor of $\omega$ on $X$.
Can we construct a morphism $X\to \mathbf{P}^1$ such that the support of the ramification locus equals the support of $D$ for some choice of $n$? If yes, the degree of such a morphism equals the degree of $\omega_X^{\otimes n}$, right? 
Slightly weaker: can we construct a morphism $X\to \mathbf{P}^1$ such that the support of the ramification locus is contained in the support of $D$?
As Francesco points out, this is not possible if $g=2$ and $n=1$
Probably, if $g$ is small compared to $n$, the answer will be negative. 
 A: The answer is no as the following simple example shows.
Assume $g(X)=2$ and take $n=1$, i.e. $D$ is the divisor of a holomorphic $1$-form. Then $\deg D=2$, so if your morphism $f \colon X \to \mathbf{P}^1$ exists, it is ramified at two points.
Consequently, $f$ is branched at at most two points, so at exactly two points since $\mathbf{P}^1$ minus a point is simply connected. But any cover of $\mathbf{P}^1$ branched at two points is still $\mathbf{P}^1$, a contradiction. 
EDIT. For completeness, let me show my assertion that if the cover $f \colon X \to  \mathbf{P}^1$ is branched at two points, then $ X \cong \mathbf{P}^1$. In general, if $f$ has degree $d$, the branch points are $b_1, \ldots ,b_n$ and the permutation $\sigma_i$ giving the local monodromy at $b_i$ is the product of $k_i$ disjoint cycles, then $$g(X)=1 + \frac{(n-2)d-\sum_{i=1}^nk_i}{2},$$ see for instance [Miranda, Algebraic curves and Riemann surfaces, page 93]. In particular if $n=2$ the only possibility is $k_1=k_2=1$ and $g(X)=0$, so $X$ is isomorphic to the projective line. 
