Examples of Computations of the Divisor Class Group or Picard Group I'm looking for a handful of examples of varieties $X$ and their associated divisor class groups $\operatorname{Div} X$, or their Picard groups. I've got a bunch of relatively simple examples I've worked out myself. The problem is that because they are so simple, I feel like I do not have the tools to compute such groups in general, thus I'd like to see a small collection of examples that illustrate the general method of computing these groups.
Here are the examples I've worked out.
Example 1: Affine space.
In this example, we know that every irreducible codimension $1$ subvariety $C$ of the affine space is defined by a single equation. So we can write $\mathfrak{U}_C = (F)$ for some polynomial $F \in k[x_1, ... , x_n]$. Thus $C = \operatorname{div} F$, and so every prime divisor is principle. But every divisor is a sum of prime divisors, and so every divisor $D = \sum C_i$ is the divisor $\operatorname{div}(\prod f_i)$. Thus every divisor is principle, and so the divisor class group is just the trivial group. Uninteresting.
Example 2: Projective space.
Here is is also true that every irreducible codimension $1$ subvariety $C$ is given by a single equation, now this equation is homogeneous. Let's again call it $F$.  Now if $F$ has degree $k$ then in affine chart $U_i$, then $\mathfrak{a}_C = (F/T_i^k)$ where the $T_i$ are the variables in projective space (this is the notation of Shafarevich, I'm not sure if it's standard). Now given an $f \in k(\mathbb{P}^n)$, we write $f = F/G$ for some forms $F$ and $G$ of equal degree. We can factor them into irreducibles, $F = \prod H_i^{k_i}$ and $G = \prod L_j^{m_j}$. Then for each $H_i$ or $L_j$, we can find an associated divisor $C_i$ and $D_j$ respectively, and then $\operatorname{div} f = \sum k_i C_i - \sum m_j D_j$.
In this case, it is not hard to show that the principle divisors are exactly those for which the degree of the divisor is $0$. From this it will follow that the divisor class of group of projective space is $\mathbb{Z}$. This is at least a little more interesting.
I also think I know how to treat products - at the very least I can do products of projective spaces - and I think a similar kind of reasoning will work in general.
I guess the main problem I have when trying to compute the Picard group is that it seems really hard on more general varieties to figure out what the principle divisors are. Also, given only the equation(s) of the variety, it seems like the set of divisors itself is really huge, since I can probably drum up any number of codimension $1$ subvarieties just by taking intersections with different hypersurfaces, or even just hyperplanes.
So what would be really great is if someone could give me some strategies for how to work this group out, and maybe a few worked examples of slightly less trivial cases. I imagine that like most things in algebraic geometry, things get hairy with things more complicated than curves or surfaces with degrees more than $2$ or $3$, but even those would suffice for me. If someone has got some notes online containing some examples, that would also be just fine. Throughout my examples, I looked at just the divisor class group because the varieties I was looking at are non-singular. Singular examples are also OK!
 A: Picard group of surfaces can be worked "by hands" in the case of surfaces, for example ruled surfaces, which  are $\mathbb P^1$-bundle over a curve $C$. When $C = \mathbb P^1$ this gives a family of surfaces called Hirzebruch surfaces, and are isomorphic to $\mathbb P_{\mathbb P^1}(O(n) \oplus O)$. More example of surfaces are worked in the notes online by Reid : available here.
You have an exact sequence $0 \to \mathbb Z \to Pic(X) \to Pic(X \backslash Z) \to 0$, where the first map is $1 \to [Z]$ which allows you to compute the Picard group of the complement of a curve in $\mathbb P^2$ for example.
In fact, you have an isomorphism $Pic(X) \cong A^1(X)$ for the case of smooth surface. Again for nice case (the precise word is "affine stratification") the Chow group is isomorphic to the cohomology group $H^2(X)$ (say if you work over $\mathbb C$). Which allows you to compute it in lot of case !
Finally let met explain to you my favorite example since it is very simple. If you don't know toric geometry, consider it as advertisement.
A toric surface is an algebraic surface which can be encoded combinatorially by a union of cone in $\mathbb R^2$. Example of toric surfaces are $\mathbb P^2$, $\mathbb P^1 \times \mathbb P^1$, cone over the Veronese curve, Hirzebruch surfaces ...
If you have such a surface you have an exact sequence $0 \to \mathbb Z^2 \to \oplus_{e \in E} \mathbb Z e \to Pic(X) \to 0$ where $E$ is the set of edges.
For example, when $X = \mathbb P^2$, there are 3 edges so the sequence is $0 \to \mathbb Z^2 \to \mathbb Z^3 \to Pic(\mathbb P^2)$ and you find again that $Pic(\mathbb P^2) \cong \mathbb Z$. You have four edges for $\mathbb P^1 \times \mathbb P^1$ so you find that $Pic(\mathbb P^1 \times \mathbb P^1) \cong \mathbb Z^2$, generated by $0 \times \mathbb P^1$ and $\mathbb P^1 \times 0$.
The best reference for toric geometry is the book of Fulton, but it is maybe a bit difficult. A good start is the note by Cox.
Notice that the toric picture is very nice : you also have a really handy (a bit longer to compute) description of the Cartier divisor, and in particular you can see very easily when $Cl(X)$ is different from $Pic(X)$ !
