Urban areas are an important part of the climate system and many aspects of urban climate have direct effects on human health and living conditions. This implies that reliable tools for local urban climate studies supporting sustainable urban planning are needed. However, a realistic implementation of urban canopy processes still poses a serious challenge for weather and climate modelling for the current generation of numerical models. To address this demand, a new urban surface model (USM), describing the surface energy processes for urban environments, was developed and integrated as a module into the PALM large-eddy simulation model. The development of the presented first version of the USM originated from modelling the urban heat island during summer heat wave episodes and thus implements primarily processes important in such conditions. The USM contains a multi-reflection radiation model for shortwave and longwave radiation with an integrated model of absorption of radiation by resolved plant canopy (i.e. trees, shrubs). Furthermore, it consists of an energy balance solver for horizontal and vertical impervious surfaces, and thermal diffusion in ground, wall, and roof materials, and it includes a simple model for the consideration of anthropogenic heat sources. The USM was parallelized using the standard Message Passing Interface and performance testing demonstrates that the computational costs of the USM are reasonable on typical clusters for the tested configurations. The module was fully integrated into PALM and is available via its online repository under the GNU General Public License (GPL). The USM was tested on a summer heat-wave episode for a selected Prague crossroads. The general representation of the urban boundary layer and patterns of surface temperatures of various surface types (walls, pavement) are in good agreement with in situ observations made in Prague. Additional simulations were performed in order to assess the sensitivity of the results to uncertainties in the material parameters, the domain size, and the general effect of the USM itself. The first version of the USM is limited to the processes most relevant to the study of summer heat waves and serves as a basis for ongoing development which will address additional processes of the urban environment and lead to improvements to extend the utilization of the USM to other environments and conditions.