In a large ovenproof skillet, preferably cast iron, on low heat melt the butter. Add the chopped onion and while occasionally stirring cook for 10 minutes until soft.
Meanwhile, stir together the cooked rice, cumin, allspice, cayenne, garlic, chipotle chile, sour cream and 1/2 cup of the Gruyere cheese. Taste and adjust seasonings, then add salt to taste. Add rice mixture to the skillet and stir until onions are mixed well with the rice. (Alternatively, you can bake the casserole in a greased 10-inch baking pan.) Top with the rest of the Gruyere cheese and bake for 30 minutes uncovered or until brown and bubbling. Serve topped with cilantro, if you like.
Texas sweet onion casserole with rice, chipotle, and Gruyere | www.homesicktexan.com