This is an old revision of the document!
Table of Contents
Structure of the documentation
The documentation is structured as follows. Sections What is CAPRI-CAPRI uses the GAMS software give an overview of CAPRI system and its main software, GAMS. Section 1.4 informs about the CAPRI network. Sections 1.5 and 1.6 describe historical development of the model and more recent examples of CAPRI studies. Chapter Getting started with CAPRI provides with system requirements and the main installation instructions.
The rest of the document largely follows the workflow of the model: the different steps of building up the national, regional and global data base provide the foundations on which the system rests (Chapter "The CAPRI Data Base"). Subsequently the procedure needed to establish a baseline (Chapter Baseline Generation) is discussed. Chapter Scenario simulation deals with the scenario impact analysis, giving descriptions for the regional supply models as well as for the global market model and their interactions in scenario runs. Chapter Post model analysis covers some elements of post model analysis, whereas Chapter Spatial dis-aggregation CAPDIS module covers options for spatial downscaling of the NUTS2 results. At the very end (Chapter Stability testing tools for model tasks), some developer tools for stability analysis are described.
What is CAPRI
The Common Agricultural Policy Regional Impact (CAPRI) model is a global partial equilibrium model for the agricultural sector, with a focus on the European Union. It has been designed for ex-ante impact assessment of agricultural, environmental and trade policies. It has a supply module covering the EU and some auxiliary European countries1) (regional programming models for about 280 European regions, detailed coverage of agricultural policies), embedded in a market module also covering regions in the rest of the world (global market model representing bilateral trade between 44 trade regions2)). Thus it has global coverage but ignores potential interactions with non-agricultural sectors, except for land use.
Figure 1: General structure of the CAPRI model
Source: Own illustration
The CAPRI modelling system itself consists of specific data bases, a methodology, its software implementation and the researchers involved in their development, maintenance and applications.
The data bases exploit wherever possible well-documented, official and harmonised data sources, especially data from EUROSTAT, FAOSTAT, OECD and extractions from the Farm Accounting Data Network (FADN)3) . Specific modules ensure that the data used in CAPRI are mutually compatible and complete in time and space. They cover about 65 agricultural primary and processed products for the EU (see the Annex), from farm type to global scale including input and output coefficients.
The economic model builds on a philosophy of model templates which are structurally identical so that instances for products and regions are generated by populating the template with specific parameter sets. This approach ensures comparability of results across products, activities and regions, allows for low cost system maintenance and enables its integration within a larger modelling network such as SEAMLESS or the DG Clima modelling suite. At the same time, the approach opens up the chance for complementary approaches at different levels, which may shed light on different aspects not covered by CAPRI or help to learn about possible aggregation errors in CAPRI.
CAPRI is designed for scenario analysis. It is a comparative static model, which technically means that the market equilibrium simulated for a given point in time does not involve lags or leads of endogenous variables. If several points in time are simulated, these simulatons may be perfomed therefore in any order or in parallel4). Comparative static results are best interpreted as the long run outcome of some scenario, after all adjustments to the new equilibrium are completed. By contrast, dynamic or recursive dynamic models also trace the adjustment path over time, while considering lagged relationships that are ususally critical in adjustment processes. CAPRI simulations start from a so-called baseline, which is a special applicaiton of the model as discussed in a separate chapter of this documention. The CAPRI baseline integrates projections from external sources, typically the Agricultural Outlook published annually by the European Commission's Directorate-General for Agriculture and Rural Development (DG-AGRI) (European Commission 2017). The parameters describing the reactions in the sector are calibrated to the baseline scenario, making the model behave in accordance with the data and projections. The baseline mirrors the projected agricultural situation up to some point in time and usually assumes status quo policy assumptions (currently: CAP 2014-2020). In a simulated scenario, all conditions in the baseline are maintained – except for the changes to be analysed.
CAPRI contains two modules, market and supply, which interact (see Figure 1).
The supply module consists of independent aggregate non linear programming models representing activities of all farmers at regional or farm type level captured by the Economic Accounts for Agriculture (EAA). The models optimize regional agricultural income, given the prices for inputs and outputs, subsidy levels and other policy measures. These models are a kind of hybrid approach, as they combine a Leontief-technology for variable costs covering a low and high yield variant5) with a non linear cost function which captures the effects of labour and capital on farmers’ decisions. The non linear cost function allows for perfect calibration of the models and a smooth simulation response rooted in observed behaviour (see also Jansson and Heckelei 2011).
Around 55 agricultural inputs produced in about 60 activities are covered in the supply module. The activities include inputs to crop and livestock production from other sectors and intermediate inputs produced by the farms such as feed and young animals. The models capture in high detail the premiums paid under CAP, include NPK balances and a module with feeding activities covering nutrient requirements of animals.
Main constraints outside the feed block are arable and grassland – which are treated as imperfect substitutes -, and potential policy restrictions (set-aside obligations, milk and sugar quotas, environmental constraints). Prices are exogenous in the supply module and provided by the market module. Grass, silage and manure are assumed to be non tradable and receive internal prices based on their substitution value and opportunity costs. A land supply curve renders agriculture responsive to returns to land. Non-agricultural areas respond in line with a given total region area, giving rise to land transitions.
Market equilibria are calculated by iterations between the supply module and the market module.
The market module for marketable agricultural outputs is a spatial, non-stochastic global multi-commodity model for about 65 primary and processed agricultural products. About 80 world regions are modelled, but aggregated to about 40 trade regions that trade bilaterally with each other, with the possibility of simultaneous import and export. It simulates supply, demand, and price changes in global markets considering international trade.
Agricultural supply is modelled in a simpler way than in the supply module, with behavioural functions for supply and feed demand. These are supplemented with other functions for processing, biofuel use, and human consumption. These functions apply flexible functional forms where calibration algorithms ensure full compliance with micro economic theory including curvature. The parameters are synthetic, i.e. to a large extent taken from the literature and other modelling systems.Consumers and traders are represented by economic agents that follow neo-classical micro-economic theory regarding behaviour, which makes it possible to compute welfare effects. Bi lateral trade flows and attached prices are modelled based on the Armington assumptions (Armington 1969). Policy instruments cover (bi lateral) tariffs, the Tariff Rate Quota (TRQ) mechanism and, for the EU, intervention stocks and subsidized exports. This market module delivers prices used in the supply module and allows for market analysis at global, EU and national scale.
As the supply models are solved independently at fixed prices, the link between the supply and market modules is based on an iterative procedure. After each iteration, during which the supply module works with fixed prices, the constant terms of the behavioural functions for supply and feed demand are calibrated to the results of the regional aggregate programming models aggregated to Member State level. Solving the market modules then delivers new prices. A weighted average of the prices from past iterations then defines the prices used in the next iteration of the supply module. Equally, in between iterations, CAP premiums are re calculated to ensure compliance with national ceilings and crop yields may respond to changing market prices.
Environmental indicators, primarily for nutrient surpluses and greenhouse gas (GHG) emissions, are calculated in CAPRI and may be directly addressed in some scenarios. Regarding nutrient surpluses, the supply module contains nutrient balance equations for nitrogen, phosphorous and potassium. It considers nutrient uptake by crops following a crop growth function, and supply of nutrients from mineral fertilizer, manure, crop residues, and, for nitrogen, atmospheric deposition and fixation. The balances also contain factors for over-fertilization, loss rates, and nutrient availability per source. From those balances nutrient surpluses can be calculated per region of the supply model. Technical information from the supply module is used to compute greenhouse gas emissions, based on IPCC methodology6). Globally, GHG emissions are computed based on estimated emission intensities per ton of product and production levels for globally traded commodities.
CAPRI allows for modular applications as e.g. regional supply models for a specific Member State may be run at fixed exogenous prices without any market module. In previous applications farm heterogeneity has been represented by a set of farm types for each NUTS2 region, each with its own supply model. The farm type model layer is currently being replaced with another solution such that it has been switched OFF in recent applications. Equally, the global market model can be run in stand-alone mode as well.
Post-model analysis includes the calculation of different income indicators as variable costs, revenues, gross margins, etc., both for individual production activities as for regions, according to the methodology of the EAA. A welfare analysis at Member State level, or globally, at country or country block level, covers agricultural profits, tariff revenues, outlays for domestic supports and the money metric measure to capture welfare effects on consumers. Outlays under the first pillar of the CAP are modelled in very high detail. Among the post model analysis options there are some designed to disentangle various contributions to scenario effects as explained in Chapter “Post model analysis”. An important element of post model analysis is the option of spatial down-scaling part to clusters of 1×1 km grid cells, covering crop shares, crop yields, animal stocking densities, fertilizer application rates and derived environmental indicators. This is based on a statistical approach, handeled in file capdis.gms and covered in a separate Chapter of this documentation. Model results are presented as interactive maps and as thematic interactive drill-down tables. The CAPRI graphical user interface including the exploitation tools are documented in a separate user manual7).
More information about the CAPRI model, including technical documentation, lists of peer-reviewed and other publications, and open access to the modelling system, is available at the model webpage: 8).
CAPRI uses the GAMS software
To solve the large-scale, non-linear optimization problems in the model, CAPRI uses a software called GAMS (General Algebraic Modelling System). GAMS is a programming language designed for solving optimization problems, widely used in economic modelling. Models in GAMS are defined by one or several text files (gms files) that contain definitions and solution methods for solving constrained optimization problems (such as the supply models of CAPRI) or systems of equations (such as the marked model of CAPRI), as well as commands for data handling and reporting.
Data used or produced by GAMS is generally stored in a file format called GDX (GAMS Data Exchange). CAPRI database and results are stored in gdx files, which can be loaded into the CAPRI Result Viewer in the Graphical User Interface where you can analyse and export the results. Without GAMS, you can view and analyse scenario results from previous scenario runs, but not run new simulations with CAPRI.
GAMS solves models using third-party solvers that are linked to GAMS. GAMS comes with a large library of such solvers, most of them specializing in particular types of problems or solution algorithms. CAPRI relies on a particular solver called CONOPT. While CAPRI itself is distributed free of charge for anyone to download and use, GAMS and the solvers such as CONOPT requires a license to work beyond demonstration mode.
Methodological development, updating, maintenance and application of CAPRI are based on a network approach, in the first 15 years certainly dominated by the key developer Wolfgang Britz and a series of PhD projects supervised by Thomas Heckelei. In the meantime responsabilites have spread with main contributors in recent years being the Bonn team (U Bonn, EuroCARE), Thünen, SLU, JRC-Sevilla and JRC –Ispra. Over the years researchers from various universities and institutes (from Norway, Switzerland and Ireland) have contributed to CAPRI, which can be seen from the contributions to many publications.
The CAPRI modelling network may be defined as a ‘club’: there are currently no fees attached to its use but the entry in the network is controlled by the current club members. The members have agreed on a distribution of tasks to maintain and update the system. They as well contribute by acquiring new projects, by quality control of data, new methodological approaches, model results and technical solutions, and by organising events such as training sessions and preparing this documentation. It is currently considered if the club constitution needs an update as well.
CAPRI development and applications
CAPRI – ‘Common Agricultural Policy Regionalised Impact analysis’ is both the acronym for an EU-wide quantitative agricultural sector modelling system and of the first project centred around it9). The scope of the project has widened over time: the first phase (FAIR3-CT96-1849: CAPRI 1997-1999) provided the concept of the data base and the regional supply models, but linked these to a simple market model distinguishing the EU and rest-of-the-world. In parallel, a team at the FAL (now Thünen Institute, TI) in Braunschweig applied CAPRI to assess the consequences of an increased share of biological farming system (FAIR3-CT96-1794: Effects of the CAP-reform and possible further developments on organic farming in the EU). A further, relatively small project (ENV.B.2/ETU/2000/073: Development of models and tools for assessing the environmental impact of agricultural policies, 2001-2002, financed by DG-REGIO) added a dis-aggregation below administrative regions in form of farm type models, refined the existing environmental indicators and added new ones. A new EU research framework project with the original network (QLTR-2000-00394: CAP-STRAT 2001-2004) refined many of the approaches of the first phase, and linked a complex spatial global multi-commodity model into the system. The application of CAPRI for sugar market reform options in the context of another project improved the way the complex ABC sugar quota system is handled in the model.
Later, a larger project (EU research FP VI, Nr. 501981: CAPRI-Dynaspat) was conducted under the co-ordination of the team in Bonn to render the system recursive-dynamic, dis-aggregate results in space, include the new Member States and add a labour module and an indicator for energy use.
A PhD study (Pérez-Dominguez 2005) initiated (non-CO2) GHG accounting and modelling with CAPRI to analyse tradable permits for GHG emissions from agriculture. Subsequently several projects served to improve the representation of trade policies (FP VI, Nr. 502457: “EU MedAgPol”, also FP VI: “EU-MercoPol”) and extended the coverage the supply models to the New Member states including Bulgaria and Romania).
In 2006-2008 a first biofuel coverage in CAPRI has been achieved during an interim stay of Wolfgang Britz at JRC-Ispra which has been expanded in later years leading to follow up studies on bioenergy policies (Blanco et al. 2010, Britz and Delzeit 2013). In 2006-2007 CAPRI made contributions to study “Integrated measures in Agriculture to reduce Ammonia emission” together with MITERRA-Europe (Alterra, Wageningen) and GAINS (IASSA, Laxenburg) which led to an update of the N-cycle description in CAPRI.
From 2006-2012 CAPRI participated in the LIFE funded EC4MACS10), the “European Consortium for Modelling of Air Pollution and Climate Strategies” which basically triggered a series of projects focussing on and improving long run projections in a modeling cluster with the PRIMES, GAINS and GLOBIOM models11).
In line with the shift of the CAP focus towards sustainability, CAPRI contributed to CCAT – EU Cross compliance tool12), an FP6 project coordinated by Wageningen University, for an integrated assessment of cross compliance impacts, and entered (also in 2007) CAPRI FARM13) aiming at an analysis of farming sustainability.
GHG abatement options have also been investigated in two studies by the JRC (IES, Ispra14), and IPTS, Seville15)) that may be considered the initialisation of mitigation modelling with CAPRI, a research focus that has gained in importance up from 2009 to the present16). Recent applications cover the challenges of including agriculture in climate change mitigation strategies (Fellmann et al. 2018) and trade liberalisation impacts on GHG emissions abatement in the agricultural sector (Himics et al. 2018).
The current two level version of land supply derives from a study on agricultural and trade policy reform impacts on land-use across the EU, with a particular focus on land abandonment (Renwick et al. 2012).
Until summer 2013, again a EU framework project co-ordinated by the team in Bonn called “CAPRI-RD” ensured various updates, and added a layer of regional CGEs, while working on the integration of CAP pillar 2 measures into the system. While the latter have become an essential element of CAP representation in the system, the regional CGEs have not been applied since that time (Schroeder et al. 2015, but this might be also considered the starting point of Wolfgang Britz, the main developper of CAPRI up to 2013, to move more into CGE modelling17)).
Sustainability in its various facets has been the topic driving model developments and extensions that are likely to be pursued in the next years.
- Beginning with a small explorative study in 2011 several studies led to the development and improvement of a “CAPRI water version” used in various projects18) and studies on water-food linkages (Blanco et al. 2018).
- GHG accounting and modelling beyond non-CO2 required to address LULUCF effects in projects aiming at a complete coverage of the country area in the UNFCCC classification as well as transitions between those land categories and a closed carbon balance for agricultural areas19)).
- Several efforts have been undetaken by JRC-Ispra, partly in house, partly in specific projects to achieve a more accurate representation of various environmental indicators. The detailed nutrient flow in CAPRI has been exploited to measure nitrogen footprint of food products in the EU (Leip et al. 2014) and to assess the impacts of European livestock production (Leip et al. 2015). The representation of environmental constraints, involving restrictions for fertiliser applications, for ammonia emissions, lifestock density, is currently being improved and also led to a representation of manure trade between regions.
- Diet shifts of food consumers offer a great potential to achieve environmental relief (as well as health benefits), such that their representation in CAPRI has been improved in the context of various partly ongoing projects20) and studies.
Apart from the wide area of sustainability aspects of trade modelling have also been repeatedly at the heart of targeted model improvements, mostly commissioned by JRC-IPTS21) and thereby pursuing the CAPRI tradition of bilateral trade modelling.
Two areas of technical developments are also likely to be continued in the future. The first one is the improvement of linkages to the in house JRC model IFM CAP that permits to represent the diversity of CAP restrictions only amenable to modelling at the farm level. As IFM-CAP operates with exogenous prices, it requires prices as model inputs that may be provided by CAPRI. The ongoing SUPREMA project (mentioned in the context of LULUCF modelling already) pursues these linkages while trying to also watch for computational feasibility, given that IFM-CAP covers each FADM farm individually. The second strand of technical improvements is the initialisation of a “stable release cycle” for CAPRI, based on two JRC-IPTS projects that are currently pursued under SUPREMA.
The historical review has so far focussed on those studies and projects, that left clear marks in the current system as a heritage. In addition, the system was applied to a wide range of numerous different scenarios that often left smaller “traces” in the system but illustrate its capabilities and contributed to improvement in many details that are critical for serious impact assessments. The very first application in 1999 analysed the so called ‘Agenda 2000’ reform package of the CAP. Shortly afterwards, a team at SLI, Lund, Sweden applied CAPRI to analyse CAP reform option for milk and dairy. FAL, Braunschweig looked into the effects of an increase of organic production systems. WTO scenarios as well as scenarios on specific trade agreements were frequnetly untertaken. Moreover, CAPRI was applied to analyse sugar market reform options at regional level, linked to results of the WATSIM and CAPSIM models. In 2003, scenarios dealing with the CAP reform package titled ‘Mid Term Review’ were performed by the team in Bonn (Britz et al. 2003). In the wake of the sugar market reforms various reform options have been investigated (Adenaeuer et al. 2004).
In 2004 CAPRI was used to generate a baseline in close co-operation with DG Agri match DG Agri’s outlook projections which has become a regular activity. Several studies have been launched in 2007 on particular aspects of the ongoing CAP reform (decoupling project for DEFRA, UK, modulation study by LEI for DG Agri and a milk quota expiry for JRC, IPTS, Seville). The Farm Type version of CAPRI has been used frequently to look at intrasectoral distribution of CAP reform impacts22), direct payment harmonisation (Gocht et al. 2013), CAP greening (Gocht et al. 2017), and an EU-wide policy to extend grassland areas in order to increase carbon sink capacity (Gocht et al. 2016). A recent important application, also involving the Farm Type layer, was the impact assessment of the proposals on the post-2020 CAP, involving CAPRI in a multi-model approach to determine effects on production, prices, trade, GHG emissions and the nitrogen balance (European Commission 2018).
Several analyses have investigated potential impact of climate change in EU agriculture by introducing changes in crop yields from biophysical models as exogenous shifts. This enables to analyse regional changes in production within the EU while considering market feedback, as well as the role of trade to counterbalance uneven effects of climate change across the world (Delincé et al 2015, Blanco et al. 2017, Pérez Dominguez and Fellmann, 2018).
As will be clear from this review the CAPRI system strongly benefitted from EU Commission support in various forms. Most of the initial developments were co financed by DG RSRCH through the series of past FP and H2020 projects and. Furthermore the DG-JRC (IPTS, Seville and IES Ispra) has actively contributed to improvements and extensions in various components of the system and also stimulated system development with a continuous flow of new research questions and matching projects. Since a number of years recurring demand for up-to-date and long run projections on the part of DG CLIMA is contributing to some regularity in the updating process for data base and projections. Nonetheless the CAPRI network faces the common problem of the commons such that the update process for documentation is in risk to lag behind the moving target of the current code. Readers identifying missing or obsolete sections are therefore invited to contact any of the authors.