Remove the plywood that creates the roof deck, or roof surface, if the plywood has already been put in place. Use a hammer to pull the nails from the plywood, and take the panels back down from the roof to leave the joists exposed.
Sand the joists in the roof to a slope of at least 1 percent with an orbital sander. Check the slope with a level that measures the slope as a percentage. Create a more severe slope for more effective drainage.
Pull out the nails that hold the joist at one end of the roof in place. Slide the joist up until the lower end of the joist sits level with the top of the wall structure and reattach the joist with the screws. Repeat this process for every roof joist.
Add an additional piece of siding, additional piece of wood or additional stucco to fill in the space at the top of the wall on the side where the top of the roof joist now sits above the top of the wall. Paint the wood in stucco in the appropriate color to match the rest of the exterior wall.
Put the plywood panels back into place on the sloped roof joists. Secure the plywood panels to the joists with nails every 2 to 3 inches.
Install roofing materials to cover the flat plywood roof deck. Lay a waterproof underlay on the roof first, installing it with waterproof adhesive, and lay metal or rubber roofing underlay, securing metal roofing with nails or rubber roofing with adhesive. Cover all seams on a flat roof with rubber cement.