remove na.omit(m_tmn) as it was doing weird things to elev