So it would be a number two cu ground or one ot aL
Determine the minimum size for ampacity, if length were negligible. I call this the "minimum local size".
Determine the corresponding EGC size from Table 250.122. The default ground size.
Compare the kcmil of what you are actually using, to the kcmil of the minimum local size. Compare it as an upsize ratio.
Multiply the upsize ratio by the kcmil of the previously determined default EGC size. That becomes your EGC required for upsizing.
Generally, if you upsize the main wires X increments of sizes, you'll correspondingly upsize the EGC the same number of gauge size increments. This is because the gauge numbering is defined as a logarithmic scale of kcmil, where incremental steps in nominal gauge size represent multiplicative changes in kcmil.
It is OK to splice this locally at the terminal equipment, in order to adapt to a size that fits in factory lugs. Obviously, it needs to be at least the size determined from Table 250.122. The physical basis for the EGC upsizing rule, is to make sure the EGC resistance isn't too high to prevent it from being an effective ground fault current path. The sizing in table 250.122 is to size it large enough to keep it from melting like a fuse during fault current conditions. Upsizing after that, is to reduce its total ohms when length is significant.