Heritability at the ecosystem level