Coping with increasing tides Evolving agglomeration dynamics and technological change under exacerbating hazards

frequency and severity to study the complex interplay of hazards with agglomeration patterns affecting the performance of the overall economy. We find that when shocks are mild or infrequent, they negatively affect the economic performance of the economy. If strong flood hazards hit frequently the Coastal region before agglomeration forces trigger high levels of the waterfront urbanization, firms and households can timely adapt and migrate landwards, thus averting the adverse impacts of climate shocks on the whole economy. Conversely, in the presence of climate tipping points where the frequency and magnitude of flood hazards abruptly intensifies, we find that economic activities remain trapped in the hazard-prone region, generating lock-ins and leading to a harsh downturn of the overall economy.


Introduction
Rapid urbanization and climate change exacerbate risks worldwide (IPCC, 2022), particularly impacting coastal areas (Vousdoukas et al., 2020).With the climate conditions that humanity has enjoyed for centuries, coastal and delta regions historically grew faster than inland areas, with all current megacities flourishing along the coast.The richness of natural amenities and resources coupled with transportation advantages facilitated agglomeration forces that have enabled this boom (Fujita and Mori, 1996).Yet, the escalation of climate-induced hazards fundamentally reshapes the trade-offs which firms and households consider while choosing a location (Coronese et al., 2019).Increasingly, managed retreat becomes plausible for all types of coasts even under low and medium sea level rise scenarios (Carey, 2020), raising a hot debate on how to make this a positive transformation (Haasnoot et al., 2021).This is particularly relevant for areas hit by recurrent hazards, which leave little time for recovery and could lead to economic gentrification and poverty traps (de Koning and Filatova, 2019;Hallegatte et al., 2007;Hallegatte and Dumas, 2009).Notably, displacement after a major flood is a common phenomena (Levine et al., 2007).Hurricane Katrina provided a clear example of interdependencies between households and firms location choices in response to a disaster.In New Orleans, as people out-migrated looking for better employment opportunities (Deryugina et al., 2018), economic sectors relying on local consumption struggled the most, especially in the long-run (Dolfman et al., 2007).In addition, empirical evidence suggests that firms' reopening decisions depend on the return of both their competitors and customers (LeSage et al., 2011).
Understanding the location and agglomeration of productive activities has been at the core of spatial economics for almost two centuries (von Thünen, 1826).The "New Economic Geography" (Krugman, 1998) literature has proposed a coherent analytical framework grounded in general equilibrium analysis of the spatial distribution of economic activities.It links international trade and geographic location of firms and consumers, and relies on increasing returns to explain emergent spatial structures (Krugman, 1992).This literature defines agglomeration economies as a self-reinforcing process that attracts and clusters economic activities and population in specific locations.The agglomeration economies unfold as an interplay between centripetal and centrifugal forces that pull towards a geographical concentration or push towards a dispersion of economic activities respectively.The new economic geography models traditionally assume a unique equilibrium and rational representative agents with perfect information.Yet, heterogeneity of technologies, resources and preferences, as well as the fundamental uncertainty necessitating dynamic expectations and adaptive behavior (Arthur, 2021), challenge these assumptions.Furthermore, analytical tractability confined new economic geography to a largely theoretical equilibrium analysis, with little empirical contributions and receiving critics from both within and outside the field (Gaspar, 2018).
Agent-Based Models (ABMs) have risen as a method to accommodate heterogeneity, learning, interactions and out-of-equilibrium dynamics (Bonabeau, 2002;Tesfatsion and Judd, 2006).In both environmental and climate change economics (Balint et al., 2017;Ciarli and Savona, 2019;Lamperti et al., 2019;Mercure et al., 2016) and economic geography (Fowler, 2007;Spencer, 2012).ABMs are versatile in modeling disaster scenarios (Coronese and Luzzati, 2022;Lamperti et al., 2018;Waldrop, 2018), and flooding in particular (Taberna et al., 2020).Notably, taking into account interactions among heterogeneous agentstraditionally omitted by new economic geography (Ottaviano, 2011) -ABMs demonstrate how -in line with the evolutionary economic geography tradition (Boschma and Frenken, 2006;Frenken and Boschma, 2007;Martin and Sunley, 2006) -stochastic knowledge exchanges in the form of innovation create new market opportunities and trigger the agglomeration process endogenously, even from spatially-even initial conditions.Hence, ABMs are particularly useful to capture evolutionary inter-temporal and path-dependency phenomena such as the mutual relocation of households and firms and feedbacks between climate and the economy.
To address this crucial gap, we designed the Climate-economy Regional Agent-Based (CRAB) model to study the spatial distribution of economic agents, -firms and households -facing of the costliest climateinduced hazard: flooding.We chose flooding as the costliest, most widespread climate-induced hazard and the first to hit urbanized regions worldwide today.However, the CRAB model primary mechanism could be linked to other climate shocks similarly disrupting the economy, such as droughts and wildfires.Following previous work on evolutionary macroeconomic ABMs (Dosi et al., 2010(Dosi et al., , 2013(Dosi et al., , 2017(Dosi et al., , 2018;;Lamperti et al., 2018), our model uses R&D investment and a "Schumpeterian" creative (innovative) destruction process as the engine of endogenous economic growth. 1 Our goal is to explore how the complex trade-offs between endogenous agglomeration economies and a changing severity of location-specific climate-induced hazards affect the economic performance and attractiveness of Coastal and Inland regions and steer their development.In particular, we address three research questions: (1) How do agglomeration forces shape economic centers in coastal regions?(2) What are the effects of climate shocks of various severity and probability on this agglomeration dynamics?(3) How does the complex interplay between agglomeration economies, technological change and flood hazards affect the economic performance of the regions?.
The novel contribution of this article is threefold.First, we add to the economic geography literature by introducing a out-of-equilibrium framework that employs innovation diffusing among heterogeneous boundedly-rational agents as the cause of agglomeration, ultimately leading to the uneven spatial distribution of economic activities across regions.Second, we go beyond the evolutionary macroeconomic ABMs tradition by introducing two regions and endogenous inter-region migration decisions for both firms and household.Lastly, the model accounts for climate shocks of varying probabilities and severity, revealing possible tipping points in the coupled climate-economy dynamics that might compromise regional development.Regarding the latter contribution, although our paper provides an illustrative stress test on how a regional economic system reacts to drastically changing hazards, it highlights the importance of anticipating and planing a timely retreat (Haasnoot et al., 2021).A positive retreat could be facilitated by the power of agglomeration forces essential to avoid increasing exposure of economic activities to intensifying climate-induced shocks and to overcome increasing sunk costs of investments in climate-sensitive areas.
Our simulation results show that this ABM is able to account for a wide ensemble of micro-and macro-empirical regularities concerning economic and spatial dynamics.In absence of floods, the Coastal region holds the natural spatial advantage of being a transportation hub and it experiences an inflow of economic activities from the Inland region driven by the co-evolution of agglomeration economies and endogenous technological change.The likelihood and the speed of the agglomeration process are contingent on the extent of such location advantages, which depend on transport costs and the volume of trade between the two regions have and the rest of the world.Finally, when climate shocks are introduced, their frequency and severity affect the final distribution of economic activities between climate-sensitive and safe regions and the economic growth of the entire economy.Specifically, infrequent or mild shocks harm the economic performance of the two regions with different effects on the agglomeration process.When flood hazards are frequent and severe from the beginning of the simulation, firms and household are able to timely adapt retreating to the Inland region while they still have resource to relocate.This helps avoiding lock-ins with possible catastrophic economic impacts.Conversely, under the occurrence of late climate tipping points when both the magnitude and frequency of climate shocks abruptly increases, the economic performance is substantially harmed as unfolding agglomeration economies concentrate firms in the Coastal region making the relocation unaffordable when it becomes necessary.In all scenarios, we find that climate shocks can affect the economy in an heterogeneous manner, pointing to the importance of studying various economic channels impacted by the adversity.
The rest of the article proceeds as follows.Section 2 describing the methodology.In Section 3, simulation results are presented and discussed.Finally, Section 4 concludes.

The model
To analyze the effect of coastal flooding on agglomeration dynamics, we build the Climate-economy Regional Agent-Based (CRAB) model upon the evolutionary economic engine of the "Keynes + Schumpeter" macroeconomic family of models ("K + S"; Dosi et al., 2017).Specifically, we extend by adding two different regions, endogenous migration dynamics and climate hazards inspired by the DSK model (Lamperti et al., 2018(Lamperti et al., , 2019)).In our CRAB model, firms and households are located in either a safe Inland region or a hazard-prone Coastal region (Fig. 1).Although stylized at this stage, the spatial scale of each region could be comparable to a European NUTS1 level.Agents can migrate between the two regions, whose economic attractiveness changes over time due to an interplay between centripetal and centrifugal forces.On the one hand, technological change and localized spatial spillovers boost profits and wages and generate a centripetal market-size effect.On the other hand, the increase of competition in one region works as a centrifugal force, making it less attractive for further relocation 2 .
More in detail, the economy of region r consists of F1 r heterogeneous capital-good firms (denoted with the subscript i), F2 r consumption-good firms (denoted with the subscript j) and L r households (denoted with the subscript h) supplying work and consuming the income they receive (Fig. 1).When a decision process is identical for both capital-and consumption-good firms (e.g.migration, cf.Section 2.4), we employ the subscript f for both types of firms. 3 In the CRAB model, all the aforementioned agents are boundedlyrational since they lack full information about e.g., prices, demand, wages or hazards and they make choices under uncertainty, not only due to probabilistic hazards but also due to the unknown production, pricing and consumption strategies of other economic actors.For this reason, they employ heuristics to make decisions 4 .Following the seminal contributions of Simon (1955); March and Simon, 1993;Cyert and March, 1963, we define a heuristic as "a strategy that ignores part of the information, with the goal of making decisions more quickly, frugally 2 for a comprehensive discussion of such centrifugal and centripetal forces see Krugman (1998). 3We assume that the current model focuses on industrialized regions and, hence, omits the agricultural sector because of its minor contribution in terms of employment and output in agglomerated areas.In the future, the model could be extended to account, for example, for rural-urban migration. 4This choice comes naturally since both empirical evidence (see, e.g., Carroll, 2003;Coibion and Gorodnichenko, 2012;Gennaioli et al., 2016) and experimental studies (see, e.g., Anufriev and Hommes, 2012;Kahneman, 2003;Kahneman et al., 1982) do not support the fully-informed rational behavior assumption, traditionally included in economics models.
A. Taberna et al. and/or accurately than more complex methods" (Gigerenzer and Gaissmaier, 2011).Specifically, we align with the evolutionary ABM macroeconomic tradition (Dosi et al., 2020) that employs the "less-ismore" principle to balance accuracy between the interpolation of past observations and predictions 5 .Capital-good firms produce heterogeneous machines and invest in R&D to stochastically discover more productive technologies.Hence, technological learning is endogenous in the model.Consumption-good firms combine labour and machines bought from the capital sector to produce a final homogeneous consumer product.A bank lends financial resources to all firms at a fixed interest rate.Finally, a stylized government collects taxes from all firms and pays unemployment subsidies to households in both regions (Fig. 1).
The regional dimension of the model affects market interactions.The two labour markets are decentralized 6 and local: firms can only hire workers residing in their own region 7 .Conversely, goods market are global: firms from both sectors are able to sell in the other region and export to the rest of the world (RoW) bearing a regional and international iceberg transport cost respectively.We assume that goods are shipped to RoW from a port in the Coastal region, while Inland firms have to first transport their goods to the Coastal region.Hence, Coastal firms have a comparative advantage in trade with RoW as Inland firms pay both the regional and international transport cost when exporting.
Furthermore, different hazards -here floods -can hit firms in the Coastal region, impacting their productivity, capital stock, and inventories.As a first step, we test the impact of floods on agglomeration dynamics by using four stylized climate shock types 8 .Each type is characterized by a specific probability and severity that are stable over time (see Section 2.5 for details).In addition, we include a "tipping point scenario" where climate conditions abruptly change from the mildest to the most extreme type in the middle of the simulation.There is significant evidence that human activities have pushed the planetary system close to a climate tipping point (the so-called "Hothouse Earth") (Steffen et al., 2018;Lenton et al., 2008).Consequently, we might be just few decades ahead to experience cascading effects leading to temperature and sea-level rise significantly higher than at any time in the Holocene (Lenton, 2020).
In the next sub-sections, we discuss the model.Further details are spelled out in Appendix A.

The capital-and consumption-good sectors
As in the "K + S" model, the capital-good sector is characterized by imperfect information and Schumpeterian competition that drives technological learning within each region. 9To discover newer and more productive technologies, capital-good firms invest a fraction of their past profits in R&D.The latter are divided between the discovery of newer machine-embodied techniques and the imitation of their competitor technologies.Notably, firms have limited information and hence more likely to imitate competitors located in the same region and with similar technologies: the higher the technological distance with a specific firm (computed using an Euclidean metric), the lower the probability to imitate its technology.Moreover, as in Dosi et al., 2019, we augmented the technological distance of firms located in different regions by a factor ∊ > 1 which captures geographical barriers hampering learning.Once the technological change concludes, firms choose the machine to produce and set prices adding a fixed markup over unit costs.The price and productivity of their machines is then communicated sending "brochures" to the current and a sub-sample of new possible customersthe consumption-good firms.Having received orders from their customers, capital-good firms start producing employing solely labour.
Consumption-good firms combine labour and capital to produce a homogeneous good.In line with the "K + S" tradition, adaptive (myopic) demand expectations determine the desired levels of production and capital stock through a fixed capital-output ratio 10 .Notably, if the current capital stock is insufficient to produce the desired output, consumption-good firms order new machines to expand their stock of heterogeneous vintage.Moreover, they replace old and technologically obsolete machines according to a payback period rule.Firms pay for the capital in advance with own liquid resources.Whenever the latter are not sufficient, firms that are not credit-constrained get access to a bank credit.Hence, the labour productivity of consumption-good firms increases over time following the expansion and renovation in the mix of vintages embedded in their capital stock.Consumption-good firms have limited knowledge about the environment and choose their machinetool supplier comparing the "brochures" they are aware of and select the one with the best quality-price ratio.Finally, they update their price, adding a variable markup on production costs, which depends on the past evolution of their market-share.They balance own market shares and profit margins by increasing their markup whenever the former is expanding and vice versa 11 .

Consumption-good markets
Consumption-good firms compete in three markets, namely the Coastal (Co), the Inland (In) and the Export (Exp).In a generic market m, firm's competitiveness (E j ) depends on its price, which can account for inter-regional (τ 1 ), international (τ 2 ) transport costs, as well as on the level of unfilled demand (l j ): (1) Of course, in the Coastal (E Co J ) and Inland (E In j ) market, τ 2 = 0, while they pay no transport cost to compete in the region where they are located.In line with the spatial economics literature that indicates ports as hub for international trade (Fujita and Mori, 1996;Glaeser, 2010), we model the competitiveness (E Exp j ) in the Export market so that firms located in the Coastal region holds a competitive advantage in trade with the rest of the world, i.e. τ 1 = 0, while Inland firms bear it.Notably, this assumption implies that the magnitude of the comparative advantage depends on the value of the inter-regional transport cost.
In each market (m), the average competitiveness (E m ) is calculated by averaging the competitiveness of all firms in the corresponding region weighed by their market share in the previous time step: 5 Heuristic expectations may be the best and more logical response in a complex and changing macroeconomic environment.For more information about the impacts and robustness of heterogeneous expectations within an evolutionary economics ABMs see Dosi et al., 2020.  For other ABMs that feature decentralized labour markets and matching processes see Caiani et al., 2016;Dawid et al., 2008Dawid et al., , 2012Dawid et al., , 2014;;Dosi et al., 2018a;Fagiolo et al., 2004;Riccetti et al., 2015;Russo et al., 2016.Furthermore, for critical surveys on macro ABMs see Dawid and Delli Gatti, 2018; Dosi  and Roventini, 2019; Fagiolo and Roventini, 2017; Gatti et al., 2010.  The assumption of a spatially constraint labor market provides a good approximation at the regional level.Our model currently omits teleworking and inter-regional commuting since we primarily focus on the production of goods and machinery that require physical presence; however, both could be added should this becomes a research focus. 8In future work, we plan to shift the stylized model of regional economies to more realistic settings and to include the worsening of the conditions following the standard IPCC RCP scenarios. 9For a detailed description of the capital-good and consumption-good sectors, see Appendix A.1 and Dosi et al., 2015.
10 Empirical evidences support the assumption of a constant capital-output ratio (Dosi, 1990;Kaldor, 1957). 11For more information about demand expectation, capital investments and price formation in the consumption-good sector see Appendix A.2.
The market shares (f j ) of firms in the three markets evolve according to a quasi-replicator dynamics: (3) with χ > 0 which measures the selective pressure of the market.In a nutshell, the market shares of the less efficient firms shrink, while those of the most competitive ones increases (due to lower prices and less unfilled demand).Firms' individual demand in each market is then calculated by multiplying their market share by the total demand.In the export market, we assume exogenous demand that grows at a constant rate (α): In the two regions, as households spend all their income, total demand for goods equals aggregate regional consumption (C): with C Co and C In computed by summing up all the wages and unemployed benefits of the households in each region12 .

Labour market dynamics
Firms in the Coastal and Inland zones offer heterogeneous wages which depends on their productivity, as well as on regional productivity, inflation and unemployment: With ψ 1 > 0, ψ 2 > 0 and ψ 1 +ψ 2 ⩽1 and where r is the region where firm j is located, AB j is its individual productivity, AB r is the regional productivity, cpi r is the regional consumer price index and U r is the local unemployment rate.Interactions in the local labor markets are decentralized.This process allows to take into account unemployment as a genuine structural disequilibrium phenomenon.As we assume no commuting, households can only work for the firms in the same region where they live.Hence.the labour supply L S,r of region r at time t, is thus equal to the number of households living in that region.The aggregate labour demand L D,r is given by the sum of individual firms labour demand: where F1 r and F2 r are the populations of capital-and consumption-good firms located in region r.The labour demand of capital-good firm i (L d i ) is equal to: where Qo i is the quantity ordered to the firm and B i its productivity.
Similarly, the labour demand of consumption-good firm j (L d j ) is computed as: where Qd i is its production and A j its average productivity.
The labour market matching mechanism in the two regions operates as follow: where n f (t) is the current labour force of a generic firm f, the firm posts m vacancies on the labour market, with < n f the firm fires m employees.2. Unemployed households have imperfect information and are boundedly-rational: they are aware only of a fraction ρ ∈ (0, 1) of all vacancies posted by the firms in their home region.3. Unemployed households select the vacancy with highest offered wage in their sub-sample and they are hired by the corresponding firm.
The process is completed when either all households are employed or firms have hired all the workers they need.Note that there is no market clearing and involuntary unemployment as well as labor rationing are emergent properties generated by the model.

Inter-regional migration
Households and firms can endogenously decide to move to another region.While migration can take a form of seasonal, temporal or permanent, here we assume only permanent migration.As a consequence, our model does not focus on post-hazard evacuation, which is already well-studied elsewhere (Dawson et al., 2011;Micolier et al., 2019).The latter concerns the immediate recovery while we focus on long-term regional dynamics.Hence, the current version of the CRAB model represents the context of industrialized economies, where the long-term economic attractiveness of regions drives households and firms permanent migration.It is still possible that years later, households and firms may relocate again, but only if they find it economically beneficial to move because of the regional advantages, e.g.labour market for workers or better business opportunities for firms.
To capture heterogeneous location preferences and imperfect information about regional variables such as wage levels, we model migration as a probabilistic two-step procedure.In the first step, agents compare selected indicators between the two regions, to obtain an individual migration probability.Clearly, the probability is positive only if their home region performs economically unfavourably.In the second step, the agents with a positive migration probability perform a draw from a Bernoulli distribution.If successful, the household will migrate, while the firm will relocate only if it can afford the relocation costs, which are assumed to be proportional to its size.This captures potential migration costs as well as preference for the home region.Regarding the first step, the probability to migrate depends on a switching test (see, Delli Gatti et al., 2010;Caiani et al., 2016;Rizzati et al., 2018) grounded in economic variables.Namely, both employed and unemployed households h learn about the economic conditions between the regions comparing wages and levels of unemployment, and their probability to migrate (Pr m ) is: Where φ 1 + φ 2 ⩽1.W d is the wage distance which captures the average salary difference between the two regions: where r is the region where the agent is located and * is the other one.
Similarly, the unemployment distanceU d reads: Despite being a major attractor for people, we do not include coastal amenities in household migration decisions for two reasons.First, the amenity effect is usually very localized, with an effect that disappears rapidly with distance, sometimes in 1 km (Bin et al., 2008;Beltrán et al., 2018).Second, the COVID-19 pandemic brought mixed evidence on where people move, with less densely populated coastal and landward regions displaying a price increase 13 .
Bigger and more profitable markets work as basins of attraction for firms (Krugman, 1998;Bottazzi et al., 2008).As firms have limited information about competitors but access to own market data, we assume that firms' mobility choices depend on the local regional demands for their goods.More specifically, firms f calculate the probability to migrate according to: where φ 3 + φ 4 ⩽1.Dd is the demand distance of firm f between the two regions: Firms also consider the dynamics of their sales with the "Demand attractiveness" (DAd): where DAd r,* f (t) = log(s r,* f (t)) − log(s r,* f (t − 1)) and s f are individual firm sales.
As the empirical evidence shows that agents are reluctant to migrate (Linnenluecke et al., 2011;Linnenluecke et al., 2013), we assume that they consider to move only if all the economic conditions of the other region are better, i.e higher wage and lower unemployment for households (cf.Eq. ( 10)), and higher demand for firms (cf.Eq. ( 13)).
In the second step, to finalize migration, economic agents with positive probability (Pr m > 0) perform a draw from a Bernoulli distribution: They follow a similar method to determine whether technological innovation or imitation is successful (see Eqs. ( 22) and ( 23) in Appendix A.1), with a higher probability in the first step leading to a more likely positive outcome from the draw.If the drawn from the Bernoulli distribution is successful, the agent migrates to the other region.Households leave their job (if employed) and move to the other region as unemployed.Migrant firms fire all their employees, paying a fixed cost that is equal to the sum of their quarterly wages: where n f is the number of workers currently employed by the firm and Mfc f is the total cost to fire them.Note that such firing costs are increasing with firm's size (in line with the empirical evidence, see e.g.Pellenbarg et al., 2002) and they constitute an additional barrier to the mobility of firms, which may not have enough financial resources for transferring their activity in the other region.

Climate-induced shocks
In each time step, there is a probability (Pr s ), that a climate shock, which we interpret here as a flood, hits the Coastal region.Since we focus on the evolutionary dynamics of the economy following a hazard shock, the model is hazard-agnostic and can be adopted to study other climate-induced hazards (e.g.wildfires), whose probability and severity change over time.Future versions of the model can include a richer representation of hazards, possibly adopting a modular approach as in Tesfatsion et al. (2017).As such our model is complementary to socio--hydrology literature (Di Baldassarre et al., 2013;Haer et al., 2020;Michaelis et al., 2020) interested in the interplay of hydrological hazards and economic development, but focused on the detailed modeling of floods and endogenous changes in hydrological regimes, with a simplified representation of the economic side.
To include hazards in a generic form, the current model draws from a Bernoulli distribution -in the similar fashion as for migration and technological learning (see Section 2.4, and Appendix A.1), -to determine whether a shock occurs: Notably, the same hazard can cause different damages to the economy depending on the evolution of firms and households population in the Coastal zone.Moreover, since in reality location-specific exposure is unequal, we model the shock at individual level, thus leading to heterogenous impacts hitting firms 14 .More precisely, each Coastal firm (fc) draws an individual damage coefficient (Dc fc (t)) from a Beta(α 3 , β 3 ) distribution. 15Once the flood occurs, we model three different damages affecting firms (see also Lamperti et al., 2018): • A productivity shock, which decrease firms' labour productivity for one period: AB fc (t) = AB fc (t − 1)(1 − Dc fc (t)).• A capital stock shock that destroys a fraction Dc fc (t) of the stock of machines of consumption-good firms and a part of the machines produced by capital-good firms.• An inventories shocks that causes a permanent destruction of a fraction of the inventories of consumption-good firms, i.e.

Timeline of events
In each time step, agents' action take place according to following sequence: 1. Firms in the capital-good sector perform R&D. 2. Consumption-good firms set their desired production, wages, and, if necessary, invest in new machines. 13Assuming a migration process driven by economic self-interest is supported by empirical evidence that shows how inter-regional migration decisions are influenced to a substantial extent by income prospects (Kennan and Walker, 2011).
14 Given the focus of our paper and in line with climate impact economic literature, we assume only supply-side shocks to firms' productive activities.We plan to include the analysis of damages to household properties as a future development, which will enable us including climate impacts on the economy via consumption patterns. 15The choice to employ the Beta distribution follows previous work on climate ABMs (Lamperti et al., 2018(Lamperti et al., , 2019(Lamperti et al., , 2021;;Lamperti and Mattei, 2018) and has two advantages.First, because it allows to account for the pattern of damage functions (and to only the mean, see e.g.Coronese et al., 2019;Hallegatte et al., 2007).Second, because its flexibility allows to represent a wide range of scenarios.
A. Taberna et al. 3. Decentralized labor market opens in each region.
4. An imperfect competitive consumption-good market opens.5. Entry and exit occur.6. Machines ordered are delivered.7. Households and firms decide whether to migrate across regions.8.A probabilistic climate shock may hit the Coastal region.

Results and discussions
Typical for complex adaptive systems, our model has no closed-form solutions and requires computer simulations.To account for the inner stochasticity of the model, we implement a set of 100 Monte Carlo runs for each experiment that addresses our research questions.Each simulation run takes 400 steps, each equivalent to a quarter of a year.Hence, the time horizon of our simulations is 100 years.
At initialization, firms and households agents are evenly distributed between the two regions, and firms share the same level of technology and resources.Therefore, the only difference between Coastal and Inland regions is the additional transport cost that Inland firms consider when calculating their export competitiveness (Eq.( 1)).This implies that the inter-regional transport cost (τ 1 ) and the amount of export demand (Exp) are the key model parameters as they determine the degree of the competitive advantage of the Coastal region in trade with RoW and the volume of such trade.In the Baseline scenario, we set international shipping cost (τ 2 ) equal to 0.06, in line with other work (Desmet et al., 2021;Hummels, 2007;Irarrazabal et al., 2015) and keep the interregional transport costs equal to a half of it, that is 0.03.Regarding the export demand, we set the initial value to 50, in line with the net exports/output ratio of a coastal open-economy such as The Netherlands (OECD, 2019, 4). 16 Before addressing our main research questions, we mute climate shocks and test the ability of the Baseline scenario to replicate key economic empirical regularities.Next, in order to explore how agglomeration forces shape economic centers in coastal areas in absence of climate shocks, we analyze the emerging regional economic dynamics, focusing on the sensitivity of the agglomeration results to inter-regional transport costs and initial export demand. 17Note that we employ the term successful agglomeration to indicate a region that hosts 100% of the total country population by the end of a simulation run, and refer to ongoing agglomeration otherwise.Finally, we study the impact of climateinduced shocks of different probability and severity on the regional agglomeration dynamics, and on macroeconomic indicators.The latter include: the temporal evolution of the average output and productivity, their growth rates, and the average unemployment rate, all measured at regional and national levels. 18

Replication of empirical regularities
Following the common validation tradition for ABMs in economics and finance (Fagiolo et al., 2007(Fagiolo et al., , 2019)), we study whether the Baseline model reproduces an ensemble of macro and micro stylized facts (Table 1).Given the spatial dimension of the model, we focus on its ability to reproduce empirical regularities concerning flows of people, businesses and trade that emerge between the two regions.Despite the even distribution of economic activities, resources and technologies in both regions at initialization, the fact that they eventually diverge into core and periphery regions is an emergent property of the model.Notably, in our Baseline scenario with disabled climate shocks, the Coastal region becomes the technologically advanced core region as it gradually experiences an inflow of firms and households from the Inland region, which turns peripheral over time (Fig. 2).This stems from the lower transportation costs required to trade with RoW experienced by the Coastal regions, which makes it attractive for businesses and workers.However, the small difference in this transportation advantage is amplified by innovation and technological learning, that self-reinforce agglomeration.This result is in line with the empirical evidence that reveals clustering of economic activities in locations that offer "natural cost advantages" (SF3, Ellison and Glaeser, 1999;Glaeser, 2010).However, when this advantage is removed, instead of an even development we still observe an emergence of the concentration of economic activities in one region, with almost equal probability in either the Inland or Coastal region (see examples with τ 1 = 0 and Exp = 0 in Fig. 4).This is triggered by the dynamics of technological progress in the initial steps (SF1 in Table 1) which spread new technologies to firms in the same area (Breschi and Lissoni, 2001), making access to innovations spatially-concentrated (Feldman and Kogler, 2010, SF2, Table 1).
Moving to firm-level regularities at the regional level, empirical evidence suggests thatdue to the market selectiononly a subset of firms trades with RoW (SF4, Table 1).In our model the majority (86%) of Coastal and the minority (7%) of the Inland firms constitute such a subset of exporters (Table 2).This difference is due to the "natural cost advantage" that eases trade with RoW for Coastal businesses, but creates trade barriers for the Inland ones.As a consequence, the Coastal region becomes an international trade hub, while the Inland area focuses primarily on the domestic market.Moreover, as observed in real data (SF5, Table 1), exporting firms are more productive and bigger in terms of employments than their non-exporting counterparts.Importantly, this

Table 1
Key economic empirical stylized facts replicated by the model.

Stylized facts (SF) Empirical studies
Regional interactions aggregate-level stylized facts SF1 Uneven spatial distribution of economic activity due to technological progress (Amin, 1994;Feldman and Kogler, 2010) SF2 Innovation is spatially concentrated (Thomas, 2005;Feldman and Kogler, 2010) SF3 Industry agglomeration due to natural advantages (Ellison and Glaeser, 1999;Fujita and Mori, 1996;Glaeser, 2010 (Doms and Dunne, 1998) 16 See Appendix B for additional information on model calibration. 17A more extensive sensitivity analysis is carried out in Appendix C. 18 The average growth rate (GR) of a generic variable X is calculated as , where T = 400 is the last step of the simulation.
A. Taberna et al. difference in productivity between exporters and non-exporters is heterogeneous between the two regions (Table 2).In the Coastal region, the productivity premium of exporters is less marked, because only a minority is not exporting.Conversely, only the most productive Inland firms are able to counterbalance the additional transport cost and penetrate the export market.The remaining stylized facts are in line with those reproduced by "K + S" family of models and they are discussed in Appendix B.

Agglomeration dynamics in a world without shocks
In the Baseline scenario, where climate shocks are disabled, simulation results reveal a self-reinforcing and path-dependent agglomeration process (Fig. 2, squared curves).In line with the empirical evidences (Bottazzi et al., 2008;Feldman and Kogler, 2010), the process is fuelled by endogenous technological change, triggered by the discovery of more productive technologies by capital-good firms which diffuse to the consumption-good sector increasing local wages in the innovating region.
How do such agglomeration patterns emerge?Due to inter-regional transport costs and physical distance (∊), firms are more likely to adopt innovations emerging in their home regions.Hence, local successful innovations diffuse faster in one region, creating a cluster of high-productivity firms which further boosts the adoption of newlydiscovered technologies among local businesses.The ensuing increasing R&D investments (Fig. 2, solid curves) signal the path-

Note:
The average growth rate (GR) of a generic variable X is calculated as GR X = LogX(T) − LogX(0) T + 1 , where T = 400 is the last step of the simulation.Our Baseline scenario is Exp = 50 and τ 1 = 0.03, highlighted in bold.The last column displays the probability of successful agglomeration, namely the case where one of the two regions hosts 100% the total country population.When a region hosts no workers, the unemployment rate equals to 1, indicating no employment.The latter is the reason behind the higher unemployment rate and standard deviations in the scenarios with τ 1 = 0.All values are averages from the 100 Monte Carlo runs under the same parameter settings.***p < 0.01 refer to P-values for a two-means t-test and indicates whether the difference between Coastal and Inland region is significant for a specific variable.
dependency in the spatial formation of a cluster, as they lead to higher innovation rates, which in turn attract more firms accelerating the technological diffusion.Furthermore, since wages are indexed to both firm and regional productivity (Eq.( 6)), they grow faster in the more innovative region, thus attracting workers which migrate from the other region (Fig. 2, black squared curves).Households' migration ultimately reduces local consumption pushing an increasing number of firms to move to the growing region (Fig. 2, white squared curves), typically with a time lag after workers' migration (compare white and black squared curves in Fig. 2).
Given the initial settings of the Baseline scenario, whenever firms in the Coastal region have a competitive advantage in trade with RoW (i.e., τ 1 = 0.03 and Exp = 50), agglomeration mostly emerges there 19 .However, in a typical Monte Carlo experiment, only 13% of the simulation runs exhibit a successful agglomeration process (Fig. 2 and Table 3).This depends on the inter-regional transport costs (τ 1 , Eq. ( 1)) which reduce the competitiveness of firms in the other region, thus negatively impacting on the dynamics of their market shares.This has two main implications.The first one concerns the speed of the agglomeration process.Firms consider to migrate only if they experience a growing demand outside their home region (Eq.( 13)).Yet, transport costs act like an inter-regional trade barrier, making it harder for firms to sell outside their region.The second implication relates to the RoW market as the inter-regional transport costs increase the competitive advantage of Coastal firms in the export market, penalizing Inland businesses (Eq.( 1)).Moreover, the larger the initial volume of trade with RoW (Exp), the higher the sales captured by Coastal firms.This process leads to a self-reinforcing dynamics wherein the lower competitiveness of Inland firms reduces their share of the export demand, which in turn translates in less profits, less R&D investment and ultimately in a slower technological change.
The increasingly unfavourable conditions in the Inland region worsened by out-migration can trigger a tipping point leading to abrupt step-changes and avalanches of relocating firms (see Fig. 2.b).The emergence of tipping points is due to positive feedbacks that gradually amplify the economic attractiveness of the Coastal region for Inland firms, further increasing the regional gap in job opportunities, R&D investments and wages levels.As economic activities continue to concentrate in the Coastal region, the wage difference with the Inland region increases exponentially (Fig. 3.a), followed by the continuing households' influx (Fig. 2.a, black squared curve).This path-dependent process leads to the divergence of the two regions in terms of output growth trajectories (Fig. 3.b), productivity (Baseline, Table 3) and wage distributions (Fig. 3.c).Notably, the productivity gap is narrower than the output gap because there are two intertwined effects that steer the economic divergence between the two regions: the population migration   19 The agglomeration process would be reinforced by the inclusion of coastal amenities, which drive workers on the waterfront even without the economic incentive.
and the diffusion of new technologies among firms.Specifically, the latter is less likely but still feasible for spatially-distant firms which could still imitate the technology of competitors from another region, hence lowering the inter-regional difference in productivity.
Notably, the accelerating technological learning and spatial spillovers driving the productivity change in the regional economies could still prevail in the Inland region, contingent on the role that interregional transport costs and exports to RoW play in this two-region economy.Our sensitivity analysis on the size of the comparative advantage between the two regions reveals a non-ergodic behavior characterized by two statistical equilibria: a successful agglomeration of economic activities and population in either Coastal (Equilibrium I) or Inland (Equilibrium II), as shown in Table 3 and Fig. 4. As expected, in the absence of inter-regional transport cost (τ 1 =0), the Coastal region has no competitive advantage in trade with RoW and there are no idiosyncratic differences between the two regions.In this case, the probability of full agglomeration is roughly the same (dark red and gray in Fig. 4, and Table 3).Moreover, if trade barriers are absent, firms easily penetrate outside their regional market and the agglomeration process speeds up: most runs reach the successful agglomeration in either region before the time step 200.As transport costs increase, trade between the two regions stagnates, hindering the agglomeration process (light brown plots in Fig. 4).This is in line with the historic evidence, where a decrease in transport costs is associated with a concentration of economic activities (Glaeser, 2010).Furthermore, when inter-regional transport costs are positive, the higher initial value of the export demand volume yields higher economic growth and lower unemployment in the Coastal region vis-á-vis the Inland one (Table 3).Indeed, the higher initial volume of export demand to RoW boosts the production of Coastal firms, leading to higher investments and increasing the chance of successful agglomeration at the shore region 20 (Fig. 4, Table 3, more details and extensive sensitivity analyses are in Appendix C).

Agglomeration dynamics and climate-induced hazards
The increasing impacts of climate change can affect the economic dynamics of the two regions and the agglomeration economies.To consider stylized climate-induced shocks, we run the Baseline model (Table 3) with hazards scenarios of different severity and probability.More specifically, we consider five flood scenarios: Low probability-Low severity flood (LPLS); High probability-Low severity flood (HPLS); Low probability-High severity flood (LPHS); High probability-High severity flood (HPHS) and Climate tipping point, that is a shift from LPLS to HPHS.The high and low probability corresponds to an average of 2:1 year and 1:25 year flood, respectively.Furthermore, we parameterize the damage coefficient of the low and high severity to 0.01 and 0.25, which are the impacts of a five and fifty-centimeter flood accordingly to the US industry depth-damage curve (Huizinga et al., 2017)  21 .Notably, the Climate tipping point scenario displays an abrupt increase of both probability and severity at t = 200.Namely, it changes the climate of the Coastal region from relatively stable (mild flood every 25 years) to extreme (50-cm flood twice a year) conditions.The extreme conditions are somehow comparable to what we can expect in Southeast Asia monsoon season in the coming years (Longenecker, 2011).Hence, the shock magnitude and probability vary among our experiments mimicking the uncertain nature of hazard variability with climate change.Despite being modeled in a stylized manner, such shocks deliver important insights about feedbacks between climate-induced hazards and the economic dynamics through an interplay of push and pull forces: flood damages, which increase over time in the Coastal region, and agglomeration forces, which attract economic activities towards the core region and boost technological innovations.
In what follows, we first examine the climate-induced disruptions to regional and national economies and the emerging dynamics arising throughout the interactions between the push and pull forces.We then examine for each flood scenario different impact channelproductivity, capital stock and inventories shocksand analyze their individual and combined impacts on the economy.

The impacts of climate-induced hazards
The first set of experiments concerns the possible impacts of natural hazards on the economy.On the one hand, the negative effects of floods are straightforward and refer to a loss of production factors (machinery, inventories) and a temporal drop in productivity.On the other hand, hazards may accelerate the replacement of capital with new technologically-advanced vintages leading to a positive "productivity effect" (Hallegatte and Dumas, 2009;Leiter et al., 2009).In our model, the latter effect is generated by two processes.The first one concerns the "forced" investments that firms undertake following a climate-induced shock when they need to replace their destroyed old capital with new equipment.The second process relates to the bankruptcy of some firms and the entry of new ones, being endowed with more productive capital technologies (see Appendix A.3). Due to the endogenous technological learning in the model, newer and more productive technologies appear over time, and consequently the production base is possibly upgraded after each flood, boosting the regional productivity, and potentially the economic output. 22 Interestingly, there are emerging non-linearities in the effects of both probability (Pr s ) and intensity (the damage coefficient Dc) of the shocks on the average unemployment, output and productivity growth of the entire economy across scenarios (Table 4). 23Surprisingly, the two extreme scenarios -LPLS and HPHS -deliver better economic performance than Baseline, mainly because of the "productivity effect" (LPLS), which in HPHS is amplified by a timely coastal retreat, as we discuss in details below.Conversely, the mixed scenarios -HPLS and LPHSperform worse than Baseline due to the lock-in effects of ongoing agglomeration, enabled by reducing either flood frequency and intensity.This increases the sunk costs of clustering production and population in the increasingly hazard-prone Coastal region.
As long as shocks are mild and infrequent (LPLS), their positive and negative effects are negligible over the simulation time span (compare LPLS to Baseline in Table 4).However, in the second half of the simulation, the growth-stimulus of the capital renewal slightly outweigh the detrimental effects caused by flood shocks (compare the average output growth in Baseline and LPLS between time steps 200-400 in Fig. 5.c).This trend explains the additional labor demand required to replace the destroyed capital that decreases the unemployment rate in both regions (compare Baseline and LPLS in Table 4).
When either the probability (HPLS) or the severity (LPHS) of the climate impacts increases, the economy performs significantly worse than in absence of shocks.Specifically, the high fraction of capital destroyed in the LPHS scenario and the frequent capital disruption in the HPLS scenario hinder firms from fully recovering their equipment due to scarcity of financial resources.Hence, they cannot fully satisfy their demand, undermining firms' long-term competitiveness and 20 The exogenous rate of export growth (g), which is set to 0.01 in the Baseline scenario, interacts with Exp and τ 1 in the dynamics of the agglomeration process.In particular, when inter-regional transport costs are positive, the higher rate of export growth means more resources available for Coastal firms and higher probability of successful agglomeration in the Coastal region (see Fig.

C.5 in Appendix C
). 21 Given the low sensitivity of the depth-damage curve to small flood depths, five centimeters should be treated as an indicative value of a very mild flood. 22For a theoretical explanation of this impact of natural disasters on the economy, see Hallegatte and Przyluski (2010). 23Appendix C provides more information about it, including the sensitivity analysis of the economic growth and the agglomeration process on the severity and probability of the shock.
A. Taberna et al. profitability.Moreover, the lack of machines forces firms to downscale production and fire workers.The ensuing growth in unemployment in the Coastal region coupled with the drop in wages due to productivity losses, creates a natural push that triggers households' migration landwards.If households' migration is considerable, firms start moving to the Inland region driven by agglomeration forces: i.e. following the shift of workforce and regional market shares these consumers represent.This bottom-up economically-driven relocation to the Inland region can revert, or at least slow down, the agglomeration process in the Coastal region.However, the few infrequent shocks in the LPHS scenario are typically insufficient to counter-balance the agglomeration force stemming from the advantages that the Coastal region has in trade with RoW and in the technological leverage that the pre-shock agglomeration offers.Hence, when the coast is firmly protected (LPHS but still not 100% safe), the economic activities in the Coastal region are comparable to the Baseline scenario (LPHS vs. Baseline in Fig. 5.b).Such lock-in of economic activities in the Coastal region implies more assets and population exposed to floods.Consequently, when the shocks do hit, they harm the majority of the country firms and households and the whole economy is more affected and exhibits a negative "hysteresis" characterized by a statistically significant lower output growth (LPHS vs. Baseline in Fig. 5.c and in Table 4).In contrast, when the economy is exposed to frequent but mild coastal floods (HPLS scenario), there are economic forces that gradually drive the population toward the Inland region, which in addition to being safe becomes an economically attractive center of technological innovation.As a result, there are fewer economic activities in the Coastal region as compared to Baseline (compare HPLS vs. Baseline in Fig. 5.b), but significantly higher output compared to the LPHS scenario (compare HPLS vs. LPHS in Fig. 5.f).
If both flood probability and severity are high from the start (HPHS), the economic agents quickly adapt to frequent and significant losses by migrating to the safe Inland region (compare HPHS and Baseline in Fig. 5.a and.b).This abrupt retreat is driven by purely bottom-up economic adaptation and agglomeration forces that now gravitate to the Inland region.The global economy temporarily contracts but recovers fast (see the negative growth rate in HPHS between time steps 0-50 vs. increasing growth rate in steps 100-150, Fig. 5.c).The firms that escaped to the Inland region avoid any further exposure to the shocks.Moreover, they also need to rebuild their capital stock choosing the most productive technologies of the time.Importantly, many firms in such extreme conditions go bankrupt early in the simulation and are then replaced by more technology advanced newcomers.In the long-term, these major renovations of capital boost the productivity of the Inland region and the aggregate output of the entire two-region economy (compare Baseline and HPHS curves in Fig. 5.c and.f and in Table 4).Our results are in line with the climate adaptation literature (Desai et al., 2021;Moss et al., 2021) discussing the importance of a timely coastal retreat in case of catastrophic impacts.Nonetheless, the benefits from the swift coastal retreats are subjects to a number of caveats: i) relocating abruptly an entire regional economy requires a well prepared and anticipated planning uncommon in the current political agenda; ii) the cost of moving businesses can increase non-linearly with their number, especially for locations where space is a scarce resource; iii) there are high social costs in relocating households and firms.To sum up, the results of the HPHS scenario appears to be realistic only for a limited area rather than for a major cluster of economic activities.
Finally, we consider a Climate tipping point scenario where the frequency and severity of shocks abruptly increase in the middle of the simulation, and which unfortunately becomes more prominent Kemp et al. (2022).Such a scenario shows the worst economic performance due to negative spatial lock-in effects (Fig. 5.b and Table 4).The stable climate that the economy experiences in the first 200 steps, allows economic activities to agglomerate in the Coastal region.However, after the climate tipping point, impacts suddenly become more frequent and severe, thus destroying Coastal firms' capital stocks, reducing their productivity and hence their competitiveness.As a consequence, the region experiences a skyrocketing unemployment rate and a depression of wages that push households Inland (compare Climate tipping and Baseline scenario in Fig. 5.a and Table 4).However, as climate conditions become extreme, Coastal firms continuously face natural hazards and they rarely manage to migrate or gain market shares in the Inland region (compare Climate tipping and Baseline scenario in Fig. 5.b).By the time firms learn the new climate conditions, it is too late to move.Adaptation by relocation needs time and resources, which the Coastal economy lacks by this point.Thus, differently from the HPHS scenario, the majority of economic activities remains trapped at the coast and the global

Note:
The average growth rate (GR) of a generic variable X is calculated as , where T = 400 is the last step of the simulation.Here Pr s .and E [Dc] denote probability and severity (the average damage coefficient Dc) of flooding in each scenario.We compare scenarios in terms of the output and productivity growth, the unemployment rate of the two-region economy, and the probability of successful agglomeration in the Coastal region (statistical equilibrium I, namely the case where such region hosts 100% the total country population).All values are averages from 100 Monte Carlo runs of each scenario.The relative average unemployment, output and productivity growth ratios are calculated by dividing the corresponding value in each scenario by that of Baseline.*p < 0.1, **p < 0.05, ***p < 0.01 refer to P-values for a two-means t-test.4).Although the inability of Coastal firms to compete with the Inland one, and the time lag and resources needed to relocated in the safe region are the main reasons of lock-ins, there are two additional factors to be considered.The first is that, in this version of the model, migration is costless for households but increases with size for firms.Migration costs constitutes an additional barrier for firms whose liquid resources are already invested in rebuilding production capacity at the coast. 24The second factor depend on the assumption that the population of firms is fixed and bankrupted firms are replaced with new in the same region (see Appendix A.3).Note that a variable number of firms could even worsen the economic performance as firm population in the Coastal region may collapse.

Dissecting the impact channels of climate hazards
The previous analysis shows how climate hazards affect the economy by compounding damages, i.e. without differentiating how shocks propagate in the economy via multiple channels.Yet, each shock hits the Coastal firms in an heterogeneous manner by decreasing their productivity, destroying a fraction of their machinery and inventories (more details in Section 2.5).Furthermore, depending on the hazard frequency and severity, each of these individual shocks might have a different impact on the distribution of economic activities across regions and the macroeconomic performance.Fig. 6 illustrates the individual effects of each shock on the evolution of the economy. 25 The productivity shock increases firms' production costs, by decreasing the production of their workers.Hence, it reduces firm competitiveness and profitability, which propagates throughout the economy leading to lower output growth and real wages.A substantial shock, possible occurring in the LPHS, HPHS and Climate tipping scenarios, shrinks real wages, triggers households migration and lowers aggregate demand, generating a negative vicious cycle.As a consequence, in line with other climate ABMs (Lamperti et al., 2018(Lamperti et al., , 2020)), the productivity shocks delivers the largest harm to the two-region economy when the damage coefficient is high (such as in the LPHS and Climate tipping, see circled and black lines in Fig. 6.c and.n).Conversely, the adverse impact of the productivity shock is negligible for a low value of the damage coefficient (such as in the HPLS, compare black and circled line in Fig. 6.f) since these effects are counterbalanced with productivity gains that the firms obtain through the process of technological change. 26An exception is the HPHS scenario: such shocks lead to intensified economic growth (see black and circled lines in Fig. 6. i).The reason is linked to the process of entry and exit.As in other models rooted in "K + S" family (Dosi et al., 2010(Dosi et al., , 2013(Dosi et al., , 2017;;Lamperti et al., 2018), new entrant consumption-good firms select amongst the most productive machines.Hence, in the HPHS scenario the severe and frequent productivity shocks initially bankrupt many firms that are then replaced with more technologically advanced entrants.
In a different manner, the capital-stock shocks immediately constrain firms' production.Consequently, firms try to reconstruct their capital stock by ordering new machines.As mentioned before, in the HPHS scenario the replacement of the destroyed capital with newer and more productive machines, coupled with the migration to the safe inland region, boosts the total units of output produced in the two-region economy (see black and squared lines in Fig. 6.i).However, in all the other scenarios where the majority of firms is exposed to climate hazards during the whole simulation (LPHS, HPLS and Climate tipping point), the economy lacks resources to sustain the substitution of capital at such accelerated rate.Hence firms have to undergone production, slowing down economic growth (see black and squared lines in Fig. 6.c,.f, and.n).The capital stock shocks also generate an increase in the demand of capital by Coastal firms that pushes capital-good firms towards the coast (see black and squared lines in Fig. 6.b) or, at least slows down its abandonment (see black and squared lines in Fig. 6.h).
Finally, the inventories shock has the smallest impact on both the distribution of population and economic growth in the LPHS, HPLS and Climate tipping point scenarios, suggesting that supply side bottle-necks are mostly relevant in the very short run (Otto et al., 2017;Willner et al., 2018).Yet, damages to inventories are particularly relevant in the HPHS case, as they reinforces our previous argument about Coastal retreat.Indeed, by exerting a relatively mild impact, the inventories shock triggers less migration of both households and firms towards the Inland region (see black and triangle lines in Fig. 6.g and.h).Thus, more firms deal with the hazard for a longer time compared to the other shocks with negative consequence for the economy (compare black and triangle lines in 6.n).

Conclusions
In presence of longstanding urbanization processes, population and economic activities are increasingly exposed to the risks of climate change.Strong economic agglomeration forces have been attracting development towards waterfront regions for centuries.Yet, the new climate reality of projected sea level rise and increasing probability and severity of coastal flooding, threatens to revert this trend, making coastal retreat a realistic policy option if proper mitigation strategies are not timely deployed (Haasnoot et al., 2021;Moss et al., 2021).
To explore the trade-offs between agglomeration economies and the changing face of hazards as well as the macroeconomic and spatial consequences of diverse climate shocks, we have developed the Climateeconomy Regional Agent-Based (CRAB) model with heterogeneous boundedly-rational interacting agents designed in the evolutionary macroeconomics tradition.The model explicitly captures the endogenous technological learning, that is reinforced by geographical proximity.Specifically, when firms cluster together newly discovered technologies circulate more easily within the cluster creating "localised knowledge spillovers" (Breschi and Lissoni, 2001) that act as Marshallian externalities and trigger agglomeration forces.We study such dynamics in an economy with two regions -Coastal and Inlandin which capital-good firms, consumption-good firms and households agents interact in the local goods and labour markets.Agents choose in which region to reside and whether to relocate driven purely by economic self-interests.Agents are boundedly-rational, but they continuously learn about prices, wages as well as the evolving economic attractiveness of regions and the intensity of climate-induced hazards as the simulation unfolds.
First, we assess the ability of the model to reproduce empirical regularities.Specifically, in line with other macroeconomic evolutionary ABMs (Dosi et al., 2010(Dosi et al., , 2013(Dosi et al., , 2015(Dosi et al., , 2017;;Lamperti et al., 2018), we validate model's output against economic stylized facts at both aggregate and firm-level.We then asses how agglomeration forces shape economic centers in coastal areas in the absence of climate shocks.We find that the model is able to reproduce a self-reinforcing and pathdependent agglomeration process driven by innovation and endogenous technological learning.Such processes are triggered by the additional resources that Coastal firms obtain though the competitive advantage of their strategic location (Glaeser, 2010).These results reinforce previous empirical findings about the correlation between productivity and agglomeration forces (Bottazzi et al., 2008;Feldman and Kogler, 2010;Kogler, 2015).In the absence of the location specific competitive advantage, the model displays a non-ergodic behavior characterized by two possible final statistical equilibria: full 24 In presence of migration cost for households, the social and economic cost of the Climate tipping point scenario would be even higher. 25Here we present only the graphs for the HPLS, LPHS, HPHS and Climate tipping point scenarios.We exclude LPLS to keep the figure readable because of the similarity of this scenario with Baseline.The LPLS results are available from authors upon requests. 26Indeed, a negative shock to labour productivity facilitates the adoption of novel and more productive production techniques and machines.
A. Taberna et al. agglomeration of economic activities and population in either Coastal or Inland region.This offers an important methodological innovation permitting to integrate the spatial dimension, both in terms of travel costs and location (dis) advantages, into the evolutionary economic models with heterogeneous adaptive agents.It responds to the need for adding the complex adaptive perspective to the economic geography toolkit (Fowler, 2007;Commendatore, 2015) and to the economic analysis of climate change impacts (Safarzyńska et al., 2013;Stern, 2016).
We then explore how the complex interplay between agglomeration forces and climate shocks unfolds the spatial distribution of economic activities as well as the development of regional economies, considering scenarios with climate hazards of various intensity and probability.We find a non-linear responses of the model economic performance to both the intensity and probability of the shocks.Such non-linearity emerges from the complex interplay between the negative consequences of climate damages, and their positive effects in terms of technological renewal of the production capital base and a timely incentive to relocate economic activities from the coast.In general, frequent shocks push economic activities towards the safe Inland region, with the speed of coastal retreat increasing with the size of the shocks, thus reducing the concentration of economic activities in the Coastal area.When the shocks are infrequent or mild the aggregate economic performance worsen due to the prevailing negative impacts of hazards.In particular, when floods are rare but more intense, the low probability shocks generally permit an initial concentration of economic activities in the Coastal region.Yet, the shocks are more likely to hit the economy later in the simulation, affecting a critically high share of firms and households, slowing the economic recovery and its further development.This has direct links to adaptation policies, such as construction of flood defences which while preventing milder floods do fuel the agglomeration forces and endanger the increasing sunk costs due to accelerating urbanization in climate-sensitive hotspots.Our results suggest that while adaptation measures such as dykes and levees are indispensable, one must account for the inter-temporal side-effects in terms of provoked "levee effect"/ "safe development paradox" (Di Baldassarre et al., 2015) driven by agglomeration forces.Furthermore, in the special case when shocks are both severe and frequent, adaptive firms swiftly retreat to the safe Inland region where they replace their destroyed machines with newer and more productive equipment without any government intervention.This capital renovation coupled with the replacement of bankrupting firms with better-technology competitors permits the entire economy to experience a long-run growth trajectory comparable to the baseline scenario.This has important policy implications for designing coastal retreat strategies, that seem increasingly necessary but face unacceptability and are costly to realize (Moss et al., 2021).However, in the most likely scenario with climate tipping points, which abruptly increase both the frequency and impact of shocks in the middle of the simulation, the most productive firms located in the Coastal area are increasingly exposed to flood hazards severely disrupting their capital and competitiveness.As a consequence, firms lack resources to relocate to safety and remain trapped at the coast, locking in the entire economy into a trajectory of a climate non-resilient stagnation.
This article makes a contribution to the literature in three ways.In terms of the theoretical framework: grounding in the new economic geography literature which focuses on trade and innovation as the cause of agglomeration, we go beyond to study a spatial distribution of economic activities across regions in an out-of equilibrium dynamics emerging from interactions of heterogeneous boundedly-rational agents.Our model employs evolutionary macroeconomic tradition to capture for the first time the dynamic interplay between trade, agglomeration, migration and hazard shocks, generalizable beyond floods which we take as an example here.In terms of methodology: we advance the evolutionary macroeconomic ABMs tradition by introducing two regions and endogenous inter-region migration decisions for both firms and household.Finally, in terms of policy implications: we assess the trade-off between intensifying natural hazards and agglomeration economies accounting for non-linear dynamics, lock-in effects, and climate tipping points.It enables us to reveal economic mechanisms that make coastal retreat economically-efficient for firms and households, opening new strategies to facilitate positive transformational climate change adaptations.A positive retreat could be facilitated by the power of agglomeration forces essential to avoid increasing exposure of economic activities to intensifying climate-induced shocks and to overcome increasing sunk costs of investments in climate-sensitive areas.Although we provide an illustrative stress test on how a regional economy reacts to changing hazards, our results highlight the importance of understanding dynamic responses of socio-economic systems to the "new normal": when the environment and climate to which our civilization was used for centuries is drastically changing.
The CRAB model can be extended in a number of ways.First, the model would benefit from making households behaviorally-richer to enable more detailed migration patterns, e.g.rural-urban migration, risk attitudes and to accommodate the new realities of teleworking.This will require modeling land-use dynamics, allowing the differentiation between urban, peri-urban, and rural areas.In addition, linking land-use maps with households' property will extend the estimation of direct flood damage to the household sector, thereby allowing to incorporate demand side shocks.Second, the model could be extended to multiple regions and calibrated to real-world data, including a finer representation of economic sectors impacted by various hazards.Also, climate shocks could align with hydrological flood maps and hazard patterns corresponding to different impacts under the downscaled IPCC scenarios.Third, governments, households, and firms are known to take climate adaptation action to reduce the adverse impacts of hazards (Leitold et al., 2020;Linnenluecke, 2017;Neise and Revilla Diez, 2019;Noll et al., 2022;Vousdoukas et al., 2020).Hence, private and public climate change adaptation could be jointly considered to analyze both limits and opportunities that regions have for development despite adversities.Importantly, "on-site" climate change adaptation options might be linked to the process of technological change and infrastructure development (Thacker et al., 2019) that supports climate-resilient growth, although empirical evidence on this is still sparse.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

A.1. The capital-good sector and technological learning
The technology of each firm i is captured by two labor productivity coefficients, A T i and B T i .The former coefficient indicates the productivity of the machines in the consumption-good sector, while the latter stands for the productivity of the manufacturing technique required to produce the machines.
Capital-good firms determine their price p i applying a fixed markup (μ 1 > 0) to their unit cost c i27 : The unit cost c i is the ratio between individual nominal wage w i and its productivity coefficient: Capital firms aim to improve their productivity coefficients (A T ,B T ) via technological learning.To do so, they actively invest in R&D a fraction ν 1 of their past sales: Furthermore, firms split their R&D between innovation (IN) and imitation (IM) according to the parameter ξ ∈ [0,1].Both innovation and imitation are modeled employing a two-step procedure.In both cases, the first step determines whether innovation or imitation is successful through a draw from a Bernoulli distribution: where 0⩽ζ 1,2 ⩽1 capture the search capabilities of firms.The probability of a positive outcome depends on the amount of resources invested.Successful firms get access to the second step.If the innovation draw (Eq.( 22)) is successful, the firm discovers a new technology, (A im i , B im i ), according to: where x A,B (t) are independent draws form a Beta(α 1 ,β 1 ), over the support [ x 1 ,x 2 ] , with x 1 ∈ [ − 1,0 ] and x 2 ∈ [0,1].The supports of the Beta distribution determine the probability of "succesfull" over "failed" innovations, and hence shape the landscape of technological opportunities.
Furthermore, firms passing the imitation draw (Eq.( 23)) get access to the technology of one competitor (A im i ,B im i ).Notably, firms are more likely to imitate competitors with similar technology and we calculate the technological distance between every pair of firms using a Euclidean metric.Moreover, in tune with empirical evidence (Dosi, 1990;Fagerberg and Godinho, 2006), firms in the other region are more difficult to imitate than domestic ones, hence technological distance between foreign Fims is augmented by a factor ∊ > 1.The physical distance plays an important role within the agglomeration process because it makes innovation spatially concentrated (Feldman and Kogler, 2010).
Once both processes are completed, all the firms succeeding in either imitation or innovation select the most efficient production technique they can master according to the following payback period rule (see Section A.2): where b is a positive payback period parameter (see Eq. ( 29)).Finally, capital-good firms send a "brochure" containing price and productivity of their machines to a random samples of potential new clients (NC i ) as well as its historical customers (HC i ).The capital-good market is indeed characterized by imperfect information and (Phelps and Winter, 1982).

A.2. The consumption-good sector
Consumption-good firms combine labour and capital with constant returns to scale to produce a homogeneous good.In line with K +S tradition (Dosi et al., 2010(Dosi et al., , 2013(Dosi et al., , 2017)), adaptive demand expectations (D e j = f[D j (t − 1),D j (t − 2),…,D j (t − h)]), desired inventories (N d j ), and the actual stock of inventories (N j ) form the desired level of production: The latter is constrained by firms' capital stock K j , with a desired capital stock K d j required to produce Q d j .In case K d j (t) > K j (t), the firm calls for a desired expansionary investment such that:  In particular, the output growth of the two-region economy is the lowest around to the top right corner of Fig. C.6, where floods are intense but not frequent.The reason is that rare events generate the lock-in of economic activities in Coastal region and that once they do happen, the majority of the firms is heavily damaged.Furthermore, the higher output growth of the two-region economy is on the top-left and bottom-right of Fig. C.6.On the one hand, in the top-left, the higher economic growth is stemming from the "productivity effect" (Hallegatte and Dumas, 2009).On the other hand, in the bottom-right corner is the combination of "productivity effect" and coastal retreat that offset the damages from the climate shocks.
Interestingly, departing from the lowest probability and severity (LPLS, top-right corner in

Fig. 1 .
Fig. 1.A conceptual representation of the CRAB model.

Fig. 2 .
Fig. 2. Share of population of firms (white squared curve), households (black squared curve) and the relative volume of R&D investment (solid curve) in the Coastal region over total in the Baseline scenario.Panel (a) displays the average values and standard deviations (shaded areas) of firms and households population and R&D investments in the Coastal region over the 100 Monte Carlo runs; panels (b) and (c) show single model runs which are representative of cases of successful (i.e.reaching 100%) and ongoing agglomerations respectively.

Fig. 3 .
Fig. 3. Panel (a) shows the dynamic trend of the difference in the average wage between the Coastal and Inland regions (vertical axis) as economic activities agglomerate (horizontal axis).Panels (b) and (c) compare the distribution of regional output growth and regional wages respectively in the Coastal and Inland regions.Note: the values refer to a Monte Carlo of size 100.

Fig. 4 .
Fig. 4. Sensitivity of the model dynamics to the inter-regional transport costs (τ 1 ) and the initial volume of the export demand (Exp).Each curve shows the dynamics of firms' population in the Coastal region across 100 individual Monte Carlo runs.Our Baseline scenario is Exp = 50 and τ 1 = 0.03, colored in black here.

Fig. 5 .
Fig. 5. Evolution of the households (a) and firms (b) population in the Coastal region, average output growth of the two-region economy by time slices (c), units of output produced in the Coastal (d) and Inland regions (e), and in the entire two-region economy (f) over time in the Baseline and the five flood scenarios (LPLS, HPLS, LPHS, HPHS and Climate tipping).All values are averages from 100 Monte Carlo runs of each scenario; the standard deviations for each scenario are available from the authors upon request.

Fig. 6 .
Fig. 6.The impact of each individual shock channel on the distribution of population, economic activities and output of the two-region economy over time in the Baseline, HPLS, LPHS, HPHS and Climate tipping scenarios.All values are averages from 100 Monte Carlo runs of each scenario.

Fig
Fig. B.1.Bandpass-filtered output, investment, and consumption.Note: results present the behavior of selected bandpass-filtered (6, 32, 12) series Fig. C.4), and keeping one parameter constant while increasing the other, the model displays some non-linearities in the probability of statistical equilibrium I (see Pr s = 0.01 and E[Dc] = 0.01 columns in Fig. C.4).The reason is linked to the additional labor demand generated by the shocks, which for some combinations of both low probability and severity increases job opportunities and hence households migration in the Coastal region.Notably, the lower but higher than zero probabilities of statistical equilibrium I in the right-bottom of Fig. C.4 (such as the 0.01 with E[Dc] = 0.15 and Pr s = 0.25) are rare -and unrealistic-cases of full gentrification.In the latter, initial rebuilding opportunities lock in all households and firms in the Coastal region, with devastating consequences for the economy.

Fig. C. 1 .
Fig. C.1.Sensitivity analysis of the average output growth of the two-region economy to different values of export (Exp) and transport cost (τ 1 ).Note: the values refer to a Monte Carlo of size 100.Average values are reported.

Fig. C. 2 .
Fig. C.2. Sensitivity analysis of the average output growth in the Coastal region to different values of export (Exp) and transport cost (τ 1 ).Note: the values refer to a Monte Carlo of size 100.Average values are reported.

Fig. C. 3 .
Fig. C.3.Sensitivity analysis of the average output growth in the Inland region to different values of export (Exp) and transport cost (τ 1 ).Note: the values refer to a Monte Carlo of size 100.Average values are reported.

Fig. C. 4 .
Fig. C.4.Sensitivity analysis of the distribution of economic activities under different values for export (Exp) and transport cost (τ 1 ).The values indicates the probability of statistical equilibrium I in the 400th step of each simulation.Note: the values refer to a Monte Carlo of size 100.Average values are reported.

Fig. C. 5 .
Fig. C.5.Sensitivity analysis of the distribution of economic activities under different values for export growth (g) and transport cost (τ 1 ).The values indicates the probability of statistical equilibrium I in the 400th step of each simulation.Note: the values refer to a Monte Carlo of size 100.Average values are reported.

Fig. C. 6 .
Fig. C.6.Sensitivity analysis of the average output growth of the two-region economy to different values of shock probability (Pr) and expected damages (E[Dc]).Note: the values refer to a Monte Carlo of size 100.Average values are reported.

Fig. C. 7 .
Fig. C.7. Sensitivity analysis of the distribution of economic activities to different values of shock probability (Pr) and expected damages (E[Dc]).The values indicates the probability of statistical equilibrium I in the 400th time step of each simulation.Note: the values refer to a Monte Carlo of size 100.Average values are reported.

Table 2
Exporters shares and premia per region.
Note: Firm are considered exporters at t if f Exp j > 0.001.Exporters premia for a specific variable are calculated dividing the exporters average by the regional average.Size is the average number of employees.The numbers are the means of 100 Monte Carlo runs of the Baseline scenario.

Table 3
Comparison of different value of the transport costs (τ 1 ) and of the initial exports to the rest of the world (Exp) to the ones of the Baseline scenario.

Table 4
Comparison of different flood scenarios to the Baseline scenario with no shocks.