Let $k$ be an algebraically closed field of positive characteristic $p$, and let $X_{/k}$ be a smooth projective connected curve. Let $x_0$ be a point of $X(k)$.
How precisely can one describe the following set of positive integers: $$ D(X, x_0) = \{ d : \exists \text{ a (separable) morphism $f : X \to \mathbb{P}^1$ of degree $d$ ramified only at $x_0$}\}? $$
An equivalent formulation in terms of divisors is given by $$ D(X, x_0) = \{ d : \text{there exists a } g^2_d \text{ on $X$ that is ramified only at $x_0$}\}. $$
If $X = \mathbb{P}^1$, then I have a preprint on unicritical rational functions that proves $$ D( \mathbb{P}^1, x_0 ) = \{ d > 1: d \equiv 0 \text{ or } 1 \pmod{p} \}. $$ The proof uses continued fraction expansions of rational functions, and so it does not seem to generalize to higher genus curves. But the answer is so restricted that I became curious what might be true for an arbitrary curve $X$.
Here is a related weaker question.
Fix an integer $d > 1$. For which curves $X_{/k}$ and points $x_0 \in X(k)$ is it true that $d \in D(X, x_0)$?
For example, consider $d=2$. The Riemann-Hurwitz formula shows that $x_0$ must be wildly ramified for any unicritical degree-$2$ morphism $X \to \mathbb{P}^1$. Hence $2 \not\in D(X, x_0)$, except perhaps when $k$ has characteristic~2. Moreover, one can construct hyperelliptic curves of any genus in characteristic $2$ ramified at only a single point over $\mathbb{P}^1$, which must necessarily be a Weierstrass point. This shows that $D(X, x_0)$ is likely to be very sensitive to the choice of point $x_0$ when $X$ has genus $g > 1$. (The automorphism groups of genus-0 and genus-1 curves act transitively on $k$-rational points, so $D(X, x_0)$ is independent of the choice of point $x_0$ in these cases.)
$$ E(X) = \{d : \exists \ X \to \mathbb{P}^1 \text{ of degree $d$ branched only over $\infty$} \}, $$
then $E(X)$ is nonempty. We also see that $D(X,x_0) \subset E(X)$. $\endgroup$