Flow and dispersion processes in urban areas are profoundly influenced by the presence of buildings which divert mean flow, affect surface heating and cooling, and alter the structure of turbulence in the lower atmosphere. Accurate prediction of velocity, temperature, and turbulent kinetic energy fields are necessary for determining the transport and dispersion of scalars. Correct predictions of scalar concentrations are vital in densely populated urban areas where they are used to aid in emergency response planning for accidental or intentional releases of hazardous substances. Traditionally, urban flow simulations have been performed by computational fluid dynamics (CFD) codes which can accommodate the geometric complexity inherent to urban landscapes. In these types of models the grid is aligned with the solid boundaries, and the boundary conditions are applied to the computational nodes coincident with the surface. If the CFD code uses a structured curvilinear mesh, then time-consuming manual manipulation is needed to ensure that the mesh conforms to the solid boundaries while minimizing skewness. If the CFD code uses an unstructured grid, then the solver cannot be optimized for the underlying data structure which takes an irregular form. Unstructured solvers are therefore often slower and more memory intensive than their structured counterparts. Additionally, urban-scale CFD models are often forced at lateral boundaries with idealized flow, neglecting dynamic forcing due to synoptic scale weather patterns. These CFD codes solve the incompressible Navier-Stokes equations and include limited options for representing atmospheric processes such as surface fluxes and moisture. Traditional CFD codes therefore posses several drawbacks, due to the expense of either creating the grid or solving the resulting algebraic system of equations, and due to the idealized boundary conditions and the lack of full atmospheric physics. Meso-scale atmospheric boundary layer simulations, on the other hand, are performed by numerical weather prediction (NWP) codes, which cannot handle the geometry of the urban landscape, but do provide a more complete representation of atmospheric physics. NWP codes typically use structured grids with terrain-following vertical coordinates, include a full suite of atmospheric physics parameterizations, and allow for dynamic synoptic scale lateral forcing through grid nesting. Terrain following grids are unsuitable for urban terrain, as steep terrain gradients cause extreme distortion of the computational cells. In this work, we introduce and develop an immersed boundary method (IBM) to allow the favorable properties of a numerical weather prediction code to be combined with the ability to handle complex terrain. IBM uses a non-conforming structured grid, and allows solid boundaries to pass through the computational cells. As the terrain passes through the mesh in an arbitrary manner, the main goal of the IBM is to apply the boundary condition on the interior of the domain as accurately as possible. With the implementation of the IBM, numerical weather prediction codes can be used to explicitly resolve urban terrain. Heterogeneous urban domains using the IBM can be nested into larger mesoscale domains using a terrain-following coordinate. The larger mesoscale domain provides lateral boundary conditions to the urban domain with the correct forcing, allowing seamless integration between mesoscale and urban scale models. Further discussion of the scope of this project is given by Lundquist et al. [2007]. The current paper describes the implementation of an IBM into the Weather Research and Forecasting (WRF) model, which is an open source numerical weather prediction code. The WRF model solves the non-hydrostatic compressible Navier-Stokes equations, and employs an isobaric terrain-following vertical coordinate. Many types of IB methods have been developed by researchers; a comprehensive review can be found in Mittal and Iaccarino [2005]. To the authors knowledge, this is the first IBM approach that is able to use a pressure-based coordinate. The immersed boundary method presented here uses direct forcing, first suggested by Mohd-Yusof [1997], to impose a no-slip boundary condition. Additionally, the WRF model has been modified to include a no-slip bottom boundary condition enabling direct comparisons with the IBM solution for problems with gently sloping terrain. The accuracy and efficiency of the immersed boundary solver is examined within the context of a two-dimensional Witch of Agnesi hill. Results are also presented for two-dimensional flow over several blocks of New York City, which demonstrate the IB method's ability to handle extremely complex terrain with sharp corners and steep terrain gradients