I notice that in your il.sublink.loadTree(basePath, snapNum, id, ...) function, there is an id parameter input. The id range for snapshot 99 is 0-4371210, which means it can not be the SubhaloID. Is that id means SubfindID?
"id" and "SubhaloID" and "SubfindID" are all the same thing.
The number of subhalos in TNG100-1 at snapshot 99 is 4371211, so that makes sense.
No. subfindID and the subhaloID are different. The galaxy with subfindID in snapshot 99 is 264412, but the corresponding subhaloID is 50000002800000000.
I see you're refering to SubhaloID of the SubLink merger tree, which is defined as "Unique identifier of this subhalo, assigned in a "depth-first" fashion. This value is contiguous within a single tree."
You are right, this ID value is used inside the merger tree only - it isn't related to anything in the snapshots or group catalogs.
So back to the first question, does the id in il.sublink.loadTree(basePath, snapNum, id, ...) means subfindID? Since in the snapshot 99, the max value for this id is 4371210.
Yes, the id of that function refers to the "subhalo ID" or the "subfind ID", we use these two labels interchangeably. They both mean the index of the object, in any array of properties, such as e.g. SubhaloMass.
I've added a clarification about this to the FAQ.