added if loop to turn of adiabatic cooling in matom mode