Preheat oven to 325°F. Butter three 9x2-inch round cake pans, flour the insides, and tap out the excess. Set aside.
Whisk the flour, baking powder, baking soda, cinnamon and salt in a medium bowl. In another bowl, stir together the carrots, chopped nuts, coconut, and raisins. Set aside.
Working with a stand mixer, preferably fitted with a paddle attachment, or with a hand mixer in a large bowl, beat the sugar and oil together on medium speed until smooth. Add the eggs one by one, beating after each addition until smooth. Reduce the speed to low and add the flour mixture, mixing only until just combined. Fold in the carrot mixture. Divide the batter evenly among the baking pans.
Bake for 40-50 minutes, rotating the pans from top to bottom and front to back just past the midway point, until a toothpick or cake tester inserted into the centers comes out clean. Transfer the pans to cooling racks and cool for about 10 minutes, then run a knife around the sides of the cakes. Remove the cakes from the pans; place back on the cooling racks, right sides up, and cool completely.
The cakes can be wrapped airtight and kept at room temperature overnight or frozen for up to 2 months.
For the Frosting
Divide the cream cheese frosting in half. Stir ½ cup of coconut into one half of the frosting for filling the cake. (Omit this step if you do not want coconut in the filling.)
To Assemble the Cake
Place one layer of the cake right-side up on a cardboard cake round or a cake plate. Tuck strips of parchment or wax paper under the edges of the cake to protect the plate while frosting.
If using the coconut filling, top the layer with half of the coconut frosting (or generously cover with about ¼ of the plain frosting). Use an offset spatula to smooth the frosting all the way to the edges of the layer.
Place a second layer of cake upside down on top of the first layer. Top with the remaining coconut frosting or another portion of plain frosting, again spreading to the edges of the layer.
Place the final layer right-side up on top of the first two layers. Use the rest of the frosting to cover the top and sides of the cake. If desired, decorate with toasted nuts or toasted coconut.
Chill the cake for 30 minutes, just to set the frosting before serving.
Notes
3 cups of carrots comes out to about 8-9 carrots, depending on size. You can grate them using the shredding attachment on your food processor or using a box grater.I personally prefer to use unsweetened coconut in the cake batter and sweetened coconut in the cake filling.This cake can be served as soon as the frosting is set. Store the cake covered in the refrigerator for up to 3 days. Bring to room temperature before serving.To freeze the cake: Freeze uncovered. When the cake and frosting is firm, wrap airtight and freeze for up to 2 months. Defrost, still wrapped, overnight in the refrigerator.Makes 1 3-layered 9-inch cakeCake barely tweaked from Dorie Greenspan