Mechanistic models of global biodiversity