Dynamics of marine ecosystems