High order compact finite difference schemes on nonuniform grids