Saute onion in olive oil until soft, about 5 to 6 minutes. Add ginger, turmeric, spices, and salt. Continue to saute for another 2 minute until fragrant.
Place onion-spice mixture into a large casserole dish. Add carrots, lentils, rice, water, and coconut milk. Mix together well. Cover and bake for 2 hours.
After 2 hours, turn oven temp up to 425 degrees F. Remove cover and cook for another 20 to 30 minutes to let excess liquid cook off. Stir and serve!