added fortran routine to get centres