1411, Nanwang, in western Shandong.
A newly dug channel ran through the town. The bed was dry, and the mud at the bottom had cracked in the sun until the cracks were wide enough to put a hand into.
Song Li, president of the Ministry of Works, stood on the bank and had nothing to say.
The channel had been dug from the south, one year of work, more than a hundred thousand men.
It was finished. There was no water in it.
Not because the rain had failed. Because the ground was too high.
South of here the water ran south. North of here it ran north. At this one spot the land lifted, and the water went both ways and left the middle dry.
The Grand Canal came through here. The boats could not.
The Roof of the Canal
The channel was called the Huitong River.
It had been cut under the Yuan, from Jining north across the hills of Shandong to join the Wei river and run on to Tongzhou, outside the capital.
The purpose was simple. The grain of the south had to reach the north.
The Yuan tried three routes. One by sea, out of the Yangtze mouth, around the Shandong peninsula and into the Bohai gulf. One by this canal. One mixed, with boats up to Xuzhou and carts beyond.
All three had faults. The sea route was dangerous, and dozens of ships went down in a bad year. The canal was shallow and open only part of the year. The cart road was ruinous. Moving one shi of grain to the capital could eat several shi on the way.
The canal never worked well. In the best years under the Yuan it carried a few hundred thousand shi.
Then, in 1391, the Yellow River broke its banks in Henan, the flood came across the plain, and most of the Huitong channel silted up.
In 1403 the Yongle emperor fixed his capital at Beijing and prepared to move the court there. A capital has to eat. The food came from the south.
In 1411 an official at Jining sent up a memorial. Of the four hundred and fifty li of the Huitong river, a third was blocked. Clear it, and the grain would move again.
The emperor approved it and sent Song Li to do the work.
His parting instruction was blunt. If the canal does not run, do not come back to report.
A River Dug in the Wrong Place
Song Li reached Shandong and raised labourers along the line.
The numbers differ between the sources. One gives a hundred and sixty five thousand, another three hundred thousand. In any case it was well over a hundred thousand men for the better part of a year.
The method was crude and correct. Drag out the silt and pile it on the banks. Widen and straighten the old channel. Put a lock wherever the water ran thin, to hold the level.
Feeding the gangs was as big a job as the digging. Grain had to be carted in from the counties around, and the men were paid in grain as much as in coin. A work of that size in that countryside was also a logistics problem, and the record of it is as much about carts as about canals.
At the end of it he had a new river.
And then he found that the water would not go into it.
Song Li had made a wrong assumption. He believed the highest point of the canal was at Jining, and he drew water there.
The water reached Jining and the channel north of it stayed shallow.
Because the highest point was not Jining.
It was Nanwang, a few dozen li to the northwest.
Nanwang sits on the ridge of the whole canal. North of it the water must fall to Linqing. South of it the water must fall to Xuzhou. The total drop in both directions is tens of zhang.
Standing at Nanwang, you are standing on the roof of a river.
For water to cross a roof, somebody has to pour it onto the roof.
The Old Man of Wenshang
Then someone told Song Li about an old man in Wenshang county, named Bai Ying, who understood water.
Bai Ying was not an official. He came from a farming family, first at Yanzhu village and later at Baijiadian, and worked the land. The histories describe him as widely learned, stubborn in his principles, and uninterested in fame. He had spent decades watching the hills, the streams and the levels of Wenshang, Dongping, Ningyang, Yanzhou and Tai an.
Song Li went to find him.
The accounts of that meeting differ. One says the minister travelled the Wen river in disguise, dressed as a fortune teller, and met an old man drawing a map in the mud on the bank. Another says Bai Ying came to him.
The details vary. The conversation does not.
Bai Ying told him that the water at Jining had been drawn from the wrong place. The summit of the canal was at Nanwang.
And then he said where the water should come from. The Wen river, northeast of here, carried plenty and ran high. Build a dam across it at Daicun, cut a channel from the dam to Nanwang, and the water would climb.
Song Li asked him to take charge of that part of the work.
A president of the Ministry of Works and an old farmer, tied together for the rest of the project.
There is a second reading of the word the histories use for him. Lao ren may not have been a term of respect. It was what people called the foreman of a river work gang.
By that reading Bai Ying had spent thirty years as a labour boss on the canal, and knew the depths of this stretch of water the way a man knows his own yard.
Either way, he was not a gentleman theorist. He was a man who had been in the mud.
The Dam at Daicun
The project had four parts. Draw the water. Store it. Split it. Drain it.
Drawing it came first.
The Wen river runs west. At Daicun the ground is higher than at Nanwang. A dam across the river lifts the level, and the water backs up into a new channel, the Little Wen, which carries it south to the summit.
The dam was earth at first and later stone, strengthened and lengthened by each generation.
An earth dam does not survive many floods.
The dam standing today is stone, a li and a half long, with the crest a little over a zhang above the river bed.
The height is the whole calculation. Too high, and the flood season has nowhere to go and the villages downstream drown. Too low, and the water will not climb to Nanwang.
The second part was carrying the water.
The Little Wen runs eighty li from Daicun to Nanwang, and it does not run straight. It winds.
The winding does two things. It slows the current, so the channel does not scour itself out. And it makes the silt drop on the bends, so that the water arriving at the canal is reasonably clear.
The third part was splitting it.
At Nanwang the Little Wen hits the canal at a right angle, making a T. At the junction the builders laid stone paving and a divider shaped like a fish snout.
The water strikes it and divides, one stream north, one south.
The divider was not a fixed piece of masonry. It could be adjusted, widened or narrowed on either side, to send more water where it was needed.
In a dry northern season the north mouth was opened. When the grain fleet was heavy in the south, the south mouth was widened.
A tool, not an ornament.
There is a folk saying about the proportion. Seven parts to the emperor, three parts to the south.
That is a rhyme, not a specification. The real split changed with the season, the level and the lock settings, week by week.
But the rhyme lasted for centuries because it got one thing right. This water was going to Beijing first.
Europe found the same problem two and a half centuries later. When Pierre-Paul Riquet built the Canal du Midi across southern France from 1666, the difficulty was identical, which was how to feed water to the highest point of the line. His answer was a channel running down from springs in the Montagne Noire to a reservoir at the summit, from which the water fed both directions.
Same question. Same shape of answer. Different continent, and a much later century.
Three lakes lie around Nanwang. The court had them dredged, channelled and embanked, and turned them into reservoirs, with sluice gates and culverts connecting them to the canal.
In a dry winter the lakes fed the canal. In a wet summer the canal spilled into the lakes.
Then came the locks.
From Nanwang north to Linqing and south to Xuzhou the river was a chain of them. In the Nanwang stretch alone there were thirty eight.
A boat going up waited at each one, then entered as the gate behind closed and the gate ahead opened, lifting it a step. Like a staircase made of water.
The gates were timber, raised and lowered by windlass. Opening one released a wall of water into the chamber below, and a boat had to be made fast fore and aft before it came, or it would be thrown against the stone.
Boatmen hated the upper canal and respected it. A good crew could take a grain boat through the lock chain without losing a rope. A bad one lost the boat.

That section of the canal stopped being a river. It became a series of ponds.
What the Water Did
In 1415 the whole line opened.
There was still one gap to close. At Huai an the canal had to cross the Huai river, and boats were hauled overland around the junction. In 1415 the same year, the eunuch admiral Chen Xuan cut the Qingjiangpu channel and built four regulating locks, and the last break in the line was gone.
A grain boat could leave Hangzhou, run north, and reach Beijing in about forty days.
The volume rose from the few hundred thousand shi of the Yuan to three or four million. The Ming quota was fixed at four million, and most years came in somewhere below it.
The same river, the same hills, and the difference was one junction.
The canal also had to be maintained, and that is where most of the money went afterwards. The channel was dredged every year, the dams and locks repaired, the lake embankments strengthened. The Ming appointed a director of waterways with a staff along the line, each section contracted to a work gang. The Qing kept the arrangement.
Stop the maintenance and the river dies.
In 1855 the Yellow River broke through at Tongwaxiang in Henan, turned north, and took a new course to the sea through Shandong, cutting the canal in half. After that the northern and southern halves ran separately.
In 1901 the court commuted the grain tax to silver and stopped shipping it. The canal offices were abolished one by one.
Bai Ying did not see any of this.
He died in 1419, a few years after the work was finished. The temple complex at Nanwang, built where the water divides, has a small shrine to him.
Song Li went back to court, was given the canal maps by the emperor, and went on running the river until he died in office.
Later engineers compared the scheme to Dujiangyan, and called it the northern Dujiangyan.
The comparison holds at the level of method. Neither fights the water. Dujiangyan uses a fish mouth divider and a spillway that throws silt out of the channel. Nanwang uses a dam to lift the water, a snout to divide it, bends to drop the silt, and lakes to hold it back.
Sixteen hundred years apart, the same kind of intelligence.
The comparison fails at the level of fate.
Dujiangyan still waters fields. Nanwang lost its purpose in 1901, when the grain stopped moving. The Shandong canal dried in sections, the locks rotted, the lakes were farmed, and the dam stayed where it was, no longer sending anything anywhere.
In 2014 the Grand Canal was inscribed on the World Heritage list, with the Nanwang junction as one of the sites.
Today the old channel at Nanwang is a grassy ditch. The stones of the divider were excavated once and then covered again.
What is left is mostly foundations. A stone apron where the two streams met, a length of brick embankment, the rotted line of a timber palisade that once held the bank against the current. Archaeologists cleared them in the last decade and mapped the junction properly for the first time.
The three lakes are farmland in part. The canal bed is a road in places. A child on a bicycle can cross the roof of the canal without noticing that it is a roof.
The dam still holds water. In flood season the river goes over the crest in a white sheet, and the roar carries for li, which is why locals call it the tiger roar of Dai village.
Standing on the crest, you watch the water go over, drop into the bed below, and run west.
Most of the water that was meant to turn north, into the canal, and on to Beijing, now just passes through.