The problem of weakly stratified, weakly sheared flow over (or under) obstacles is solved approximately by using a Lagrangian approach that obtains solutions on isentropic or Bernoulli surfaces and hence reveals the vortex lines immediately. The new method is based on a decomposition of the vorticity in dry, inviscid, isentropic flow into baroclinic and barotropic components. The formulas for both baroclinic and barotropic vorticity are exact formal solutions of the vorticity equation. A nonhydrostatic Lagrangian model approximates these solutions based on a primary-flow-secondary-flow approach. The assumed primary flow is a three-dimensional steady potential flow so that it is a solution of the governing inviscid equations only in the absence of stratification and preexisting vorticity. It is chosen to be irrotational in order to eliminate the primary flow as the origin of rotation. Three particular potential flows are chosen for their simplicity and because pieces of them approximate mesoscale atmospheric flows. The secondary flow is the correction needed to give an improved approximation to the actual flow. The Lagrangian model computes the secondary vorticity that develops owing to the introduction of stratification and vorticity in the upstream horizontally homogeneous environment as secondary effects without modification of the primary flow. Potential vorticity is conserved and is zero because both the barotropic and the baroclinic vortex lines lie in the isentropic surfaces. The baroclinic component of vorticity, zero initially, depends on the gradient of cumulative temperature (the Lagrangian integral of temperature following an air parcel) and on the local entropy gradient. In a particular isentropic surface, it is determined by the local static stability and by horizontal gradients of the height and the cumulative height perturbations of parcels in the surface. For weak stable stratification, it is proven that the vertical baroclinic vorticity is cyclonic (anticyclonic) on the entire right (left) side of the flow, upstream as well as downstream of the height extremum. A time-dependent linearized version of the model is used to show how the baroclinic vortex lines evolve initially. Barotropic vorticity is determined by the property that barotropic vortex lines, which are straight and horizontal in the upstream environment, are frozen into the fluid and move with it. The component normal to the surfaces of the secondary velocity induced by the baroclinic and barotropic vorticity is deduced qualitatively.