A model for erosion, sedimentation, and flexure with application to New Caledonia