The UK government is investing £1m in a scheme to help aid charities predict where and when humanitarian disasters will strike.