Middle Pennsylvanian-Lower Permian limestones in the subsurface of west Texas were studied to determine how subaerial exposure and freshwater diagenesis (karstification) affected porosity distribution in meter-scale cycles. Approximately 87 depositional cycles are present in the gross reservoir interval (depths of 2600-3000 m), and each cycle is interpreted to represent a glacio-eustatic sea level fluctuation. Using recent radiometric age dating, average cycle duration is estimated at 160,000 yr per cycle. Reservoir-grade porosity (>4%) occurs in 5-25% of the gross reservoir section. Porosity is stratified, occurring in 1-6-m-thick intervals in the upper part of cycles that were subaerially exposed; however, many cycles that were subaerially exposed now lack porosity. Diagenesis and porosity development have distinct patterns related to duration of subaerial exposure. Four stages of porosity development are identified. (1) Very brief or no subaerial exposure (estimated at less than 5000 yr) caused little or no diagenetic change. (2) Brief to moderate subaerial exposure (estimated at 5000-50,000 yr) resulted in most primary pores being filled with calcite cement, and dissolution creating fine matrix pores (molds and intercrystalline pores). (3) Moderately long subaerial exposure (estimated at 50,000-130,000 yr) resulted in cements filling primary pores and some fine secondary pores, and dissolution creating small conduit pores (vugs, fractures, fissures). (4) Prolonged subaerial exposure (estimated at greater than 130,000 yr) resulted in most primary and secondary matrix pores being filled with calcite cement, but dissolution enlarged conduit pores (vugs, fractures, fissures). Present subsurface porosity in this field preferentially occurs in thick grainstones, phylloid algal boundstones, and a few wackestone/packstones in cycles subjected to brief subaerial exposure (stages 2 and 3). Matrix porosity (molds, intercrystalline pores) is dominant because most conduit pores formed during prolonged subaerial exposure were filled with either shale during subsequent transgressions or burial cements derived from pressure solution associated with the shales. The distribution of porosity in the Southwest Andrews area indicates that duration of subaerial exposure and supply of clastics are major factors determining ultimate porosity in limestones subjected to subaerial exposure and karstification.