  In this paper we study the Nirenberg problem on standard half spheres
$(\mathbb{S}^n_+,g), \, n \geq 5$, which consists of finding conformal metrics
of prescribed scalar curvature and zero boundary mean curvature on the
boundary. This problem amounts to solve the following boundary value problem
involving the critical Sobolev exponent: \begin{equation*} (\mathcal{P}) \quad
\begin{cases}
  -\D_{g} u \, + \, \frac{n(n-2)}{4} u \, = K \, u^{\frac{n+2}{n-2}},\, u > 0 &
\mbox{in } \mathbb{S}^n_+,
  \frac{\partial u}{\partial \nu }\, =\, 0 & \mbox{on } \partial
\mathbb{S}^n_+. \end{cases} \end{equation*} where $K \in C^3(\mathbb{S}^n_+)$
is a positive function.
  This problem has a variational structure but the related Euler-Lagrange
functional $J_K$ lacks compactness. Indeed it admits \emph{critical points at
infinity}, which are \emph{limits} of non compact orbits of the (negative)
gradient flow. Through the construction of an appropriate \emph{pseudogradient}
in the \emph{neighborhood at infinity}, we characterize these \emph{critical
points at infinity}, associate to them an index, perform a \emph{Morse type
reduction} of the functional $J_K$ in their neighborhood and compute their
contribution to the difference of topology between the level sets of $J_K$,
hence extending the full Morse theoretical approach to this \emph{non compact
variational problem}. Such an approach is used to prove, under various pinching
conditions, some existence results for $(\mathcal{P})$ on half spheres of
dimension $n \geq 5$.
