This question is motivated by my earlier question.

Suppose I have some algebraic variety $X/\mathbb R$ of dimension $n$, and suppose that $X(\mathbb R)$ is compact. Now for any element of $H^0(X,\Omega_X^n)$ (i.e. a holomorphic $n$-form, or an $(n,0)$-form), there is the integration map:

$$\alpha\mapsto\int_{X(\mathbb R)}\alpha$$

Question: Can this map be defined algebraically? (or, stated more colloquially, what is this map?) Note that there are some difficulties of definition of the map in the first place, e.g. if $X(\mathbb R)$ fails to be compact. Perhaps this means the answer to this question isn't all that nice.

A few thoughts:

1) For example, suppose $A$ is an $\mathbb R$-algebra, and $X=\operatorname{Spec}A$. Then $\Omega_X$ is described concretely as the dual of the module of derivations of $A$ over $\mathbb R$. We have above a concrete map from $\wedge^n\Omega_X$ to $\mathbb R$, though I don't see any obvious way to define it in the algebraic category.

2) On the other hand, if $X$ is projective, then the dual of $H^0(X,\Omega_X^n)$ is $H^n(X,\mathcal O_X)$ (by Serre duality, perhaps assuming some smoothness). This suggests that the real points of $X$ induce a natural element of $H^n(X,\mathcal O_X)$. Given only $X\times_{\mathbb R}\mathbb C$, a choice of model over $\mathbb R$ is roughly equivalent to giving an involution of $X$ over $\mathbb C$ which is complex conjugate linear (see ex II 4.7 in Hartshorne). Thus for projective varieties, perhaps one wants to ask the following: "given $X/\mathbb C$ and an involution lifting complex conjugation, define a canonical element of $H^n(X,\mathcal O_X)$".

3) Again, if we can embed $X$ in projective space, and then perhaps it suffices to study the case when $X$ is projective space itself (or perhaps the question needs to be a bit more general then). Surely an answer is known in the case $X=\mathbb P^n$.

These are a few thoughts I've had about the problem. Does anyone know if this has been studied, or if there is a good reference?