We study the M1.9 class solar flare SOL2015-09-27T10:40 UT using
high-resolution full-Stokes imaging spectropolarimetry of the Ca ii 8542 {\AA}
line obtained with the CRISP imaging spectropolarimeter at the Swedish 1-m
Solar Telescope. Spectropolarimetric inversions using the non-LTE code NICOLE
are used to construct semi-empirical models of the flaring atmosphere to
investigate the structure and evolution of the flare temperature and magnetic
field. A comparison of the temperature stratification in flaring and
non-flaring areas reveals strong heating of the flare ribbon during the flare
peak. The polarization signals of the ribbon in the chromosphere during the
flare maximum become stronger when compared to its surroundings and to pre- and
post- flare profiles. Furthermore, a comparison of the response functions to
perturbations in the line-of-sight magnetic field and temperature in flaring
and non-flaring atmospheres shows that during the flare the Ca ii 8542 {\AA}
line is more sensitive to the lower atmosphere where the magnetic field is
expected to be stronger. The chromospheric magnetic field was also determined
with the weak-field approximation which led to results similar to those
obtained with the NICOLE inversions.Comment: 11 pages, 9 figures, accepted in Ap