According to the state of California, wires are sized according to what the temperature capacity rating of the insulation is. Another factor is whether the wire is copper or aluminum. For example, a 10-guage wire with a type TW insulation has one rating, but an aluminum wire has another rating, even though its the same gauge and insulation type. Engineers use a complex series of criteria, based on temperature charts provided by the state of California. After the building electrical loads are calculated, the final wire size is determined.
This is not as difficult to calculate as wire size. Two common methods are used for the ground rod. If the wire is grounded to rebar embedded into the concrete slab, the rebar must be at least 20 feet long, and 1/2 inch in diameter. If a ground rod is driven into the ground, it has to be driven in 8 feet deep or more. . Furthermore, the diameter of the ground rod depends on the material it is made of. If the ground rod is made of iron or steel, it has to be 5/8 inch in diameter. For stainless steel or other nonferrous material, it can be 1/2 inch in diameter.
If more than one ground rod is used, the rods cannot be closer than 6 feet from each other. This is not hard to comply with. A simple tape measure can determine the spacing. Usually, the architect or electrical designer lays out the location of the ground rods on the blueprints before the building is ever built.
If the ground wire is attached to a cold water pipe, the attachment point cannot be more than 5 feet away from the panel box. Again, this is not hard to accomplish. A simple tape measure is all that's needed. If you cannot ground a wire to a cold water pipe because of distance, drive a ground rod into the ground and attach the ground to it.