A three-dimensional coupled ice-ocean model of coastal circulation