It looks like you're calculating the temperature at the top of the atmosphere (or for an airless world), which can be a useful parameter to input into a climate model. I didn't try to verify your math because that sort of thing is well-defined in a lot of places already and I'm not up to that level of detail work at the moment, but make sure that you check your units.

Switching the base temperature based on the underlying land type is certainly one way to go about getting a temperature difference between sea, land, and mountainous provinces, but it won't get you any gradients between those values. If you have a heightmap, using the altitude as an input to a temperature function will get you the underlying gradients of your heightmap.

There is still a long way to go (ITCZ calculations, currents in the atmosphere, heat flow around the oceans and atmosphere along with exchanges between them, cloud albedo effects, greenhouse effects, and so on) to get to a minimal climate model, but solar influx at the top of the atmosphere is a good starting point.