A one-dimensional boundary-layer model for Mars is described, and its results are compared with Viking data. The model equations are similar to Earth boundary-layer models in that they include contributions from Coriolis, pressure gradient, and frictional forces for momentum; and radiation, sensible heat flux convergence, and advection for heat. Turbulent fluxes are computed from the level-2 second-order closure theory of Mellor and Yamada with similarity relations employed for boundary conditions. The pressure gradient force can be specified or computed from a simple slope model. Radiative heating is due to the absorption of solar and infrared radiation by CO2 ps and suspended dust particles. Ground temperatures are computed by solving a surface heat budget using an accurate treatment of conduction into the Martian soil. The data used for comparison were obtained by the Viking 1 and 2 landers for early northern summer. At each site, these data include a single profile of wind and temperature between 1.5 and 4 km and their diurnal variations at 1.6 m above the surface. Model-predicted temperatures are in good agreement with the data, though they show a greater variation at 1.6 m than is evident in the data. Model-predicted winds compare less favorably in that they can match the surface data or the profiles, but not both simultaneously. In addition, best agreement is obtained using a slope magnitude and/or direction that is different from reported values. However, the model can reproduce the shape, phase, and sense of rotation of the surface wind hodograph at each site. Some features of the simulations include low-level nocturnal jets, which may be common on Mars, and a negative feedback between dust and surface stress. The sensitivity of the model to uncertain parameters such as dust load, optical properties, and surface roughness is discussed.