Nuty,
Amokhta's reply covers the subject very well. Let me just add that if the roof segment has a slope steeper than 1/4 inch per foot toward points of free drainage, we do not have to check the structural strength of the roof for ponding of rainwater.
The design of the roof drains and piping is based on the rain hourly rate specified by the applicable code. Structurally, we design the roof for the water accumulated considering the deflection of the roof system.
AEF