Earth system modeling with endogenous and dynamic human societies: the copan:CORE open World-Earth modeling framework

Analysis of Earth system dynamics in the Anthropocene requires to explicitly take into account the increasing magnitude of processes operating in human societies, their cultures, economies and technosphere and their growing feedback entanglement with those in the physical, chemical and biological systems of the planet. However, current state-of-the-art Earth System Models do not represent dynamic human societies and their feedback interactions with the biogeophysical Earth system and macroeconomic Integrated Assessment Models typically do so only with limited scope. This paper (i) proposes design principles for constructing World-Earth Models (WEM) for Earth system analysis of the Anthropocene, i.e., models of social (World) - ecological (Earth) co-evolution on up to planetary scales, and (ii) presents the copan:CORE open simulation modeling framework for developing, composing and analyzing such WEMs based on the proposed principles. The framework provides a modular structure to flexibly construct and study WEMs. These can contain biophysical (e.g. carbon cycle dynamics), socio-metabolic/economic (e.g. economic growth) and socio-cultural processes (e.g. voting on climate policies or changing social norms) and their feedback interactions, and are based on elementary entity types, e.g., grid cells and social systems. Thereby, copan:CORE enables the epistemic flexibility needed for contributions towards Earth system analysis of the Anthropocene given the large diversity of competing theories and methodologies used for describing socio-metabolic/economic and socio-cultural processes in the Earth system by various fields and schools of thought. To illustrate the capabilities of the framework, we present an exemplary and highly stylized WEM implemented in copan:CORE that illustrates how endogenizing socio-cultural processes and feedbacks could fundamentally change macroscopic model outcomes.


Introduction
In the Anthropocene, Earth system dynamics is equally governed by two kinds of internal processes: those operating in the physical, chemical, and biological systems of the planet and those occurring in its human societies, their cultures and economies (Schellnhuber, 1998(Schellnhuber, , 1999Crutzen, 2002;Steffen et al., 2018). The history of global change is the history of the increasing planetary-scale entanglement and strengthening of feedbacks between these two domains (Lenton and Watson, 2011). Therefore, Earth system analysis of the Anthropocene requires to close the loop by integrating the dynamics of complex human societies into integrated whole Earth system models (Verburg et al., 2016;Donges et al., 2017a, b). Such models need to capture the co-evolving dynamics of the social (the World of human societies) and natural (the biogeophysical Earth) spheres of the Earth system on up to global scales and are referred to as World-Earth models (WEMs) in this article. In pursuing this interdisciplinary integration effort, World-Earth modeling can benefit from and build upon the work done in fields such as social-ecological systems (Berkes et al., 2000;Folke, 2006) and coupled human and natural systems (Liu et al., 2007) research or land-use (Arneth et al., 2014) and socio-hydrological modeling (Di Baldassarre et al., 2017). However, it emphasizes more the study of planetary scale interactions between human societies and parts of the Earth's climate system such as atmosphere, ocean and the biosphere, instead of more local and regional scale interactions with natural resources that these fields have typically focused on in the past .
The contribution of this paper is twofold: First, following a more detailed motivation (Sect. 1.1), general theoretical considerations and design principles for a novel class of integrated WEMs are discussed (Sect. 1.2) and WEMs are discussed in the context of existing global modelling approaches (Sect. 1.3). Second, after a short overview of the copan:CORE open World-Earth modeling framework (Sect. 2), an exemplary full-loop WEM is presented and studied (Sect. 3), showing the relevance of internalizing socio-cultural processes. Finally, Sect. 4 concludes the paper.

State of the art and research gaps in Earth system analysis
Computer simulation models are pivotal tools for gaining scientific understanding and providing policy advice for addressing global change challenges such as anthropogenic climate change or rapid degradation of biosphere integrity and their interactions (Rockström et al., 2009;Steffen et al., 2015). At present, two large modeling enterprises considering the larger Earth system in the Anthropocene are mature (van Vuuren et al., 2016): (i) Biophysical "Earth system models" (ESMs) derived from and built around a core of atmosphere-ocean general circulation models that are evaluated using storyline-based socioeconomic scenarios to study anthropogenic climate change and its impacts on human societies (e.g., representative concentration pathways, RCPs) (Stocker et al., 2013). (ii) Socio-economic Integrated Assessment Models (IAMs) are operated using storylinebased socio-economic baseline scenarios (e.g., shared socio-economic pathways, SSPs, Edenhofer et al. (2014)) and evaluate technology and policy options for mitigation and adaption leading to different emission pathways. There is a growing number of intersections, couplings and exchanges between the biophysical and socio-economic components of these two model classes for increasing their consistency (van Vuuren et al., 2012;Foley et al., 2016;Dermody et al., 2018;. However, the existing scientific assessment models of global change include only to a limited degree -if at all -dynamic representations of the socio-cultural dimensions of human societies (Fig. 1), i.e. the diverse political and economic actors, the factors influencing their decisions and behavior, their interdependencies constituting social network structures and institutions (Verburg et al., 2016;Donges et al., 2017a, b) as well as the broader technosphere they created (Haff, 2012(Haff, , 2014. In IAMs, these socio-cultural dimensions are partly represented by different socio-economic scenarios (e.g., SSPs), providing the bases for different emission pathways. These are in turn used in ESMs as external forcing, constraints and boundary conditions to the modeled Earth system dynamics. However, a dynamic representation would be needed to explore how changes in the global environment influence these socio-cultural factors and vice versa.
There are large differences in beliefs, norms, economic interests, and political ideologies of various social groups, and their metabolic profiles, which are related to their access and use of energy and resources Otto et al., 2019;Lenton et al., 2016;Lenton and Latour, 2018). Historical examples show that these differences might lead to rapid social changes, revolutions and sometimes also devastating conflicts, wars and collapse (Betts, 2017;Cumming and Peterson, 2017).
In other cases, the inability to establish effective social institutions controlling resource access might lead to unsustainable resource use and resource degradation (see the discussion around the tragedy of the commons, Ostrom, 1990;Jager et al., 2000;Janssen, 2002). Climate change is a paradigmatic example of a global commons that needs global institutional arrangements for the usage of the atmosphere as a deposit for greenhouse gas emissions if substantial environmental and social damages are to be avoided in the future (Edenhofer et al., 2015;Schellnhuber et al., 2016b;Otto et al., 2017).
In order to explore the risks, dangers and opportunities for sustainable development, it is important to understand how biophysical, socio-economic and socio-cultural processes influence each other , how institutional and other social processes function, and which tipping elements can emerge out of the interrelations of the subsystems (Lenton et al., 2008;Kriegler et al., 2009;Cai et al., 2016;Kopp et al., 2016). To address these questions, the interactions of social systems and the natural Earth system can be regarded as part of a planetary social-ecological system (SES) or World-Earth system, extending the notion of SES beyond its common usage to describe systems on local scales (Berkes et al., 2000;Folke, 2006). This dynamical systems perspective allows to explore under which preconditions the maintenance of planetary boundaries (Rockström et al., 2009;Steffen et al., 2015), i.e., a Holocene-like state of the natural Earth System, can be reconciled with human development to produce an ethically defensible trajectory of the whole Earth system (i.e., sustainable development) (Raworth, 2012;Steffen et al., 2018).

World-Earth modeling: contributions towards Earth system analysis of the Anthropocene
To this end, the case has been made that substantial efforts are required to advance the development of integrated World-Earth system models (Verburg et al., 2016;Donges et al., 2017a, b). The need for developing such next generation social-ecological models has been recognized in several subdisciplines of global change science dealing with socio-hydrology (Di Baldassarre et al., 2017;Keys and Wang-Erlandsson, 2018), land-use dynamics (Arneth et al., 2014;, and the globalized food-water-climate nexus (Dermody et al., 2018). While in recent years there has been some progress in developing stylized models that combine socio-cultural with economic and natural dynamics (e.g. Janssen and De Vries (1998); Kellie- It is shown to what degree current Earth system models, integrated assessment models and WEMs cover environmental/biophysical, socio-economic/metabolic, and socio-cultural processes, respectively. The term "process-detailed" indicates the types of Earth system processes that the different model classes typically focus on representing. However, also in these core areas the level of detail may range from very stylized to complex and highly structured.
Smith and Cox (2011); Garrett (2014); Motesharrei et al. (2014); Wiedermann et al. (2015); Heck et al. (2016); Barfuss et al. (2017); ), more advanced and process-detailed WEMs are not yet available for studying the deeper past and the longer-term Anthropocene future of this coupled system. The research program investigating the dynamics and resilience of the World-Earth system in the Anthropocene can benefit from recent advances in the theory and modeling of complex adaptive systems (Farmer et al., 2015;Verburg et al., 2016;Donges et al., 2017a, b). When going beyond stylized modelling, a key challenge for World-Earth modeling is the need to take into account the agency of heterogeneous social actors and global-scale adaptive networks carrying and connecting social, economic and ecological processes that shape social-ecological co-evolution.
A number of new developments make it attractive to re-visit the challenge of building such WEMs now. Due to the huge progress in computing, comprehensive Earth system modeling is advancing fast. And with the ubiquity of computers and digital communication for simulation and data acquisition in daily life (Otto et al., 2015), efforts to model complex social systems are increased and become more concrete. Recent advances for example in complex systems theory, computational social sciences, social simulation and social-ecological systems modeling (Farmer and Foley, 2009;Farmer et al., 2015;Helbing et al., 2012;Müller-Hansen et al., 2017) make it feasible to include some important macroscopic dynamics of human societies regarding among others the formation of institutions, values, and preferences, and various processes of decision-making into a model of the whole Earth system, i.e., the physical Earth including its socially organised and mentally reflexive humans. Furthermore, new methodological approaches are developing fast that allow representing crucial aspects of social systems, such as adaptive complex networks (Gross and Blasius, 2008;Snijders et al., 2010). Finally, initiatives such as Future Earth (Future Earth, 2014) and the Earth League (Rockström et al. (2014), www.the-earth-league.org) provide a basis for inter-and trans-disciplinary research that could support such an ambitious modeling program. In turn, WEMs as envisioned by us here are needed when the research questions at hand require the explicit and internalized representation of socio-cultural processes and their feedback interactions with biophysical and socio-economic dynamics in the Earth system. In the following, we give examples for research questions of this type that could be studied with WEMs in the future, as they have been already elaborated in more detail by, e.g. Verburg et al. (2016) and Donges et al. (2017a, b): 1. What are the socio-cultural, -economic and environmental preconditions for sustainable development towards and within a "safe and just" operating space for humankind (Barfuss et al., 2018;O'Neill et al., 2018), i.e., for a trajectory of the Earth system that eventually neither violates precautionary planetary boundaries (Rockström et al., 2009;Steffen et al., 2015) nor acceptable social foundations (Raworth, 2012)? 2. A more specific example of the previous questions is: How can major socio-economic transitions towards a decarbonized social metabolism, such as a transformation of the food and agriculture system towards a sustainable, reduced-meat diet that is in line with recent recommendations by the EAT-Lancet Commission on healthy diets (Willett et al., 2019), be brought about in view of the strong socio-cultural drivers of current food-related and agricultural practises and the reality of the political economy in major food-producing countries? And how would their progress be influenced by realized or anticipated tipping of climatic tipping elements like the Indian monsoon system?
3. Under which conditions can cascading interactions between climatic (e.g., continental ice sheets or major biomes such as the Amazon rain forest) and potential social tipping elements (e.g., in attitudes towards ongoing or anticipated climate change or eco-migration) be triggered and how can they be governed (Schellnhuber et al., 2016a;Steffen et al., 2018)? What are implications for biophysical and social-ecological dimensions of Earth system resilience in the Anthropocene (Donges et al., 2017a)?
4. How do multilevel coalition formation processes (like the one modeled in Heitzig and Kornek (2018) assuming a static climate) interact with Earth system dynamics via changes in regional damage functions, mitigation costs, and realized or anticipated distributions of extreme events that drive changes in public opinions which in turn influence the ratification of international treaties and the implementation of domestic climate policies?

Design principles for World-Earth models
To address research questions of the kinds suggested by the examples given above, we suggest that the development of WEMs of the type discussed in this paper could be guided by aiming for the following properties: 1. Explicit representation of social dynamics. Societal processes should be represented in an explicit, dynamic fashion in order to do justice to the dominant role of human societies in the Anthropocene. (In contrast, social process occur typically non-dynamically in ESMs as fixed socio-economic pathways; and in IAMs as inter-temporal optimization problem.) Such social processes such as social learning may be included in models via comparably simple equationbased descriptions (e.g. Donges et al. (2018)). Yet, more detailed WEMs should also allow also for representations of the dynamics of the diverse agents and the complex social structure connecting them that constitute human societies, using the tools of agent-based and adaptive network modeling (Farmer and Foley, 2009;Farmer et al., 2015;Müller-Hansen et al., 2017). The social sphere is networked on multiple layers and regarding multiple phenomena (knowledge, trade, institutions, preferences etc.) and that increasing density of such interacting network structures is one of the defining characteristics of the Anthropocene (Steffen et al., 2007;Gaffney and Steffen, 2017). While there is a rich literature on modeling various aspects of socio-cultural dynamics (e.g. Castellano et al. (2009);Snijders et al. (2010); Müller-2. Feedbacks and co-evolutionary dynamics WEMs should incorporate as dynamic processes the feedbacks of collective social processes on biogeophysical Earth system components and vice versa. The rationale behind this principle is that the strengthening of such feedbacks, e.g. the feedback loop consisting of anthropogenic greenhouse gas emissions driving climate change acting back on human societies through increasingly frequent extreme events, is one of the key characteristics of the Anthropocene. Moreover, the ability to simulate feedbacks is central to a social-ecological and complex adaptive systems approach to Earth system analysis. Capturing these feedbacks enables them to produce paths in co-evolution space (Schellnhuber, 1998(Schellnhuber, , 1999 through time-forward integration of all entities and networks allowing for deterministic and stochastic dynamics. Here, time-forward integration refers to simulation of changes in system state over time consecutively in discrete time-steps, rather than solving equations that describe the whole time evolution at once as in inter-temporal optimization. 3. Nonlinearity and tipping dynamics WEMs should be able to capture the nonlinear dynamics that is a prerequisite for modeling climatic (Lenton et al., 2008) and social tipping dynamics (Kopp et al., 2016;Milkoreit et al., 2018) and their interactions (Kriegler et al., 2009) that are not or only partially captured in ESMs and IAMs. This feature is important because the impacts of these critical dynamics are decisive for future trajectories of the Earth system in the Anthropocene, e.g. separating stabilized Earth states that allow for sustainable development from hothouse Earth states of self-amplifying global warming (Steffen et al., 2018).

Cross-scale interactions
Modeling approaches for investigating social-ecological or coupled human and natural system dynamics have already been developed. However, they usually focus on local or small-scale human-nature interactions (Schlüter et al., 2012). Therefore, such approaches need to be connected across scales and up to the planetary scale and incorporate insights from macro-level and global modeling exercises (Cash et al., 2006).

5.
Systematic exploration of state and parameter spaces WEMs should allow for a comprehensive evaluation of state and parameter spaces to explore the universe of accessible system trajectories and to enable rigorous analyses of uncertainties and model robustness. Hence, they emphasize neither storylines nor optimizations but focus on the exploration of the space of dynamic possibilities to gain systemic understanding. This principle allows for crucial Anthropocene Earth system dynamics to be investigated with state-of-the-art methods from complex systems theory, e.g., for measuring different aspects of stability and resilience of whole Earth system states (Menck et al., 2013;van Kan et al., 2016;Donges and Barfuss, 2017) and for understanding and quantifying planetary boundaries, safe operating spaces and their manageability and reachability as emergent system properties across scales (Heitzig et al., 2016;Kittel et al., 2017).

World-Earth models compared to existing modeling approaches of global change
It is instructive to compare WEMs more explicitly than above to the two existing classes of global change models, Earth System Models and Integrated Assessment Models, in terms of to what degree they represent biophysical, socio-metabolic/economic and socio-cultural subsystems and processes in the World-Earth system (Fig. 1). Before discussing how model classes map to these process types, we describe the latter in more detail.

Basic process taxa in World-Earth models
Based on the companion article by Donges et al. (2018) that is also part of the Special Issue in Earth System Dynamics on "Social dynamics and planetary boundaries in Earth system modeling", we classify processes occurring in the World-Earth system into three major taxa that represent the natural and societal spheres of the Earth system as well as their overlap (Fig. 2).
We give only a rough definition and abstain from defining a finer, hierarchical taxonomy, being aware that gaining consensus among different disciplines on such a taxonomy would be unlikely, and thus leaving the assignment of individual processes and attributes to either taxon to the respective model component developers: Environment (ENV; environmental, biophysical and natural processes) The 'environment' process taxon is meant to contain biophysical or "natural" processes from material subsystems of the Earth system that are not or only insignificantly shaped or designed by human societies (e.g., atmosphere-ocean diffusion, growth of unmanaged vegetation, and maybe the decay of former waste dumps).
Metabolism (MET; socio-metabolic and economic processes) The 'metabolism' process taxon is meant to contain sociometabolic and economic processes from material subsystems that are designed or significantly shaped by human societies (e.g., harvesting, afforestation, greenhouse gas emissions, waste dumping, land-use change, infrastructure building). Social metabolism refers to the material flows in human societies and the way societies organize their exchanges of energy and materials with nature Martinez-Alier, 2009).
Culture (CUL; socio-cultural processes) The 'culture' process taxon is meant to contain socio-cultural processes from immaterial subsystems (e.g., opinion adoption, social learning, voting, policy-making) that are described in models in a way abstracted from their material basis. Culture in its broadest definition refers to everything what people do, think and possess as members of society (Bierstedt, 1963, p. 129). Socio-cultural processes such as value and norm changes have been suggested to be key for understanding the deeper human dimensions of Earth systen dynamics in the Anthropocene (Nyborg et al., 2016;Gerten et al., 2018) 1.3.2 Mapping model classes to Earth system processes Earth System Models focus on the process-detailed description of biogeophysical dynamics (e.g., atmosphere-ocean fluid dynamics or biogeochemistry), while socio-metabolic processes (e.g., economic growth, greenhouse gas emissions and land use) are incorporated via external forcing and socio-cultural processes (e.g., public opinion formation, political and institutional dynamics) are only considered through different scenarios regarding the development of exogenous socio-metabolic drivers. Integrated Assessment Models contain a stylized description of biophysical dynamics, are process-detailed in the socio-metabolic/economic domains and are driven by narratives in the socio-cultural domain. In turn, WEMs should ultimately include all three domains equally. However, the focus of current and near-future developments in World-Earth modeling would likely lie on the development of a detailed description of socio-cultural processes because they are the ones where the least work has been done so far in formal Earth system modeling.

The copan:CORE open World-Earth modeling framework
Here we give a short overview of the World-Earth open modeling framework copan:CORE that was designed following the principles given above (Sect. 1.2) and is more formally described and justified in detail in the Supplementary Information. It enables a flexible model design around standard components and model setups that allows investigation of a broad set of case studies and research questions using both simple and complex models. Its flexibility and role-based modularization support flexible scripting by end users, interoperability and dynamic coupling with existing models, and a collaborative and structured development in larger teams. copan:CORE is an open, code-based (rather than graphical) simulation modeling framework with a clear focus on Earth system models with endogenous human societies. In other words, it is a tool that provides a standard way to build and run simulation models without giving preference to any particular modeling approach or theory describing human behavior and decision making and other aspects of social dynamics (Müller-Hansen et al., 2017;Schlüter et al., 2017). All components can be developed and maintained by different model developers and flexibly composed into tailor-made models used for particular studies by again different researchers. The framework facilitates the integration of different types of modeling approaches. It permits for example to combine micro-economic models (e.g., of a labor market at the level of individuals) with systems of ordinary differential equations (modeling for example a carbon cycle). Similarly, systems of implicit and explicit equations (e.g., representing a multi-sector economy) can be combined with Markov jump processes (for example representing natural hazards). It also provides coupling capabilities to preexisting biophysical Earth system and economic integrated assessment models and thus helps to benefit from the detailed process representations embedded in these models. Many of our design choices are based on experiences very similar to those reported in , in particular regarding the iterative process of scientific modeling and the need for open code, a common language for a broader community, and a high level of consistency without losing flexibility. These features distinguish the copan:CORE modeling framework from existing modeling frameworks and platforms.
A model composed with copan:CORE describes a certain part of the World-Earth system as consisting of a potentially varying set of entities ("things that are", e.g., a spot on the Earth's surface, the European Union, yourself), which are involved in processes ("things that happen", e.g., vegetation growth, economic production, opinion formation) that affect entities' attributes ("how things are", e.g., the spot's harvestable biomass, the EU's gross product, your opinion on fossil fuels, the atmosphereocean diffusion coefficient) which represent the variables (including parameters) of a model. An attribute can have a simple or complex data type, e.g. representing a binary variable, a whole social network, or, to facilitate interoperability and validation, a dimensional quantity with a proper physical unit.
Entities are classified by entity type (cell, social system, individual, . . . ), processes by their formal process type (see below), and both are represented by objects in an object-oriented software design, currently using the Python programming language.
x + 2y = 42 adaptive network modelling agent based modelling stochastic events p Figure 2. Overview of copan:CORE open World-Earth modeling framework. The entities in copan:CORE models are classified by entity types (e.g., grid Cell, Social system, Individual, see middle column). Each process belongs to either a certain entity type or a certain process taxon (left column). Processes are further distinguished by formal process types (see text for a list) which allow for various different modeling approaches (right column). Entity types, process taxa and process types can be freely combined with each other (grey lines). Thick grey lines indicate which combinations are most common. The copan:CORE framework allows to consistently build World-Earth models across the spectrum from stylized and globally aggregated to more complex and highly resolved in terms of space and social structure. Hence, entity types, process taxa and types may or not be present in specific models. For example, a stylized and globally aggregated model would describe the dynamics of entity types World and Social system and neither contain Cells nor Individual agents as entities.
Each process and each attribute belongs to an entity type or a process taxon (environmental, socio-metabolic, socio-cultural).
Currently, the following formal process types are supported, enabling typical modeling approaches: -Ordinary differential equations representing continuous time dynamics, -Explicit or implicit algebraic equations representing (quasi-)instantaneous reactions or equilibria, -Steps in discrete time representing processes aggregated at the level of some regular time interval or for coupling with external, time-step-based models or model components, and -Events happening at irregular or random time points, representing e.g. agent-based and adaptive network components or externally generated extreme events).
Processes can be implemented either using an imperative programming style via class methods, or using symbolic expressions representing mathematical formulae. copan:CORE's modularization and role concept distinguishes -Model components developed by model component developers, implemented as subpackages of the copan:CORE software package providing interface and implementation mixin classes for entity types and process taxa, -Models made from these by model composers, implemented by forming final entity types and process taxa from these mixin classes, -Studies by model end users in the form of scripts that import, initialize and run such a model, -A master data model providing metadata for common variables to facilitate interoperability of model components and a common language for modelers, managed by a modeling board.
Entity types and their basic relations shipped with copan:CORE are: -'World', representing the whole Earth (or some other planet).
-'Cell', representing a regularly or irregularly shaped spatial region used for discretising the spatial aspect of processes and attributes which are actually continuously distributed in space.
-'Social system', representing what is sometimes simply called a 'society', i.e. "an economic, social, industrial or cultural infrastructure" (Wikipedia, 2017) such as a megacity, country, or the EU. It can be interpreted as a human-designed and human-reproduced structure including the flows of energy, material, financial and other resources that are used to satisfy human needs and desires, influenced by the accessibility and usage of technology and infrastructure Otto et al., in review), and may include social institutions such as informal systems of norms, values and beliefs, and formally codified written laws and regulations, governance and organizational structures ).
-'Individual', representing a person, typically used in an network-, game-theoretic, or agent-based component. In contrast to certain economic modeling approaches that use "representative" consumers, an 'individual' in copan:CORE is not meant to represent a whole class of similar individuals (e.g., all the actual individuals of a certain profession) but just one specific individual. Still, the set of all 'individuals' contained in a model will typically be interpreted as being a representative sample of all relevant real-world people. Each individual resides in a cell that belongs to a social system.

Fig. 2 illustrates these concepts.
Although there is no one-to-one correspondence between process taxa, entity types, and modeling approaches, some combinations are expected to occur more often than others, as indicated by the thicker gray connections in Fig. 2. We expect environmental (ENV) processes to deal mostly with 'cells' (for local processes such as terrestrial vegetation dynamics described with spatial resolution) and 'world(s)' (for global processes described without spatial resolution, e.g., the greenhouse effect) and sometimes 'social systems' (for mesoscopic processes described at the level of a social system's territory, e.g., the environmental diffusion and decomposition of industrial wastes). Socio-metabolic (MET) processes will primarily deal with 'social systems' (e.g., for processes described at national or urban level), 'cells' (for local socio-metabolic processes described with additional spatial resolution for easier coupling to natural processes) and 'world(s)' (for global socio-metabolic processes such as international trade), and only rarely with 'individuals' (e.g., for micro-economic model components such as consumption, investment or the job market). Socio-cultural (CUL) processes will mostly deal with 'individuals' (for "micro"-level descriptions) and 'social systems' (for "macro"-level descriptions), and rarely 'world(s)' (for international processes such as diplomacy or treaties). Other entity types such as, e.g., firms, social groups or institutions can be added to the framework if needed.  Table 1. Possible classification of exemplary model processes by owning process taxon (row) and affected process taxon (column) (following the taxonomy developed in the companion paper Donges et al., 2018): environmental (ENV), social-metabolic (MET) and socio-cultural of real-world global aggregates in order to make the example as accessible as possible, the shown time evolutions may not be interpreted as any kind of meaningful quantitative prediction or projection.
In spite of this modest goal here, it will become obvious from the presented scenarios that including socio-cultural dynamics such as migration, environmental awareness, social learning, and policy making into more serious models of the global coevolution of human societies and the environment will likely make a considerable qualitative difference for their results and thus have significant policy implications.
The example model includes the following groups of processes: (1)  the local biomass density and diffuses through a social acquaintance network via a standard model of social learning (see e.g., Holley and Liggett, 1975). These processes cover all possible process taxon interactions as shown in Table 1 and are distributed over six model components in the code as shown in Fig. 4.
We now describe the model components in detail. As many processes add terms to variables' time derivatives, we use the notationẊ += Y to indicate this. The effective time evolution of X is then determined by the sum of the individual processes given below.

Entity types
The example model contains one 'world' representing the planet, two 'social systems' representing the global North and South, four 'cells' representing major climate zones: 'Boreal' and 'Temperate' belonging to the territory of North, and 'Subtropical' and 'Tropical' belonging to South, and 100 representative 'individuals' per cell which form the nodes of a fixed acquaintance network.

Global carbon cycle
Our carbon cycle follows a simplified version of Anderies et al. (2013) (processes of type 'ODE'), with a diffusion rate d = 0.016/yr and a solubility parameter m = 1.5. On the level of a cell c, A and the cell's terrestrial carbon stock L c (initially 620 GtC for all four c) are changed by a respiration flow RF c and a photosynthesis flow P F c , The respiration rate depends linearly on temperature, which is expressed as a dependency on atmospheric carbon density A/Σ, where Σ = 1.5e8 km 2 is the total land surface area, so that with a basic rate a 0 = 0.0298/yr and carbon sensitivity a A = 3200 km 2 /GtC/yr. The photosynthesis rate also depends linearly on temperature (and hence on A) with an additional carbon fertilization factor growing concavely with A/Σ and a space competition factor similar to a logistic equation, giving with land area Σ c = Σ/4, parameters l 0 = 34 km/GtC 1/2 /yr and l A = 1.1e6 km 3 /GtC 3/2 /yr, and per-area terrestrial carbon capacity k = 25e3 GtC/1.5e8 km 2 . Note that especially the linear temperature dependency and the missing water dependency make this model rather stylized, see also Lade et al. (2017).

Economic production
As in , economic activity consists of producing a final good Y from labour (assumed to be proportional to population P ), physical capital K (initially K N orth = 4e13 $, K South = 2e13 $), and energy input flow E. The latter is the sum of the outputs of three energy sectors, fossil energy flow E F , biomass energy flow E B , and (other) renewable energy flow R. The process is described by a nested Leontieff/Cobb-Douglas production function for Y and Cobb-Douglas production functions for E F , E B , R, all of them here on the level of a cell c: In this, y E = 147 $/GJ is the energy efficiency, G c is the cell's fossil reserves (initially 0.4, 0.3, 0.2 and 0.1×1125 GtC in the Boreal, Temperate, Subtropical and Tropical cells), L p c is the environmentally protected amount of terrestrial carbon (see below), S s gives the renewable energy production knowledge stock of the corresponding social system s (initially 2e11 GJ), and κ • = π • = γ = λ = σ = 2/5 are elasticities leading to slightly increasing returns to scale. The productivity parameters b • have units that depend on the elasticities and are chosen so that initial global energy flows roughly match the observed values: b F = 1.4e9 (GJ/yr) 5 /(GtC $) 2 , b B = 6.8e8 (GJ/yr) 5 /(GtC $) 2 , and b R,c = 0.7, 0.9, 1.1 and 1.3 times the mean value b R = 1.75 × 10 −11 (GJ/yr) 5 /(GJ $) 2 in Boreal, Temperate, Subtropical and Tropical to reflect regional differences in solar insolation.
As in , we assume b Y b B , b F , b R so that its actual value has no influence because then K Y,c K s and P Y,c Y s . Furthermore, K •,c , P •,c are the shares of a social system s's capital K s and labour L s that are endogenously allocated to the production processes in cell c so that and similarly for its population P s . The latter shares are determined on the social system level in a general equilibrium fashion by equating both wages (= marginal productivity of labour) and rents (= marginal productivity of capital) in all cells and sectors, assuming costless and immediate labour and capital mobility between all cells and sectors within each social system: for all c ∈ s, and similarly for K •,c . The production functions and elasticities are chosen so that the corresponding equations can be solved analytically (see  for details), allowing us to first calculate a set of "effective sector/cell productivities" by a process of type 'explicit equation' on the Cell level, which are used to determine the labour and capital allocation weights P •,c /P s and K •,c /K s , and then calculate output Y s , carbon emissions, and all cells' fossil and biomass extraction flows in another process of type 'explicit equation' on the social system level. Given the latter, a second process of type 'ODE' on the social system level changes the stocks A, G c and L c for all cells accordingly.

Economic growth
Again as in , but here on the social system level, a fixed share i (here 0.244) of economic production Y s is invested into physical capital K s , Capital also depreciates at a rate that depends linearly on surface air temperature to represent damages from climate change, with k 0 = 0.1/yr, k T = 0.05/yr/K, and T K = 287 K. In addition, renewable energy production knowledge S s grows proportional to its utilization via learning-by-doing, Finally, we interpret S s as a form of human capital that also depreciates at a constant rate (due to forgetting or becoming useless because of changing technology, etc.), with β = 0.02/yr. Note that unlike in , we consider populations to be constant at P N orth s = 1.5e9 and P South s = 4.5e9 to avoid the complexities of a wellbeing-driven population dynamics component (which could however be implemented in the same way as in  on the social system level).

Environmental awareness
On the level of the 'Culture' process taxon, an "awareness updating" process of type 'event' occurs at random time points with a constant rate (i.e., as a Poisson process, here with rate 4/yr), representing times at which many people become aware of the state of the environment, e.g., because of notable environmental events. At each such time point, each individual independently updates her environmental friendliness (a Boolean variable) with a certain probability. When i updates, she switches from "false" to "true" with a probability ψ + depending on the terrestrial carbon density in her cell c, T CD c = L c /Σ c , given by and switches from "true" to "false" with a probability where T CD ⊥ = 1e−5 and T CD = 4e−5 are sensitivity parameters with T CD ⊥ < T CD to generate hysteresis behaviour.
As a consequence, a fraction L p c of the terrestrial carbon L c is protected from harvesting for economic production. This fraction is proportional to the cell's social system's population share represented by those individuals i which are environmentally friendly. The initial share of environmentally friendly individuals will be varied in the bifurcation analysis below.

Social learning
Similarly, on the Culture level, "social learning" events occur at random time points with a constant rate (here 4/yr), representing times at which the state of the environment becomes a main topic in the public debate. At each such time point, each individual i independently compares her environment with that of a randomly chosen acquaintance j with a certain fixed probability (here 1/10). j then convinces i to copy j's environmental friendliness with a probability ψ that depends via a sigmoidal function on the difference-in-logs between both home cells' terrestrial carbon densities, where φ = 1 and ρ = 1 are slope and offset parameters. The underlying social network is a block model network in which each individual is on average linked to 10 randomly chosen others: 5 in the same cell, 3.5 in the other cell of the same social system, and 1.5 in the other social system.

Voting on climate policy
Each (of the two) social systems performs general elections at regular time intervals (hence implemented as a process of type 'step', here every 4 years) which may lead to the introduction or termination of climate policies. If at the time t of the election, more than a certain threshold (here 1/2) of the population is environmentally friendly, both a subsidy for renewables (here 50 $/GJ) is introduced and use of fossils is banned. This leads to a shift in the energy price equilibrium that determines the energy sector's allocation of labour and capital, which then reads marginal production cost of biomass energy = marginal production cost of renewable energy − renewable subsidy.
Conversely, if these policies are already in place but the environmentally friendly population share is below some other thresholds (here as well 1/2), these policies are terminated.
Note that we have chosen to model awareness-formation and social learning in an agent-based fashion here mainly to illustrate that such an approach can be easily combined with other approaches in copan:CORE, not because we want to claim that an agent-based approach is the most suitable here. Indeed, one may well want to replace these two agent-based model components by equation-based versions which approximate their behaviour in terms of macroscopic quantities (e.g. as in Wiedermann et al. (2015)), and because of the modular design of copan:CORE, this can easily be done and the two model versions could be compared (still, this is beyond the scope of this paper).

Results
In Due to the technology becoming competitive, the South changes its energy production to renewable energy comparatively early in the simulation, resulting in a fast fading out of biomass and fossils as an energy source. Due to its larger fossil reserves and lower solar insolation, the North takes two decades longer to make this switch. However, this delay in the North causes high atmospheric carbon, hence a high global mean temperature, which due to our oversimplified vegetation model makes the terrestrial carbon stock decline further even after biomass has been phased out as an energy source as well, recovering only much later (not shown). In both social systems, economic growth declines until the switch, then boosts and later declines again since neither population nor total factor productivity grow in our model. Once the South switches to renewables, they hence overtake the North, and this reversed inequality is then sustained since our model includes no trade, knowledge spillovers, migration or other direct interaction which would lead to economic convergence. Certainly, such results are not in itself realistic (as this model does not intend to be) or transferable to real-world application. Future WEM's, therefore, should include such processes beyond pure economic ones in order to properly capture real-World-Earth dynamics; see the Supplementary Information for some corresponding extensions of this model.
If social processes are considered, we obtain qualitatively similar, but quantitatively different trajectories, e.g. in the right panel of Fig. 5, where we assume initially 40% are environmentally friendly. As before, both social systems initially rely on energy produced from fossils and biomass, but as biomass reduces terrestrial carbon density, environmental awareness makes some people environmentally friendly and this spreads via social learning. Once half of the population is environmentally friendly, the next elections in that social system bring a fossil ban and subsidies for renewables. This causes a slightly earlier switch to renewables than before, especially in the North (dashed lines in Fig. 5). This ultimately results in lower atmospheric and ocean carbon stocks, lower peak temperatures, less cumulative use of fossil fuels, and a much faster recovery of terrestrial carbon. from 1/50yr (less than once in a generation) to 12/yr (once every month) and compute the carbon stocks as well as the GDP per capita and the global mean temperature in model year 120 for an ensemble of 50 simulations per learning rate (Fig. 6) and the same initial conditions for all runs (we thus do not test for a possible multistability of the system).
For learning rates lower than 1/yr (slow learning) the carbon stocks as well as the global mean temperature align well for the two simulation setups, i.e, the one with (scatter points) and without social processes (dashed lines). In contrast, for learning rates larger than 1/yr (faster learning) the individuals become more capable of assessing the consequences of their behaviour (in our case extensive biomass use) before the system has reached a state with low terrestrial and high atmospheric and ocean carbon stocks. As such, increasing the learning rate also causes an increase in the terrestrial carbon stock combined with a decrease of the atmospheric and ocean carbon stocks (in model year 120). This behaviour is also reflected in the global mean temperature which decreases as the learning rate increases. Hence, with respect to the environment social learning only has a positive effect if it happens at sufficiently high rate (around once to more than once a year). It remains to note that learning rates have in the past already been shown to have a profound impact on the state and dynamics of a coupled socio-ecological system, a feature that is recovered in our simple WEM as well (Wiedermann et al., 2015;Auer et al., 2015;Barfuss et al., 2017).
The metabolic variable GDP per capita interestingly already increases much earlier (i.e., for much lower learning rates than 1/yr) as compared to the changes in the environmental variables. This implies that for our specific WEM social processes generally seem to foster the economy regardless of their actual rate. Furthermore we observe that the South shows an approximately 3 times higher GDP per capita than the North, which is caused by the earlier switch to renewable energies in that social system (see third row of Fig. 5). As already stated above, note again, that these results are not intended as a realistic projection of future trajectories of the Earth System, but are discussed here to showcase the capabilities of the copan:CORE framework.
Using the pycopancore reference implementation, running the above two simulations ( Figure 5) took 140 seconds (without socio-cultural processes) and 290 seconds (including socio-cultural processes) on an E5-2690 CPU at 2.60 GHz. Since further performance improvements are desirable to support Monte-Carlo simulations, we aim at a community-supported development of an alternative, more production-oriented implementation in the C++ language.

Conclusions
In this paper, we presented a simulation modeling framework that aims at facilitating the implementation and analysis of World-Earth (or planetary social-ecological) models. It follows a modular design such that various model components can be combined in a plug-and-play fashion to easily explore the influence of specific processes or the effect of competing theories of social dynamics from different schools of thought  on the co-evolutionary trajectory of the system. The model components describe fine-grained yet meaningfully defined subsystems of the social and environmental domains of the Earth system and thus enable the combination of modeling approaches from the natural and social sciences. In the modeling framework, different entities such as geographic cells, individual humans, and social systems are represented and their attributes are shaped by environmental, socio-metabolic, and socio-cultural processes. The mathematical types of processes that can be implemented in the modeling framework range from ordinary differential and algebraic equations to deterministic and stochastic events. Due to its flexibility, the model framework can be used to analyze interactions at and between various scales -from local to regional and global.
The current version of the copan:CORE open modeling framework includes a number of tentative model components implementing, e.g., basic economic, climatic, biological, demographic and social network dynamics. However, to use the modeling framework for rigorous scientific analyses, these components have to be refined, their details have to be spelled out, and new components have to be developed that capture processes with crucial influence on World-Earth co-evolutionary dynamics.
For this purpose, various modeling approaches from the social sciences are available to be applied to develop comprehensive representations of such socio-metabolic and socio-cultural processes (Müller-Hansen et al., 2017, and references therein).
For example, hierarchical adaptive network approaches could be used to model the development of social groups, institutions and organizations spanning local to global scales or the interaction of economic sectors via resource, energy and information flows (Gross and Blasius, 2008;Donges et al., 2017a;Geier et al., 2019).
Making such an endeavor prosper requires the collection and synthesis of knowledge from various disciplines. The modular approach of the copan:CORE open modeling framework supports well-founded development of single model components, helps to integrate various processes and allows to analyze their interplay. We therefore call upon the interdisciplinary socialecological modeling community and beyond to participate in further model and application development to facilitate "whole" Earth system analysis of the Anthropocene. In this section, we present the World-Earth modeling framework copan:CORE that was designed following the principles given in Sect. 1 of the main text in more detail than in Sect. 2 of the main text. Here we describe our framework on three levels, starting with the abstract level independent of any software (Sects. 1.2 and 1.3), then describing the software design independent of any programming language (Sect. 1.4), and finally presenting details of our reference implementation in the Python language (Sect. 1.5).
In summary, copan:CORE enables a flexible model design around standard components and model setups that allows investigation of a broad set of case studies and research questions (Fig. 1). Its flexibility and role-based modularization are realized within an object-oriented software design and support flexible scripting by end users and interoperability and dynamic coupling with existing models -e.g., the terrestrial vegetation model LPJmL working on the cell level (Bondeau et al., 2007)

or other
Earth system models or integrated assessment models based on time-forward integration (rather than intertemporal optimization) such as IMAGE (van Vuuren et al.). On the level of model infrastructure, a careful documentation and software versioning via the 'git' versioning system aim to support collaborative and structured development in large teams using copan:CORE.

Features of the copan:CORE modeling framework
The copan:CORE World-Earth modeling framework presented in this paper is a code-based (rather than graphical) simulation modeling framework with a clear focus on Earth system models with complex human societies. It was developed within the flagship project 'copan -coevolutionary pathways' and will form the core of its further model development, which explains the naming. Similar to the common definition of 'software framework', we define a '(simulation) modeling framework' as a tool that provides a standard way to build and run simulation models.
We have designed copan:CORE to meet the special requirements for model development in the context of Earth system analysis: First, the framework's modular organization combines processes into model components. Different components can implement different, sometimes disputed, assumptions about human behavior and social dynamics from theories developed within different fields or schools of thought. This allows for comparison studies in which one component is replaced by a different component modeling the same part of reality in a different way and exploring how the diverging assumptions influence the model outcomes. All components can be developed and maintained by different model developers and flexibly composed into tailor-made models used for particular studies by again different researchers. Second, our framework provides coupling capabilities to preexisting biophysical Earth system and economic integrated assessment models and thus helps to benefit from the knowledge of the detailed processes embedded in these models.
Finally, copan:CORE facilitates the integration of different types of modeling techniques. It permits for example to combine agent-based models (e.g., of a labor market at the micro-level of individuals) with systems of ordinary differential equations (modeling for example a carbon cycle). Similarly, systems of implicit and explicit equations (e.g., representing a multi-sector economy) can be combined with Markov jump processes (for example representing economic and environmental shocks).
These features distinguish the copan:CORE modeling framework from existing modeling frameworks and platforms. Before we continue with a more detailed description of the modeling framework, we go back to the underlying design principles of WEMs that guided the development of copan:CORE.

Abstract structure
This section describes the abstract structure of models that can be developed with copan:CORE and gives rationales for our design choices, many of which are based on experiences very similar to those reported in , in particular regarding the iterative process of scientific modeling and the need for open code, a common language, and a high level of consistency without losing flexibility.

Entities, processes, attributes
A model composed with copan:CORE describes a certain part of the World-Earth system as consisting of a potentially large set (that may change over model time) of sufficiently well-distinguishable entities ("things that are", e.g., a spot on the Earth's surface, the European Union [EU], yourself). Entities are involved in a number of sufficiently well-distinguishable processes ("things that happen", e.g., vegetation growth, economic production, opinion formation). Processes in turn affect one or more attributes ("how things are", e.g., the spot's harvestable biomass, the EU's gross product, your opinion on fossil fuels, the atmosphere-ocean diffusion coefficient). During a model run, entities may come into existence (individuals may be born, social systems may merge into larger ones or fractionate), cease to exist (individuals may die, social systems may collapse), or may even be "reactivated" (e.g., an occupied country may regain independence).
Rationale. While for some aspects of reality an ontological distinction between entities, attributes of entities, and processes might be ambiguous, it corresponds very well to both the distinction of nouns, adjectives, and verbs in natural languages, and to the concepts of objects, object attributes, and methods in object-oriented programming. 1.2.2 Entity types, process taxa, process types copan:CORE classifies entities by entity types ("kinds of things that are", e.g., spatial grid cell, social system, individual), and allows to group (some or all) processes into process taxa (e.g., environmental, social-metabolic, socio-cultural). Each process and each attribute belongs to either a certain entity type or a certain process taxon. We deliberately do not specify criteria for deciding where processes belong since this is in part a question of style and academic discipline and there will inevitably be examples where this choice appears to be quite arbitrary and will affect only the model's description, implementation, and maybe its running time, but not its results.
Similarly, attributes may be modeled as belonging to some entity type (e.g., 'total population' might be modeled as an attribute of the 'social system' entity type) or to some process taxon (e.g., 'atmosphere-ocean diffusion coefficient' might be modeled as an attribute of the 'environment' process taxon). We suggest to model most quantities as entity type attributes and model only those quantities as process taxon attributes which represent global constants.
Independently of where processes belong to, they are also distinguished by their formal process type, corresponding to different mathematical modeling and simulation/solving techniques: continuous dynamics given by ordinary differential equations, -(quasi-)instantaneous reactions given by algebraic equations (e.g., for describing economic equilibria), steps in discrete time (e.g., for processes aggregated at annual level or for coupling with external, time-step-based models or model components), or events happening at irregular or random time points (e.g., for agent-based and adaptive network components or externally generated extreme events).
the latter two potentially have probabilistic effects. Later versions will also include support for stochastic differential equations or other forms of time-continuous noise, currently noise can only be modeled via time-discretized steps. Similarly, attributes have data types (mostly physical or socio-economic simple quantities of various dimensions and units, but also more complex data types such as references or networks). Rationale. When talking about processes, people from very different backgrounds widely use a subject-verb-object sentence structure even when the subject is not a conscious being and the described action is not deliberate (e.g., "the oceans take up carbon from the atmosphere"). copan:CORE therefore allows modelers to treat some processes as if they were "done by" a certain entity (the "subject" of the process) "to" itself and/or certain other entities (the "objects" of the process). Other processes for which there appears to be no natural candidate entity to serve as the "subject" can be treated as if they are happening "inside" or "on" some larger entity that contains or otherwise supports all actually involved entities. In both cases, the process is treated as belonging to some entity type. Still other processes such as multilateral trade may best be treated as not belonging to a single entity and can thus be modeled as belonging to some process taxon.
A twofold classification of processes according to both ownership and formal process type is necessary since there is no oneto-one relationship between the two, as the grey lines in Fig. 1 indicate. E.g., processes from all three taxa may be represented by ODEs or via stochastic events, and all shown entity types can own regular time stepped processes.

Modularization, model components, user roles
copan:CORE aims at supporting a plug-and-play approach to modeling and a corresponding division of labour between several user groups (or roles) by dividing the overall model-based research workflow into several tasks. As a consequence, we formally distinguish between model components and (composed) models.
A model component specifies (i) a meaningful collection of processes that belong so closely together that it would not make much sense to include some of them without the others into a model (e.g., plants' photosynthesis and respiration), (ii) the entity attributes that those processes deal with, referring to attributes listed in the master data model whenever possible, (iii) which existing (or, if really necessary, additional) entity types and process taxa these processes and attributes belong to. A The suggested workflow is then this: -If there is already a model that fits your research question, use that one in your study (role: model end user).
-If not, decide what model components the question at hand needs.
-If all components exist, compose a new model from them (role: model composer). Rationale. Although in smaller teams, one and the same person may act in all of the above roles, the proposed role concept helps structuring the code occurring in a model-based analysis into parts needed and maintained by different roles, a prerequisite for collaborative modeling, especially across several teams.
The additional concept of model components (in addition to entity types and taxa) is necessary since processes which belong together from a logical point of view and are hence likely to be modeled by the same person or team may still most naturally be seen as being owned by different entity types, and at the same time developers from several teams may be needed to model all the processes of some entity type.

Master data model and master component repository
The master data model defines entity types, process taxa, attributes, and physical dimensions and units which the modeling board members deem (i) likely to occur in many different models or model components and (ii) sufficiently well-defined and well-named (in particular, specific enough to avoid most ambiguities but avoiding a too discipline-specific language). Users are free to define additional attributes in their components but are encouraged to use those from the master data model or suggest new attributes for it.
The master component repository contains model components which the modeling board members deem likely to be useful for many different models, sufficiently mature and well-tested, and indecomposable into more suitable smaller components.
Users are free to distribute additional components not yet in the repository.
Rationale. Poorly harmonized data models are a major obstacle for comparing or coupling simulation models. Still, a perfectly strict harmonization policy that would require the prior approval of every new attribute or component would inhibit fast prototyping and agile development. This is why the above two catalogs and the corresponding role were introduced.

All attributes are treated as variables with metadata
Although many models make an explicit distinction between "endogenous" and "exogenous" variables and "parameters", our modular approach requires us to treat all relevant entity type or process taxon attributes a priori in the same way, calling them variables whether or not they turn out to be constant during a model run or are used for a bifurcation analysis in a study.
A variable's specification contains metadata such as a common language label and description, possibly including references to external metadata catalogs such as the Climate and Forecast Conventions' Standard Names (CF Standard Names, 2018) for climate-related quantities or the World Bank's CETS list of socio-economic indicators (World Bank CETS codes, 2017), a mathematical symbol, its level of measurement or scale of measure (ratio, interval, ordinal, or nominal), its physical or socioeconomic dimension and default unit (if possible following some established standard), its default (constant or initial) value and range of possible values.
Rationale. The common treatment of variables and parameters is necessary because a quantity that one model component uses as an exogenous parameter that will not be changed by this component will often be an endogenous variable of another component, and it is not known to a model component developer which of the quantities she deals with will turn out to be endogenous variables or exogenous parameters of a model or study that uses this component. Well-specified metadata are essential for collaborative modeling to avoid hard-to-detect mistakes involving different units or deviating definitions.

Basic entity types
We try to keep the number of explicitly considered entity types manageably small and thus choose to model some relevant things that occur in the real world not as separate entities but rather as attributes of other entities. As a rule of thumb (with the exception of the entity type 'world'), only things that can occur in potentially large, a priori unknown, and maybe changing numbers and display a relevant degree of heterogeneity for which a purely statistical description seems inadequate will be modeled as entities. In contrast, things that typically occur only once for each entity of some type (e.g., an individual's bank account) or which are numerous but can sufficiently well described statistically are modeled as attributes of the latter entity type.
Although further entity types (e.g., 'household', 'firm', 'social group', 'policy', or 'river catchment') will eventually be included into the master data model, at this point the copan:CORE 'base' model component only provides the entity types which all models must contain, described in this section, in addition to an overall entity type 'world' that may serve as an anchor point for relations between entities (see also Fig. 2).

Cells
An entity of type 'cell' represents a small spatial region used for discretising the spatial aspect of processes and attributes which are actually continuously distributed in space. They may be of a more or less regular shape and arrangement, e.g., represent a latitude-longitude-regular or an icosahedral grid or an irregular triangulation adapted to topography. Since they have no real- Step +timetype = "discrete" +variables +... world meaning beyond their use for discretization, cells are not meant to be used as agents in agent-based model components.
Geographical regions with real-world meaning should instead be modeled via the type 'social system'.

Social systems
An entity of type 'social system' is meant to represent what is sometimes simply called a 'society', i.e. "an economic, social, industrial or cultural infrastructure" (Wikipedia, 2017) such as a megacity, country, or the EU. We understand a social system as a human-designed and human-reproduced structure including the flows of energy, material, financial and other resources that are used to satisfy human needs and desires, influenced by the accessibility and usage of technology and infrastructure Otto et al., in review). Equally importantly, social systems include social institutions such as informal systems of norms, values and beliefs, and formally codified written laws and regulations, governance and organizational structures . In our framework, norms, values and beliefs may be described in macroscopic terms on the social system level but may also be described microscopically on the level of individuals (Sect. 1.3.3).
Social systems in this sense typically have a considerable size (e.g., a sovereign nation state such as the United States of America, a federal state or country such as Scotland, an urban area such as the Greater Tokyo Area, or an economically very closely integrated world region such as the EU), controlling a well-defined territory (represented by a set of cells) and encompassing all the socio-metabolic and cultural processes occurring within that territory. Social systems are not meant to represent a single social group, class, or stratum, for which different entity types should be used (e.g., a generic entity type 'social group').
To allow for a consistent aggregation of socio-metabolic quantities and modeling of hierarchical political decision-making, the social systems in a model are either all disjoint (e.g., representing twelve world regions as in some integrated assessment models, or all sovereign countries), or form a nested hierarchy with no nontrivial overlaps (e.g., representing a three-level hierarchy of world regions, countries, and urban areas). As the attributes of social systems will often correspond to data assembled by official statistics, we encourage to use a set of social systems that is compatible to the standard classification ISO 3166-1/2 when representing real-world social systems.
Social systems may act as agents in agent-based model components but an alternative choice would be to use 'individuals' like their 'head of government' or 'social groups' like a 'ruling elite' as agents.

Individuals
Entities of type 'individual' represent individual human beings. These entities will typically act as agents in agent-based model components, although also entities of other types (e.g., the potential types 'household', 'firm', or 'social group') may do so.
In contrast to certain economic modeling approaches that use "representative" consumers, an entity of type 'individual' in copan:CORE is not usually meant to represent a whole class of similar individuals (e.g., all the actual individuals of a certain profession) but just one specific individual. Still, the set of all 'individuals' contained in a model will typically be interpreted as being a representative sample of all real-world people, and consequently each individual carries a quantity 'represented population' as an attribute to be used in statistical aggregations, e.g., within a social system.

Relationships between entity types and process taxa
Although there is no one-to-one correspondence between process taxa and entity types, some combinations are expected to occur more often than others, as indicated by the thicker gray connections in Fig. 1.
We expect processes from the environmental (ENV) process taxon to deal primarily with the entity types 'cell' (for local processes such as terrestrial vegetation dynamics described with spatial resolution) and 'world' (for global processes described without spatial resolution, e.g., the greenhouse effect) and sometimes 'social system' (for mesoscopic processes described at the level of a social system's territory, e.g., the environment diffusion and decomposition of industrial wastes).
Socio-metabolic (MET) processes are expected to deal primarily with the entity types 'social system' (e.g., for processes described at national or urban level), 'cell' (for local socio-metabolic processes described with additional spatial resolution for easier coupling to natural processes) and 'world' (for global socio-metabolic processes such as international trade), and only rarely with the entity type 'individual' (e.g., for micro-economic model components such as consumption, investment or the job market).
Finally, processes from the socio-cultural (CUL) taxon are expected to deal primarily with the entity types 'individual' (for "micro"-level descriptions) and 'social system' (for "macro"-level descriptions), and rarely 'world' (for international processes such as diplomacy or treaties).

Software design
This section describes the programming language-independent parts of how the above abstract structure is realized as computer software. As they correspond closely with the role-based and entity-centric view of the abstract framework, modularization and object-orientation are our main design principles. All parts of the software are organized in packages, subpackages, modules, and classes. The only exception are those parts of the software that are written by model end-users to perform actual studies, which will typically be in the form of scripts following a mainly imperative programming style that uses the classes provided by the framework. Fig. 3 summarizes the main aspects of this design which are described in detail in the following.

Object-oriented representation
Entity types and process taxa are represented by classes ('Cell', 'SocialSystem', 'Culture', . . . ), individual entities by instances (objects) of the respective entity type class, and process taxon classes have exactly one instance. While entity type and process taxon classes hold processes' and variables' metadata as class attributes, entity instances hold variable values and, where needed, their time derivatives as instance attributes. Processes' logics can be specified via symbolic expressions in the process metadata (e.g., for simple algebraic or differential equations) or as imperative code in instance methods (e.g., for regular 'steps' and random 'events' in an agent-based modeling style), thereby providing a large flexibility in how the equations and rules of the model are actually represented in the code, without compromising the interoperability of model components.

Interface and implementation classes
All of this is true not only on the level of (composed) models but already on the level of model components, though restricted to the entity types, processes and variables used in the respective component. To avoid name clashes but still be able to use the same simple naming convention throughout in all model components, each model component is represented by a subpackage of the main copan:CORE software package, containing class definitions for all used entity types and process taxa as follows. Each entity type and process taxon used in the model component is represented by two classes, (i) an interface class that has a class attribute of type 'Variable' (often imported from the master data model subpackage or another model component's interface classes) for each variable of this entity type or process taxon this model component uses as input or output, containing that variable's metadata (see Fig. 1 in the Supplementary Information for an example), and (ii) an implementation class inherited from the interface class, containing a class attribute 'processes' and potentially some instance methods with process logics.
The attribute 'processes' is a list of objects of type 'Process', each of which specifies the metadata of one process that this model component contributes to this entity type or process taxon (see Figs. 2 and 3 of the Supplementary Information for examples). These metadata either contain the process logics as a symbolic expression or as a reference to some instance method(s). Instance methods do not return variable values but manipulate variable values or time derivatives directly via the respective instance attributes. As many variables are influenced by more than one process, some process implementation methods (e.g., those for differential equations or noise) only add some amount to an attribute value, while others (e.g., those for major events) may also overwrite an attribute value completely.

Model composition via multiple inheritance
Finally, a model's composition from model components is represented via multiple inheritance from the model component's implementation classes (which are thus also called 'mixin' classes) as follows. Each model is defined in a separate module (typically a single code file). For each entity type and process taxon that is defined in at least one of the used model component packages, the model module defines a composite class that inherits from all the mixin classes of that entity type contained in the used model component packages. Fig. 3 shows an example of this with just two components and two entity types.

Dimensional quantities, symbolic expressions, networks
To be able to specify values of dimensional quantities, mathematical equations, and networks of relationships between entities in a convenient and transparent way, we provide classes representing these types of objects, e.g., 'Dimension', 'Unit', 'Dimen-sionalQuantity', 'Expr' (for symbolic expressions), 'Graph' (for networks), 'ReferenceVariable'/'SetVariable' (for references to single/sets of other entities).

Interoperability with other model software
copan:CORE can be used together with other simulation software to simulate coupled models consisting of "internal" components implemented in copan:CORE interacting in both directions with an "external" component provided by the other software.
Currently, copan:CORE must act as the coupler to achieve this, which requires that the other software provides at least a minimal interface (e.g., conforming to the basic modeling interface (BMI), Syvitski et al. (2014)) that allows to read, set and change its state variables and to advance its model simulation by one time step.
To couple an external model component into a copan:CORE model, one must write a "wrapper" model component in the copan:CORE framework. For each relevant 'external' variable of the external model, the wrapper specifies a corresponding 'internal' copan:CORE variable in a suitable entity type or process taxon. In addition, the wrapper contributes a process implementation method of type ' Step' to a suitable process taxon, which uses the external software's interface to sync the external variables with their internal versions, using a suitable regridding strategy if necessary, and lets the external model perform a time step.
In later versions, copan:CORE will include a standard wrapper template for models providing a BMI, and might also itself provide such an interface to external couplers.

Reference implementation in Python
For the reference implementation of copan:CORE we chose the Python programming language to enable a fast development cycle and provide a low threshold for end users. It is available as the open-source Python package pycopancore (https: //github.com/pik-copan/pycopancore) including the master data model and a small number of pre-defined model components and models as subpackages and modules. Symbolic expressions are implemented via the sympy package (Meurer et al., 2017) which was extended to support aggregation (as in Fig. 3 of the Supplementary Information, top, line 5) and cross-referencing between entities (same Fig., bottom, line 14). ODE integration is currently implemented via the scipy package (Jones et al., 2001). While the reference implementation is suitable for moderately sized projects, very detailed models or large-scale Monte-Carlo simulations may require an implementation in a faster language such as C++, which we aim at realizing via a community-driven open-source software development project. Fig. 4 gives an impression of how user code in pycopancore looks like. See the Supplementary Information for further details.
Model component developers add their model component as a package to their local workspace folder, including the interface module and one module for each provided implementation class as in Figs. 5-7. In order to paralellize complex computations or couple to other model software, an implementation class may implement certain processes using an instance method that calls or communicates with other processes or external programs which provide a communication method supported by Python, e.g., MPI or JSON.
Model composers provide a module that mainly composes the final entity type and process taxon classes via multiple inheritance from model components' implementation classes, e.g., specifying code like import .climate_policy as pol import pycopancore.model_components.simple_economy as econ import pycopancore.base class SocialSystem (pol.SocialSystem, econ.SocialSystem, base.SocialSystem): pass Model end users use a Python script that imports these model modules, instantiates a 'model' object, all needed process taxon objects and an initial set of entities, then initializes those variables that shall start with non-default values, uses a 'runner' object to run the model for a specified time and finally analyses the resulting trajectory. Upon instantiation, the 'model' object uses Python's introspection capabilities to analyse its own model structure including which variables depend on which others in which way, and this information is then used by the runner to simulate the model.
Future versions will use this information further for improving performance and producing reports on model structure. The runner returns the time evolution of requested variables as a nested Python dictionary the first-and second-level keys of which Module pycopancore.model components.simple policy process.interface: 1 from pycopancore import m ast e r _ d a t a _ m o de l as D 2 from pycopancore import Variable , B oo lea nVar ia b le 3 4 class Model : # mixin class holding model component 's metadata 5 name = " simple policy process " 6 description = " At regular intervals , social systems set an emissions tax " \ 7 " if a majority of their population supports it . Individuals " \ 8 " imitate the corresponding attitude from their acquaitances .  are a 'variable' object and an entity or process taxon and whose values are lists of values ordered by time, which can then conveniently be analysed or plotted (e.g., Fig. 5 of the main text, line 30).

Details and potential extensions of the example model
For variables and parameters taken from  we chose values equivalent to those given in Table 1 of that paper, mainly except for l 0 , which was chosen higher to accommodate for our additional space competition factor and make the initial photosynthesis flow fit current amounts. As initial conditions, we used rough global aggregates where data was available.
The model presented in the main text can easily be extended to include well-being-driven population growth and migration, renewable technology knowledge spillovers, and carbon taxation, for all of which the reference implementation shippes with corresponding model components.

Population growth
Like in , but here again on the SocialSystem level, population has a wellbeing-dependent fertility rate that was roughly fitted against country-level data of fertility vs GDP per capita. We chose the functional form fert s = p 0 + 2(p−p 0 )W s W 1 # ( imports ) 2 class Culture ( I . Culture ): # process taxon impl . mixin inheriting from interface 3 4 def close_triads ( self , unused_t ): # method performing the " triadic closure " step 5 for i in self . individuals : # i introduces two of her friends 6 nbs = self . culture . a c q u a i n t a n c e _ n e t w o r k . neighbors ( i ) 7 if len ( nbs ) > 1: 8 j1 = random . choice ( nbs ); nbs . remove ( j1 ); j2 = random . choice ( nbs ) 9 if not G . has_edge ( j1 , j2 ): G . add_edge ( j1 , j2 ) 10 11 processes = [ # list of processes contributed to Culture by this component 12 Step ( " triadic closure " , # type and name of process 13 [ I . Culture . a c q u a i n t a n c e _ n e t w o r k ] , # affected variable (  (1 − i)Y s /P s and the mean terrestrial carbon density in that social system, L s /Σ s . For small W s , f grows linearly, reaching its maximum at W s = W P , then decaying towards p 0 with an asymptotically power-law shape with exponent ω p for large W s .
Similarly, for mortality we roughly fitted the function q/(W s /W P ) ω q against data and added a term representing increased mortality from climate change impacts, q T (T − T q ), and one representing competition for space, q C P s /Σ s √ K s , where the factor 1/ √ K s represents the assumption that housing is a form of physical capital with decreasing marginal value.
Note that while population P s changes over time, the number of representative individuals in s remains constant in our example model, implying that the share of the population in s that a certain Individual i represents will change over time.
A more elaborate model could try to keep the ratio of population and number of representative individuals roughly constant by generating or deactivating instances of Individual in s at the current birth and death rate of s.

Wellbeing-driven migration
In addition to births and deaths, SocialSystems' populations change due to migration depending on differences in wellbeing. We assume each person in s has a probability of emigrating to s that is proportional to the available information about differences in wellbeing for which we use the population in s ' as a proxy. We also assume that the probability of migration depends on a sigmoidal function of the wellbeing ratio, f (log W s − log W s ) with f (−∞) = 0 and f (∞) = 1. More specifically, the absolute emigration flow from s to s is µP s P s (1/2 + arctan(πφ(log W s − log W s − log ρ))/π), where µ is a basic rate and φ and ρ are slope and offset parameters.

Carbon taxation
In the general elections of a SocialSystem, also a GHG emissions tax may be introduced, leading to a shift in the energy price equilibrium of marginal production cost of fossil energy + emissions tax = marginal production cost of biomass energy + emissions tax = marginal production cost of renewable energy − renewable subsidy.

Necessary improvements
We'd like to repeat that the example model was designed to showcase the concepts and capabilities of copan:CORE in a rather simple WEM, and its components were chosen so that all entity types and process taxa and most features of copan:CORE are covered. The example model is not intended to be a serious representation of the real world that could be used directly for studying research questions, and the shown time evolutions may not be interpreted as any kind of meaningful quantitative prediction or projection.
To develop the example model into a serious World-Earth model, very many things remain to be done, including a careful selection of processes to include or exclude, improvements in model equations and agent's behavioural rules, both by fitting data where available and adopting model components from the literature, suitable choice of real-world social systems to include as entities, appropriate gridding of the surface into cells, and a solid estimation of parameters and initial conditions and their local and societal differences.  Figure 8. Main variables and processes of the example model and its extension.