def get_river_index(self, river_id):
        """
        This method retrieves the river index in the netCDF
        dataset corresponding to the river ID.

        Parameters
        ----------
        river_id: int
            The ID of the river segment.

        Returns
        -------
        int:
            The index of the river ID's in the file.


        Example::

            from RAPIDpy import RAPIDDataset

            path_to_rapid_qout = '/path/to/Qout.nc'
            river_id = 53458

            with RAPIDDataset(path_to_rapid_qout) as qout_nc:
                river_index = qout_nc.get_river_index(river_id)

        """
        try:
            return np.where(self.get_river_id_array() == river_id)[0][0]
        except IndexError:
            raise IndexError("ERROR: River ID {0} not found in dataset "
                             "...".format(river_id))