Nonlinear dynamics and catastrophic shifts in a forest-grassland ecosystem