Let $(G,X)$ be a Shimura datum with reflex field $E\subset \mathbb C$. For any neat open compact subgroup $K \subset G(\mathbb A_f)$, let $\mathrm{Sh}_K$ denote the associated Shimura variety. It is a quasi-projective smooth scheme over $\mathrm{Spec}(E)$. Let $p$ be a prime number and let $v$ be a place of $E$ above $p$. We write $E_v$ for the $v$-adic completion of $E$. Let us fix further a prime $\ell \not = p$. Besides, let $\xi$ be a finite dimensional irreducible algebraic representation of $G$ over $\overline{\mathbb Q_{\ell}}$, and let $\mathcal L_{\xi}$ be the associated local system on $\mathrm{Sh}_K$. What is the link between the two following cohomology groups $$H^{\bullet}(\mathrm{Sh}_K\otimes E^{\mathrm{ac}},\mathcal L_{\xi}) \text{ and } H^{\bullet}(\mathrm{Sh}_K\otimes E_v^{\mathrm{ac}},\mathcal L_{\xi})?$$ Here, $E^{\mathrm{ac}}$ is an algebraic closure of $E$ and $E_v^{\mathrm{ac}}$ is its $v$-adic completion. Upon taking limits over all $K$, the LHS is a representation of $G(\mathbb A_f)\times \mathrm{Gal}(E^{\mathrm{ac}}/E)$, whereas the RHS is a representation of $G(\mathbb A_f)\times \mathrm{Gal}(E_v^{\mathrm{ac}}/E_v)$. We can embed the absolute Galois group of $E_v$ into the absolute Galois group of $E$, thus could it be that the RHS is just obtained by restriction of the LHS?
For motivation, the LHS can be studied in different ways. For instance if the Shimura variety is compact then we have Matsushima's formula, which essentially states that the LHS is semi-simple and describes what automorphic representations can occur (ie. those which are cohomological for $\xi$). In the non compact case, one may resort to intersection cohomology of the Baily Borel compactification instead, and compare it with the LHS. On the other hand, provided that $K = K_pK^p$ and that we have an integral model $\mathrm S_{K^p}$ of $\mathrm{Sh}_K\otimes E_v$ over $\mathrm{Spec}(\mathcal O_{E_v})$, then the RHS is isomorphic to $\mathrm H^{\bullet}(S_{K^p} \otimes \kappa(E_v)^{\mathrm{ac}}, \mathrm R\Psi_{\eta}\mathcal L_{\xi})$, the cohomology of the special fiber with coefficients in the nearby cycles (this works in certain generality even for non compact Shimura varieties). One may use the geometry of the special fiber to further analyze these cohomology groups.
I have seen papers which, unless I'm mistaken, seemingly use Matsushima's formula to analyze the RHS and the cohomology of the special fiber in nearby cycles, by restricting the Galois representations to $E_v^{\mathrm{ac}}$. That is why I guess that there should be a link between LHS and RHS, even though I have not seen it written clearly anywhere (maybe because it is too obvious?)