  We performed the temperature diagnostics using inversions of data from nine
spectroscopic observations obtained with the IRIS spectrograph in the MgII h &
k lines. The sensitivity to the temperature of the emission peaks of these
lines was exploited to determine the temperature of the coronal rain plasma
using inversions of the spectroscopic profiles. Additional relationships
between different spectral features of these lines, derived from the use of 3D
radiative transfer line synthesis applied to simulations, were employed in
order to derive the line-of-sight (LoS) velocities in different parts of the
coronal rain plasma. For the first time, spectroscopic inversions of coronal
rain were successfully performed. Temperatures derived from the inversions
yield coronal rain clump temperatures at the formation height of the emission
peaks of the MgII h & k lines in the range between 5000 and 7000 K. This narrow
range of values remains consistent among all the different observations used in
this work. We obtained LoS velocities of up to 40 km/s, which are consistent
with the motion of the plasma being mostly constrained to the plane of the sky,
as the coronal rain was mostly detected shortly after its formation and the
observations took place in the disc. Furthermore, velocity diagnostics led to
the detection of larger velocities at higher layers of the coronal rain plasma
in some cases. This increased velocity seems to indicate that at some point (at
least) during the fall of coronal rain clumps towards the chromosphere, the
material in the upper part of the coronal rain plasma is falling with greater
velocity than the material below it. The conditions of the temperature and
density of the coronal rain plasma where the Mg II h line forms appear to be
slightly different that those of the Mg II k line, with the former found at
slightly colder and denser parts of the plasma.
