This study describes the theoretical foundation and applications of a newly designed mesoscale model named CLIMM (climate model Mainz). In contrast to terrain following coordinates, a cartesian grid is used to keep the finite difference equations as simple as possible. The method of viscous topography is applied to the flow part of the model. Since the topography intersects the cartesian grid cells, the new concept of boundary weight factors is introduced for the solution of Poisson`s equation. A three-dimensional radiosity model was implemented to handle radiative transfer at the ground. The model is applied to study thermally induced circulations and gravity waves at an idealized mountain. Furthermore, CLIMM was used to simulate typical wind and temperature distributions for the city of Mainz and its rural surroundings. It was found that the model in all cases produced realistic results. (orig.) 38 refs.