An unstructured CD-grid variational formulation for sea ice dynamics