The millennium old hydrogeology textbook “The Extraction of Hidden Waters” by the Persian mathematician and engineer Abubakr

We revisit and shed light on the millennium old hydrogeology textbook “The Extraction of Hidden Waters” by the Persian mathematician and engineer Karaji. Despite the incomparable understanding and conceptualization of the world by the people of that time, ground-breaking ideas and descriptions of hydrological and hydrogeological perceptions such as components of hydrological cycle, groundwater quality and even driving factors of groundwater flow were presented in the 15 book. Although some of the ideas may have been presented elsewhere, this is the first time that a whole book was focused on different aspects of hydrology and hydrogeology. More importantly, we are impressed as the book is composed in a way that covered all aspects that are related to an engineering project including technical and construction issues, guidelines for maintenance, and final delivery of the project when the development and construction is over. We speculate that Karaji’s book 20 is the first of its kind to provide a construction and maintenance manual for a modern [I am not sure what is meant by "modern" here. It can't be modern like in the 21st century it has the character of such a manual. Perhaps you mean modern for its time. I am not sure this adjective adds much here.] engineering project.

We believe that Karaji's contributions in hydrology and hydrogeology are significant and should be remembered and revisited in this Hydrology and Earth System Sciences special issue on the 'History of Hydrology'. In this essay, we revisit this book 35 and provide an English translation of the pieces from the book that crucially offer pioneering ideas in hydrogeology and in general for engineering projects. The translations presented here are based on the Persian translation of Karaji's book originally written in Arabic. We believe it is crucially important to include quotes from Karaji, in his own words, to ensure historical veracity and authenticity and hence a historically faithful essay. It is also fascinating to hear Karaji's thoughts in his own words bringing his story, his motivations and his scientific contributions to life. 40 We hope this essay brings about new insights and information that were not provided in the previous written accounts. We hope that it helps to contribute to a growing awareness of Karaji's contributions to hydrology. In the following sections, we provide a short description of Mohammad Karaji's life, explanations of basic components of Qanat technology to exploit groundwater resources, and finally examine Karaji's book "The Extraction of Hidden Waters" to shed some light on his knowledge of hydrology and hydrogeology some one thousand years ago. 45

Abubakr Mohammad Karaji
Abubakr Muhammed Karaji was a late 10th century-early 11th century (c. 953c. 1029) Persian-born Muslim mathematician and engineer. Most of his scientific life was spent in Baghdad. Girogio Levi Della Vida (1934) mentioned he was born in Karaj, a city near Tehran, Iran, and was not from Al-Karkh district of Baghdad, Iraq (Abattouy, 2019). Karaji lived in Baghdad under the Abbasid rulers. We anticipate that he would have been a direct beneficiary of the translation movement. This 50 initiative was begun under the second Caliph Al-Mansur and continuing through to the seventh Caliph Al-Ma'mun and saw a large amount of significant scientific, religious and other literature translated into Arabic for scholars to use. At this time, Baghdad was one of the world's greatest places of learning and knowledge. It hosted some of the world's best libraries. It was a vibrant place for scholarly activity and scientific discovery. The Middle East became the centre of intellectual thought instead of Europe. The modern world owes a great deal to the far thinking translation initiative of the Abbasid Caliphate and generally 55 to Muslim (Arabic-Persian) Golden Era civilization.
Karaji lived in Baghdad for most of his life and his main mathematical works were written when he lived in that city (O'Connor and Robertson, 2019). His three remaining books on algebra and geometry are: Al-Badi' fi'l-hisab (exquisiteness of calculation), Al-Fakhri fi'l-jabr wa'l-muqabala (Glories of algebra), and Al-Kafi fi'l-hisab (Sufficient for calculus) (Abattouy, 2019). The titles of his books on mathematics signals Karaji's lookout on mathematics. It portrays his affection for mathematics 60 as a spectacular and almighty knowledge. In the introduction of Xadiv Jam's translation where, a historical account of the life and work of Karaji was presented, it was mentioned that Karaji was a contemporary of great Persian scholars such as Avicenna In later years of his life, Karaji returned to the central plateau of his Persian homeland and wrote the book Inbat al-miyah alkhafiya ("The Extraction of Hidden Waters)". This book was about practical hydrology in this period. Although, it has been 75 mentioned that the book was written by him as a means of earning a living, we may speculate that the topic was of great practical interest in the arid area of the Persia plateau. It is also very likely that this topic was of interest to Karaji personally and he certainly knew it was vitally important. As it will be mentioned, in the extracts of Karaji's preface to his book, he notes that to provide people with a good water supply would be a most beneficial work. The book is considered "the oldest textbook on hydrology" (Nadji and Voigt, 1972). Figure 1 shows a statue of Abubakr Mohammad Karaji at the Water Museum of 80 Sa'dabad Museum Complex in Tehran, Iran.

Qanat
Karaji wrote extensively on Qanat in his book. Qanat or Kariz is an old system of water supply from an aquifer. Qanat is an Arabic word and Kariz is in Persian, although Qanat is now also used in Persian. It consists of gently sloping underground aqueducts, which are hand-dug and just large enough to fit the person doing the digging, and a series of wells and vertical 85 access shafts traversing different topographies and geologies along its course [e.g., English, 1968;Semsar Yazdi and Labbaf Khaneiki, 2017]. Vertical shafts are used to remove excavated material, to ventilate tunnels, and to provide access for maintenances. Qanats are still used in arid and semi-arid climates for the supply of water. Qanat technology was developed for the first time in ancient Persia as far back as 3000 BC to the early 1st millennium BC [e.g., Korka, 2014;Hussain et al., 2008;Wulff, 1968]. 90 Qanat technology spread across the world, first westwards to the Mediterranean and Egypt, and southwards to Oman and Southern Arabia, and then the second major diffusion of Qanat technology occurred with the early conquests of Islam to peninsular Spain and the Canary Islands [Lambdon, 1989;Martínez-Santos and Martínez-Alfaro, 2012]. Finally, as a consequence of the Spanish conquests, the technology also spread to South and Central Americas, such as in Mexico, Peru, or

The Extraction of Hidden Waters
In the preface to the book Karaji wrote "I do not know any other profession more beneficial than extraction of hidden water, as it flourishes and cultivates lands, improves people's welfare, and grants ample profits" [Translated from Xadiv Jam, H. 100 1966]. Figure 2 illustrates the first page of Inbāt al-miyāh al-khafiya. This is from a later-century copy of the original book of Karaji that is kept at the University of Pennsylvania, in the Lawrence J. Schoenberg Collection . The titles of the book sections provide a fascinating insight into the wide range of topics that were covered in the book. It is amazing that the book not only covers the conceptual and technical aspects as well as construction guides, it also provides guidelines for maintenance and even advice on how to deliver and consign the project when the development and construction is over. It even touches on important social aspects such as religious regulations. The book is like a construction and 115 maintenance manual for a modern engineering project! Excerpts from Karaji's book highlight his knowledge of hydrology at the time: " … Earth with all its mountains, plains, low, and high lands, is spherical form…" [Translated from Page 24: Xadiv Jam, 1966]. Karaji believed that each component of the universe such as fire, air, water and soil have a specific location and intends to get back to their original location when they separate from their source. "… therefore, water flows from distant to closer 120 locations from earth centre, and by transformation/conversion of air to water in cold days and cold locations and conversion of water to air in hot seasons and warm locations this flow continues and this transformation of water and air to each other is very beneficial for earth affluence. " [Translated from Page 26: Xadiv Jam, 1966]. Obviously, those who lived a millennium ago, had a very different understanding and conceptualization of the world surrounding them. It should be considered that the classical elements air, earth, fire and water were used by medieval scientists to explain nature. 125 "I have heard that in some islands there are excessive freshwater springs, and there is no doubt that that the source of them is not the surroundings seawater of islands, as the seawater level is lower that the island surface level and seawater is brackish but the springs' water are fresh. However, the sources of these springs are distant locations that have higher level than the springs' level…" [ Translated from Page 29: Xadiv Jam, 1966]. "And a portion of water that infiltrates into ground, when it reaches to hard soil, it avoids infiltration and rests there. And 130 when aqueducts are established above these barriers, water enters into these conducts proportional to its force and pressure." scientist and potter, some five or six hundred years after Karaji (Duffy, 2017).
Then Karaji explains the procedure to extract fresh water from the sea floor. "…seawater is heavy and undrinkable, as sunlight takes its thinness and freshness during long time. The evidence for this proposition is that sailors exploit and drink freshwater from the sea floor." [Translated from Page 38: Xadiv Jam, 1966]. The freshwater mentioned at the sea floor is possibly due to the discharge of offshore fresh groundwater that is now well known as being a global phenomenon we today refer to as 150 submarine groundwater discharge [Post et al., 2013].
Karaji provided observations and evidence which can be considered to describe groundwater-surface water interactions in today's nomenclature. "…that water in the wells rises when water in rivers increases and falls when that decreases, to the extent that the water level in a well would be the same as the water level in a river" [Translated from Page 40: Xadiv Jam,

1966]. "…and the rainwater infiltrates into earth openings and gaps till water encounters a horizontal barrier and stops 155
there." [Page 41: Xadiv Jam, 1966]. It seems as an understanding of recharge processes and the way in which water interacts with rocks -earliest conceptions of "hydrogeology"water and rock.
Karaji provided explanations about soils and rock classifications based on their colours and characteristics and described the indicators that could be used to find out where water might be available underground and in springs. One of the indicators Karaji described water flow in Qanat and wells. "Of course, it is not possible that water of a spring or well or lagoon gushes or rises up, unless its source is in location that is higher than the location of gushing." [Translated from Page 63: Xadiv Jam, 1966]. Concepts such as mass, force, energy, gravity field, and may other physical properties and processes, which are easily 190 comprehensible now, did not exist in eleventh century conceptualizations of the universe. However, we may speculate that there are some very early insights into the modern-day concept of hydraulic headnamely that groundwater flows from points of high hydraulic head to points of low hydraulic head -in Karaji's descriptions of water flow. We are unaware of any other documented cases where ideas of groundwater flow, from higher grounds to lower grounds, had been published any earlier than Karaji's treatment. 195 To understand how different the conceptualisation of the world was in old times, the following is a quote from da Vinci (1452-1519) to explain water flow, in which he creates an analogy between water flow and blood circulation in the human body: "Natural heat keeps blood in the veins at the top of the man, and when the man has died this blood becomes cold and is brought back into the low parts, and as the sun warms the man's head the amount of blood there increases, and it grows to such an excess there with the humors as to overload the veins and frequently to cause pains in the head. 200 It is the same with the springs that ramify through the body of the earth and, by the natural heat which is spread through all the body that contains them, the water stays in the springs and is raised to the high summits of the mountains. And the water that passes through a pent-up channel within the body of the mountain like a dead thing will not emerge from its first low state, because it is not warmed by the vital heat of the first spring. Moreover the warmth of the element of fire, and by day the heat of the sun, have power to stir up the dampness of the low places and draw this to a height in the same way as it draws the 205 clouds and calls up their moisture from the expanses of the sea." [Page 199, Suh, 2005].
Humor is Latin for moisture. da Vinci, who is recognised as one of history's most brilliant minds, lived 500 years after Karaji's time. We may appreciate Karaji's profound knowledge of hydrology, especially when appreciated in the context of his time.
da Vinci was clearly on the incorrect path with water flowing uphill, however, Karaji seems to be very close to understanding the core of hydrologic cycle and the mechanism of water flow from higher ground levels to lower levels. We note that it was 210 just in the seventeenth century that a clear understanding of hydrologic cycle was realized (Todd and Mays, 2004).
Fascinatingly, the protection boundary of wells and qanats based on religious laws are described. For example, Karaji explained that whoever dug a well, with the permission of the ruler, the digger would be the owner of the well. There would also be a protection zone of 40 cubits for this well (about 20 m). However, if the well was established illegally, the digger would not be the owner and there is no protection zone for that. The protection zone for Qanat is 500 cubits (250 m) [Page 67: 215 Xadiv Jam, 1966]. It is intriguing to note that the only available and ruling law at the time in the Islamic world was strictly based on religious ideas and texts. Thus, all matters relating to ownership, property and rights were based entirely on religious ideas and works. These were developed, promoted, espoused and written entirely by religious scholars. They were linked to the practice of the prophet Muhammad and his companions' practices. Karaji's work began to bring science, engineering, maths and technology to this importantand at that time entirely religiouslegal discussion, principles and practice. 220 Next, Karaji defined protection limits based on his knowledge and consideration of differing soil types. "The protection areas of Qanat in hard soils is less than that for loose soils." [Translated from Page 74: Xadiv Jam, 1966]. Karaji understands that wells placed in the more permeable material (the loose soils) require a greater area or size for the groundwater protection zone around it compared to that in the less permeable material (the hard soils). Groundwater protection or buffer zones are based on the very same principle todaya principle that Karaji conceived a thousand years ago. We speculate that what Karaji 225 mentioned here is related to his intuitive understanding of the ease of water flow in loose soils compared to that in hard soils.
It is possible that Karaji understood that water flowed more easily through loose soils than it did through hard soilsleading to a concomitant increase in the size of the protection zone for a well in the more permeable material (the loose materials).
This may be some of the very earliest documented insights into the rates and ease of groundwater flow through different geologic materialsearliest conceptions of what we would call hydraulic conductivity today. They are also earliest documented conceptions of modern-day hydrogeology. Moreover, he reported how to prepare the construction works and prepare aqueducts. He provided detailed methods to level the construction sites and illustrated the apparatus that can be used for levelling in both horizontal and vertical directions and the methods for surveying and planning Qanat construction [Pages 93-141: Xadiv Jam, 1966]. Figures 3-8 illustrate diagrams 235 and schematics from a later-century copy of the original manuscript of Karaji's book showing surveying and levelling apparatuses, as well as, the proofs and descriptions of their applications . Karaji provided elaborate explanations on stabilizing techniques for tunnel excavation procedures [Pages 142-150: Xadiv Jam, 1966]. He explained how to plan and dig in a tortuous conduct and how to open, maintain, and dredge Qanats [Pages 151-162: Xadiv Jam, 1966]. Figure 9 illustrates a caliper, a ruler and the schematic for planning how to dig in a tortuous Qanat . 240

Epilogue
Karaji's pioneering scientific and engineering contributions into hydrology and hydrogeology through his book "The Extraction of Hidden Waters" are seminal and significant. Despite this, we and other authors have noted that his contributions to hydrologic science have been largely unknown and hence greatly undervalued and underappreciated. The fact that full translations of his work into other languages did not exist until modern time (e.g., French translation in 1973, Italian in 2007 and English in 2011) is probably a key reason for this. The situation may have been different if translations had occurred much earlier, but this was not common at the time. Thus, his contributions, we surmise, were simply not known.
It is abundantly clear from our article, and a small number of previous papers on this matter, that Karaji both thought about and proposed interesting, important and prescient ideas about hydrology hundreds of years before European thinkers in the Middle Ages. Many of those have stood the test of time and are as true today as they were a thousand years ago. Karaji was a 250 prognostic hydrologist and hydrogeologist hundreds of years ahead of his time. Beyond the specific topic of Karaji's book on the extraction of hidden waters, the comprehensive content, details and topics that he has covered in the book are very impressive for engineering construction project management. This important point has not been noted before, to the best of our knowledge. Therefore, Karaji's book is not only "the oldest textbook on hydrology", but also the first book on engineering construction management! Like previous authors, we too assert Karaji deserves more credit in hydrologic science and 255 engineering than has been the case to date. We hope our paper plays a part in rectifying this. We hope that it helps to bring Karajithe scientist and his scienceto the attention of current and future generations of hydrologists around the world.