Within the tropics, and during the summer months in midlatitudes, most of the rainfall reaching the surface is generated by moist convection. Over land, the diurnal cycle in moist convective rainfall usually peaks in the late afternoon. In most climate models, the diurnal peak in convective rainfall occurs several hours too early and is often near local solar noon. We argue that this bias partly originates from the methods used in convective parameterizations to calculate the cloud base mass flux. In most convective parameterizations, the initial convective mass flux is determined from the convective available potential energy (CAPE) of an updraft parcel originating from the model layer closest to the surface. In models, the rapid increase in the CAPE of this near-surface layer following sunrise contributes to a rapid increase in convective precipitation. However, the mass-weighted CAPE of the boundary layer as a whole responds much more slowly to the increase in downward solar radiation at the surface. Using a recently developed convective parameterization in version 4 of the Community Atmosphere Model (CAM4), we show that the overall accuracy in the diurnal simulation of convective precipitation increases as the number of near-surface layers from which convective air parcels are permitted to originate increases from one to four. We also show that the simulation of the diurnal cycle in convective precipitation over land can be improved through the introduction of variables which attempt to represent the persistence of subgrid-scale convective organization within a grid column across model time steps.