1. Prepare the leg of lamb: Using a sharp chef ’s knife, deeply score the leg of lamb on all sides in a crosshatch pattern. The cuts should be about 1 inch deep and 2 inches apart. Break the onion wedges into individual layers. Insert the pieces of onion and the slices of garlic and ginger into the cuts made by the scoring, pushing each in as deeply as possible. Generously season the leg of lamb on all sides with salt and pepper.
2. Make the charmoula: Place the chopped onion, garlic, and ginger in a heavy mortar and pound them to a paste with a pestle. Add the cilantro, paprika, salt, cumin, and pepper and pound them into a paste. Work in the olive oil and enough water to obtain a thick but pourable sauce (about 1 ½ cups). If you don’t have a mortar and pestle, puree the onion, garlic, and ginger in a food processor, followed by the cilantro, paprika, salt, cumin, and pepper, then work in the olive oil and water. Taste the charmoula for seasoning, adding more salt and/or pepper as necessary; it should be highly seasoned. Transfer the charmoula to a saucepan and let it simmer over medium heat until richly flavored, about 5 minutes.
3. To grill: If you are grilling using the indirect method, set up the grill for indirect grilling, place a large drip pan in the center, and preheat the grill to medium. When ready to cook, if you are using wood chips or chunks, toss them on the coals of a charcoal grill or, if you are using a gas grill, add the chips or chunks to the smoker box or place them in a smoker pouch under the grate. Place the leg of lamb, fat side up, in the center of the grate over the drip pan and away from the heat. Cover the grill and cook the lamb until it is sizzling and dark golden brown, depending upon the grill and the size of the leg of lamb, 1 ½ to 2 ¼ hours.
If you are using a rotisserie, set up the grill for spit roasting, following the manufacturer’s instructions, and preheat the grill to medium-high. Place a large drip pan under the spit. Starting at the fatter end, thread the leg of lamb lengthwise on the rotisserie spit, parallel to the leg bone, using the forked prongs of the spit to hold it in place. When ready to cook, attach the spit to the grill and turn on the motor. Spit roast the lamb until it is sizzling and dark golden brown, depending on the grill and the size of the leg of lamb, 1 ¼ to 2 hours.
4. Use an instant-read meat thermometer to test for doneness, inserting it into the thickest part of the leg but not touching the bone or the spit, if any. When cooked to well-done the internal temperature should be 190° to 195°F. (Moroccans prefer their lamb well-done.) After 30 minutes, start basting the lamb all over with the charmoula, basting it every 20 minutes. If you are using a charcoal grill, you’ll need to add fresh coals after the lamb has grilled for an hour.
5. Transfer the grilled lamb to a platter. Loosely tent the leg with aluminum foil and let it rest for 5 to 10 minutes. Strain the lamb drippings into what remains of the charmoula sauce. Bring the charmoula to a boil and let boil until slightly thickened and richly flavored, 3 to 5 minutes.
6. Carve the lamb so that each person gets pieces with both meat and the outside crust. Spoon the charmoula on top and serve at once.