A semi-implicit numerical model for baroclinic oceans