T Ranger
email: tom.ranger@univ-reims.fr

A Philippot

B Riera

Manufacturing Tasks Synchronization by Algebraic Synthesis

Keywords: Tasks synchronisation, algebraic approaches, logic controllers, formal methods, discrete event systems, modular control

The development of control programs for PLCs is mainly carried out by direct implementation. We propose to switch to formal methods to obtain these control laws. For this we use a task-based structural analysis approach assisted by algebraic synthesis. We obtain a control law in ST language allowing to ensure the functional behaviour defined in the specifications. This makes the generation of PLC programs more reliable and efficient.

INTRODUCTION

Programmable logic controllers (PLCs) are frequently used as industrial automation components in a very large number of systems such as production systems for the control of complex systems. Control engineers today mainly handle the development of industrial automation applications by direct implementation of the control task based on the interpretation of informal specification and text documents. This effort is assisted by standardized engineering tools for the programming of PLCs [START_REF] Zaytoon | Synthesis and implementation of logic controllers -a review[END_REF]. However, the informal specification of the control software has to be manually and intuitively transferred into the control program as they are not formally defined in practise due to lack of time and expertise. The growing complexity of the control problem, the demand for reduced development time, and the possible reuse of existing software modules result in the need for formal approaches in logic control design and PLC programming. To reach this goal, several formal approaches have been proposed for the design of logic controllers. This area is mainly filled with works using Supervisory Control Theory (SCT) defined by [START_REF] Ramadge | Control of discrete event systems[END_REF], 30 years ago. A large body of theoretical results has appeared since then, but there is still a gap between the theoretical development and the limited number of applications of SCT in the industry using PLC [START_REF] Fabian | Plc-based implementation of supervisory control for discrete event systems[END_REF]) [START_REF] Cantarelli | Reactive control system design using the Supervisory Control Theory: evaluation of possibilities and limits[END_REF] [START_REF] Zaytoon | Synthesis and implementation of logic controllers -a review[END_REF]. In addition, the large scale of industrial systems requires to use modular approaches in order to reduce the problem complexity [START_REF] De Queiroz | Modular supervisory control of large scale discrete event systems[END_REF]. Applying a modular approach to SCT is not without difficulties. In the works of Hellgren [START_REF] Hellgren | Modelling and plc-based implementation of modular supervisory control[END_REF] it is explained that it is necessary to have an internal synchronization of the controllers. With regard to these difficulties, it could be interesting to use formal non SCT based approaches like Algebraic Synthesis [START_REF] Roussel | Design of Logic Controllers Thanks to Symbolic Computation of Simultaneously Asserted Boolean Equations[END_REF] able to support parts of the work of control engineers. In this paper a task-based structural analysis approach is proposed to obtain the control laws. The Algebraic Synthesis (AS) is used to manage the synchronization tasks problem.

The first part of the paper deals with algebraic synthesis. The second section of this paper consists on a presentation of a method using task-based structural analysis. The last part of the paper details how to synchronise the tasks thanks to AS.

ALGEBRAIC SYNTHESIS

All the equations in this paper are based on Boolean algebra (B, +, ., , 0, 1) (Definition 15.5 of [START_REF] Grimaldi | Discrete and Combinatorial Mathematics: An Applied Introduction[END_REF]).

Overall presentation

Algebraic synthesis is used in the framework of discrete event systems (DES) as shown in the figure 1. The controller of such a system consists of p Boolean inputs (u i ), of q Boolean outputs (y j ) and of r Boolean states variables (x l ). Obtaining the control law for an algebraic model requires the generation of (q + r) switching functions of (p + q) variables. This generation must be automated because of the combinatorial explosion. The system controller presented in figure 1 can send 2 q output combinations that can express (2 2 p+r ) q+r sequential behaviors. This automation is made possible by Brown's results on Boolean algebra [START_REF] Brown | Boolean Reasoning[END_REF].

The principle is to translate each of the requirements of the specification into the form of a Boolean equation. The resolution of this system provides an expression of the outputs and state variables as a function of the inputs and state variables. However, initially the solution is in a parametric form. Indeed, the latter expresses the Fig. 1. A sequential DES whole space of the admissible solutions. Since PLC control requires a deterministic behavior, the parametric solution must then be reduced to a single solution.

Equation mainly uses an inclusion form. It is a partial relation which allow to define conditions of sufficiency or necessity between 2 boolean expressions. Let us take a 1 and a 2 2 known variables and B 1 and B 2 2 unknown variables. To express the fact that it is enough to have a 1 to get B 1 the equation 1 is used. The equation 2 expresses the fact that it is necessary to have a 1 to get B 1 . The equation 3 expresses the fact that in order to obtain B 1 when a 2 is true it is necessary to have a 1 . Finally, the equation 4 expresses the fact that the variables B 1 and B 2 cannot be true simultaneously.

a 1 ≤ B 1
(1)

B 1 ≤ a 1 (2) B 1 .a 2 ≤ a 1 (3) B 1 .B 2 = 0 (4)
Concerning the choice of a single solution, it is possible to use optimization criteria on Boolean expressions. The use of such criteria in Algebraic Synthesis has been presented in the work of [START_REF] Leroux | Algebraic synthesis of logical controllers with optimization criteria[END_REF]. An optimization criterion is a linear combination of variables in the problem and can be maximized or minimized. With each application of a criterion the space of solutions of the unknowns contained in this criterion is reduced. These criteria are applied in the order in which they are defined. With each application the solution space is reduced, so the order of definition has an impact on the solution. It should be noted that part of the expected behavior can be expressed via these optimization criteria.

Previous uses of Algebraic Synthesis

Originally, LURPA developed the algebraic synthesis [START_REF] Roussel | Algebraic synthesis of logical controllers despite inconsistencies in specifications[END_REF] on the basis of Brown's work in order to generate control laws in a formal way. Their The first step consists in formalizing the problem. Indeed, before using the algorithms for solving systems of Boolean equations, the functional and safety requirements must be available in the form of Boolean equations. At first it is necessary to define a set of specifications informally before transcribing them into Boolean equations. In the second step the coherence of the system of equations obtained is checked. This ensure that there is no contradiction between several equations. Inconsistencies may reflect two types of problems, errors in the definition of the specifications or conflicts between security constraints and functional requirements. Once all the inconsistency problems have been removed, the resolution can take place. This third step provides the parametric solution to our problem. The implementation into a PLC requires the choice of a solution among the proposed set. This choice can be assisted by the use of optimization criteria.

By applying this approach, the goal is to generate the entire control law, from its functional behavior to the management of safety aspects. However, it is difficult to describe sequential behaviors using Boolean equations. This difficulty comes from the fact that these equations define constraints and that it is complicated to define sequences of actions by constraints. This is why it is difficult to design the entire control law in algebraic synthesis. So we decided to use algebraic synthesis only for some parts of the control law generation. In the next section shows where the algebraic synthesis can be used in the handling of a synchronization problem.

TASK-BASED STRUCTURAL ANALYSIS

A methodology constituted by a task-based structural analysis presents the management of the synchronisation problem using Algebraic Synthesis. The idea of this method is to obtain the PLC code by partitioning the functional command into elementary tasks which then are synchronized in order to meet the requirements of the specifications.

Overall method

This method consists of the following 4 steps:

(1) Identification of basic system tasks ;

(2) Specification of task behavior ;

(3) Definition of task launch conditions ;

(4) Generation of a controller to ensure task synchronization.

Step 1: Identification of basic system tasks The first step in a task-based structural analysis is to subdivide the system into elementary tasks that it can perform. Each of these tasks must remain independent, and it is the synchronization of these tasks that makes it possible to respect the functional specifications.

It is necessary that the tasks are independent of each other during their execution. That is why each task must respect the following rules:

• Must have a launch condition ;

• Must not require additional conditions during its execution ; • Must not emit authorizations during its execution ;

• Must generate one or more authorizations at the end of execution.

A functional analysis must be performed to identify the different tasks. The more tasks are added, the more flexible the command can be and the more complex behaviors can be defined. However, the complexity of synchronization may increase. It is therefore necessary to find the right level of granularity to meet the functional specifications without unnecessarily multiplying the number of tasks. This step is the weak point of the method because a poorly performed task identification can greatly complicate the rest of the method.

Step 2: Specification of task behavior After having identified the different tasks of our system their behavior must be specified. Once this step is done the system situation at the start of the task, the added value of the task to the overall process and the system situation at the end of the execution must be known for each task. The behavior can then be modeled by different tools but we are not focusing on this part in this paper.

Step 3: Definition of task launch conditions Now that the behavior of the tasks is specified, it is necessary to determine their launch conditions. All the conditions for launching the tasks are gathered in a table such as the one presented in table 2 and 3. Before authorizing the launch of a task 3 types of conditions need to be checked. The first kind of condition are the initial conditions which are indicated in the second column of table 2. They are defined based on the system inputs and are used to ensure that a task have access to the right resources before starting.

Then the anteriority conditions are be defined. Their role is to make sure that the tasks are properly sequenced.

The definition of the anteriority conditions is done in three steps.

(1) Determination of the induced tasks list (third column of table 2); (2) Definition of the tokens generated at the end of the execution of each task (fourth column of table 2) ; (3) Generation of the anteriority conditions by gathering the tokens into logical expressions (second column of table 3).

Concerning the step 2, different kinds of token generation can be distinguished. In case a task always causes the same tasks to be carried out, the same set of tokens is generated at each of its end of execution. However in other cases the induced tasks depends on the state of the system at the end of the task. In this case the generation of the tokens is done under condition.

The other conditions are those of access to shared resources. Indeed, in many industrial systems this type of resources can be found. Whether it is a conveyor, a robotic arm or access to a material flow, it is necessary to manage the conditions of access to these resources during the design of the control system. The first step is to identify the shared system resources and determine which tasks should have access to them. All tasks that have access to the same R i resource must then be ordered by priority of access to this resource. A task with an order of 1 has priority over one with an order of 2. This information is provided in the third column of table 3.

Step 4: Generation of a controller to ensure task synchronization Finally, based on the table obtained from step 2, a controller must be generated to synchronize the tasks.

Even with a correctly constructed synchronisation table it can be extremely complex to obtain such a controller. However, with the help of algebraic synthesis we propose a methodology to automatically generate such a controller.

Mathematical framework and notations

We are using the following notations:

• T i : Task i ;

• Start T i: Starting event of the task i ;

• End T i : Ending event of the task i ;

• GT i j : Generated token by task i for task j ;

• GT i jk : Generated token by task i for task j or k ;

• AntC T i : Condition of anteriority of the task i ;

• AU T T i : Authorisation for the launch of the task i ;

• REQ T i : Request for the launch of the task i ;

• X -1 : Variable X at the previous cycle of the PLC ;

• R i : Shared resource i ;

• R i j : Shared resource i assigned in order of priority j.

Application of the method to an academic benchmark

In this section, the objective is to illustrate the methodology presented above by applying it to an example. Here only the first three steps of the method are dealt with, the fourth will be dealt with in the section 4. Concerning step 2 the task modeling is not presented because it has no impact on synchronization management. Moreover, it should be noted that the goal here is not to have the most optimized control in terms of production cycle time but to illustrate the use of the method on an example, the number of tasks is therefore deliberately limited.

The studied system (presented figure 3) aims at filling a box with 3 pieces that can be supplied by two different conveyors. The observer C 1 indicates if the box is ready to be evacuated. As long as there are less than 3 pieces in the box, C 1 is false. Each of the parts conveyors has a robotic arm equipped with a suction cup to place the parts in the box.

X 1 M ove X 1 moving X 2 M ove X 2 moving Z 1 M ove Z 1 moving Z 2 M ove Z 2 item detected 1 Grab 1 item detected 2
Grab 2

For this system we identify the following tasks:

• T1: Supply part 1 ;

• T2: Supply part 2 ;

• T3: Take part 1 ;

• T4: Take part 2 ;

• T5: Supply box ;

• T6: Deposit part 1 ;

• T7: Deposit part 2 ;

• T8: Box evacuation.

Tasks 1 and 2 correspond to bringing a part to the sensors item at entry 1 and item at entry 2. Tasks 3 and 4 start with the empty arm above the entry conveyors and end with a part gripped by the suction cup above the entry conveyors. Task 5 is the feeding of a box to the item at exit sensor. Tasks 6 and 7 start with a part picked up by the suction cup above the entry conveyor and end in the same position after depositing the part in the box. T 3 item at entry 1 T 1 and T 6 GT 3 1 and GT 3 6

T 4 item at entry 2 T 2 and T 7 GT 4 2 and GT 4 7

T 5 item at exit T 6 or T 7 GT 5 67

T 6 T 3 and GT 6 3 and

item detected 1 (T 8 if C 1 (GT 6 8 if C 1 or T 6 if C 1 ) or GT 6 67 if C 1 )
T 7 T 4 and GT 7 4 and

item detected 2 (T 8 if C 1 (GT 7 8 if C 1 or T 7 if C 1 ) or GT 7 67 if C 1 ) T 8 C1 T 5 GT 8 5
T 1 AntC T 1 = GT 3 1 T 2 AntC T 2 = GT 4 2 T 3 AntC T 3 = GT 1 3 .GT 6 3 T 4 AntC T 4 = GT 2 4 .GT 7 4
T 5 AntC T 5 = GT 8 5

T 6

AntC T 6 = GT 3 6 .(GT 5 67 R 1 1

+GT 6 67 + GT 7 67 )

T 7 AntC T 7 = GT 4 7 .(GT 5 67 R 1 2

+GT 7 67 + GT 6 67 )

T 8 AntC T 8 = GT 6 8 + GT 7 8

Finally task 8 ends once a falling edge has been detected on the item at exit sensor.

Tasks 6 and 7 must share access to the central conveyor.

The latter is therefore a shared resource whose access priority must be managed. This priority is given to task 6 in this example.

Tables 2 and3 presents the task synchronization table for the tasks.

USE OF ALGEBRAIC SYNTHESIS TO OBTAIN THE SYNCHRONIZATION CONTROLLER

The previous section did show how to define a problem using a task-based structural analysis approach. It ended with the writing of the synchronisation table. This sections aims to show how to switch from this table to a system of Boolean equations in order to be able to use algebraic synthesis to solve the synchronization problem.

Tasks synchronizations

At first we are looking at tasks that do not require access to a shared resource. Our problem presents 2 types of unknowns, the generated tokens and the authorizations to launch tasks. The execution of a task is only authorized when the initial and anteriority conditions are checked for this task. For a task to be authorized it is necessary that the initial conditions as well as the precedence conditions are true. The task authorizations are therefore constrained by an equation of the type 2. The authorization of the task T i is thus managed by the equation 5.

AU T T i ≤ AntC T i . IC T i (5)
The equation 6 represents the example of the task T 3 .

AU T T 3 ≤ AntC T 3 . IC T 3 (6)
It is also necessary to manage the evolution of the generated tokens. In order to manage their evolution we need to define the sufficient conditions for a token to be true or false. For this, equations of the form 1 will be used. Let's consider the GT i j token, this token is generated when the ending event of the task i is observed. On the other hand, he is consumed when the task j is executed. This leads to the writing of the equations 7 and 8.

End T i .GT -1 i j ≤ GT i j (7) Start T j .GT -1 i j ≤ GT i j (8)
The equation 9 presents the generation and consumption of the token GT 1 3.

End T 1 .GT -1 1 3 ≤ GT 1 3 Start T 3 .GT -1 1 3 ≤ GT 1 3 (9)
In the case of conditionally generated tokens like GT 6 8 only the generation of the token is modified. This generation is only done if the condition C 1 is verified as presented in the equation 10

End T 6 .GT -1 6 8 .C 1 ≤ GT 6 8 (10)
Applying these rules to all authorizations and tokens results in a system of Boolean equations. As the resolution of this system gives parametric solutions, optimization criteria must also be defined in order to obtain a unique solution for each output.

With regard to authorizations, it is desirable that the execution of tasks be authorized as soon as possible. The expression of each authorization is therefore maximized as in the equation 11. Tokens should only be produced and consumed when necessary. Their evolution is limited by applying the criterion presented in the equation 12.

Crit AU T T i = M ax(AU T T i ) (11)

Crit GT i j = M in(GT -1 i j .GT i j + GT -1 i j .GT i j ) (12)

Management of shared resources

The generation of the task authorizations is changed to manage the access to shared resources. The idea is to add a step before issuing the authorization. Where it was sufficient to have the conditions of precedence and the initial conditions verified to authorize the launch of a task, it is now necessary to add an access authorization to the resource. However, it is not enough to have the resource free to be able to use it. Indeed, it must also be assigned to the task when making the access request. In this way it is ensured that two accesses are not granted to the same resource during an PLC cycle.

To manage these access authorizations are transformed into access requests. Then if the resource is assigned to the task by making the request an authorization is issued. The equation 13 presents the situation where the task i needs to have access to the resource R 1 . Moreover, in order to ensure that the authorizations follows the value of the requests as much as possible, a similarity criteria between these two variables is defined. The equation 14 presents this criteria which has to be maximized.

REQ T i ≤ AntC T i .CI T i AU T T i ≤ REQ T i .R 1 (13) SIM T i = AU T T i .REQ T i + AU T T i .REQ T i (14)
Now we must prevent the resource from being allocated more than once. To do this we prohibit all tasks requiring access to the resource to have their launch authorizations true simultaneously. In our case, we prevent AU T T 6 and AU T T 7 to be true at the same PLC cycle using the equation 15.

AU T T 6 . AU T T 7 = 0 (15)

Finally, we must be able to manage the priority of access to resources. To do this we exploit one of the properties of the optimization criteria presented in the 2.1 section. The order in which these criteria are defined depends on the priority given to the tasks. The task with the highest priority will have its criterion applied first. Solving this system of equations allows to obtain the logical expressions of the authorizations as well as the generated tokens. These expressions can be directly written in ST code which is one of the standard languages for PLCs (figure 4).

For the resulting code to be functional, it is also necessary to indicate which tokens will be available at the initial time. For this example the tokens GT 3 1, GT 4 2, GT 6 3, GT 7 4 and GT 8 5 are available at launch.

Implementation

The implementation of our method is assisted by several automation tools. In the figure 5 we distinguish the steps carried out by the designer (upper frame) from those automated (lower frame). Two of these tools have been developed by us and the last one comes from LURPA.

The LURPA tool is a Boolean equation system solver. It takes as input a file containing the variables (known and unknown), the constraint equations and the optimization criteria and provides the solution of the system in ST code.

The first tool we have developed allows to generate the input file of this solver from the task synchronization table.

The second tool allows to obtain the control law from the data of the Factory I/O scene, the tasks defined in the form of GRAFCET and the solutions of the Boolean equation system. Because of the method of separation by elementary tasks, GRAFCETs are linear and independent which makes them easy to define. The command is generated in a UNITY file. In this paper we have presented a method to obtain PLC program through task-based structural analysis using a formal tool that is algebraic synthesis to ensure task synchronization. The evolution of the tasks being described by Grafcet it allows to overcome the problem met by Roussel concerning the description of sequential behavior. Moreover this approach allows to automate the whole task synchronization process once their chaining rules have been defined. In the future, we intend to explore in more details the choice of task granularity. In addition, we wish to integrate this approach into a global method that also deals with safety requirements. Finally, we would like to focus on the problems of verification and validation. This will concern the PLC program but also the synchronization table whose validity is critical for this method.

Fig. 2 .

 2 Fig. 2. Steps to obtain PLC code by algebraic synthesis methodology is based on 4 steps presented in figure 2.The first step consists in formalizing the problem. Indeed, before using the algorithms for solving systems of Boolean equations, the functional and safety requirements must be available in the form of Boolean equations. At first it is necessary to define a set of specifications informally before transcribing them into Boolean equations. In the second step the coherence of the system of equations obtained is checked. This ensure that there is no contradiction between several equations. Inconsistencies may reflect two types of problems, errors in the definition of the specifications or conflicts between security constraints and functional requirements. Once all the inconsistency problems have been removed, the resolution can take place. This third step provides the parametric solution to our problem. The implementation into a PLC requires the choice of a solution among the proposed set. This choice can be assisted by the use of optimization criteria.

Fig. 4 .

 4 Fig. 4. Task 1 equations in ST code

Fig. 5 .

 5 Fig. 5. Steps to obtain PLC code by task synchronisation

Table 1 .

 1 System Inputs/Outputs

	Inputs	Outputs
	item at entry 1	Entry conveyor 1
	item at entry 2	Entry conveyor 2
	item at exit	Exit conveyor
	moving

Table 1 presents the input/output variables of the benchmark:

Fig. 3. Studied system

Table 2 .

 2 Task synchronization table (1)

	Task	Initial conditions	Induced tasks	Tokens generated
	T 1	item at entry 1	T 3	GT 1 3
	T 2	item at entry 2	T 4	GT 2 4

Table 3 .

 3 Task synchronization table (2)

	Task	Anteriority conditions	Order of access
			to resources

ACKNOWLEDGEMENTS

This paper is carried out in the context of the HUMANISM ANR-17-CE10-0009 research program, funded by the ANR "Agence Nationale de la Recherche". This project involves three laboratories in Automatics Sciences and in Human Factors, CReSTIC (Reims), Lab-STICC (Lorient), and LAMIH (Valenciennes).

The authors gratefully acknowledge these institutions.


Andrew Ogilvie
email: andrew.ogilvie@ird.fr

Jeanne Riaux

Sylvain Massuel

Mark Mulligan

Gilles Belaud

Patrick Le Goulven

Roger Calvez

Socio-hydrological drivers of agricultural water use in small reservoirs

Keywords: Socio-hydrology, Remote sensing, Small reservoirs, Water harvesting, Tunisia

niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Introduction

Agricultural water uses in small reservoirs

By harvesting scarce and unreliable rainfall for local inhabitants, small reservoirs have the potential to supplement water resources and extend the growing season of farmers within poor rural areas [START_REF] Wisser | The significance of local water resources captured in small reservoirs for crop production -A global-scale analysis[END_REF]. Their reduced costs and ability to be implemented at the scale of individual farms or clusters notably supports recent efforts to recognise and promote irrigation and water management practices of millions of smallholders [START_REF] Vincent | Towards a smallholder hydrology for equitable and sustainable water management[END_REF]. Studies revealed multi use systems [START_REF] Ayantunde | Multiple uses of small reservoirs in crop-livestock agro-ecosystems of Volta basin: Implications for livestock management[END_REF][START_REF] De Fraiture | Pirates or pioneers? Unplanned irrigation around small reservoirs in Burkina Faso[END_REF] with diverse benefits including watering livestock, irrigation, fish production as well as recreational and cultural importance. Agricultural production remained sometimes limited [START_REF] Faulkner | Water use and productivity of two small reservoir irrigation schemes in Ghana's upper east region[END_REF][START_REF] Habi | Contraintes et perspectives des retenues collinaires dans le Nord-Ouest algérien[END_REF][START_REF] Khlifi | Impacts of small hill dams on agricultural development of hilly land in the Jendouba region of northwestern Tunisia[END_REF][START_REF] Mugabe | Opportunities for increasing productive water use from dam water: a case study from semi-arid Zimbabwe[END_REF] leading to concerns by donors and investors despite the strong demand and apparent affection for reservoirs by users [START_REF] Venot | Enduring Controversy: Small Reservoirs in Sub-Saharan Africa[END_REF]. This contradiction highlighted the difficulty in identifying and quantifying the real outputs of these systems, partly due to the inherently subjective and restrictive frameworks used, centred on issues of agricultural performance, efficiency or productivity [START_REF] Venot | Discursive framing: Debates over small reservoirs in the Rural South[END_REF].

Literature on the reasons which constrain, or favour agricultural water use in small reservoirs remains scarce. Hydrological limitations and user uncertainties over water availability have been highlighted [START_REF] Mugabe | Opportunities for increasing productive water use from dam water: a case study from semi-arid Zimbabwe[END_REF], however other observations pointed to insufficient resources to cover investment & maintenance costs, lack of adequate management structures [START_REF] Zairi | Evaluation participative de l'impact des travaux de conservation des eaux et des sols (CES) dans le région de Sidi M'hadheb (Sud-Est tunisien)[END_REF] or the consequence of government strategies and siting criteria [START_REF] Talineau | Lacs collinaires en Tunisie semi-aride[END_REF]. The overlapping interactions between drivers of agricultural water use remain poorly understood, often as a result of mono-disciplinary studies considering agronomic, social (i.e. cultural, economic, institutional) and hydrological factors separately.

Investigating socio-hydrosystems

The recent surge in scientific literature in socio-hydrology [START_REF] Di Baldassarre | Socio-hydrology: conceptualising human-flood interactions[END_REF][START_REF] King | Reframing hydrology education to solve coupled human and environmental problems[END_REF][START_REF] Montanari | Panta Rhei -Everything Flows: Change in hydrology and society -The IAHS Scientific Decade 2013 -2022[END_REF][START_REF] Riaux | Engager la construction d'un regard sociohydrologique : des archives catalyseurs de l'interdisciplinarité[END_REF][START_REF] Sivakumar | Socio-hydrology: not a new science, but a recycled and re-worded hydrosociology[END_REF][START_REF] Sivapalan | Socio-hydrology: A new science of people and water[END_REF] highlights the growing recognition of the importance and difficulties in studying the mutual interactions in human-water systems. Despite the popularity for the recently coined term, the concept refers to common contemporary approaches which recognise the importance of human interactions within hydrological systems [START_REF] Falkenmark | Water and Mankind: A Complex System of Mutual Interaction[END_REF], as in other socio-ecological systems [START_REF] Ostrom | Governing the commons: The evolution of institutions for collective action[END_REF]. This begun with considering human influences, such as withdrawals, impoundments and other human induced changes on hydrological systems, moving away from theoretically undisturbed natural systems [START_REF] Thompson | Developing predictive insight into changing water systems: Use-inspired hydrologic science for the anthropocene[END_REF]. Conversely, it also focussed on the influence of hydrological systems on human interests, notably water variability on water & food security and the consequences of flood dynamics [START_REF] Di Baldassarre | Socio-hydrology: conceptualising human-flood interactions[END_REF] and droughts. Socio-hydrology represents a step further to provide new insights on the broad, complex interactions and retroactions [START_REF] Braden | Social science in a water observing system[END_REF][START_REF] Wesselink | Socio-hydrology and hydrosocial analysis: toward dialogues across disciplines[END_REF] of coupled human-water systems. Understanding the finer workings of these sociohydrosystems notably requires in depth field investigations [START_REF] Massuel | Inspiring a Broader Socio-Hydrological Negotiation Approach With Interdisciplinary Field-Based Experience[END_REF], which must be transcribed into operational approaches, modus operandi [START_REF] Hale | iSAW : Integrating Structure , Actors , and Water to study socio-hydroecological systems[END_REF][START_REF] Sivapalan | Socio-hydrology: A new science of people and water[END_REF]. Suitable approaches must notably seek to extract value from incorporating the approach and viewpoints of other disciplines, rather than simply combining their results. By exploring and borrowing different tools, such interdisciplinary approaches may address water and society issues from a different perspective, and allow new topics and new questions to be investigated and generated [START_REF] Massuel | Inspiring a Broader Socio-Hydrological Negotiation Approach With Interdisciplinary Field-Based Experience[END_REF][START_REF] Riaux | Construire un regard sociohydrologique (2). Le terrain en commun, générateur de convergences scientifiques[END_REF]. This field-based "comparative sociohydrology" may then identify key variables to account for when upscaling or transposing such investigations and according to [START_REF] Pande | Progress in socio-hydrology: a meta-analysis of challenges and opportunities[END_REF] may feed into wider socio-hydrological modelling research.

An original socio-hydrological approach is developed here to investigate the agricultural water uses around multiple small reservoirs and the drivers which foster or constrain agricultural development on their banks. Understanding the dynamics around small reservoirs requires a comprehensive framework to study the reservoir's hydrology, the riparian community and the way they are interlinked.

Methods

Research combined hydrological monitoring, numerical modelling, remote sensing, ethnographic enquiry and qualitative analysis while developing a nested scale approach, to provide varying depth of analysis, as we proceeded to upscale observations on individual small reservoirs to more than 50 small reservoirs scattered across a 1200 km 2 catchment in semi-arid Tunisia.

Case study site

The study site is the Merguellil upper catchment (1200 km², figure 12) situated in semi-arid central Tunisia (329 mm/year ± 131 mm), where 56 small reservoirs were built as a result of successive water and soil conservation programmes since the 1960s [START_REF] Khlifi | Impacts of small hill dams on agricultural development of hilly land in the Jendouba region of northwestern Tunisia[END_REF]Selmi et al., 2001). Following a nationwide strategy setting ambitious objectives of 1000 small reservoirs, 700 small reservoirs were built nationally by the late 1990s for an estimated capacity of 70 Mm 3 . Around Kairouan, this 1st phase led to the construction of 39 small reservoirs, followed by a second phase after 2002, supported through a host of additional international projects (CNEA, 2006).

The 56 lakes were inventoried through the combination and cross referencing of records from local authorities, literature (CNEA, 2006;[START_REF] Kingumbi | Modélisation hydrologique d'un bassin affecté par des changements d'occupation[END_REF][START_REF] Lacombe | Evolution et usages de la ressource en eau dans un bassin versant amenagé semi-aride[END_REF], satellite imagery and field visits [START_REF] Ogilvie | Assessing Floods and Droughts in Ungauged Small Reservoirs with Long-Term Landsat Imagery[END_REF]. The area has been the focus of numerous agricultural surveys, and a vast hydrological and climatic observation network [START_REF] Albergel | Les lacs collinaires en Tunisie : Enjeux, Contraintes et Perspectives[END_REF][START_REF] Leduc | Impacts of hydrological changes in the Mediterranean zone: environmental modifications and rural development in the Merguellil catchment, central Tunisia[END_REF], which included the monitoring of 13 small reservoirs, considering the importance of climatic and human changes on the downstream irrigated Kairouan plain. Initial design capacities of small reservoirs in the catchment range between 17,000 m 3 and 1,590,000 m 3 though the median size only reaches 66,000 m 3 . Land uses in the catchment are dominated by traditional Mediterranean crops, mostly rainfed cereals (30% of catchment surface area) and fruit trees (20%), especially olive groves suited to the extended dry season. Grasslands cover 30%, forest 19% and towns and watercourses the remaining 1% [START_REF] Dridi | Impact des aménagements sur la ressource en eaux dans le bassin du Merguellil (Tunisie centrale)[END_REF]. 3 500 ha (fruit trees and market gardening) are irrigated, mostly from unregulated groundwater resources [START_REF] Le Goulven | Sharing scarce resources in Mediterranean river rasin: Wadi Merguellil in Central Tunisia[END_REF].

Assessing water availability

Water resources were assessed across 48 lakes based on surface water assessments acquired from 546 Landsat 5-8 images over 1999-2014. The method described in [START_REF] Ogilvie | Surface water monitoring in small water bodies: potential and limits of multi-sensor Landsat time series[END_REF] uses a fixed threshold Modified Normalised Difference Water Index [START_REF] Xu | Modification of normalised difference water index (NDWI) to enhance open water features in remotely sensed imagery[END_REF]) calibrated against extensive field data. Surface area are converted to volumes using a locally derived surface volume rating curve, where the B and β model parameters were incremented over time to account for silting, based on known maximum capacity and construction date [START_REF] Ogilvie | Assessing Floods and Droughts in Ungauged Small Reservoirs with Long-Term Landsat Imagery[END_REF]. Time series were spline interpolated and gap filled using the TSGF extension [START_REF] Forkel | Trend Change Detection in NDVI Time Series: Effects of Inter-Annual Variability and Methodology[END_REF] in order to allow water availability statistics to be calculated over time. RMSE on mean annual volumes reaches 20 600 m 3 . Lakes built recently (Daoud 3 & Mdinia 2 in 2012) as well as 6 minor lakes (e.g. Bouksab 2) for which maximum capacity data was not available were excluded from the water availability analysis. To allow unbiased comparison of all lakes, interannual water availability was also assessed over the common period 2007-2014 when all 48 lakes were in operation.

Characterising agricultural water availability

Considering water uses depend on the amplitude but also the timing and duration of the flood, the number of days that water levels exceed a given volume were calculated for each lake to highlight the irrigation potential. Values were calculated over the whole year and the 6 months of dry season (April-October), when potential watering needs are greatest. A 5000 m 3 threshold was chosen based on interviews as it reflected sufficient water availability to promote irrigated activities by two farmers. These farmers developed market gardening or fruit trees, withdrawing water for 8 hours/day, 3 or more days/week. Significantly it also complies based on the height-surface-volume (HSV) rating curves with a minimal water depth of 1 m, required according to interviews by users to operate pumps without silt from the lake floor bed clogging the pumps. Aggregating a minimum of 6 Landsat pixels also reduced the presence of single outliers, whilst remaining inferior to the size of the smallest lakes (0.5 ha). The 48 lakes were then categorised based on the length of time they succeeded or failed to meet the required water threshold.

Characterisation of water uses

Water uses associated with small reservoirs were examined through a combination of field surveys, quantitative questionnaires as well as semi-structured interviews borrowed from ethnographic methodologies. A multi-stage sampling methodology [START_REF] Mushtaq | Economic evaluation of small multi-purpose ponds in the Zhanghe irrigation system[END_REF] was used to identify broad water use characteristics at the catchment scale, and define with greater detail water uses and profile water users on a selection of lakes (figure 1).

Water use field surveys on 56 lakes

Field surveys enabled preliminary scoping of the type of water uses across all 56 reservoirs. Surveys undertaken between April and June 2011, noted the presence and number of pumps, watering pipes (bergater) and cisterns which allow watering from the lake. They also qualitatively listed the presence of nearby habitations, fruit trees, market gardening, rainfed crops, grazing and watering livestock nearby. Flood recession cropping on the banks of the lake to benefit from increased and prolonged soil moisture was also recorded, as were nearby wells under the influence of lakes, considering their potential benefit for groundwater recharge [START_REF] Selmi | Evaluation économique et environnementale des lacs collinaires en Tunisie. Le cas d'El Gouazine[END_REF]. Furthermore, all water supply sources (spring, boreholes, wadi) were inventoried to highlight the role of these lakes in supplementary irrigation.

Information collected through these water use surveys on 56 reservoirs was compared with previous inventories undertaken in 1999 and 2005, at similar periods of the year [START_REF] Lacombe | Evolution et usages de la ressource en eau dans un bassin versant amenagé semi-aride[END_REF]. In 1999, interviews focussed on 43 reservoirs while in 2005 extensive agricultural use surveys were carried out on 25 lakes in the region. Additional local studies (Selmi et al., 2001;[START_REF] Selmi | Evaluation économique et environnementale des lacs collinaires en Tunisie. Le cas d'El Gouazine[END_REF] and reports including original project documents and evaluation reports (e.g. CNEA, 2006) were used, notably to identify the original objectives of lakes and the wider assistance provided to riparian farmers.

Agricultural questionnaires on 22 lakes

Preliminary scoping on all 56 lakes distinguished 24 lakes with motor pumps and 23 lakes without. A further 9 lakes potentially supported the recharge of nearby wells. The latter were differentiated considering the different dynamics, in terms of water resources, access, government support, involvement in water use association, prior irrigation experience, etc. [START_REF] Selmi | Des lacs collinaires pour un développement durable en Tunisie semi-aride : Systèmes irrigués[END_REF] A sample of 22 reservoirs was then chosen to carry out quantitative questionnaires about agricultural practices and water uses. 16 lakes studied in 2005 were included to provide diachronic assessments of agricultural water uses and management. Additional lakes were randomly selected to investigate a total of 17 lakes (75%) equipped with motorpumps. 4 lakes with no apparent withdrawals were investigated to specifically explore the reasons behind these. One further lake supporting the recharge of nearby wells was included.

All 48 farmers on the 22 lakes were interviewed on the following topics: household and livelihood strategies, farm characteristics, agricultural practices across each plot (crop types, surface areas, yields, watering regimes, livestock), water access and water uses, lake withdrawals, water management, and future perspectives. Additional questions on land rights and government assistance to draw out potential constraints influencing water use were also included based upon the insights gained in the semi-structured interviews.

Semi-structured, in-depth interviews on 4 lakes

25 semi-structured, in-depth interviews were undertaken (over 2011-2013) with farmers on four reservoirs presenting a cross section of water use, availability and issues identified through initial surveys (Riaux et al., 2014). As a qualitative tool, semi-structured interviews were not intended to be multiplied for the sake of increasing representativity, and instead sought to illustrate and shed light on specific complex issues which other (faster) methods are unable to [START_REF] Beaud | L'usage de l'entretien en sciences sociales. Plaidoyer pour l'entretien ethnographique[END_REF][START_REF] Longhurst | Interviews: In-Depth, Semi-Structured[END_REF]. This technique, combined with observations and literature review to form an ethnographic framework, seeks to build greater trust with the interviewee and allow for more personal, confidential or sensitive information to be disclosed, relating here to conflicts or political and economic constraints. The open framework also allowed for a comprehensive assessment of wider, unsuspected uses, benefits and issues to be captured, in contrary to predetermined, constrained and subjective framework [START_REF] Becker | Tricks of the trade : how to think about your research while you're doing it[END_REF][START_REF] Venot | Valeurs d'usage ou performances techniques : comment apprécier le rôle des petits barrages en Afrique subsaharienne ?[END_REF].

Discussions focussed around predetermined topics identified from the literature and initial visits to the reservoirs, which sought to paint a portrait of how lives had evolved around the reservoir after its construction, (life story, [START_REF] Denzin | Handbook of qualitative research[END_REF]). Based only on the assumption that people exploit the available resources, this work followed the grounded theory approach [START_REF] Glaser | The Discovery of Grounded Theory: Strategies for Qualitative Research[END_REF] to understand the drivers which explain the apparent low agricultural water use [START_REF] Lacombe | Evolution et usages de la ressource en eau dans un bassin versant amenagé semi-aride[END_REF]Riaux et al., 2014). Focusing on the history of the site, the origins of the small reservoir and its management and water uses, discussions sought to understand in greater detail the influence of water user associations, land and water rights, government incentives, economic difficulties and conflicts. High resolution Digital Globe and Astrium satellite imagery (available in Google Earth and Bing Maps) were used as a visual aid to represent the location of plots and pumps, and stimulate discussions (carte parlée, [START_REF] Collard | The non-adherence of farmers in the Sertão to the conversion of their agricultural model [La non-adhésion des agriculteurs du sertão brésilien à la conversion de leur Modèle agricole[END_REF]). Interviews were not recorded, but transcribed and typed up collectively to iron out uncertainties or incoherences [START_REF] Beaud | L'usage de l'entretien en sciences sociales. Plaidoyer pour l'entretien ethnographique[END_REF].

Deducing socio-hydrological constraints to water use

The information extracted through quantitative agricultural interviews and qualitative semi-structured interviews were combined to characterise the users and their agricultural practices on 22 small reservoirs. Based on the information gathered through rapid surveys across all reservoirs, key water use characteristics of each lake and their statistical distribution were identified, leading to a typology of the 56 lakes' agricultural benefits. Withdrawal patterns including average pumping duration and frequencies during the dry and rainy seasons for each category of lakes were calculated from the questionnaire data [START_REF] Ogilvie | Upscaling water availability and water use assessments in hydro-sociosystems: the small reservoirs of the Merguellil catchment (Central Tunisia) (PhD)[END_REF]. Higher resolution in the withdrawals estimates was not relevant considering the high uncertainties observed in the number of pumps in operation each year and on each lake.

The water uses and water availability typologies were then crossed on the common subset of 48 lakes to identify where water availability is constraining or supporting agricultural water use. The incoherences highlighted, associated with the in-depth knowledge gained through ethnographic enquiry, then helped shed light on the multiple social (cultural, historical, political, institutional) and economic drivers which influence agricultural development around small reservoirs. Interpretation of the dynamics around reservoirs followed an iterative process, whereby initial hypotheses deduced from observations were gradually confirmed or invalidated through the interviews and hydrological assessments. Interviews trigger new questions and hypotheses which progressively reorient, refine and nuance our evolving understanding of this sociohydrological system. The multiple replies obtained allow us to triangulate the information (e.g. who shares the pumps, did the government assist, what happened to the water user associations, conflicts, etc.) until we reach a saturation point where the additional information only reinforces the confidence in our interpretation of the system but ceases to provide new insights (Olivier de [START_REF] Olivier De Sardan | Anthropology and development : understanding contemporary social change[END_REF]. Feeding the insights gained from interviews into the design of the questionnaires (e.g. questions on land rights, water user associations) allowed us to identify the spatial, statistical distribution of these drivers and help upscale local observations.

Results and discussion

Supporting and diversifying livelihoods around small reservoirs

The introduction of small reservoirs was first and foremost accompanied by a change in agro-pastoral activities, notably the development and expansion of irrigated practices, sometimes at the expense of other livelihood strategies.

Fruit tree farming

Fruit trees were observed on the banks of over 80% of all lakes. These were cultivated by all interviewed farmers, 58% of which declared taking up arboriculture activities following the construction of the lake. The number of fruit trees ranged from 4400 over 20 ha to 13 trees on 0.5 ha (mean = 720 trees on 6.3 ha) highlighting the variability across farms and lakes (figure 2). Only a few farmers strive to expand the number of trees on their land (El Maiz, Sidi Sofiane 2, Mahbes, Morra), with most others having already exploited all their land and only planting new trees to replace dead ones. Olive trees dominate (61.2% of fruit trees) and yield around 1-2 galba/tree (1 galba is equivalent to 1 litre of oil or 14 kg), providing for the family consumption and additional revenue during good years for 65% of people surveyed. Values are consistent with Selmi et al. (2001) (mean 8 ha on 57 lakes in the wider Kairouan governorate) but significantly lower than those in CNEA (2006) (2000-3000 fruit trees on 20 ha), partly due to the greater proportion of lakes with large exploitations in their sample. In Jendouba, northern Tunisia, [START_REF] Khlifi | Impacts of small hill dams on agricultural development of hilly land in the Jendouba region of northwestern Tunisia[END_REF] reported an increase in the average surface area for trees from 3 ha to 23 ha over 8 years following the introduction of small reservoirs, however this region benefits from comparatively higher rainfall (450-950 mm from South to North), not accounting for additional socio-economic differences which may explain this dynamic.

Farmers rely on motor driven pumps to draw water from the lake which is conveyed to the plots using bergater pipes and a network of trenches and impoundments to channel water to each tree. Some farmers had built a basin and practised gravity-fed irrigation (Mahbes, Daoued) while drip irrigation was only recorded on three exploitations (Sidi Sofiane, Fadden Boras and El Kraroub). The filling of cisterns was only allowed on 45% of lakes surveyed and on half of these, their use was restricted to riparian farmers, which reached as many as 20 families (Garia S, Skhira 3, O. El Haffar or El Mahbes). On the other half, cisterns were also provided to farmers from further afield for supplementary irrigation, for free (50 cisterns/year at Morra, 100 at Skhira 4) or sold as on O. Daoued 3 where 4 cisterns of 3000 l at a time operate, and up to 50 cisterns per day are withdrawn during summer months.

Market gardening

Market gardening had been attempted at some stage on 80% of lakes surveyed and by 65% of farmers interviewed but only 20% of these continue this activity today (figure 3). Surface areas were typically small (under 0.5 ha) and mostly for personal consumption except for two farmers surveyed for whom market gardening became and remains today an income generating activity (Ain Smili, Guettar). These values are close to those observed by (Selmi et al., 2001) who had previously observed an average of 0.25 ha for market gardening on lakes in the region, and similarly observed a rapid decline of activity within three years.

Cereals

In very rare instances (Morra and Sidi Sofiane), farmers had installed sprinklers (up to 9 over 3 ha) to exploit water from the lake during the early phases of cereal growth. In both cases, the practice ceased rapidly as unreliable rainfall during the rest of the growth period during which they chose not to continue watering reduced all benefit. Similar practices in the Jendouba region had also been observed on a handful (3 out of 18) of reservoirs but again only over the first two years [START_REF] Khlifi | Impacts of small hill dams on agricultural development of hilly land in the Jendouba region of northwestern Tunisia[END_REF]. Cereal cropping continues to be practised by 70% of farmers around small reservoirs, but 20% declared ceasing rainfed cereals after the lake's construction to concentrate on fruit trees. This conversion remains much less significant than around small reservoirs around Jendouba where in 2 years, people reportedly all converted to fruit farming and market gardening [START_REF] Khlifi | Impacts of small hill dams on agricultural development of hilly land in the Jendouba region of northwestern Tunisia[END_REF]. In certain cases (Skhira), soil humidity on the contours of lake were used to advantage by farmers to grow cereals (flood recession cropping), however benefits can be outweighed by potential flooding and several farmers preferred to refrain from cropping near the reservoirs to reduce risk of damage to their crops.

Livestock

Livestock is a major traditional activity and 70% of lakes surveyed were reportedly used to water livestock. In certain remote areas with limited alternate water supply, lakes reduce the distance livestock must travel, thereby increasing productivity of the herd. 27% of farmers declared abandoning this activity following the construction of the lake, as farmers reported having less time to water and feed their stock, but also due to increasing pressure on land leading certain years to conflicts over fodder, as well as increased theft since the 2011 revolution.

Groundwater recharge and peripheral water use

Farmers on 12 lakes witnessed the positive influence of the lake on the level and recovery times of their wells, which support fruit tree and market gardening activities. This positive effect was notably documented [START_REF] Selmi | Des lacs collinaires pour un développement durable en Tunisie semi-aride : Systèmes irrigués[END_REF][START_REF] Selmi | Evaluation économique et environnementale des lacs collinaires en Tunisie. Le cas d'El Gouazine[END_REF] on two wells downstream of Gouazine where groundwater levels rose by 11 m and 4 m respectively after the dam was built, as well as in other parts of Tunisia [START_REF] Zairi | Evaluation participative de l'impact des travaux de conservation des eaux et des sols (CES) dans le région de Sidi M'hadheb (Sud-Est tunisien)[END_REF]. Geochemical studies in the region [START_REF] Gay | Fonctionnement et bilan de retenues artificielles en Tunisie: approche hydrochimique et isotopique[END_REF][START_REF] Montoroi | Groundwater geochemistry of a small reservoir catchment in Central Tunisia[END_REF] showed that infiltration reached 300 m 3 /day on the Gouazine lake, and that this signal was observed on wells exploiting shallow aquifers 350 m downstream within 100 days (figure 4). Eight reservoirs were specifically designed to favour recharge (cf. table A1) of the local (Bou Hafna, Cherichira) aquifers (CNEA, 2006).

Protecting downstream areas

Reservoirs as part of the national water and soil conservation strategy were also designed to contain silt and reduce silting of downstream areas and lakes. Based on mean sedimentation rates across 14 reservoirs in the region, over 200 000 m 3 sediment may be collected annually by reservoirs in the catchment (CNEA, 2006;[START_REF] Ogilvie | Upscaling water availability and water use assessments in hydro-sociosystems: the small reservoirs of the Merguellil catchment (Central Tunisia) (PhD)[END_REF]. This corresponds to a reduction of the order of 15% of silting in the downstream El Haouareb dam, estimated around 1.33 to 1.48 Mm 3 /year. Other lakes were also designed to protect roads (Bouksab 2 & 3) or plots (Fidh Ben Nasseur) situated directly downstream from floods.

Reducing available capacities over time, the captured silt causes discontent from farmers and problems were also reported due to the detrimental flushing of accumulated silt and debris onto the land of farmers situated below (Bouchaha, Fidh Ben Nasseur).

Other social and economic benefits

People interviewed also mentioned the wider value of lakes, including the contribution to landscape, shaded ecosystems, recreational benefits (swimming), duck populations attracting hunters, bee keepers placing their hives (Guettar, Mahbes), water for house construction and washing wool (Morra, Guettar). Household use was only mentioned on 8 out of 22 lakes surveyed, as public fountains are relatively widespread, though can be used during common water shortages. Biodiversity benefits have yet to be investigated. Farmers notably expressed attachment to their lakes, which were also for some a source of prestige (e.g. Ain Smili).

Significantly, in addition to being a material resource capable of increasing local production, lakes appeared as an immaterial resource that plays a key role in structuring and maintaining local social groups (Riaux et al., 2014).

Typology of lakes' agricultural benefits

Based upon the qualification of water uses across 22 lakes and the rapid surveys carried out across the 56 lakes, the benefits of lakes from the farmers' perspective were characterised into three categories (tables 1 and A.1).

Lakes with negligible benefits to users

These (16) lakes currently support negligible agricultural withdrawals, and do not visibly recharge any nearby wells. These include (9) lakes which never did support agriculture and have essentially a protective value, reducing erosion and flooding of downstream areas. In certain cases, this corresponds to their primary objective (table A.1) but a few larger lakes failed to develop irrigated practices, largely due to their isolated location (Chaouba El Hamra and Marrouki 2). Other lakes ceased to support agriculture after becoming completely silted (Ben Houria, Bouchaha B) or sufficiently to be abandoned (Skhira A) or now only allow for the occasional watering of a few trees, up to 100.

Lakes with residual benefits to users

These (27) lakes support occasional withdrawals, and provide small, irregular but noticeable benefits to nearby farmers. These support agriculture directly through motor pumps (13) or through cisterns (8) while a total of 10 (also) support water levels of nearby wells exploited for irrigation. The number of pumps remains low (1 per lake on average) and withdrawals essentially support the occasional watering of fruit trees. Sampled exploitations possess on average 300 (up to 1000) fruit trees, 7 ha of cereals, between 10 and 50 heads of sheep, and when availability is greater, occasional small-scale market gardening (0.5 ha) for domestic consumption continues to be observed. This largest category includes lakes of all sizes, including very small lakes (under 40,000 m 3 capacity) where single riparian farmers continue to occasionally pump on the lake, to large lakes (over 800,000 m 3 capacity) where the low number of pumps installed (2-3) reflect the low exploitation of these lakes. Several of these lakes were built to support irrigation, while others (Skhira 4&5) built in the 1960s to protect from soil erosion, have supported the development of several orchards through direct pumping and nearby wells.

Lakes with isolated, high benefits

These (13) lakes support modest regular withdrawals and have assisted the development of isolated but significant exploitations. Two of these are currently exploited using only cisterns while the others withdraw using motor pumps (2.5 pumps per lake on average), and two lakes also contribute to recharging nearby wells. Activities focus essentially around fruit trees which reached 900 on average across our sample (and up to 4400), 15 ha of cereals and between 10 and 50 heads of livestock essentially sheep. Commercial market gardening of 2-5 ha was attempted but farmers preferred to focus on fruit trees, even using drip irrigation on three lakes. Lakes were often large (table A.1) but also include two smaller lakes (40,000 m 3 ). In most cases though, the benefits are the results of individual entrepreneurs and the lakes and pumps appear to have contributed in reinforcing existing capabilities. These lakes suffer from low equity, where benefits are confined to single users, who possessed existing capital or reliable sources of income (e.g. Fadden Boras).

Agricultural water availability characterisation

Analysis from Landsat observations in [START_REF] Ogilvie | Assessing Floods and Droughts in Ungauged Small Reservoirs with Long-Term Landsat Imagery[END_REF] highlighted the high variability of mean water availability across 48 small reservoirs, ranging from 100 m 3 /day to 255,000 m 3 /day on larger lakes (mean = 28,000 m 3 /day) over the 6 months of the dry season. Interannual variations were high on the smallest lakes (variation coefficient > 2) but remarkably the variation coefficient also reached 0.75 on large lakes over 1 Mm 3 capacity such as Kraroub and En Mel. By considering the number of days water volumes exceed 5000 m 3 , three classes of lakes were here distinguished, according to their capacity to support agricultural intensification.

Negligible water availability

The first category consists of lakes with negligible water potential. A minimum of 45 days during the dry season where water resources exceeded 5000 m 3 /month was considered necessary to support market gardening activities based on minimal crop cycles lengths. When accounting for silting, 27 lakes never reached the required water availability and a further 6 met this requirement for less than 45 days during the 6 dry months (i.e. below 25% of dry season days). For 20 of these, figure 6 confirmed that uncertainties over silting rates were not significant as even under the best case scenario of maintaining initial capacity through dredging or building new dams at these locations and dimensions, these continued to fail to meet the defined availability requirements. On the other 13 lakes, sensitivity to the silting model was much greater (e.g. Chaouba El Hamra, figure 6) and as field visits confirmed (minimal) storage capacity and occasional pumping, these 13 lakes were therefore classed in the unreliable availability category. These confirm the difficulties of modelling over space and more than 30 years discrete silting phenomena [START_REF] Ogilvie | Assessing Floods and Droughts in Ungauged Small Reservoirs with Long-Term Landsat Imagery[END_REF], influenced by topography, lithology, rainfall regimes and land uses. On these 20 lakes, water availability is limited and unreliable, providing inopportune conditions to develop more intense irrigated activities but when not silted, allow for limited watering (e.g. Ain Faouar on figure 9). Several were designed for protection or recharge and appear under-dimensioned for water uses, despite farmers having planted trees and installed a pump besides these. With a mean initial capacity 44,000 m 3 , many lakes are unable to hold water for any length of time, due to low depths and greater exposure to evaporation. Other larger lakes, suffered from progressive silting (Bouchaha B, Garia 3, Haffar) or like Hoshas (130,000 m 3 ) experienced very short floods due to high infiltration. Figure 7 highlights how water availability patterns vary rapidly when lowering the thresholds, i.e. for very small lakes (Habsa A and Fidh Zitoune) water availability around 2000 m 3 rises significantly pointing to reliable but limited water volumes. A further four lakes would reach this lower threshold of 2000 m 3 (figure 8). Conversely, where agricultural water needs were greater (e.g. 10,000 m 3 for at least 45 days), 6 additional lakes would not reach this raised target.

Good water availability

The 7 lakes in this category displayed water availability exceeding 5000 m 3 for more than 4.5 months during the 6 dry months, (i.e. over 75% of days). With a mean initial capacity of 1 Mm 3 , these lakes support the notion that storage is determinant in semi-arid areas where floods are rare. However, exceptions exist, with El Maiz suffering despite its similar capacity (500,000 m 3 ) from greater water insecurity (variation coefficient = 0.97). Conversely Fadden Boras with its modest size (84,000 m 3 ) displayed in the absence of silting reduced variability and field visits confirmed its reliable availability. The mean availability of lakes is indeed only partly correlated (R² = 0.6) with the maximum capacity of lakes, due to the influence of the rainfall variability and differences in runoff coefficients and lake characteristics (notably high infiltration) [START_REF] Ogilvie | Assessing Floods and Droughts in Ungauged Small Reservoirs with Long-Term Landsat Imagery[END_REF].

These lakes remain affected by interannual variability (figure 5), but not to the point of affecting local irrigation practices. Significantly, these lakes are the ones which can realistically provide year-round irrigation, i.e. support farmers through the critical dry periods in line with their objective in many semi-arid regions. Figure 8 highlights the modest decline in the number of these lakes if agricultural water availability requirements (in terms of volume or number of days) increase.

Unreliable water availability

These 21 lakes display the greatest uncertainties over water availability and fail to meet the required threshold between 1.5 and 4.5 months out of the 6 dry months. With a mean capacity of 129,000 m 3 these lakes include large lakes (Gouazine and El Maiz 230,000 m 3 and 500,000 m 3 respectively) whose average resources largely exceed the threshold (figure 5). However, these lakes suffer from significant variability and extended periods where resources become insufficient to meet these basic watering demands (figure 9). Years where availability is good, more intense localised irrigation of vegetables becomes possible, but farmers must compose with this uncertainty through other resources, be they physical (other watering points) or economic (means to purchase cisterns). As mentioned earlier, silting uncertainties were high for 13 of these lakes indicating the sites where updating topographic surveys may provide the most benefit [START_REF] Ogilvie | Assessing Floods and Droughts in Ungauged Small Reservoirs with Long-Term Landsat Imagery[END_REF].

Wider socio-hydrological drivers

No correlations were observed between water availability and water use levels assessed as the number of fruit trees grown or number of pumps around lakes (figure 12). These discrepancies between water use and availability classes of each lake illustrated in figure 10 confirmed the need to look beyond purely hydrological factors.

Economic water access difficulties

Only 43% of lakes were equipped with motor pumps while on 23% of lakes, withdrawals consisted of occasional cisterns. The number of motor pumps ranged between 1 and 7 (mean=2.5), but across all 56 lakes the average number reduced to barely 1 per lake (figure 11). Their presence reduced since 2005 on 19% of lakes due to irreparable damages or the decline in irrigated activities (En Mel) but on others (33%), additional pumps had been acquired and replaced over time, signalling a continued or increased interest in the lake's resources by farmers or local projects. A noteworthy 27% of pumps were out of order at the time of visit, due to lack of regular maintenance or direct damage from floods. The absence of spare parts and difficulties to cover repair costs led to extended periods before pumps were repaired.

Over half (54%) of these pumps were provided by the government following the construction of the lakes, while the others had been purchased by farmers who shared the costs with 2-3 brothers or cousins. These were typically wealthier exploitations having inherited large plots of land, or farmers who had additional external resources (regular employment, or family cash flows), though a third of the private pumps had been purchased without such assistance. Credits are notably difficult to obtain due to the absence of official land titles (titre bleu) on 73% of exploitations surveyed.

Managing hydrological uncertainty

Farmers faced with uncertainty over water resources variability managed in certain instances to develop successful enterprises due partly to their ability to deal with water shortages. To save 1 ha of fruit trees, farmers reported needing 10 cisterns of 3000-4000 litres 2-5 times per year, representing a cost of 500DT-1250DT (1DT=0.5€ at the time) depending on rainfall and the age of the trees. These additional costs were difficult to bear by many farmers who lost part of their younger fruit trees. 60% of farmers interviewed had attempted market gardening but more than half of these ceased after losing their first crop. Limited capabilities [START_REF] Sen | Commodities and capabilities[END_REF] affects the willingness to take on risks and most users around these lakes now focus exclusively on olive and other fruit trees. Uncertainties can also prevent farmers from planting or lead them to reduce investments, e.g. applying minimal inputs hence reducing their production levels [START_REF] Khlifi | Impacts of small hill dams on agricultural development of hilly land in the Jendouba region of northwestern Tunisia[END_REF][START_REF] Mugabe | Opportunities for increasing productive water use from dam water: a case study from semi-arid Zimbabwe[END_REF]. Conversely, farmers with increased financial resilience and ability to access alternate water supplies, such as nearby wells (15 farmers) or cisterns (17 farmers), were capable of bearing these risks and developed greater irrigated activities.

Local water mismanagement

The limited number of pumps were shared between 2.9 beneficiaries on average, though sometimes up to 8 initially, and were to be managed through water user associations (WUAs) as requested by the government. Over 22 reservoirs, 11 had formally created an association but by 2014 all had dissolved, due to conflicts, the declining number of users, or pump failures. On other lakes, WUAs had not been created due to the low number of users and the existence of family ties. Frequent conflicts were reported, often due to the heads of WUAs unfairly restricting access to the pump (Kraroub, Maiz), or even preventing access to the lake to riparian families, entitled to the resource according to the traditional bind between land and water rights. In many cases, the position of head of WUA (and often dam operator) were given to local government employees living on site, or others with close links to the former ruling party, the Rassemblement constitutionnel démocratique (RCD). The importance of ties with government officials and bribes were highlighted by several interviewees and allegedly influenced the number of pumps but also tree saplings that farmers benefited from.

Over time, several government pumps became private, due to members acquiring these after reportedly paying for repairs. Other farmers resorted to private pumps shared amongst family members, but conflicts endure over water turns or maintenance and repair costs. In the absence of an active WUA, management and access to the lake is done through informal gatherings, where established influences (dam operator and/or head of WUAs) continue to play a role. The absence of clear management leads to unregulated withdrawals, where farmers reported withdrawing what they can afford while water is available, replicating the tragedy of the commons [START_REF] Hardin | The tragedy of the commons[END_REF]) already observed [START_REF] Selmi | Des lacs collinaires pour un développement durable en Tunisie semi-aride : Systèmes irrigués[END_REF]. The resulting rapid decline in resources led to certain farmers calling for instating control and fees over water access but coordinated by an external government engineer.

Local participation and development strategy

While farmers agreed (Gouazine) or even requested (Fidh Mbarek, Guettar and Fidh Zitoune) certain lakes, others regretted not being consulted on their interest for a dam, which was eventually imposed, sometimes at the expense of their land and livelihoods. Out of 29 exploitations with land under the 22 lakes (and 12 with land titles to prove it), only 2 reported obtaining some compensation (Garia S, El Kraroub), generating disaffection for the project. Government strategies to develop water use appear somewhat fuzzy (Riaux et al., 2014), and in many cases argue that irrigation remained merely an "implicit" objective [START_REF] Selmi | Evaluation économique et environnementale des lacs collinaires en Tunisie. Le cas d'El Gouazine[END_REF], behind the priority protection of downstream infrastructure. Criteria in project documents referred to physical parameters however failed to include social selection criteria relating to water use despite the stated irrigation objectives. Farmers confirmed no pre-assessment to identify local resources and challenges was carried out, reducing ownership and participation by end users [START_REF] Habi | Contraintes et perspectives des retenues collinaires dans le Nord-Ouest algérien[END_REF][START_REF] Selmi | Des lacs collinaires pour un développement durable en Tunisie semi-aride : Systèmes irrigués[END_REF][START_REF] Selmi | Evaluation économique et environnementale des lacs collinaires en Tunisie. Le cas d'El Gouazine[END_REF][START_REF] Talineau | Lacs collinaires en Tunisie semi-aride[END_REF][START_REF] Wisser | The significance of local water resources captured in small reservoirs for crop production -A global-scale analysis[END_REF]. Numerous incoherences were also observed in the siting of dams (Chaouba El Hamra, El Marrouki 2) where the clear absence of beneficiaries around the lake appears to contradict the stated objectives of developing irrigation. On others, no pumps or trees were provided, or sometimes only at a much later stage therefore losing out on the impetus created by the construction of the lake intended for irrigation. Larger irrigation projects (Morra and Kraroub) never materialised, due for instance to a failed electrification strategy, leading to a built, yet inoperative pumping station. Incoherences were also reported by farmers in policies forbidding lake users to sell market gardening products (Gbatis, En Mel and Mahbes) or advising farmers that water use would be forbidden to favour recharge (Hoshas) but only after the construction, placing undue expectations on the lake.

Limited ongoing government assistance

15 out of 22 lakes investigated had benefited from a pump, provided by the government or the funding body (e.g. EU project) and 45% of farmers had obtained fruit trees saplings. Farmers interviewed expected further support however and several regularly placed requests with the local authorities for subsidies for additional pumps, bergater piping or repairs to the dam, whose maintenance over time is poorly budgeted [START_REF] Selmi | Des lacs collinaires pour un développement durable en Tunisie semi-aride : Systèmes irrigués[END_REF]. In the remote Merguellil upper catchment, public action for development is limited compared to the downstream Kairouan plain, and is compensated for through subventions and individualised small grants (Riaux et al., 2014). Government assistance appears to have been too limited and punctual for many users to make the transition from traditional rainfed activities to irrigated activities, which demand additional investments and knowledge [START_REF] Oweis | Water harvesting and supplemental irrigation for improved water productivity of dry farming systems in West Asia and North Africa[END_REF][START_REF] Selmi | Des lacs collinaires pour un développement durable en Tunisie semi-aride : Systèmes irrigués[END_REF][START_REF] Zairi | Evaluation participative de l'impact des travaux de conservation des eaux et des sols (CES) dans le région de Sidi M'hadheb (Sud-Est tunisien)[END_REF]. Monitoring over time by authorities may have also helped solve some of the incongruities and mismanagement observed around lakes. The continued reference to the local government by farmers emphasised how engrained the government's presence is, possibly as a result of the historically interventionist government. This also seemed to reflect a posture, whereby farmers are merely managing a government lake where they gained rights, instead of appropriating their lake.

Conflicting livelihood strategies

Of those who abandoned market gardening, 19 stated that water supply was the dominant constraint however 15 identified other reasons, which included the costs and low profits obtained, the intense labour and the presence required. Small farmers notably struggled to cope financially until the harvest and with the minimal return on investment from fruit trees in the first years, leading them to pursue complementary livelihoods. A subset of farmers (7) with large herds of sheep (between 50 and 60) and significant surface area (10-60 ha) of cereals showed no real interest in intensifying their fruit farming activities, preferring to rely on traditional agricultural livelihoods. Other farmers had already started to diversify their income due to land surface area reducing through inheritance and soil fertility declining over time, and work as labourers (CNEA, 2006;Selmi et al., 2001). Many, when they have interesting opportunities (including abroad in Libya or Cameroon) pursue these activities and when contracts are scarce and/or water levels were high, choose to focus on agriculture and seek to intensify their production (market gardening, fertilisers, etc.). Out of 28 people who previously had a secondary source of income, 25 continue to have a secondary activity, implying that only three people were able to move towards agriculture exclusively, here high value fruit (cherry, fig, apricots) and some market gardening.

Conclusions

The multi-scale, interdisciplinary approach developed here highlighted the vast disparities in the benefits and practices between lakes, farmers and over time. Diachronic perspectives highlighted crop diversification and an increase in fruit trees, supported in part by watering from the lakes. Olive harvests provide nonnegligible revenue to families, and during good years, farmers can develop limited lucrative activities. Isolated successful enterprises based around intensive fruit farming were also observed. The wide framework also identified support to livestock, nearby wells and immaterial benefits.

Attempts to develop market gardening and intensifying fruit farming on 56% of lakes bear witness to the level of interest in this additional resource, but most farmers were deceived due to the unfavourable hydrometeorological conditions. Exploiting the Landsat-derived water availability patterns provided unprecedented insights into the hydrological constraints on 86% of small lakes. On some of the smallest lakes, due to their size or rapid infiltration, their initial potential was already negligible and communication with the riparian communities would have avoided disappointments and associated disaffection. On lakes where volumes can be significant and irrigated activities can be developed, farmers must be equipped with strategies to cope with the variability and associated uncertainty for the lake to cease to be both a "help and a threat". For most this was limiting, and led to the loss of production, while those with sufficient economic resilience or other water supplies survived the droughts. Though a limiting condition, water availability was indeed not a sufficient condition to understand the disparities in practices. On lakes where water availability is high, individual successes are reported and again occurred as a result of individual capabilities. Inadequate ongoing government support to develop and structure agricultural activities and water management limited the number of beneficiaries, due largely to problems over access to pumps, pipes, repairs and to WUA failures. Farmers were in certain cases excluded from the start [START_REF] Selmi | Des lacs collinaires pour un développement durable en Tunisie semi-aride : Systèmes irrigués[END_REF]) and others more subtly over time, through conflicts, mismanagement and appropriation of the pumps. Where the local government was proactive this led to wider levels of exploitation compared to other similar lakes, but benefits remained confined to a select few.

Investments in small reservoirs have supported remote rural areas, affected by erosion, poor soils and low and irregular rainfall, albeit with often low equity and incoherences. They probably contributed to slow the inevitable fate of rural exodus, and investments helping local upstream smallholders [START_REF] Vincent | Towards a smallholder hydrology for equitable and sustainable water management[END_REF] should be encouraged. The majority of small reservoirs which depend on erratic rainfall volumes are however limited in their ability to develop irrigated agriculture on any significant scale. Lakes can support dry spells during the rainy season, and on good rainfall years intensification during dry months if supported adequately to optimise production and minimise risks could be performed. However fundamentally small reservoirs, despite gradual shifts in the discourse [START_REF] Venot | Discursive framing: Debates over small reservoirs in the Rural South[END_REF] are designed for supplementary irrigation and their limited storage does not address the years when rainfall is low, preventing a long term transition to irrigated agriculture. In any case, reservoirs by capturing silt have a dedicated lifespan and must not be perceived as a perennial solution. 30 years on, complementary strategies are required to support the seeds sown by these previous water and soil conservation programmes.

Figure 1 :

 1 Figure 1: Schematic representation of methodology used to determine water uses and associated socio-hydrological drivers in multiple small reservoirs (SR)

Figure 2 :

 2 Figure 2: Observed heterogeneity in the number of fruit trees per farm and per lake based on questionnaires

Figure 3 :

 3 Figure 3: Diversification of agro-pastoral practices following the small reservoir construction based on farmer interviews (N.B. indicative timespan 20 years)

Figure 4 :

 4 Figure 4: Irrigated agriculture on wells situated directly downstream from the Gouazine lake

Figure 5 :

 5 Figure 5: Mean interannual availability over 2007-2014 per lake over the dry season displayed as mean ±1 standard deviation

Figure 7 :

 7 Figure 7: Mean number of days during dry season over 2007-2014 water availability remains above a designated volume for 48 reservoirs

Figure 8 :

 8 Figure 8: Number of lakes where water availability exceeds a given threshold for a number of days during dry seasons over 2007-2014

Figure 10 :

 10 Figure 10: Representation of water availability and water uses for 48 small reservoirs according to their typology classes (precise location within the 9 squares is figurative)

Figure 11 :

 11 Figure 11: Number of motor pumps in 2005 (on 21 lakes) and 2012 (on 56 lakes)

Figure 12 :

 12 Figure 12: Map of interannual mean water availability (2007-2014) and agricultural water use levels per lake

Table 1 :

 1 Categorisation of 56 small reservoirs based on agricultural water uses

	Lake Category	Negligible benefits	Residual benefits Isolated, high benefits
	Number of lakes	16	27	13
	Initial capacity
	Min 17,000	18,000	40,000
	Mean 181,000	1,200,000	1,590,000
	Max 65,000	166,000	490,000
	Mean annual availability
	(m 3 /day, 2007-2014)
	Min 340	900	5,200
	Mean 16,900	230,000	302,000
	Max 7,200	29,300	80,800
	Mean number of pumps	0	1.1	2.5
	Fruits trees/farm	N/A	300	900
	Market gardening/farm	N/A	Up to 0.5 ha	Up to 2.5 ha
	Withdrawals (m 3 /month/lake)	0	Up to 1200	Up to 4100

Table 1 :

 1 Categorisation of 56 small reservoirs based on agricultural water uses

		Skhira D	N/A	N/A	N	0	N	Protection
	Residual benefits	Abda	37,000	4,972	N	0	Y	Recharge
		Ain Faouar	66,000	3,309	Y	0	Y	Recharge
		Bouchaha A	18,000	1,560	Y	1	N	Irrigation
		Bouksab	55,000	8,152	Y	0	Y	Irrigation
		Dhahbi	26,000	2,799	N	0	Y	Recharge
		El Haffar	30,000	1,720	Y	0	N	N/A
		Fidh Ali	134,000	30,092	Y	2	N	Irrigation
		Fidh Ben Nasseur	47,000	3,751	Y	1	Y	Protection (plots)
		Fidh Mbarek	53,000	4,287	Y	1	N	Irrigation
		Gbatis	106,000	17,598	Y	2	N	Irrigation
		Gouazine	237,000	65,435	Y	0	Y	Irrigation
		Habsa A	50,000	3,964	Y	0	N	Irrigation
		Habsa B	35,000	912	Y	0	N	Irrigation
		Hammam	850,000	107,826	Y	2	N	Irrigation
		Hoshas	130,000	7,365	Y	0	Y	Recharge

Acknowledgements

We thank all the people interviewed for their vital contributions and hospitality. We also gratefully acknowledge the collaboration from the Direction Générale de l'Aménagement et de la Conservation des Terres Agricoles (DG ACTA) and Direction Générale des Ressources en Eau (DGRE) in Tunis and local representatives at the Kairouan and Siliana Commissariat Régional au Développement Agricole (CRDA). These works were partly financed by the ANR AMETHYST and SICMED DYSHYME projects.

Appendix A. Supplementary materials 700