A two-part modeling study of the wind-forced flow on the continental shelf off northern California in the region (37°–40°N) of the Coastal Ocean Dynamics Experiment (CODE) is pursued. This paper involves a process-oriented study with idealized wind stress forcing. Gan and Allen  involves forcing with observed winds and heat flux for April–May 1982 and comparison of model results with CODE observations. A characteristic, but previously unexplained, response observed during CODE following the weakening, or relaxation, of southward upwelling favorable winds is the time-dependent development of northward currents over the inner shelf next to the coast. The presence of northward winds is not necessary for this occurrence. The objective in this paper is to investigate the dynamics of the shelf flow response to upwelling wind relaxation events under idealized conditions. In the basic case experiment a spatially uniform upwelling favorable southward wind stress of 0.1 Pa is applied to the ocean initially at rest. The stress is held constant for 10 days and then decreased linearly to zero over 3 days. In response to the southward wind stress, southward alongshore currents develop on the shelf accompanied by upwelling of cold, dense water near the coast. Considerable spatial variability in the shelf flow, clearly related to the alongshore variations in coastline and bottom topography, is found. The alongshore currents tend to separate from the coast south of capes, and the coldest surface water is found at those locations. As the winds decrease, northward currents, similar to those observed, develop on the inner shelf next to the coast at many alongshore locations. Examination of the alongshore momentum balances shows that the northward currents are forced by a northward pressure gradient force associated with negative alongshore pressure gradients. These pressure gradients are set up by the interaction of the wind-forced flow with the alongshore variations in shelf topography. In general, negative alongshore pressure gradients, intensified off Pt. Reyes and Pt. Arena by the gradient wind balance, are found south of capes. The negative pressure gradients geostrophically balance onshore flow at depth, and upwelling is strengthened in these locations. North of capes, positive pressure gradients that are primarily in balance with nonlinear advective effects are found. After the winds cease the forced across-shelf circulation weakens, and the resulting unbalanced negative pressure gradients south of the capes accelerate the alongshore currents northward. Processes with similar dynamics are found embedded in the more complex coastal ocean response to observed time varying winds by Gan and Allen .