1 Introduction

A recent report from the United Nations (IPBES Global Assessment Report on Biodiversity and Ecosystem Services) has warned of the unprecedented rapid deterioration of the health of ecosystems worldwide (Díaz et al. 2019). This statement provides evidence that environmental regulations for protecting natural resources and the defense of ecosystem’s health and functioning are still far from being accomplished. Human activities are the main drivers of ecosystem damage, causing several problems in the functioning and health of ecosystem organisms, loss of ecosystem resilience, loss in biodiversity, and habitat destruction (Lu et al. 2015; Dasgupta 2021).

Freshwater ecosystems are one of the world’s most vulnerable systems (Dudgeon et al. 2006; Khamis et al. 2014). While freshwater habitats occupy less than 1% of the planet, they contain 10% of all known species, 40% of fish diversity, and 30% of all vertebrate species (Dudgeon et al. 2006; Strayer and Dudgeon 2010). A relevant example is the case of wetlands, estuaries and coastal ecosystems, suffering from impacts that affect the status of at least 50% of these environments (Zedler and Kercher 2005; Barbier et al. 2011; Díaz et al. 2019).

A major threat to aquatic ecosystems is associated with the deterioration of water bodies due to human activities that cause habitat degradation (Vörösmarty et al. 2010; Arthington 2012; Collen et al. 2014; Davis et al. 2015). Underground water systems, which support several freshwater ecosystems, are facing substantial overexploitation, which creates unprecedented pressures on these resources but also on linked aquatic ecosystems. Groundwater resources are the main reserves of liquid freshwater on Earth. These resources support the 43 percent of irrigation agriculture worldwide and are the main source of drinking water for 50 percent of the global population (UNESCO 2015). However, increasing water demands during the last decades have caused a sharp intensification in groundwater withdrawals ending up in a widespread decline in their reserves and in the quality of these resources. Aquifers depletion is considered as a global phenomenon, with estimations alerting than the 20 percent of aquifers worldwide are already overexploited, and with withdrawals substantially exceeding recharge rates in arid and semi-arid regions (Famiglietti 2014; Thomas and Famiglietti 2019).

Despite the existence of a significant range of ecosystems with varying dynamics between them, all of them require an acceptable state of water bodies. Heavily groundwater pumping has resulted in falling water tables and underground bodies contamination (e.g. salinization, chemical pollution, nutrient pollution) with associated impacts in natural streamflows, hydrological systems, and ecosystems (Konikow and Kendy 2005). Several studies have already reported how groundwater depletion is an important threat to many freshwater ecosystems. The impacts include sharp decreases in wetlands’ flooded areas and drying springs (Esteban and Albiac 2011; Cooper et al. 2015), reductions in the abundance and type of wetlands’ vegetation (Stromberg et al. 1996; Froend and Sommer 2010), land subsidence (Dinar et al. 2021), penetration of invasive species (Danielopol et al. 2003), or river flows declines (Glazer and Likens 2012) among others.

The aim of this paper is to assess an optimal management of groundwater withdrawals while preserving aquatic ecosystems that present regime shifts. Our contribution lies in the consideration of switches in the state function of an ecosystem when a critical water level (‘tipping point’) is reached. Despite linear ecosystem behavior was considered a good approximation of the performance of ecosystems (Esteban and Dinar 2016), several studies point out that nonlinear specifications including shifts, tipping points, and even hysteresis processes, better represent the behavior of ecosystems (Scheffer et al. 2001; Scheffer and Carpenter 2003). For simplicity, in this manuscript we assume that groundwater depletion presents two alternative stable states after a certain tipping point is reached (e.g., decrease in the groundwater table level). Despite the fact that hysteresis processes and several tipping points could be a more realistic assumption (Scheffer et al. 2012; Folke et al. 2004), there are some impediments for the correct empirical implementation of that hypotheses, such as the lack of knowledge on the relationship between groundwater dependent ecosystems (GDEs), the groundwater regime, and the safe limits of groundwater reserves to maintain ecosystems (Eamus and Froend 2007). Furthermore, some studies have also reported the existence of little evidence for multiple states and tipping points (Schröder et al. 2005).

Our results highlight how optimal water extractions and aquifer water level paths are significantly different when a switch in the ecosystem status functions is taken into account. In contrast with previous contributions, our results suggest that optimal water extractions present discontinuous patterns. These outcomes contribute to a better understanding of the relationship between groundwater and ecosystems, and can be helpful for the implementation of effective groundwater policies to maintain economic activities while protecting aquatic ecosystems.

The remainder of the paper is organized as follows. Section 2 presents the hydro-economic representation of an aquifer including the dynamics of linked aquatic ecosystems. The resolution of the optimal control problem is stated in Sect. 3 and Sect. 4 describes the study area. Section 5 numerically illustrates the main theoretical findings and sensitivity analyses are performed in Sect. 6. Finally, Sect. 7 sets out the conclusions.

2 The Model

Depletion and quality deterioration of groundwater bodies has prompted a general interest in the analysis of an efficient management of these resources (see the reviews by Koundouri (2004) and Koundouri et al. (2017)). However, the effective management and control of groundwater resources is still far from being achieved.

Several studies have included ecosystems as relevant elements in groundwater management (e.g., Roumasset and Wada 2013; Gutrich et al. 2016; Esteban and Dinar 2016; Pongkijvorasin et al. 2018; Pereau et al. 2019). However, to the best of our knowledge none of them have specifically included the possibility of tipping points involving regime shifts in the ecological systems. de Frutos et al. (2019) analyze the occurrence of shocks and regime shifts in a groundwater resource, however, each shock is based on a sudden change in the dynamics of the resource itself. Our motivation in this paper is to include some notions of the ecological literature that has already reported how when a ‘critical’ habitat condition (tipping point or threshold) is reached, some systems switch from one regime to another, with important losses in the ecosystem state (Scheffer et al. 2001). Small modifications in the environmental conditions may cause dramatic shifts in the ecosystem ecological state (Chaparro-Pedraza and Roos 2020).

The economic literature is quite extensive in the analysis of managing natural resources in presence of regime shifts (e.g., Folke et al. 2004; Brozovic and Schlenker 2011; de Zeeuw and Zemel 2012; Crépin et al. 2012; di Maria et al. 2012; Werners et al. 2013; Ren and Polasky 2014; de Zeeuw 2014; Tsur and Zemel 2014, 2017; Polasky et al. 2014; Lade et al. 2015), including the case of groundwater resources (Tsur and Zemel 1995, 2004; de Frutos et al. 2014 and 2019). In general, most of the studies are mathematical and suggest how optimal management patterns largely depend on the shifts in ecosystem. In this study we contribute with this literature by developing an optimal management model of an aquifer, linked with an aquatic ecosystem. This ecosystem presents a regime shift, once a water table threshold is reached, that originates a change in the structure and functioning of the ecosystem.

2.1 Hydro-economic Model

We take a typical single-cell aquifer with a flat bottom and a fixed natural recharge \((R)\) that is used for human purposes \((W_{t} )\). The depth of the aquifer is represented by the difference between the surface level \((S_{L} )\) and the aquifer water table level \((H_{t} )\). The groundwater dynamics \((\dot{H})\) is a function of the natural recharge (R) minus net water extractions for human consumption \(\left( {1 - \alpha } \right) \cdot W_{t}\), with \(\alpha\) being a proportion of water that infiltrates the aquifer as a return flow from human extractions.

$$\dot{H} = \displaystyle{\frac {R - \left( 1 - \alpha \right)\, W_{t} }{AS}}$$
(1)

where \(AS\) represents the total available water (aquifer area multiplied by the storativity coefficient).

A social planner aims to maximize the net present value of future benefits streams from using the aquifer. Social benefits consist of both the private profits from human activities (\(B\left( {W_{t} , H_{t} } \right)\)) and the economic value of the goods and services from aquatic ecosystems (\(E\left( {H_{t} } \right)\)). The functioning of aquatic ecosystems depends on the existence of an ‘acceptable’ groundwater level to guarantee their survival. So, the social planner problem model can be stated as follows:

$$\mathop {\max }\limits_{{W_{t} }} \mathop \int \limits_{0}^{\infty } e^{ - r\,t} \left[ {B\left( {W_{t} , H_{t} } \right) + E\left( {H_{t} } \right)} \right]dt$$
(2)

with \(W_{t}\) being the total groundwater extractions (control variable) and \({H}_{t}\) being the groundwater table level (state variable). The social discount rate is denoted by r. This maximization is constrained by the dynamics of the resource (Eq. (1)), an the initial condition of the water table level \(H\left( 0 \right) = H_{0}\)\(.\)

Private benefits from groundwater extractions are represented by a quadratic revenue function minus pumping costs (Koundouri et al. 2017). Traditionally, these withdrawals are related with extractions for irrigation activities that are the main groundwater user worldwide (Siebert et al. 2010).

$$B\left( {W_{t} , H_{t} } \right) = Re\left( {W_{t} } \right)-C\left( {W_{t} , H_{t} } \right) = \frac{1}{2k} \cdot W_{t}^{2}-\frac{g}{k} \cdot W_{t}-\left( {C_{0}-C_{1} \cdot H_{t} } \right) \cdot W_{t}$$
(3)

Private net revenues from groundwater extractions (\(Re\left( {W_{t} } \right)\)) are derived from a linear specification of a groundwater demand function \(W = g + k \cdot P\), where P is the groundwater price, and g and k are equation parameters (\(g > 0\) and \(k < 0\)). Total costs of extractions (\(C\left( {W_{t} ,H_{t} } \right)\)) depend on both the amount of withdrawals and the depth of the groundwater level. \(C_{0}\) and \(C_{1}\) are respectively fixed costs and marginal costs from groundwater pumping (Gisser and Sanchez 1980).

2.2 Ecosystem Health Function

As reported in the literature, ecosystems’ deterioration is non-linear and presents potential regime shifts when reaching certain habitat conditions (Scheffer et al. 2001, 2012; Beisner et al. 2003; Suding et al. 2004; Heffernan 2008; Utz et al. 2008; Crépin et al. 2012). Once a tipping point is reached, the ecosystem status switches to a different regime (Scheffer et al. 2001; Hughes et al. 2013). In this paper, we follow the representation by Scheffer and Carpenter (2003) on how the state of ecosystems changes under variations in the external conditions. Fig. 1 shows how ecosystems can respond smoothly to alternations in their habitats (a) or, by contrast, they can change abruptly when habitat conditions approach a critical level (b) with even having different stable states and several critical levels (c).

Fig. 1
figure 1

Source from Scheffer and Carpenter (2003) (copyright Elsevier reprinted with permission)

Different ecosystem’s response to habitat modifications.

The ecosystem state in this study is represented by a function (\(EC(S_{L} - H_{t}\))) that links the healthFootnote 1 of the ecosystem with the level of water into the aquifer (aquifer depletion). This function represents how decreases in the water table level \((S_{L} - H_{t} )\) affect the functioning of dependent aquatic ecosystems. When the aquifer is full \((S_{L} = H_{t} )\) the ecosystem maintains its pristine state; however, as the water table decreases, the health of the ecosystem declines (see Fig. 1b). In the case of groundwater dependent ecosystems, some studies state that aquifers depletion progressively impacts in the functioning and adaptation of ecosystems (Eamus et al. 2006). However, ‘if the stress is prolonged or extreme, these adaptations become inadequate and result in populations progressively declining, and a shift in the composition and function of ecosystems’ (Rohde et al. 2017, p. 296). In this study we assume that the deterioration of habitat conditions (groundwater depletion) cause a profound change, non-linear relationship, in the ecosystem dynamic that presents two ‘stable states’ once a unique tipping point is exceeded.

The stated ecosystem function is described in Fig. 2 and shows how when the aquifer is full the ecosystem presents is maximum health \((\sigma_{1} )\). The parameter \(\sigma_{1}\) represents the ecosystem’s best state (or health) when the aquifer has not been altered. On the other hand, the parameter \(\sigma_{2}\) is the tipping point where the ecosystem switches to a different regime or state. Following the ecology literature, regime switches take place because external forces (e.g., habitat conditions) drive ecological conditions beyond a tipping point or critical threshold. In this model, the critical threshold \((H_{C} )\) represents the water table level at which habitat conditions hamper the good status and viability of the ecosystem. Critical aquifer depletion depth \((d_{c} )\) is defined as the difference between the surface level \((S_{L} )\) and the critical water table level \((H_{c} )\).

Fig. 2
figure 2

Nonlinear ecosystem function (\(EC\left( {S_{L} - H_{t} } \right)\)). Note: dc is the ecosystem critical depletion depth once the threshold Hc is reached. A full aquifer (SL = H) corresponds with the healthiest condition of the ecosystem

Once the critical threshold is reached the ecosystem change to a different regime where their ecological status presents a notable deterioration. Following Scheffer et al. (2012), in the second state the marginal deterioration of the ecosystem is smaller because the remaining ecosystem presents a different ecological structure not as rich both in productivity and diversity as in the first state (Rohde et al. 2017).

The mathematical expression of the ecosystem health function \(\left( {EC\left( {S_{L} - H_{t} } \right)} \right)\) shown in Fig. 2 is as follows:Footnote 2

$$EC\left( {S_{L} - H_{t} } \right) = \left\{ \begin{gathered} \frac{{\left( {\sigma_{2} - \sigma_{1} } \right)}}{{d_{c}^{2} }} \cdot \left( {S_{L} - H_{t} } \right)^{2} + \sigma_{1} \quad {if}\, \left( {S_{L} - H_{t} } \right) \le d_{c} \hfill \\ \begin{array}{*{20}c} \\ {\frac{{\sigma_{2} }}{{H_{c}^{2} }} \cdot \left( {S_{L} - \left( {S_{L} - H_{t} } \right)} \right)^{2} \quad {if} \,\left( {S_{L} - H_{t} } \right) > d_{c} } \\ \end{array} \hfill \\ \end{gathered} \right.$$
(4)

where \(\sigma_{1}\) and \(\sigma_{2}\) are positive parabola parameters, \((S_{L} - H_{t} )\) represents the aquifer depletion, \(H_{C}\) is the critical threshold (critical water table level), and \(d_{c}\) is the aquifer depletion depth at the critical threshold \((S_{L} - H_{c} )\). We assume that at the critical threshold the ecosystem function has the same value both at right and left of the function. Finally, we assume that when the aquifer is totally depleted \((H_{t} = H_{bottom} )\) the ecosystem is extinguished. Even though several functional forms can characterize the representation of Fig. 1b, we state a parabola as a functional form of the ecosystem behavior to obtain mathematical solutions for the optimal control problem. In order to find theoretical solutions for the groundwater model presented in sub-Sect. 2.1, it was necessary to establish a quadratic function for the ecological functioning (Eq. (4)).

Finally, the economic value of the ecosystem depends on the amount of goods and services that the ecosystem provides. The economic value of the ecosystem is a linear function of the ecosystem state \((EC)\):

$$E\left( {H_{t} } \right) = \xi \cdot EC\left( {S_{L} - H_{t} } \right)$$
(5)

where \(\xi\) is a constant parameter relating the ecosystem state and the aggregate economic value of the ecosystem services.

3 Two-stage Optimal Control Problem

Assuming the equations formulated in Sect. 2, the social planner’s maximization becomes a ‘two-stage’ optimal control problem. When abrupt changes occur and the objective function shifts, the problem requires a resolution by phases (‘multi-stage’ dynamic optimization problems). ‘An optimal multiprocess problem is a dynamic optimization problem involving a collection of control systems coupled through constraints in the endpoint of the state trajectories…’ (Babad 1995, p. 530). We define this two-stage optimal control problem as the maximization of social welfare (SW), and we rewrite Eq. (2) as follows:

$$\begin{aligned} &{Max}\, SW\left( {W_{t} ,H_{t} , t_{c} } \right) = \hfill \\ & \mathop \int \limits_{0}^{{t_{c} }} e^{ - r\,t} \cdot \left( {B\left( {W_{t} , H_{t} } \right) + \xi \cdot \left( { \frac{{\left( {\sigma_{2} - \sigma_{1} } \right)}}{{d_{c}^{2} }} \cdot \left( {S_{L} - H_{t} } \right)^{2} + \sigma_{1} } \right)} \right)dt \hfill \\ &\quad+ \mathop \int \limits_{{t_{c} }}^{\infty } e^{ - r\,t} \cdot \left( {B\left( {W_{t} , H_{t} } \right) + {\upxi } \cdot \left( {\frac{{\sigma_{2} }}{{H_{c}^{2} }} \cdot \left( {S_{L} - \left( {S_{L} - H_{t} } \right)} \right)^{2} } \right)} \right)dt \hfill \\ & s.t. \quad \quad \mathop {H_{t} }\limits = \frac{{R + \left( {\alpha - 1} \right)W_{t} }}{AS} \hfill \\ &\quad\qquad { }H\left( t \right) \ge 0\, \hfill \\ & \quad\qquad H\left( 0 \right) = H_{0} \,\text{ and } \, H\left( {t_{c} } \right) = H_{c } \hfill \\ & \hfill \\ \end{aligned}$$
(6)

with \(t_{c}\) being the time at which the critical threshold is reached. The time \({t}_{c}\) is also one of the variables to be determined.

The ‘two-stage’ optimal control problem, corresponding with the two ecosystem’s regimes, is solved by imposing a sequence of two phases with two Pontryagin problems (Tomiyama 1985; Tomiyama and Rossana 1989; Makris 2001; Boucekkine et al. 2004; Aisa et al. 2007). The ‘two-stage’ method proceeds by solving the two sub-problems backwards, with then the second optimal control sub-problem (\(SP_{2}\)) resolved first:

$$\begin{aligned} & {Max}\, SP_{2} \left( {W_{2} ,H_{2} , t_{c} } \right) = \int \limits_{{t_{c} }}^{\infty } e^{-r\,t} \cdot \left( {B\left( {W_{2} , H_{2} } \right) + {\upxi } \cdot {\frac{{\sigma_{2} }}{{H_{c}^{2} }} \cdot \left( {H_{t} } \right)^{2} } } \right)dt \hfill \\ & s.t. \quad \dot{H}_{2} = \frac{{R + \left( {\alpha - 1} \right) \cdot W_{2} }}{AS} \hfill \\ & \quad \quad \quad H_{2} \left( {t_{c} } \right) = H_{c} \,\,\text{ given } \hfill \\ & \quad \quad \quad t_{c}\,\, \text{ free } \hfill \\ \end{aligned}$$
(7)

with \(W_{2}\) and \(H_{2}\) being the solutions of water extractions and water table level under the Pontryagin problem corresponding to sub-problem 2 (\(SP_{2}\)).Footnote 3

The associated Hamiltonian is:

$$\begin{aligned} {\mathcal{H}}_{2} \left( {t, W_{2} ,H_{2} ,\lambda_{2} } \right) & = - e^{ - r\,t} \left( {B\left( {W_{2} , H_{2} } \right) + {\upxi } \cdot \left( {\frac{{\sigma_{2} }}{{H_{c}^{2} }} \cdot \left( {S_{L} - \left( {S_{L} - H_{t} } \right)} \right)^{2} } \right)} \right) \\ & + \lambda_{2} \cdot \frac{{R + \left( {\alpha - 1} \right) \cdot W_{2} }}{AS} \\ \end{aligned}$$
(8)

where \(\lambda_{2}\) is the costate variable of sub-problem 2. By solving the first order conditions we obtain the optimal results of this problem (\(SP_{2}^{*} \left( {W_{2}^{*} ,H_{2}^{*} ,t_{C} } \right)\)), and the optimal values of the state and control variables (\(W_{2}^{*}\) and \(H_{2}^{*}\))Footnote 4:

$$W_{SP2}^{*} \left( t \right) = \overline{B} \cdot e^{{t \cdot x_{2} }} - \frac{M}{m}$$
(9)
$$H_{SP2}^{*} \left( t \right) = \frac{{m \cdot \overline{B}}}{{x_{2} }} \cdot e^{{t \cdot x_{2} }} + \frac{{N - r \cdot \frac{M}{m}}}{n}$$
(10)

with \(m = \frac{{\left( {\alpha - 1} \right)}}{AS}\), \(M = \frac{R}{AS}\), \(n = r \cdot C_{1} \cdot k - 2 \cdot {\upxi } \cdot \frac{{\sigma_{2} }}{{ {H_{c} }^{2} }} \cdot m \cdot k\), and \(N = - \left( {r \cdot g + C_{0} \cdot k \cdot r - k \cdot C_{1} \cdot M} \right)\). Additionally, \(x_{2} = \frac{r-\sqrt{r^2-4\,n\, m}}{2}\) is the negative root of the polynomial equation from the system of two differential equations (see Appendix 1, Eq. (29)). Finally, by imposing the initial conditions in \(t_{c}\) the coefficient \(\overline{B}\) is obtained:Footnote 5

$$\overline{B} = \frac{{x_{2} }}{m} \, e^{{ - t_{c} \cdot x_{2} }} \, \left( {H_{c} - \frac{{N - r \, \frac{M}{m}}}{n}} \right)$$
(11)

Having obtained the optimal value of sub-problem 2 (\(SP_{2}\)), the second phase requires optimizing the Pontryagin problem while corresponding to the first sub-problem (\(SP_{1}\)):

$$\begin{aligned} & Max\, SP_{1} \left( {W_{1} ,H_{1} , t_{c} } \right) \hfill \\ & = \mathop \int \limits_{0}^{{t_{c} }} e^{ - rt} \cdot \left( {P\left( {W_{2} , H_{2} } \right) + {\upxi } \cdot \left( { \frac{{\left( {\sigma_{2} - \sigma_{1} } \right)}}{{d_{c}^{2} }} \cdot \left( {S_{L} - H_{1} } \right)^{2} + \sigma_{1} } \right)} \right)dt \hfill \\&\quad + SP_{2}^{*} \left( {W_{2}^{*} \left( {t_{c} } \right),H_{2}^{*} \left( {t_{c} } \right),t_{c} } \right) \hfill \\ & s.t. \quad \dot{H}_{1} = \frac{{ {R + \left( {\alpha - 1} \right) \cdot W_{1} } }}{AS} \hfill \\ & \quad \quad H_{1} \left( 0 \right) = H_{0} \,\,\text{ given } \hfill \\ & \quad \quad H_{1} \left( {t_{c} } \right) = H_{2} \left( {t_{c} } \right) = H_{c} \hfill \\ & \quad \quad t_{c} \,\, free \hfill \\ \end{aligned}$$
(12)

where \(W_{1}\) and \(H_{1}\) are the solutions under the sub-problem 1 (\(SP_{1}\)).

The Hamiltonian associated with the Pontryagin problem corresponding to sub-problem 1 is:

$$\begin{aligned} {\mathcal{H}}_{1} \left( {t, W_{1} , H_{1} ,\lambda_{1} } \right) & = - e^{ - r\,t} \left( {B\left( {W_{1} , H_{1} } \right) + {\upxi } \cdot \left( { \frac{{\left( {\sigma_{2} - \sigma_{1} } \right)\left( {S_{L} - H_{1} } \right)^{2} }}{{d_{c}^{2} }} + \sigma_{1} } \right)} \right) \\ & + \lambda_{1} \cdot \frac{{\left( {R + \left( {\alpha - 1} \right) \cdot W_{1} } \right)}}{AS} \\ \end{aligned}$$
(13)

with \(\lambda_{1}\) being the costate variable of sub-problem 1.

By solving the first order conditions, and imposing both the continuity condition \(\left( \ {\lambda_{1}^{*} \left( {W_{1}^{*} \left( {t_{c} } \right),H_{1}^{*} \left( {t_{c} } \right),t_{c}^{*} } \right) = \lambda_{2}^{*} \left( {W_{2}^{*} \left( {t_{c} } \right),H_{2}^{*} \left( {t_{c} } \right),t_{c}^{*} } \right)} \ \right)\) and the matching condition \(\left({\mathcal{H}}_{1}^{*} \left( {t_{c} } \right) = \displaystyle{\frac{{\partial SP_{2}^{*} \left( {W_{2}^{*} \left( {t_{c} } \right), H_{2}^{*} \left( {t_{c} } \right),t_{c} } \right)}}{{\partial t_{c} }}}\right)\), we obtain the optimal paths for groundwater withdrawals \((W_{1}^{*} )\) and the water table \((H_{1}^{*} )\) under sub-problem 1. Additionally, we also obtain the optimal time \((t_{c}^{*} )\) for reaching \(H_{c}\).Footnote 6

$$W_{1}^{*} \left( t \right) = \overline{CA} \cdot e^{{ty_{1} }} + \overline{CB} \cdot e^{{ty_{2} }} - \frac{M}{m}$$
(14)
$$H_{1}^{*} \left( t \right) = \frac{{m \cdot \overline{CA} }}{{y_{1} }} \cdot e^{{ty_{1} }} + \frac{{m \cdot \overline{CB} }}{{y_{2} }} \cdot e^{{ty_{2} }} + \frac{{NN - r\frac{M}{m}}}{nn}$$
(15)

The parameters \(\overline{CA}\) and \(\overline{CB}\) are constants to be determined with the initial conditions, \(H_{1} \left( 0 \right) = H_{0}\) and \(H_{1} \left( {t_{c} } \right) = H_{c}\). Additionally, \(nn = C_{1} \cdot k \cdot r - 2 \cdot \xi \cdot k \cdot m \cdot \frac{{\left( {\sigma_{2} - \sigma_{1} } \right)}}{{d_{c}^{2} }}\), and \(NN = - r \cdot g - C_{0} \cdot k \cdot r + k \cdot C_{1} \cdot M - 2 \cdot \xi \cdot k \cdot m \cdot \frac{{\left( {\sigma_{2} - \sigma_{1} } \right)}}{{d_{c}^{2} }} \cdot S_{L}\). Finally, \(y_{1}\) and \(y_{2}\) are the roots of the polynomial equation established to solve sub-problem 1.Footnote 7 The value of the constants \(\overline{CA}\) and \(\overline{CB}\) can be expressed as:

$$\overline{CA} = \frac{{y_{1} }}{m} \cdot \left( {H_{0} - \left( {\frac{{NN - r \cdot \frac{M }{{ m }}}}{nn}} \right) - \frac{{H_{c} - H_{0} \cdot e^{{t_{c} \cdot y_{1} }} + \left( {\frac{{NN - r \cdot \frac{M }{{ m }}}}{nn}} \right)e^{{t_{c} \cdot y_{1} }} }}{{e^{{t_{c} \cdot y_{2} }} - e^{{t_{c} \cdot y_{1} }} }}} \right)$$
(16)
$$\overline{CB} = \frac{{y_{2} }}{m} \cdot \left( { \frac{{H_{c} - H_{0} \cdot e^{{t_{c} \cdot y_{1} }} + \left( {\frac{{NN - r \cdot \frac{M }{{ m }}}}{nn}} \right)e^{{t_{c} \cdot y_{1} }} }}{{e^{{t_{c} \cdot y_{2} }} - e^{{t_{c} \cdot y_{1} }} }}} \right)$$
(17)

The optimal paths for the water extraction \((W^{*} )\) and the water table level \((H^{*} )\) depend on the solutions of the two sub-problems (\(SP_{1}\) and \(SP_{2}\)) included in Eqs. (7) and (12). Consistent with previous analysis (Ren and Polasky 2014; Crépin et al. 2012), our outcomes suggest that the inclusion of ecosystem regime shifts will condition groundwater management strategies when the objective is both, to maintain human activity and to preserve aquatic ecosystems. The theoretical outcomes show that both optimal variables (extractions and groundwater level) are conditioned by the ecosystem function parameters \(\sigma_{1}\) and \(\sigma_{2}\) (Eq. (4) and Fig. 2). Furthermore, the tipping point or critical threshold \((H_{c} )\) is also a relevant element in the optimal equations.

The theoretical outcomes clearly indicate the relevance of the ecosystem dynamics (shifts and tipping point) in groundwater management. However, the complexity of the theoretical results, with several interactions between the model parameters, makes it difficult to assess the size and impact of these elements on the optimal outcomes. To illustrate the influence of these parameters on the results, we have performed a numerical analysis applied to the Eastern la Mancha aquifer (Spain).

4 Study Area

The Eastern La Mancha aquifer is located in Southeastern Spain within the upper Jucar river basin. This aquifer is the largest groundwater reservoir in the Iberian Peninsula with an extension of 7300 km2. The interest in the aquifer stems from the fact that it is a unique case of a large aquifer in arid and semiarid regions being managed towards sustainability, due to the success of the collective action engaged by stakeholders (Esteban and Albiac 2011). This is the reason for this aquifer being an international benchmark that could be used like an example for the analysis.

The expansion of irrigation in the Eastern La Mancha aquifer between the 1970s and 1990s caused a substantial decline in the aquifer’s water table which led to a reduction in the streamflows to the Jucar basin, and produced important ecosystem damages. The aquifer water table has dropped about 80 m resulting in large storage depletion, fluctuating around 2500 Mm3. The aquifer is linked to the Jucar River stream, and it used to feed the Jucar River with about 150 Mm3/year in the 1980s but the feeding has fallen below 40 Mm3/year at present (Pérez-Martín et al. 2014). The consequence is that the lower Jucar is undergoing severe problems of low flows, water-quality degradation, and damages to the Albufera wetland, which is the most important aquatic ecosystem in the basin.

The Albufera wetland is a freshwater lagoon with an area covering 2430 ha and supporting very rich aquatic ecosystems. It was declared National Park in 1986, included among the international important wetlands by the Ramsar convention in 1990, and recognized as special area for bird protection (ZEPA) since 1991 (Soria 2006). The Albufera is located in the lower Jucar basin beside the Mediterranean Sea, and it is mainly fed by irrigation return flows from the Jucar River (Kahil et al. 2016). ‘The case of the Albufera illustrates the complexity of water management in some Mediterranean wetlands where the connection between irrigation systems and palustrine ecosystems creates an amalgam of contrasted visions, goals, functions and values, generating enormous difficulties to define shared strategies for sustainability’ (Jégou and Sanchis-Ibor 2019, p. 504). The reduction in the contribution of the inflows of the Eastern la Mancha aquifer into the Jucar River are dwindling the environmental flows in many parts of the basin, and especially in the lower Jucar River resulting in severe environmental damages to the Albufera ecosystems.

The institutional developments in the Eastern La Mancha aquifer leading to collective action started when farmers became aware of the problems from aquifer depletion and responded by creating a water-user association aimed to jointly manage the aquifer. This response was driven by the call for control of extractions by the basin authority with the strong support of downstream farmers, the threats by the basin authority of not issuing water rights to pumping farmers, and the increase of pumping costs because of the falling water table. These facts have resulted in a progressive reduction in extractions of 100 Mm3 after 2000, down to the recharge level (Table 1).

Table 1 Extractions in Eastern La Mancha since 2000

In Table 2, we show the economic and hydrologic parameters of the Eastern la Mancha aquifer used for the numerical simulation (Esteban and Albiac 2011 and 2012). Parameter values for both the groundwater demand and supply functions have been estimated from Esteban (2010). We have actualized these values with recent information regarding current average prices of irrigation in the region, the electricity costs \((C_{1} )\) and the fixed costs of operation and maintenance of the wells \((C_{0} )\). Hydrological parameters are provided by Esteban and Albiac (2011).

Table 2 Parameter values for the Eastern la Mancha aquifer

For the ecosystem function and due to the lack of knowledge on specific groundwater ecosystem dynamics in the study area, we have approximated the parameters of this function (\(\sigma_{1}\) and \(\sigma_{2}\)). We assume that when the aquifer is full the ecosystem’s heath is the best \((\sigma_{1} = 1)\) and then, the economic value of this ecosystem is the highest. Furthermore, because the lack of knowledge on specific values for possible tipping points in ecosystems, we assume that the ecosystem’ shift occurs when the health of the ecosystem has fallen by half \((\sigma_{2} = 0.5)\). To support our results, we have conducted a sensitivity analysis to evaluate the influence of these parameters on the optimal outcomes. Regarding the critical threshold \((H_{c} )\), we consider that it takes place after a groundwater depth of 40 m, which means to assume an additional depletion of 10 m compared with current situation \((H_{0} )\). Detailed information on the relationship between ecosystems health and water regimes, as groundwater depth, is still lacking and existing estimations are very different between regions, climatic variables, hydrology, geology, soil, and vegetation (Eamus et al. 2006; Huang et al. 2019). However, some studies report that groundwater depletion threatens vegetation species because plants in the riparian zone that grew because of close proximity of the water table may not survive as depth to water increases (e.g., Stromberg et al. 1996; Froend and Sommer 2010). Some estimation suggests 20 m of groundwater depth as a critical threshold for the survival of selected vegetation species (Chávez et al. 2016). The economic valuation of the ecosystems’ goods and services is based on studies reporting general values of wetland ecosystems worldwide (Quintas-Soriano et al 2016; de Groot et al 2012; Costanza et al 2014).

5 Empirical Application: Results

Figure 3 illustrates the optimal trends of water pumping and the water table in the Eastern La Mancha when comparing two scenarios: (1) baseline scenario where ecosystems are ignored, and (2) scenario where ecosystem dynamics are taken into account (ecosystem scenario).

Fig. 3
figure 3

Optimal paths of groundwater withdrawals and water table levels. Note: Solid line (blue) represents the case where ecosystems are ignored (baseline scenario). Broken line (red) represents the case where the ecosystem is accounted for and a shift in its status is established (ecosystem scenario). (Color figure online)

The outcomes in Fig. 3 show the existence of differences under both scenarios, by considering and not considering the ecosystem dynamics, especially by the optimal pumping rates. Under the scenario where no ecosystems dynamics are considered (dotted line), groundwater withdrawals decrease until reaching the steady state. Optimal paths of groundwater withdrawals show the ‘trade-off’ between maintaining private benefits from groundwater pumping together with the preservation of the resource (extraction costs externality). The results indicate how extractions are socially unsustainable and the optimal paths show the need for a smooth decrease until reaching the steady state and where withdrawals equals recharge rates.

By contrast, when ecosystem dynamics are taken into account in the model, results show an important decrease in the initial level of extractions. Optimal withdrawals should be more than 20 Mm3 lower compared with the baseline scenario (370 Mm3). Furthermore, optimal paths of extractions show a declining trajectory for the first 60 years; and from then on, optimal extractions sharply increase until the ecosystem threshold (tipping point) is reached. Once the critical water table level is exceeded, optimal withdrawals are slightly higher up, compare with the baseline scenario, to approach the steady state.

Lower groundwater withdrawals, when environmental objectives are included in the model, is an expected result already reported in the literature (Pereau et al. 2019; Esteban and Dinar 2016). However, our results show a decreasing pattern followed by a sharp increase in extractions. The explanation of this unexpected pattern is related with the low contribution of the ecosystem to the social welfare. In this paper, we have approximated the groundwater-related ecosystems as some native vegetation that is directly linked with the depth of the aquifer water table. We assumed a conservative valuation of the ecosystem and a moderate economic impact of the ecosystem in the social welfare. So, after a ‘short’ period of time, private benefits from groundwater pumping largely exceed the benefits from the ecosystem and the model sacrifices ecosystems to benefit private extractions. With the selected ecosystem valuation and discount rate the preservation of the ecosystem is essential during almost 60 years. From then on, private profits from groundwater extractions are preferred and the ecosystem is pushed to their deterioration (second ‘stable state’). An example of this, a priori surprising result, is the fact that the model described have been constructed using economic values of the ecosystem that are not “extreme”. We have allowed the model to always reach the tipping point and causing a significant deterioration in ecosystems. However, when imposing large values of some relevant parameters, namely \(H_{c}\) or the economic value of the ecosystem \((\xi )\), the results show that the system would never reach the second sub-problem (SP2). An example of this result is represented in Fig. 4. This figure shows how large valuable ecosystems require an optimal water table level of 677 masl. This scenario is attained when assuming and economic values of the ecosystem goods and services of 40 million €. In this case, the optimization problem never reaches the second sub-problem (\(SP_{2}\)) or the critical threshold. This outcome suggests that valuable ecosystems that provide several commodities to society need to be protected in order to preserve their ecological status. Under this scenario, government interventions are required with policies able to reduce groundwater withdrawals in order to avoid ecosystems deterioration.

Fig. 4
figure 4

Optimal water table under a valuable ecosystem

6 Sensitivity Analyses and Model Extension

To corroborate and assess the impacts of different parameter values, we performed several sensitivity analyses with the coefficients related to the ecosystem function. The first sensitivity analysis conducted uses higher and lower values of the selected tipping point \((\sigma_{2} )\). We have also simulated the impacts of imposing different levels of the critical threshold \((H_{c} )\). Aggregate outcomes of the main results of the sensitivity analyses are presented in Table 3. The results in Table 3 illustrate how the consideration of ecosystems dynamics will change the aquifer depletion levels and also social welfare.

Table 3 Main results from the scenarios analyzed

Finally, we have included an additional simulation that incorporates the impact on the optimal variables when assuming that the shift in the ecosystem impacts on the aquifer’s recharge rate. This scenario supposes an extension of the model and highlights the role of connecting the ecosystem with the hydrological behavior of the aquifer.

6.1 Sensitivity analysis of the tipping point \((\sigma_{2} )\)

Figure 5 presents the scenario when higher and lower values of the tipping point \((\sigma_{2} )\) are stated. The tipping point is related with the ecosystem’ resilience to habitat modifications due to represents the point at which the ecosystem health is being significantly altered. As expected, optimal patterns for groundwater extractions follow similar trends than those presented in Fig. 3. However, significant differences arise in both the time of reaching the critical threshold and the total volume of extractions (Table 3).

Fig. 5
figure 5

Optimal paths of groundwater withdrawals and water table levels under different values of the tipping point (\(\sigma_{2}\)). Note: Solid line (red) shows the initial scenario with ecosystems. Dotted line (blue) represents the sensitivity analysis with a lower tipping point (\(\sigma_{2} = 0.4)\) and broken line (green) represents the sensitivity analysis with a higher tipping point \(\left( {\sigma_{2} = 0.6} \right)\). (Color figure online)

Results from Fig. 5 shows that when imposing a higher tipping point (\(\sigma_{2} = \frac{3}{5} = 0.6\)), the critical threshold is reached earlier in time \((t_{c}^{*} = 93)\). Furthermore, groundwater withdrawals are higher before reaching the critical threshold, but once exceeded are lower compared to the other scenarios. Finally, even though the peaks in extractions are similar in the three scenarios, when imposing a higher tipping point the peak is slightly lower. By contrast, with a lower tipping point \((\sigma_{2} = \frac{2}{5} = 0.4)\) the critical threshold is reached after 258 years and the aquifer depletion is lower compared with the other two scenarios (Table 3). Under this scenario we also observed the highest peak in withdrawals, although the difference is small.

These outcomes indicate that the resilience of an ecosystem, which is related with the greater ability to maintain their properties and processes, conditions the optimal trajectories for both optimal variables. Optimal trajectories indicate how highly resilient ecosystems (lower tipping point \((\sigma_{2} = 0.4)\)), should be protected for a prolonged period of time. It should be noted that this result is calculated by assuming the same economic value for high and low resilient ecosystems. The optimal model prioritizes an ecosystem that is able to contribute to the social welfare for a longer period of time.

6.2 Sensitivity analysis with the critical threshold \((H_{c} )\)

Figure 6 illustrates the optimal paths for both groundwater withdrawals and water level under different critical thresholds. In this case, we have selected upper \((H_{c} = 655)\) and lower \((H_{c} = 645)\) critical thresholds.Footnote 8 The results show that while optimal patterns follow similar trends, there are notable dissimilarities between aggregate water extractions and the time reaching the critical threshold \({t}_{c}^{*}\). A relevant outcome from this scenario is the significant difference in the groundwater withdrawals peaks depending on the tipping point. The upper the critical threshold, the greater the peak in extractions once this level is reached.

Fig. 6
figure 6

Optimal paths of groundwater withdrawals and water table levels under different critical thresholds (\(H_{c}\)). Note: Solid line (red) shows the initial scenario with ecosystems. Dotted line (blue) represents the sensitivity analysis with a higher critical threshold (\(H_{c} = 655)\) and broken line (green) represents the sensitivity analysis with a lower critical threshold \(\left( {H_{c} = 645} \right)\). (Color figure online)

A lower critical threshold means that the ecosystem displays a higher resilience to habitat alterations. The results of a sensitivity analysis imposing a lower critical threshold \((H_{c} = 645)\) show how the decrease in groundwater extractions holds for a prolonged period of time. As expected, the optimal time at which the critical threshold is reached \((t_{c}^{*} )\) occurs later. Finally, a relevant result is the fact that the peak in groundwater withdrawals, once the threshold is reached, is less severe compared with the other scenarios. By contrast, when imposing a higher critical threshold \((H_{c} = 655)\), meaning that the ecosystem displays a lower resilience to habitat alterations, groundwater withdrawals decrease at a higher rate. Once the threshold is reached, at an earlier stage compared with the other scenarios, the peak in groundwater pumping is more significant. These results corroborate those obtained in the previous analysis and give weight to the argument that the optimal strategy is to protect higher resilient ecosystems with a greater capacity of providing goods and services to society. As noted above, these results depend on assuming the same economic value (similar provision of good and services) of low and high resilient ecosystems.

6.3 Model Extension: Change in the Recharge Rate

A final scenario simulates the case of assuming that the change in the ecosystem’ function will affect the recharge capacity of the aquifer. Under this scenario, the groundwater dynamics stated in Eq. (1) becomes:

$$\left\{ \begin{gathered} \dot{H} = \frac{1}{AS} \cdot \left[ {R_{1} - \left( {1 - \propto } \right) \cdot W_{t} } \right]\quad \quad S_{L} - H_{t} \le d_{c} \hfill \\ \dot{H} = \frac{1}{AS} \cdot \left[ {R_{2} - \left( {1 - \propto } \right) \cdot W_{t} } \right]\quad \quad S_{L} - H_{t} > d_{c} \hfill \\ \end{gathered} \right.\quad$$
(18)

where \(R_{1}\) represents the recharge rate in the pristine situation (Table 2) and \(R_{2}\) is the recharge rate once the critical threshold is exceeded. ‘Vegetation is responsible for a large portion of the variation in recharge…’ (Kim and Jackson 2011, pp. 9). Some studies suggest that the recharge rate increases when vegetation disappears due to lower evapotranspiration (Li et al 2018). So, to test this hypothesis we establish a higher recharge in the second steady state of the ecosystems. We simulate an increase of 2% and a 5%.Footnote 9

The new formulation of the groundwater hydrology modifies the theoretical results calculated in section 3. However, the modifications are minimal since the recharge is constant in the model and its modification does not alter the optimality conditions of the two-state optimal control problem. The effects on the model resolution when including Eq. 18 are presented in Appendix 2.

Figure 7 shows the optimal trajectory of the water table and groundwater withdrawals when the shift in the ecosystem health function impacts in the recharge level of the aquifer. Under a higher recharge rate in the second state, based on the assumption that plant’s populations are reduced and thereby the evapotranspiration will be lower, the critical threshold is reached later in time compare to the baseline. The results from this simulation demonstrate that changes in the recharge rate modify the time at which the tipping point is approached but also the total aquifer depletion. The inclusion of this effect intensifies the impacts of including the dynamic aspects in groundwater management. It is important to note that for simplicity in the model (Sect. 2) we assume that groundwater withdrawals for ecosystems (environmental flows) are marginal. A potential sophistication of the model could be the inclusion of ecological withdrawals as stated by Pereau et al. (2019).

Fig. 7
figure 7

Optimal paths of groundwater withdrawals and water table levels when the shifts in the ecosystem health alter recharge rates. Note: Solid line shows the baseline scenario. Dotted line represents the simulation with a 2% increase in the recharge rate and broken line represents the simulation with a 5% increase in the recharge rate

7 Conclusions and Discussion

Nature across most of the globe has now been significantly altered by multiple human drivers, with the great majority of indicators of ecosystems and biodiversity showing rapid decline’ (Díaz et al. 2019, p. 4). Large decays in ecosystems during the last few decades, especially freshwater habitats, have increased awareness of the need to protect these systems. One of the main factors affecting freshwater ecosystems is groundwater depletion. The pressures placed on these hydrological systems with which ecosystems interact, together with the important alterations in ecosystem habitats and the growing exploitation of some ecosystem commodities, is threatening the ecological status of many ecosystems. Despite the fact that the study of groundwater resources has been fully addressed in the literature, the relevance of ecosystems and how they affect groundwater management is still pending.

In this paper, we present a groundwater model where aquatic ecosystems, which depend on the status of groundwater resources, are incorporated in the problem. Our contribution lies in the consideration of ecosystems’ dynamics, meaning that there is a shift in the state function of the ecosystems once a critical groundwater level is reached. Traditionally, simple and smooth ecosystem behavior was considered as a good approximation of the performance of ecosystems to habitat changes (Esteban and Dinar 2016). However, several studies suggest that nonlinear specifications with shifts are better approximation to the behavior of ecosystems (Scheffer et al. 2001; Crépin et al. 2012).

Results from our theoretical model and the numerical illustration suggest that current groundwater management strategies are not optimal due to the fact that they do not incorporate ecosystem dynamics. The outcomes from our analysis highlight that optimal groundwater management is affected by ecosystem dynamics and the emergence of critical habitat thresholds or tipping points. As expected, when ecosystems are taken into account, aggregate optimal extractions must be lower and the optimal water table level must be higher compared to a situation without ecosystems. However, when including a shift in the ecosystem state function, optimal water extractions follow a non-continuous trend. Before reaching the critical threshold, extractions are lower compared with the scenario where ecosystems are not included. In order to maintain the ecosystem’s habitat and a ‘valuable’ ecosystem, extractions need to be controlled. However, as the health of the ecosystem slowly deteriorates, and the water table reaches the critical threshold, water extractions suddenly increase to higher levels, even exceeding the levels under the scenario where ecosystems were not accounted for. Additionally, very valuable or low-resilient ecosystems could lead to the outcome of never reaching the critical threshold. To avoid the critical level, a policy to control groundwater extractions is needed in order to prevent large aquifer depletion levels that destroy linked-ecosystems. A relevant result in terms of policy is the fact that high resilient ecosystems should have a greater protection due to their larger capacity to provide goods and services to society. It is important to note that, this finding is obtained even though the model assumes that the economic value of ecosystems is the same for high and low resilient ecosystems.

The policy outcomes indicate that managers should carefully plan groundwater strategies to maintain human needs while protecting ecosystems. In order to achieve an efficient allocation of groundwater resources, there is a need for better knowledge on the GDEs and their functions and relationships with groundwater resources. Additionally, ecosystems will also affect some hydrological variables, such as aquifer recharge. The main political implication of our results is that policy regulations are mandatory if a social planner internalizes the protection of aquatic ecosystems. This is indeed an obvious outcome that has already been stated in the literature (Esteban and Albiac 2011; Roumasset and Wada 2013; Gutrich et al. 2016; Esteban and Dinar 2016; Pongkijvorasin et al. 2018; Pereau et al. 2019). However, our findings involve new implications based on the inclusion of ecosystem dynamics in groundwater management. Variables such as the critical threshold or the resilience of the ecosystem are relevant variables to take into account in groundwater management.

The empirical application deals with the Eastern La Mancha Aquifer, which is a unique case of a large aquifer in arid and semiarid regions being managed towards sustainability. This is a compelling reason for using this aquifer as an international benchmark, setting an example of successful collective action. The results obtained in the Eastern La Mancha Aquifer can be useful for policymakers when implementing regulations to control groundwater withdrawals. First of all, water policies require an accurate knowledge of the ecosystems linked with the water bodies and the dynamics of these systems. Second, better information on the interactions between groundwater bodies and ecosystem processes is needed. Third, managers need to know how different disturbances affect ecosystems, and also the resilience of the ecosystems to face these disruptions. And finally, the main challenge for institutions dealing with the environment and policymakers worldwide is to determine which is the ‘acceptable’ state of water bodies and how to entice the collective action of stakeholders.