In 833 a county magistrate of thirty three stood between two hills above the Yin river and watched the water.
It was muddy. The fresh water coming down from the mountains ran straight out to sea, and the tide pushed salt back up the channel into the fields, where the rice died. In the dry months the river bed showed and people walked miles for a jar of brackish water.
His name was Wang Yuanwei. He had been in the post a short time.
He decided to build a weir.
Salt in the Wells
Before the Tang, this coast was not a comfortable place to live.
The Siming mountains to the south drain into a stream called the Zhang, which reaches the town of Yinjiang and splits. One branch, the Yin river, runs to the sea. The other, the Nantang, loops east toward the prefectural city. The Yin had no gate on it, so the fresh water could not be held.
A Southern Song official named Wei Xian compiled a handbook on the works and quoted an older gazetteer in his opening pages. The stream joins the great river, and the tide rises and falls in it. The sweet water drains away to the sea and the salt water pushes back into the stream. When it comes, the ditches overflow; when it goes, the channels dry. The fields cannot be planted and people are thirsty.
The remedy for a place like that is always the same. Put a barrier across the river, keep the tide out, hold the fresh water above it.
The difficulty is that the river was wide, the bed was gravel, the current was fast and the tide was strong. What to build, how high, and where, could each waste several years of work.
There was a second reason to hurry. In 821 the prefectural seat had been moved downstream to the confluence of three rivers, the site of the old city of Ningbo. The government, the garrison, the granaries and the markets all moved with it. The new site was closer to the sea, the salt reached further up, and the wells in the city came up brackish. A city of officials cannot drink salt.
Between Two Hills
He chose a place called Tuoshan.
There the river is pinched between two small hills, and the channel narrows. A narrow channel means fast water, but it also means a short dam and a smaller load. The hill stands alone, unconnected to the range behind it, which is where the name comes from: the lone one.
The stone came from the local stream, cut into long blocks.
The weir is one hundred and thirteen point seven metres long, four point eight metres wide across the crest, and a little over five metres high. It is built of more than a hundred and fifty blocks, the largest two or three metres long, a metre and a half wide, and twenty to thirty centimetres thick.
The numbers are not entirely agreed. Some accounts give a length of one hundred and thirty four metres, a height of ten, a crest of three point three, and an irrigated area of over two hundred thousand mu. The differences come from what is measured: whether the side steps count, whether the buried portion counts. The common figures are the ones above, with most of the body below water.
What interested later engineers was not the size but four things that cannot be seen from the bank.
First, the base tilts five degrees upstream. When the current pushes the wall, the wall leans back into the push, and the weight settles on the upstream toe. European dam engineering did not put that principle into a textbook until the nineteenth century.
Second, the crest is not straight. It is an arc of about a hundred and five degrees. Water crossing a curved crest runs faster in the middle than at the ends, so the arc steers the spill toward the centre of the channel and away from the banks.
Third, the foundation is a layer of clay mixed with broken stone. Water will always find a path under a dam; this layer blocks it.
Fourth, huge plum beams lie across the body of the weir, binding the blocks together. The wood does not rot under water. They call them the plum beams, and they were still there when instruments were finally put into the structure in the 1990s.
The salt problem needs one more word. Sea water is heavier than fresh, so on a flood tide it comes up along the bed as a wedge, with clear water on top and salt underneath. A barrier therefore has to do two things at once: stand above the highest tide and reach below the permeable gravel. The narrow gorge at Tuoshan made both affordable.
Ten Names on a Wall
The work took three years.
In the story, those three years were not easy.
The piles would not hold. Oak and plum trunks a metre across went into the water and were carried away; dozens went down and not one stayed. Then somebody said that only blood would settle the gravel, and that ten men would have to go down with the piles.
Ten young men volunteered.
They were lashed to the points of the piles and driven one by one into the bed. After the ninth, the tenth disappeared, and a monk passing through the crowd jumped in and took his place. The ten were remembered as the Ten Brothers of Tuoshan.
The story is in the local gazetteers and on the temple wall, in more than one version. One says the tenth man tried to hide because he was afraid, which is why nine of the images in the temple are smiling and the tenth is not. Another lists all ten by name and native village, down to the surname.
Nobody can now check it. What can be checked is that the temple has ten images and has had them for a very long time.

The shrine stands north of the weir. Its formal name is the Temple of Handed Down Virtue; the local people call it the Tuoshan temple. In front there is a stone pavilion with four characters cut on the face: a single stone leaves its fragrance. Inside, the seated figure is Wang Yuanwei.
Every year on the third day of the third month and the tenth day of the tenth, the villages around Yinjiang hold a fair there. The tenth of the tenth is said to be his birthday.
Three Parts, Seven Parts
When the weir was finished, the river divided.
The fresh water no longer ran straight to the sea. It turned into the Nantang channel, went east to the city and fed the two lakes inside the walls, and another branch went north into the creeks that watered the western plain.
In flood, seven parts of the flow spilled over the crest into the old river and three went into the channel. In drought, three went over and seven stayed for the fields. That is the rule the local records call three parts and seven parts.
To make the division adjustable, three sluices were built on the Nantang below the weir, at Wujin, Jidu and Xingchun. A sluice is a gate, opened in flood and shut in drought, and the three of them tuned the channel reach by reach.
One weir, one channel, three gates, and a grid of subsidiary ditches. The seven townships of the western plain stopped depending on the sky.
The local saying is four characters long: the weir made the city.
This is a different solution from the one at Dujiangyan, where the Min river is split by a nose shaped levee and half the flow is diverted into the Chengdu plain, and where the method is division. At Tuoshan the whole river is blocked and the method is storage: hold the fresh water, refuse the salt, draw the water off sideways. One divides, one dams. The terrain decides which.
Venice has spent five centuries trying to keep the Adriatic out of its lagoon, and London built a barrier across the Thames in 1982 for the same reason. Both are fighting the same enemy as Wang Yuanwei: a tide that comes up a channel into a city that cannot move.
A Thousand Years Later
The weir was neither forgotten nor finished.
In the 1240s a flood broke part of it. Wei Xian, a local man, petitioned for a rebuild, spent several years on the weir, the sluices and the channels, and then compiled the handbook. His purpose was practical. Whoever repairs this next should be able to follow the record instead of starting from nothing. The book survives, and it is one of the earliest local hydraulic monographs in China.
The Ming and Qing repaired it in turn. The Qing added stone and iron cramps to lock the loosened blocks. In the 1930s a proposal was made to replace the whole structure with a concrete dam; the survey stopped it. The clay and gravel layer under the old foundation was thicker than anyone expected, and no one was confident of rebuilding it.
The river changed as well. Deforestation upstream brought silt down and raised the bed, and the lower part of the weir was gradually buried. In the 1970s the Jiaokou reservoir was built on the upper stream, which evened out the flow and took some of the load off the old wall, while changing the way the city drew its water.
In 1988 the site was listed among the national protected monuments.
In 1995 the structure was repaired. The team poured a concrete seepage panel in front of the weir and grouted the body, and before they did, a geophysical survey was run through the wall with a seismic instrument. That survey confirmed what the Song text had claimed: the body is partly hollow, carried on great timbers, shaped like a roof ridge. The old weir had kept its secret until somebody could look inside it.
In October 2015, at Montpellier, the International Commission on Irrigation and Drainage added Tuoshan to its register of world irrigation heritage. The citation noted that the works had run for more than eleven hundred years and still served irrigation, drainage, city flood control and urban water supply.
On the crest today you can still see the joints between the blocks. In dry weather the water is low enough to walk across, and visitors count the stones under their feet. The local claim is that the count is never the same twice.
The weir is still holding water. The city is still using it.
A magistrate of thirty three spent three years building a stone wall one hundred and thirteen metres long, and kept the salt out of a city. Eleven centuries later the wall is still lying across the river, the water still spilling over it and falling into the Yin, and running east to the sea.
The ten images in the temple face the water.