nodes: 0, module; 1, function_definition; 2, function_name:get_subset_riverid_index_list; 3, parameters; 4, block; 5, identifier:self; 6, identifier:river_id_list; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, for_statement; 12, expression_statement; 13, expression_statement; 14, expression_statement; 15, return_statement; 16, comment:"""
          Gets the subset riverid_list from the netcdf file
          Optional returns include the list of valid river ids in the dataset
          as well as a list of missing rive rids
  
          Parameters
          ----------
          river_id_list: list or :obj:`numpy.array`
              Array of river ID's for the river segments you want the index of.
  
          Returns
          -------
          :obj:`numpy.array`
              A sorted array of the river index in the NetCDF file that
              were found.
          :obj:`numpy.array`
              A sorted array of the river IDs that were found.
          list
              An array of the missing river ids.
  
          """; 17, assignment; 18, assignment; 19, assignment; 20, identifier:river_id; 21, identifier:river_id_list; 22, comment:# get where streamids are in netcdf file; 23, block; 24, assignment; 25, assignment; 26, assignment; 27, tuple; 28, identifier:netcdf_river_indices_list; 29, list; 30, identifier:valid_river_ids; 31, list; 32, identifier:missing_river_ids; 33, list; 34, try_statement; 35, identifier:np_valid_river_indices_list; 36, call; 37, identifier:np_valid_river_ids; 38, call; 39, identifier:sorted_indexes; 40, call; 41, subscript; 42, subscript; 43, call; 44, block; 45, except_clause; 46, attribute; 47, argument_list; 48, attribute; 49, argument_list; 50, attribute; 51, argument_list; 52, identifier:np_valid_river_indices_list; 53, identifier:sorted_indexes; 54, identifier:np_valid_river_ids; 55, identifier:sorted_indexes; 56, attribute; 57, argument_list; 58, expression_statement; 59, expression_statement; 60, identifier:IndexError; 61, block; 62, identifier:np; 63, identifier:array; 64, identifier:netcdf_river_indices_list; 65, identifier:np; 66, identifier:array; 67, identifier:valid_river_ids; 68, identifier:np; 69, identifier:argsort; 70, identifier:np_valid_river_indices_list; 71, identifier:np; 72, identifier:array; 73, identifier:missing_river_ids; 74, call; 75, call; 76, expression_statement; 77, expression_statement; 78, attribute; 79, argument_list; 80, attribute; 81, argument_list; 82, call; 83, call; 84, identifier:netcdf_river_indices_list; 85, line_continuation:\; 86, identifier:append; 87, call; 88, identifier:valid_river_ids; 89, identifier:append; 90, identifier:river_id; 91, identifier:log; 92, argument_list; 93, attribute; 94, argument_list; 95, attribute; 96, argument_list; 97, call; 98, string:"WARNING"; 99, identifier:missing_river_ids; 100, identifier:append; 101, identifier:river_id; 102, identifier:self; 103, identifier:get_river_index; 104, identifier:river_id; 105, attribute; 106, argument_list; 107, concatenated_string; 108, identifier:format; 109, identifier:river_id; 110, string:"ReachID {0} not found in netCDF dataset."; 111, string:" Skipping ..."
code: def get_subset_riverid_index_list(self, river_id_list):
          """
          Gets the subset riverid_list from the netcdf file
          Optional returns include the list of valid river ids in the dataset
          as well as a list of missing rive rids
  
          Parameters
          ----------
          river_id_list: list or :obj:`numpy.array`
              Array of river ID's for the river segments you want the index of.
  
          Returns
          -------
          :obj:`numpy.array`
              A sorted array of the river index in the NetCDF file that
              were found.
          :obj:`numpy.array`
              A sorted array of the river IDs that were found.
          list
              An array of the missing river ids.
  
          """
          netcdf_river_indices_list = []
          valid_river_ids = []
          missing_river_ids = []
          for river_id in river_id_list:
              # get where streamids are in netcdf file
              try:
                  netcdf_river_indices_list \
                      .append(self.get_river_index(river_id))
                  valid_river_ids.append(river_id)
              except IndexError:
                  log("ReachID {0} not found in netCDF dataset."
                      " Skipping ...".format(river_id),
                      "WARNING")
                  missing_river_ids.append(river_id)
  
          np_valid_river_indices_list = np.array(netcdf_river_indices_list)
          np_valid_river_ids = np.array(valid_river_ids)
          sorted_indexes = np.argsort(np_valid_river_indices_list)
  
          return(np_valid_river_indices_list[sorted_indexes],
                 np_valid_river_ids[sorted_indexes],
                 np.array(missing_river_ids))