A group of species that interact with each other and with their environment in a defined area, generating flows of matter and energy.