Ancient Arabic writings help scientists piece together past climate