How does a GM make his opening repertoire and how does he calculate his moves in advance.Can he calculate 20 moves in advance base on his opening?
They don't calculate the common openings, they know them by heart, at least the main lines, and the possible refutations, should the opponent deviate from the main line.
For the less common openings, they might remember things not as deep as the often playable ones. Still, it's like 10-15 plys for something obnoxious and could be as much as 20-30 plys for the most common ones.
GMs have all the common opening memorized, sometimes to a very deep level. In this regard, they are not calculating at all. Once they are out of their book, the depth of calculation is based upon the complexity of the board. When there aren't many pieces on the board, they don't always calculate so much as know that a certain situation is a win if they following certain principles. In the middle game, 8 moves would be common, but the GM knows how to quickly remove from consideration variations that don't look promising. When they calculate deeper it is because they don't waste energy on bad variations.
It depends, strong grandmasters might know tremendous amounts of lines by heart. Weaker GMs who no longer drill openings will forget majority of lines sooner or later but they will still be very good at recognizing strategic patterns and in making practical decisions. They will still know how to lure much weaker opposition into mess they will understand better while they will be able to limit seriously power of younger guys with better theoretical knowledge by sidestepping dangerous lines and limiting possible home preparation dangers. It's not that much about calculating in openings I guess.
When Richard Reti was asked how many moves ahead he calculated, his answer is said to have been "One, sometimes two". This is probably correct, if by "calculate" you mean examine all alternatives and be sure of the result. This is not what grandmasters do. What they actually do, nobody knows, not even them.