Numerical dynamo simulations reproduce palaeomagnetic field behaviour