Effects of waves and tide on tidal flat ecosystems