# Difference between revisions of "Agriculture"

The most recent and complete agriculture model documentation is available on Pardee's website. Although the text in this interactive system is, for some IFs models, often significantly out of date, you may still find the basic description useful to you.

The IFs agricultural model tracks the supply and demand, including imports, exports, and prices, of three agricultural commodities: crops, meat, and fish. Crops, meat and fish have direct food, animal feed, industrial and food manufacturing uses. The agricultural model is also where land use dynamics and water use are tracked in IFs, as these are key resources for the agricultural sector.

The structure of the agriculture model is very much like that of the economic model. It combines a growth process with a partial economic equilibrium process using stocks and prices to seek a balance between the demand and supply sides. As in the economic model, no effort is made in the standard adjustment mechanism to obtain a precise equilibrium in any time step. Instead stocks serve as a temporary buffer and the model chases equilibrium over time.

The most important linkages between the agriculture model and other models within IFs are with the economic model. The economic model provides forecasts of average income levels, labor supply, total consumer spending, and agricultural investment, all of which are used in the agriculture model. In turn, the agriculture model provides forecasts on agricultural production, imports, exports, and demand for investment, which override the sectoral computations in the economic model. The agricultural model also has important links to the population and health models, using population forecasts and providing forecasts of calorie availability.

# Dominant Relations

Agricultural production is a function of the availability of resources, e.g. land, livestock, capital, and labor, as well as climate factors and technology. Technology is most directly seen in the changing productivity of land in terms of crop yields, and in the production of meat relative to the input level of feed grain. The model also accounts for lost production (such as spoilage in the fields or in the first stages of the food supply chain), distribution and transformation losses and consumption losses (which account for food lost at the household levels) which are all determined by average income.

Agricultural demand depends on average incomes, prices, and a number of other factors. For example, changing diets can affect the demand for meat, which in turn affects the demand for feed crops. The industrial demand for crops, some of which is directed to the production of biofuels, is also affected by energy prices.

Production and demand, along with existing and desired stocks and historical trade patterns determine the trade in agricultural products. The differences in the supply of crops, meat, and fish (production after accounting for losses and trade) and the demand for these commodities are reflected in shifts in agricultural stocks. Stock shortages feed forward to actual consumption, which is addressed in the population model of IFs. Stocks, particularly changes in stocks, are a key driver of changes in crop prices. Crop prices are also influenced by the returns to agricultural investment and therefore to the basic underlying cost structure. Meat prices are tied to, and track world crop prices, while changes in fish prices are driven by changes in fish stocks.

Stocks and stock changes also play a role, along with general economic and agricultural demand growth, in driving the demand for agricultural investment. The actual levels of investment are finalized in the economic model of IFs and subject to constraints there. The investment can be of two types – investment for expanding and maintaining cropland (extensification) and investment for increasing crop yields per unit area (intensification). The expected relative rates of return determine the split.

The final key dynamics addressed in the agriculture model relate to land, livestock, and water. The latter of these is very straightforward, driven only by crop production. Changes in livestock are determined by changes in the amount of available grazing land, changes in the demand for meat, and the ability of countries to meet this demand as reflected in changing stocks.

In the IFs model, land is divided into 5 categories: crop land, grazing land, forest land, ’other’ land, and urban or built-up land. First, changes in urban land are driven by changes in average income and population, and draws from all other land types. Second, the investment in cropland development is the primary driver of changes in cropland, with shifts being compensated by changes in forest and "other" land. Third, changes in grazing land are a function of average income, with shifts again being compensated by changes in forest and "other" land. Finally, conservation policies can influence the amount of forest land, with any necessary adjustments coming from crop and grazing land.

# Structure and Agent System

 System/Subsystem Agriculture Organizing Structure Partial market equilibrium Stocks Capital, labor, accumulated technology, agricultural commodities, land Flows Production, loss, consumption, trade, investment Key Aggregate  Relationships (illustrative, not comprehensive) Production function with endogenous technological change Price determination Key Agent-Class Behavioral  Relationships(illustrative, not comprehensive) Household crop, meat, and fish consumption Industry crop use Livestock producers crop use

# Flow Charts

## Overview

The agriculture model combines a growth process in production with a partial equilibrium process that replaces the agricultural sector in the full-equilibrium economic model unless the user disconnects it. The model represents three agricultural commodities: crop, meat, and fish.

The key equilibrating variables are the stocks of the three commodities. Equilibration works via investment to control capital stock and via prices to control domestic demand.

Specifically, as food stocks rise, investment falls, restraining capital stock and agricultural production, and thus holding down stocks. Also, as stocks rise, prices fall, thereby increasing domestic demand, further holding down stocks. Domestic production and demand also influence imports and exports directly, which further affect stocks.

## Agricultural Production

### Crop Production

Crop production is most simply a product of the land under cultivation (cropland) and the crop yield per hectare of land. Yield is determined in a Cobb-Douglas type production function, the inputs to which are agricultural capital, labor, and technical change. Technical change is conceptualized as being responsive to price signals, but the model uses food stocks in the computation to enhance control over the temporal dynamics of responsiveness.  Specifically, technology responds to the imbalance between desired and actual food stocks globally.  In addition there is a direct response of yield change to domestic food stocks that represents not so much technical change as farmer behavior in the fact of market conditions (e.g. planting more intensively). Overall, basic annual yield growth is bound by the maximum of the initial model year's yield growth and an exogenous parameter of maximum growth.

This basic yield function is further subject to a saturation factor that is computed internally to the model̶–investments in increasing yield are subject to diminishing rather than constant returns to scale. Moreover, changes in atmospheric carbon dioxide (CO2) will affect agricultural yields both directly through CO2 and indirectly through changes in temperature and precipitation. Finally, the user can rely on parameters to increase or decrease yield patterns indirectly with a multiplier or to use parameters to control the saturation effect and the direct and indirect effects of CO2 on crop yield.

Agricultural Production Flowchart

### Meat and Fish Production

Meat and fish production are represented far more simply than crop production. Meat production is simply the product of livestock herd size and the slaughter rate. Meat production includes production of non-meat animal products (eg. Milk and eggs). The herd size changes over time in response to global and domestic meat stocks, as well as changes in the demand for meat and the amount of grazing land.

Fish production has two components: wild catch and aquaculture. The former is based on actual data and an exogenous parameter that allows the user to influence rate of catch. Aquaculture is assumed to continue to grow at a country-specific growth rate; a multiplier can also be used to increase or decrease aquaculture production.

Meat and Fish Production Flowchart

## Agricultural Demand

### Overview

Agricultural demand is divided into crops, meat, and fish. Crop demand is further divided into industrial, animal feed, and human food demand.

Food demand from crops, meat and fish are responsive to calorie demand, which in turn responds to GDP per capita (as a proxy for income).  The division of calorie demand between demand for calories from crops and from meat and fish changes in response also to GDP per capita (increasing with income). Caloric demand is used as the basis to compute food demand through conversion to food demand in terms of grams per capita. The caloric value of demand is also used to compute food demand in terms of proteins per capita.

In addition to food demand, demand for feed, industrial demand for meat, crops and fish and food manufacturing demand are also computed. When all components of agricultural demand are computed, the price of the food elements of it are checked to assure that the total household demand for food does not exceed a high percentage of total country-level household consumption expenditures.

### Calorie Demand

Crop use for food and meat demand are both influenced by calorie demand. Total per capita calorie demand is driven by GDP per capita, but can be limited by calorie availability as well as by an exogenous parameter specifying maximum calorie need.
Calorie demand flowchart

The calculations of demand for meat, fish and food crop determine the ultimate division of calorie sources.  There is also a limit to the share of calories that can come from meat. The demand for calories from crops is simply the residual obtained by subtracting the demand for calories from meat and fish from the demand for total calories. Caloric value of demand is used to compute food demand in terms of grams per capita and in terms of proteins per capita.  Caloric value of demand is adjusted for elasticities to prices for all three categories namely crops, meat and fish.

The user can manipulate calorie demand through the use of an exogenous calorie multiplier and can reduce undernourishment to 5 percent of the population over time through the usage of two other hunger elimination parameters.

### Food Demand for Crops, Meat and Fish

Food demand is driven by the demand for calories. A conversion factor translates calorie demand into food demand in terms of grams per capita.  Crop prices and an elasticity affect the resultant food demand.  So too does a constraint on the maximum calories per capita and the size of the population.

Food demand flowchart

### Industrial Demand

Industrial demand (examples would be textile use of cotton or beverage inputs use of barley) is driven primarily by GDP per capita and population.   Another important use in recent years has been for biofuels, and that demand component is responsive to world energy price and an elasticity.

Crop prices also influence total industrial demand for crops.  A maximum per capita demand parameter constrains the total and an exogenous multiplier allows users to alter the total.

Industrial demand flowchart

### Feed Demand

The total feed demand for the livestock herd is dependent on the weight of the livestock herd and per unit weight feed requirements.  The per unit feed requirements increase with GDP per capita as populations move from meat sources such as chickens to more feed intensive ones such as pork and especially beef.  But they also are reduced by change in the efficiency of converting feed to animal weight.

Some of the food requirements of livestock are met by grazing, thereby reducing the feed requirements.  The feed equivalent of grazing depends on the amount of grazing land, the productivity of that land (computed in the initial year and highly variable across countries), and grazing intensity (which increases with crop prices).

Finally, the feed demand can be modified directly by an exogenous demand parameter that modifies industrial crop demand. The feed demand for meat and fish are calculated using ratios of the food demand to feed demand which are calculated in the initial years of the model. In addition to industrial demand and feed demand, food manufacturing demand is also calculated in the model on the basis of the food demand for all three categories (meat, crops and fish)

Feed demand flowchart

### Total Agricultural Demand

Total Agricultural demand is the sum of demand for crops to serve industrial, animal feed, food manufacturing and human food purposes.

Total Agricultural Demand Flowchart

### Financial Constraint on Food Demand

Total food demand in million metric tons consists of the sum of crop demand, meat demand and food demand and fish demand.  It can be, however, that the monetary value of those calculated demands is greater than the financial ability of households to pay for them.  When that is the case, the food ,meat and fish demand are proportionately reduced.
Visual representation of financial constraint on food demand

### Agricultural Investment and Capital

The level of total desired agricultural investment are driven by the rate of past investment as a portion of GDP, changes in global crop demand as a portion of GDP, and global crop stocks relative to desired levels. We have experimented also with tying investment to profit rates in agriculture, thereby linking it also to prices relative to costs. The user can use a multiplier to increase or decrease the desired level of investment.  This desired amount of investment is passed to the economic model, where it must ‘compete’ with demands for investments in other sectors.  The economic model returns a final investment level for use in agriculture.

Investment in agriculture has two possible targets. The first is capital stock. The second is land. The split between the two destinations is a function of the relative returns to cropland development and agricultural capital, the latter of which is determined by the increased yield that could be expected from an additional unit of agricultural capital.

Visual representation of agricultural investment and capital

## Land Dynamics

In IFs, land use is divided into 5 categories: cropland, grazing land, forest land, "other" land, and urban or built-up land. Four key dynamics are involved in land use change. First, changes in urban land are driven by changes in average income and population, and draws from all other land types. Second, the investment in cropland development is the primary driver of changes in cropland, but this is also influenced by the cost of developing cropland, the depreciation rate, or maintenance cost, of cropland investment, and a user-controllable multiplier. The costs of developing cropland increase as the amount of cropland increases and, therefore, there is less other land available for conversion. Shifts in cropland are compensated by changes in forest and "other" land. Third, changes in grazing land are a function of average income, with shifts again being compensated by changes in forest and "other" land. Finally, conservation policies can influence the amount of forest land, with any necessary adjustments coming from crop and grazing land.
Visual representation of land dynamics

# Agricultural Equations

### Overview

Briefly, each year the agriculture model begins by estimating the production (pre- and post-production loss) of crops, meat, and fish. It then turns to the demand for these commodities. This begins with a computation of caloric demand from crops, meat, and fish, which is translated into demand for food going directly to consumers. Other demands for crops, meat, and fish are for feed, industrial uses (e.g. biofuels), and food manufacturing. Losses in the production, distribution and consumption of agricultural commodities are also accounted for. This is followed by computations for trade. The model then considers the balance between the demands and the available supply based on production, imports, and exports. Any excess supply increases stocks. In the case of excess demand, stocks are drawn down; this can result in shortages if there are not enough stocks, which leads to an inability to meet all of the demands. Levels of, and changes in, stocks influence prices for the coming year, as well as desired investment, which are passed to the economic model, which determines the actual amount of investment that will be available. With this knowledge, the model can then estimate values for changes in land development, agricultural capital, and livestock for the coming year.

### Agricultural Supply

Crop, meat, and fish supply have very different bases and IFs determines them in separate procedures.

#### Crop Production

Crop production, pre-loss, (AGPpplf=1) i is the product of total yield and land devoted to crops (LDl=1).

$AGPppl_{r,f=1}= YL_r*LD_{r,l=1}$

We focus here on the determination of yield; the amount of land devoted to crops is addressed in the sections below.Yield functions are almost invariably some kind of saturating exponential that represents decreasing marginal returns on inputs such as fertilizer or farm machinery. Such functions have been used, for instance in World 3[1] , SARUM[2], the Bariloche Model [3], and AGRIMOD [4]. IFs also uses a saturating exponential, but relies on a Cobb-Douglas form. The Cobb-Douglas function is used in part to maintain symmetry with the economic model but more fundamentally to introduce labor as a factor of production. Especially in less developed countries (LDCs) where a rural labor surplus exists, there is little question that labor, and especially labor efficiency improvement, can be an important production factor.

##### Pre-processor and first year

In the pre-processor, agricultural production is initialized using data from the FAO food balance sheets. For details of the series that are used in this initialization, refer Annex 1 of this document. In the first year of the model, total crop production is calculated by adjusting the initialized value of crop production for production losses, as the FAO data are for post-loss production. Yield (YL) is computed simply as the ratio of total crop production (AGPpplf=1) to cropland (LDl=1). It is bound, however, to be no greater than 100 tons per hectare in any country.

In addition to yield, a number of other values related to production are calculated in the first year of the model that are used in forecast years.

First, a scaling factor cD is calculated in the first year of the model. This is basically the constant in the Cobb-Douglas formulation for estimating yields. It is based upon the base year yield (YL), capital (KAG), and labor supply (LABS). The labor supply is adjusted using a Cobb-Douglass alpha exponent (CDALF) which is explained in detail below.  cD is similar to the shift factors elsewhere in the model, which are used to match predicted values in the base year to actual values.  It does not change over time. It is computed using the following equation,

$cD_r= YL_{r,t=1}/ KAG_{r,t=1} ^ {CDALF_{r,s=1}} * LABS_{r,S=1,t=1} ^ {(1-CDALF_{r,s=1})}$

Second, a target growth rate in yield is computed (TgrYli) which is used in forecast years to restrict the growth rate of the yield. This target growth is a function of current crop demand (AGDEM), expected crop demand (Etdem), and a target growth rate in cropland.

$Tgryli_{r}= (Etdem/AGDEM_{r,s=1}) -1-tgrld_{r}$

where,

tgrld is a country-specific parameter indicating target growth in crop land

Etdem is an initial year estimate of the sum of industrial, feed and food demand for crops in the following year

##### Forecast years

In forecast years, IFs computes yield in stages. The first provides a basic yield (byl) representing change in long-term factors such as capital, labor and technology. The second stage uses this basic yield as an input and modifies it based on prices, so as to represent changes in shorter-term factors (e.g. amounts of fertilizer used, even the percentage of land actually under cultivation). Finally, in a third stage, yields are adjusted in response to changing climate conditions.

First stage (Adjustment for long-term factors)

The basic yield (Byl) relates yield to agriculture capital (KAG), agricultural labor (LABS), technological advance (Agtec), a scaling parameter (cD), an exponent (CDALF), and a saturation coefficient (Satk).

$Byl_{r}= cD_{r}*(1+Agtec_{r} )_{t-1}* KAG_{r}^ {CDALF_{r,s=1}} * LABS_{r,s=1} ^ {(1-CDALF)_{r,s=1}} * Satk_{r}$

The equations for KAG and LABS are described elsewhere (see sections 3.9 and the economic model, respectively).

• cD is the scaling factor calculated in the first year of the model. Its calculation is described in the section above
• CDALF is the standard Cobb-Douglas alpha reflecting the relative elasticities of yield to capital and labor.  It is computed each year in a function, rooted in data on factor shares from the Global Trade and Analysis Project, driven by GDP per capita at PPP.[5]

Agtec is a factor-neutral technological progress coefficient similar to a multifactor productivity coefficient. It is initially set to 1 and changes each year based upon a technological growth rate (YlGroTech). Its computation is described below.

$Agtec_{r}= Agtec_{r,t-1}*(1+ YlGroTech_{r})$

• The saturation coefficient Satk is a multiplier of the Cobb-Douglas function and of the technological change element. It is the ratio of the gap between a maximum possible yield (YLLim) and a moving average of yields to the gap between a maximum possible yield and the initial yield, raised to an exogenous yield exponent (ylexp). With positive parameters the form produces decreasing marginal returns.

$Satk_{r+1}=(YLLim_{r}-Syl_{r}/YLLim_{r}-YL_{r,t=1})^ {ylexp}$

where

Sylr is a moving average of byl, the historical component of which is weighted by 1 minus the user-controlled global parameter ylhw.

ylexpis a global parameter

The maximum possible yield (YLLim) is estimated for each country and can change over time.  It is calculated as the maximum of 1.5 times the initial yield (YLr,t=1) and the multiple of an external user-controlled parameter (ylmax) and an adjustment factor (YLMaxM).

$YLLim_{r} = max⁡(ylmax_{r}* YLMaxM_{r}, 1.5* YL_{r,t=1})$

where

ylmax is a country-specific parameter

The adjustment factor YLMaxM allows for some additional growth in the yields for poorer countries

$YLMaxM_{r} = 1*((1-DevWeight_{r})+(YL_{r}/YlMaxFound)^ {0.35* DevWeight_{r}})$

where

DevWeightr is GDPPCPr/30, with a maximum value of 1

YlMaxFound is the maximum value of YL found in the first year

 Box1: Computation of technological growth rate for yield The algorithmic structure for computing the annual values of YlGroTech involves four elements:  The difference between a targeted yield growth calculated the first year and the portion of that growth not initially related to growth of capital and labor (hence the underlying initial technology element of agricultural production growth); call it AgTechInit. The gap between desired global crop stock levels and actual stocks (hence the global pressure for technological advance in agriculture); call it AgTechPress. This contribution is introduced by way of the ADJUSTR function of IFs.[6] The difference between the productivity of the agricultural sector calculated in the economic model and the initial year's value of that (hence reflecting changes in the contributions of human, social, physical, and knowledge capital to technological advance of the society generally); call if AgMfpLt. The degree to which crop production is approaching upper limits of potential; this again involves the saturation coefficient (Satk). The algorithmic structure this is: $YlgroTech_{r} = F(AgTechInit_{r},AgTechPress_{r},AgMfpLt_{r},Satk_{r})$

Second stage of yield calculation (short term factors)

Before moving to the next stage, a check is made to see if the growth in byl is within reason.  Specifically, Byl is not allowed to exceed the moving average of Byl (Syl) times a given growth rate (YlGrbound).  This bound is the maximum of a user-controlled global parameter - ylmaxgr and an initial country specific target growth rate (Tgrylir).[7]

At this point, the basic yield (byl) is further adjusted by a number of factors.  The first of these is a simple country-specific user-controlled multiplier – ylm. This can be used to represent the effects of any number of exogenous factors, such as political/social management (e.g., collectivization of agriculture).

$YL_r= YL_r*ylm$

The basic yield represents the long-term tendency in yield but agricultural production levels are quite responsive to short-term factors such as fertilizer use levels and intensity of cultivation. Those short-term factors under farmer control (therefore excluding weather) depend in turn on prices, or more specifically on the profit (FPROFITR) that the farmer expects. Because of computational sequence, we use domestic food stocks as a proxy for profit level. Note that this adjustment is distinct from the adjustment above where global stocks affect the technological growth rate.

The stock adjustment factor uses the ADJSTR function to calculate an adjustment factor related to the current stocks, the recent change in stocks, and a desired stock level.  The desired stock level is given as a fraction (Agdstl) of the sum of crop demand (AGDEMf=1) and crop production (AGPf=1). Agdstl is set to be 1.5 times dstl, which is a global parameter that can be adjusted by the user.

The focus in IFs on yield response to prices differs somewhat from the normal use of price elasticities of supply. For reference, Rosegrant, Agcaoili-Sombila, and Perez (1995: 5) report that price elasticities for crops are quite small, in the range of .05 to .4.[8]

Third stage of yield calculation (Adjustment for a changing climate)

In the third stage, IFs considers the potential effects of a changing climate on crop yields. This is introduced through the variable ENVYLCHG[4] which is calculated in the environmental model. This variable consists of two parts: the direct effect of atmospheric carbon dioxide concentrations and the effects of changes in temperature and precipitation.

$ENVYLCHG_{r,f} =(((CO2Fert_{t}/100)+1)*((DeltaYClimate_{R,t}/100)+1)-1)*100$

The direct effect of atmospheric carbon dioxide assumes a linear relationship between changes in the atmospheric concentration from a base year of 1990 and the percentage change in crop yields.

$CO2Fert_{t+1} = envco2fert *((CO2PPM- CO2PPM_{t=1990})/CO2PPM_{t=1990} )$

where

envco2fert is a global, user-controllable parameter

CO2PPMt=1990 is hard coded as 354.19 parts per million

The effect of changes in annual average temperature and precipitation are based upon two assumptions: 1) there is an optimal temperature (Topt) for crop growth, with yields falling both below and above this temperature and 2) there is a logarithmic relationship between precipitation and crop yields.  The choice of this functional form was informed by work reviewed in Cline (2007)[9].  Together, these result in the following equation:

$ClimateEffect_{t+1} = 100*{({e^{(-0.5*(T0_{r}+ DeltaT{r} - Topt)^2)/SigmaTsqd}*ln⁡(P0_{r}*(DeltaP_{r}/100+1))/e^{(-0.5*(T0_{r}-Topt)^2/SigmaTsqd}*ln⁡(P0_r))-1}}$

where

T0 and P0 are country-specific annual average temperature (degrees C) and precipitation (mm/year) for the period 1980-99.

DeltaT and DeltaP are country specific changes in annual average temperature (degrees C) and precipitation (percent) compared to the period 1980-99.  These are tied to global average temperature changes and described in the documentation of the IFs environment model.

Topt is the average annual temperature at which yield is maximized.  It is hard coded with a value of 0.602 degrees C.

SigmaTsqd is a shape parameter determining how quickly yields decline when the temperature moves away from the optimum. It is hard coded with a value of 309.809.

CO2Fert and ClimateEffect are multiplied by each other to determine the effect on crop yields.

There are two final checks on crop yields.  They are not allowed to be less than one-fifth of the estimate of basic yield (Byl) and they cannot exceed the country-specific maximum (ylmax) or 100 tons per hectare. Finally crop production is adjusted for production losses to arrive at post loss production (AGP). Losses are discussed in detail in section 3.1.4 below

#### Meat Production

Meat production in IFs is the sum of animal meat production and non-meat animal products (AGPMILKEGGS). Animal meat production in a particular country is a function of the herd size and the slaughter rate and non-animal meat products are calculated by applying a ratio MilkEggstoMeatI which is calculated in the first year of the model as the ratio of non-meat animal production to the meat production. Meat production is then adjusted for production losses which are described in detail in the sections below.

$AGP_{r,f=2} =((LVHERD_{r}* slr)+ AGPMILKEGGS_r )- AGLOSSPROD_{r,f=2}$

Where,

LVHERD is the size of livestock in a particular country in a particular year

slris the slaughter rate which is a global parameter

AGLOSSPROD is the meat production loss.

##### Pre-processor and first year

In the pre-processor, meat production is initialized in the model using data from the FAO food balance sheets. Total meat production and animal meat production (which is the sum of bovine meat production, mutton and goat meat production, pig meat production, poultry meat prod, and other meat production) are initialized separately. If data on all of the animal meat sub-categories is unavailable, then Animal meat production is calculated as 30 percent of total meat production. Animal production is also not allowed to exceed 99% of the value of total meat production.

AGPMILKEGGS, which is the non-meat animal production is then calculated as total meat production minus total animal meat production. The non-meat production ratio MilkEggstoMeatI is calculated as the ratio of the initialized value of AGPMILKANDEGGS and meat production in the first year. This is used in forecast years to calculate the value of non-meat animal production, and is held constant over time.

$MilkEggstoMeatI_{r} = AGPMILKEGGS_{r}/(AGP_{r,f=2}- AGPMILKEGGS_{r})$

The size of the livestock (LVHERD) is also computed in the first year using the initialized value of pre-loss meat production. This value of LVHERD is used in forecast years to compute meat production.

$LVHERD_{r} = (AGPppl_{r,f=2} - AGPMILKEGGS_{r} )/slr$

For a detailed discussion on the dynamics of livestock herd, refer to section 3.11 of this document.

##### Forecast years

Pre-production loss values for meat production are calculated in IFs as meat production (AGPppl) and production of non-meat animal products (AGPMILKANDEGGS). Meat production, in metric tons, is given as the multiple of the herd size (LVHERD) and the slaughter rate (slr). The latter is a global parameter. These values are then adjusted for production losses for meat (AGPRODLOSS) to arrive at post production loss values (AGP). The same meat production loss percentage is also applied to the non-meat production to arrive at post loss production values for the variable. The dynamics of production losses are discussed here.

$AGP_{r,f=2} = AGPppl_{r,f=2} - AGLOSSPROD_ {r,f=2}$

Where,

$AGPppl_{r,f=2} = (AGPMILKANDEGGSppl_{r} +( LVHERD_{r}*slr))$

Production of non-animal meat products is computed using the non-meat production ratio which is applied to the animal meat production.

$AGPMILKANDEGGSppl_{r} = MilkEggstoMeatI_{r} *( LVHERD_{r} * slr)$

The dynamics of the livestock herd are described in section 3.11.

#### Fish Production

The production of fish has two components, wild catch and aquaculture. Fish caught through aquaculture is treated as a stock in the model and is a function of a growth component.  Wild catch on the other hand is treated as a flow in the model.

##### Pre-processor and first year

Data for fish catch and aquaculture is derived through two main sources, namely the FAO food balance sheets and the FAO Fishstatj software. Data for fish production, imports and exports is initially extracted from the FAO Food Balance Sheets. However, no breakout is available for fish caught as wild catch and fish caught through aquaculture. This bifurcation is available in the dataset from the FAO Fishstatj database. The data from the FAO food balance sheets is broken down into fish catch (AGFISHCATCH) and aquaculture (AQUACUL) using data from the FAO fishstatj dataset.

In the first year, the values for pre-loss production of wild fish, AGFISHCATCHppl and aquaculture, AQUACULppl, are calculated by adding in a level of catch loss, which is not reflected in the FAO and Fishstatj data. Separate parameters, aglossprodpercf=3 and aglossprodpercf=4, are used for wild catch and aquaculture.

##### Forecast years

The amount of aquaculture (AQUACUL) in forecast years can be modified by the user. Production is assumed to grow over time. The default growth rate in the first year for all countries is 3.5 percent, but this value can be modified by the user, by country, with the parameter aquaculgr. This growth rate declines to 0 over a number of years given by the global parameter aquaculconv. Users can change the amount of aquaculture production, by country, with the multiplier aquaculm[10]. Finally, this is adjusted for production losses from aquaculture with Aquaculloss

$AQUACUL_{r} = (AQUACULppl_{r,t-1} * (1+ aquaculgr_{r,t} )* aquaculm_{r})- Aquaculloss_{r}$

where

aquaculgrr,t declines from aquaculgrr,t=1 to 0 over aquaculconv years

Wild catch is initialized in the pre-processor as the variable AGFISHCATCH. The pre- production loss of wild catch is computed after applying a multiplier fishcatchm and this is adjusted for losses (Catchloss) to arrive at post production loss wild fish catch.

$AGFISHCATCH_{r} = (AGFISHCATCHppl_{r,t-1} * fishcatchm_{r} )- Catchloss_{r}$

Total, post-production loss fish production (AGP) is then given as:

$AGP_{r,t=3} = AQUACUL_{r} + AGFISHCATCH_{r}$

#### Losses and waste

Losses can occur at several places along the chain from production. In earlier sections, we mentioned losses at the production stage. Losses can also occur in the process of transmission and distribution from the producer to the final consumer and at the consumer stage. The latter is sometimes referred to as food waste, but for our purposes, we will use the term loss for all three stages: production, transmission and distribution, and consumption.

The FAO Food Balance Sheets provide data on losses during transmission and distribution, but not at the production or consumption stages. Until we are able to find data showing a clear relationship between these losses and GDP per capita, or some other explanatory factor, we make an assumption of production losses and consumption losses of 10% for all countries. The user can make changes in these values with the parameters aglossprodpercandaglossconspercrespectively. The former can be set for crops, meat, wild catch, and aquaculture separately. The latter combines wild catch and aquaculture as fish, as we do not have separate data on the consumption of wild caught versus farmed fish. More details on the use of these parameters and the actual calculation of production and consumption losses are provided in sections 3.1.1-3.1.3 and 3.2.1, respectively.

Turning to transmission and distribution losses, some agricultural commodities will never make it from the producer to the final consumer because of pests, spoilage, etc.  The FAO food balance sheets provide data on food lost to waste for crops and meat , but not for fish. Thus, for now we assume that there are no losses in this stage for fish. For crops and meat, though we were able to establish relationships between transmission and distribution losses and GDP per capita. These are shown in the figures below:

##### Pre-processor and first year

The initial values for transmission and distribution losses are taken directly from the FAO Food balance sheets. For those countries without data, an assumed loss of 1 ton (0.000001 MMT) is used. These are given by the variable AGLOSSTRANS[[|r, f=1-3]]. As with consumption, wild catch and aquaculture are combined into a single category, fish, as we do not have separate data; also, for the moment the value of AGLOSSTRANSr, f=3 is set to 0 for all countries.

In the first year, a ratio of transmission/distribution loss to food demand, FDEM,  is computed as:

$AgLossTransToFoodRatI_{r,f=1to3} = AGLOSSTRANS_{r,f=1to3} / FDEM_{r,f=1to3}$

##### Forecast years

In future years, for crops and meat, the initial estimate for transmission and distribution losses are calculated as follows:

·         Predictions are made for the ratio of transmission/distribution loss to food demand as a function of GDP per capita (predaglosstrans) for the first year and the current year.

·         The ratio of the predicted values for the current year to the predicted value for the first year is multiplied by AgLossTransToFoodRatI.

·         That result is multiplied by FDEM for the current year to get losses in MMT.

·         That result is multipled by the parameter aglosstransm, to get a final value.

This can be expressed as:

$AGLOSSTRANS_{r,f=1,2,3} = FDEM_{r,f=1,2,3,t=1} * predaglosstrans_{r,f=1,2,3,t}/predaglosstrans_{r,f=1,2,3,t=1}*AgLossTransToFoodRatioI_{r,f=1,2,3}*aglosstransm_{r,f=1,2,3}$

Some further adjustments may be made to AGLOSSTRANS in the process of balancing global trade and balancing domestic supply and demand. These are discussed later in this documentation.

## Agricultural Demand

IFs computes demand, or uses, for three agricultural categories—crops, meat, and fish.  These commodities are used for direct human consumption (FDEM), animal feed (FEDEM), industrial uses, e.g. biofuels (INDEM), and food processing and manufacturing (FMDEM). IFs also tracks the losses in transmission and distribution (AGLOSSTRANS). Total demand (AGDEM) is the sum of these five use categories and is given in MMT per year.

The sections above describe the calculation of AGLOSSTRANS, so that is not repeated here. The calculation of the demand for direct human consumption, FDEM begins with estimates of daily per capita calorie demand for crops, meat, and fish. Briefly, IFs first estimates total per capita calorie demand, which responds to GDP per capita (as a proxy for income).  The division of total demand between demand for calories from crops and from meat and fish also changes in response to GDP per capita (more meat and fish demand with increasing income).  Finally, the division of calories from meat and fish is calculated based on historic patterns. Using country and commodity specific factors, the daily per capita calorie demands are converted to grams per capita per day and protein per capita per day. The grams per capita per day are then multiplied by the size of the population, POP, and the number of days in a year, 365, to arrive at FDEM.

The other demands, FEDEM, INDEM, and FMDEM are driven by factors such as the size of the livestock herd, LVHERD, and the use of crops for fuel production. In cases where information is lacking, these demands are determined in relation to FDEM. Finally, there may be some modifications to all of the demand categories due to shortages or other factors, as described in the rest of this section.

#### Daily per capita demands – calories, grams, and protein

IFs tracks one set of variables for agricultural demands, or uses, on a daily per capita basis. These are. specifically, calories (CLPC), protein (PROTEINPC), and grams (GRAMSPC), for each category – crops, meat, and fish.

##### Pre-processor and first year

Daily calories per capita (CLPC), by category, are initialized in the IFs pre-processor using data from the FAO food balance sheets. Data on daily protein per capita and grams per capita are also read into the pre-processor.[11] If data are available for crops, meat, and fish, total values for calories, protein, and grams are calculated as sums of the three categories. For countries where no data are available for one or more of the categories, the model follows a set of procedures to fill in the missing data. These procedures uses, among other things, 1) equations that relate total calories per capita per day and the share of these calories from crops versus meat and fish to GDP per capita and 2) other ratios derived from global averages of those countries with data. Later in the pre-processor, CLAVAL, which represent the total calories (across all categories) per day for the population as a whole is also calculated.

The equation for total calories as a function of GDP per capita is stored as "GDP/Capita (PPP 2011) Versus Calorie Demand (fixed-effect)" and is illustrated below.[12]

Calorie demand vs GDP per capita at PPP (fixed effect)

The equation for the share of calories from meat and fish as a function of GDP per capita is stored as " GDP/Capita (PPP 2011) Versus CLPC from MeatandFish (2010) Log"

Both of these are in a logarithmic form, indicating that both total calories and the share of calories from meat and fish increase with GDP per capita, but at a decreasing rate. As the data do not show a clear pattern for the breakdown between meat and fish, which is largely due to cultural patterns and geography, the model uses historical values rather than an estimated equation, as discussed below. In the pre-processor, an average global value is used for countries without data.

In the first year of the model, one of the first things that occurs is a recalculation of GRAMSPC as GRAMSPC = FDEM/(POP * 365) * 100000. This is to ensure the consistency between the daily per capita variable, GRAMSPC, and the annual national value, FDEM. This is necessary because FDEM may have been modified in the pre-processor as part of ensuring a balance between the initial year supply of agricultural produces and their use. This is described in more detail in Box 1.

In addition, a number of additional values related to calories to be used in the forecast period are calculated.

1. CalActPredRat: the ratio between actual calories available and the predicted value.[13] It is used as a multiplicative shift factor. The predicted level of is estimated using the equation for total calories per capita as a function of GDP per capita described above. This is bound from above by an assumed maximum value, given by the global parameter calmax. The value of calactpredrat gradually converges to 1 over a period given by the global parameter agconvand appears in future equations with the name AdjustForInitialDevc.
2. MeatAndFishActPredRat: the ratio between actual share of calories from meat and fish to the predicted value. It is used as a multiplicative shift factor. The predicted level of is estimated using the equation for share of calories from meat and fish per capita as a function of GDP per capita described above.
3. MeatToMeatFishRatI: the ratio between calories from meat and calories from meat and fish. It is used to separate the future estimates of calories from meat and fish into separate values for meat and fish.
4. ProtToCalRatI: the ratio of daily per capita protein to daily per capita calories, by category. It is used to convert future estimates of calorie availability to protein availability. If for some reason the initial estimate of ProtToCalRatI is 0 for any category, the median value for that category based on 2010 is used.
5. GramsToCalRatI: the ratio of daily per capita grams to daily per capita calories, by category. It is used to convert future estimates of calorie availability to a value in grams, which is then used to estimate aggregate demand for food for direct human consumption. If for some reason the initial estimate of GramsToCalRatI is 0 for any category, the median value for that category based on 2010 is used.
##### Forecast years

In the forecast years, daily per capita calorie demand begins with a prediction of a total demand, CalPerCap, as a function of average income using the equation above, with a maximum value given by calmax. Two other values are also calculated at this point. First, a base level of calories per capita, CalBase, is also calculated, which is given as the minimum of 3000 or calmaxminus 300. Second, because comparative cross sections show a growth of around 7.6 calories per capita per year independent of average income, a factor representing this increase (CaldGr) is calculated as:

$CaldGr_{r,t} = CaldGr_{r,t-1} +7.638*((calmax-MAX(CalBase,MIN(calmax, CalPerCap_{r} )))/(calmax-CalBase)$

Thus, depending on the exact values of calmax, CalBase, and CalPerCap, CaldGr grows each year by a value that centers around 7.6 calories. This value is then added to the predicted value in calculating the total demand for calories.

The equation also takes into account calmaxand the multiplicative shift factor on calories per capita calculated in the first year of the model. The latter is named AdjustForinitialDevc, which, as noted previously, is calculate as the value of calactpredrat gradually converging to 1 over a period given by the global parameter agconv

$TotalCalPerCap_{r} = MIN('''''calmax''''',(CalPerCap_{r} + CaldGr_{r})* AdjustForInitialdevc_{r})* POP_r$

Finally, a value for the total calories per day, CalDem, is calculated by multiplying TotalCalPerCap times POP.

The next step is to divide the total calories between crops and meat plus fish. First, a predicted value of the share of total calories going to meat and fish, MeatAndFishPctPred, is calculated as a function of GDP per capita, using the equation described earlier. Second, the ratio of between actual share of calories from meat and fish to the predicted value, MeatAndFishActPredRat, calculated in the first year is potentially modified. Specifically, a new variable, AdjustForInitialDevm, is assigned either the intial value of MeatAndFishActPredRat, or a value that reflects convergence of MeatAndFishActPredRat to a value of 1 over a period given by the global parameter agconv. The countries for which convergence does not occur are the South Asian countries – India, Nepal and Mauritius –  which are traditionally low meat consuming countries. The actual share of calories from meat and fish is then calculated as:

$MeatAndFishPctAct_{r} = MeatAndFishPctPred_{r} * AdjustForInitialDevm_r$

A minimum value of 3.5 percent is also imposed.

With this value for MeatAndFishPctAct, the model can divide the total calories between crops and the combination of meat and fish. Using the value for MeatToMeatFishRatioI, calculated in the first year, the model can then estimate the calories from meat and fish separately. The values are stored in the variable CLPC(r,f)

At this point, these values are adjusted for changes in world food prices and elasticities to demand for these prices.

$CLPC_{r,f=1-3} = CLPC_{r,f=1-3} *(WAP_{f=1-3}/WAP_{f=1-3,t=1} )^{X}$

'where'

WAPf=1-3 are the global food prices for crops, meat, and fish

X is the price elasticity of demand and takes on the value of elascd, elasm, and elasfdfor crops, meat, and fish, respectively

Given these adjustments, TotalCalPerCap is recalculated as the sum of CLPC for crops, meat, and fish.

Finally, a parameter clpcmis applied to the final value of calories per capita that allows the user to manipulate demand for calories in addition to two parameters (that allow the user to eliminate hunger in a particular country over time) which are described below.

The parameters malnelimstartyrand malnelimtargetyrallow the user to reduce hunger in any country over a specific period of time. The activation of these parameters by the user, calculates the required cumulative growth rate in calories to eliminate hunger (reduce the undernourished population to 5 percent of the total population) ClPCcum. This cumulative growth rate is calculated using a logarithmic function that computes the growth rate relative to the household income and unskilled labor in a country.[14]  Also, the user can activate a switch malelimprecisesw, which calculates the specific number of calories required to eliminate hunger for the most undernourished part of the population. An individual who consumes less than 1000 calories per day but is still alive is assumed to be the most undernourished person in the population.

Therefore the final equation is as follows,

$CLPC_{r,f} = (CLPC_{r,f} *'''''clpcm'''''_{r,f} * ClPCcum_{r} )+ Caldef_{r,f}$

Where,

clpcmis a multiplier that can be used to affect the demand for calories

ClPCcum is the cumulative growth rate required in calories per capita to eliminate hunger over a specific time period determined by malnelimstartyr and malnelimtargetyr

Caldef is the cumulative number of calories required to eliminate hunger for the most undernourished part of the population. This is calculated through the activation of malelimprecisesw.

At this point, i.e., after dealing with the hunger targets, the values for daily grams per capita (GRAMSPC) and daily protein per capita (PROTEINPC) are calculated by multiplying the values for CLPC by GramsToCalRatI and ProtToCalRatI, respectively. Recall that these values were computed in the first year.

A final adjustment to CLPC, PROTEINPC, and GRAMSPC can occur as a result of shortages. This begins with a reduction in FDEM, as described in Section 3.4: Stocks, which is then translated into new values for GRAMSPC, which are then used to recalculate CLPC and PROTEINPC.

One final variable, CLAVAL, which represent the total calories (across all categories) per day for the population as a whole is then calculated as total calories per capita times the population.

#### Agricultural demand for direct human consumption (FDEM)

FDEM represents the amount of agricultural commodities going directly to consumers, presumably for consumption.

##### Pre-processor and first year

The pre-processor reads in data from the FAO Food Balance Sheets and initializes values for the amount of agricultural commodities used for direct human consumption, FDEM. If these data are missing for any commodity, a value is calculated by multiplying the daily grams per capita by the size of the population (POP) and the numbers of days in a year (365), and then divided by 100000 to get the units correct. As noted in Box 1, certain adjustments may be made to ensure consistencies between supply and demand in individual countries, as well as between imports and exports across countries.

No adjustments are made to FDEM in the first year.

##### Forecast years

In the forecast years, FDEM is initially calculated based upon the calculation of daily grams per capita described in this section below:

$FDEM_{r,f=1-3} = GRAMSPC_{r,f=1-3} * POP_{r}* 365⁄100000$

There are two situations where the value of FDEM might be adjusted. The first case is where more than 85 percent of consumers’ expenditures are on food stuffs. If this is the case, the values of FDEM for crops and meat and fish are reduced proportionately, as described in this section below.

The second case is when a country faces absolute shortages, i.e., the total domestic supply, AGDEM, is not adequate to meet all of the demands, FDEM + FEDEM + INDEM + AGLOSSTRANS even after drawing down stocks to 0. Here, each of these demands/uses are reduced proportionately to restore the balance as described in Section 3.4: Stocks. In both cases, the decreases in FDEM are fed forward to reduce the actual calories available, as described here.

### Feed demand for crops, meat and fish

Feed demand, FEDDEM, represents: 1) the amount of crops that are used to complement what livestock receive from grazing, and 2) an unspecified use of meat and fish, which appears in the FAO Food Balance Sheets.

##### Pre-processor and first year

The pre-processor reads in data from the FAO Food Balance Sheets and initializes values for the amount of agricultural commodities used as feed for other agricultural production, usually meat. If data are missing, a minimum value of 1 ton, or .000001 MMT is used.

An initial adjustment to feed demand for crops can occur in the pre-processor. This occurs when the production from grazing land is not being fully utilized. Specifically, this is when the amount of equivalent feed from grazing land, i.e. grazing land productivity, here named GLandCAP, implies a lower than assumed minimum value of 0.01 tons of crop equivalents per hectare, here named MinLDProd. The implied value of GLandCap is calculated as the difference between the total feed requirement for the number of livestock minus the feed demand divided by the amount of grazing land.

$GLandCAP_{r} = LiveHerd_r* fedreq_r-FEDDEM_{r,f=1}/ LDGraz_{r}$

where,

LiveHerd is the size of the livestock herd (discussed in this section )

LDGraz is the amount of grazing land (discussed in this section under Land Dynamics)

FEDDEMr,f=1 is the value for demand for crops for feed

Fedreq is an estimate of the per animal feed requirements, which is a function of GDP per capita. The function is depicted in the figure below[15]:

Feed demand as a function of GDP per capita at PPP

If the value of GLandCAP is less than the minimum, MinLDProd—currently hard coded as 0.01 tons of crop equivalents per hectare, based on values for the Saudi desert), then CFEDDEMr,f=1 is recalculated as the difference between the total feed requirement for the number of livestock minus the amount of feed equivalent produced by grazing using the minimum productivity.

$CFEDDEM_{r,f=1} = LiveHerd_{r} * fedreq_{r} - MinLDProd* LDGraz_{r}$

Note that this occurs when the feed from crops meets most, if not all, of the total feed requirements, implying little or no need for feed equivalents from grazing land. Also a minimum value of 0.01 MMT is set for CFEDDEM.

Finally, as noted in Box 1, certain adjustments may be made in the pre-processor to ensure consistencies between supply and demand in individual countries, as well as between imports and exports across countries.

In the first year, the model once again checks to make sure that the grazing land productivity exceeds a minimum value and this time stores this value for future use. A parallel equation to that in the pre-processor is used to get an initial estimate for grazing land productivity, now named GldCap:

$GLdCAP_{r} = (LVHERD_{r,t=1} * Fedreq_{r,t=1} -FEDDEM_{r,t=1})/LD_{r,l=2,t=1}$

'where'

LVHERDr,t=1 replaces LiveHerd from the equation in the pre-processor

LDr,l=2,t=1 replaces LDGraz from the equation in the pre-processor

FEDDEMr,f=1 replaces CFEDDEMr,f=1 from the equation in the pre-processor

Fedreqr is the same as in the equation in the pre-processor

Now, if the model estimates that GldCAP is below the minimum level, still called MinLDProd and hard coded to a value of 0.01, a new value of GldCAP  calculated:

$GLdCAP_{r} = LVHERD_{r,t=1} * Fedreq_{r,t=1} -FEDDEM_{r,t=1}/LD_{r,l=2,t=1}$

'where'

LVHERDr,t=1, LDr,l=2,t=1, FEDDEMr,f=1, and fedreqr are defined as above

fedreqmr is a multiplier required to ensure that the grazing land productivity meets the difference between the total feed requirement and that provided by crops in the initial year. It is calculated as:

$fedreqm_{r} = LD_{r,l=2,t=1} * MinLDProd + FEDDEM_{r,t=1} /(LVHERD_{r,t=1} * fedreq_{r,t=1} )$

Note that this value is always greater than or equal to 1 given the condition for making the adjustment. When no adjustment is made, fedreqm is set to 1. These values of GldCAP and fedreqm, calculated in the first year, are held constant for all forecast years

Finally, one other value is calculated in the first year – FeedToFoodRatI, which is the ratio between FEDDEM and FDEM. This is calculated for crops, meat, and fish, but is only used for the latter two categories in the forecast years, as described below.

#### Forecast years

In the forecast years, FEDDEM is calculated as a function of the size of the livestock herd (LVHERD), the feed requirements per unit livestock (fedreq), the amount of grazing land (LDl=2), and the productivity of grazing land (GldCAP), but adjustments are also made reflecting the effect of global crop prices on grazing intensity (WAPf=1), changes in the efficiency with which feed is converted into. meat, and the adjustment factor fedreqm calculated in the first year. There is also a parameter with which the user can cause a brute force increase or decrease in FEDDEM (feddemm)

The model first calculates the amount of crop equivalent produced from grazing land using the following equation:

$GLFeedEq_{r} =(LD_{r,l=2} * GLdCAP_{r} )*( WAP_{f=1} / WAP_{f=1,t-1} )^{elglinpr}$

where,

LDr,l=2 is the amount of grazing land; the dynamics of this variable is discussed in section 3.10: Land Dynamics

GldCAPr is the country value for grazing land capacity initialized in the first year

WAPt,f=1 is global price for crops; and

elglinpr is a global parameter for the elasticity of livestock grazing intensity to annual changes in world crop prices; the basic assumption is that increasing prices should lead to increased grazing intensity and therefore greater productivity of grazing land[16]

This production of crop equivalents from grazing land is then subtracted from total feed requirement in the following equation:

$FEDDEM_{r,f=1} =(LVHERD_{r} * Fedreq_{r} * fedreqm_{r}*max⁡{0.5,(1-livhdpro/100)^(t-1) }-〖GLFeedEq〗_r )*feddemm$

Where,

LVHERD, fedreq, and fedreqm are as previously described. LVHERD and fedreq are updated each year as described in section 3.11: Livestock Dynamics and as a function of GDP per capita, respectively. fedreqm, determined in the first year, does not change over time.

livhdpro is a global parameter related to the rate at which the productivity of crops in producing meat improves over time. This part of the equation implies that the amount of feed needed to produce a unit of meat declines over time to a minimum of half the original amount required

feddemm is a country-specific multiplier that can be used to increase or decrease crop demand for feed purposes

For meat and fish, a simpler process is used. The feed to food ratio, FeedToFoodRatI, calculated in the initial years of the model is used to calculate the share of feed demand for meat and fish respectively.

$FEDDEM_{r,f} = FeedToFoodRatI_{r,f} * FDEM_{r,f}$

Note that there is no multiplier equivalent to feddemmfor meat and fish.

Finally, as with FDEM, FEDDEM may be adjusted to account for excessive consumer spending on food, as described in Box 2 or due to shortages in crops, meat, or fish as described in Section 3.4: Stocks.

### Industrial demand for crops, meat and fish

Industrial demand, INDEM, represents the amount of crops, meat, and fish that are used in industrial processes.

#### Pre-processor and first year

The pre-processor reads in data from the FAO Food Balance Sheets and initializes values for the amount of agricultural commodities used in industrial processes. If data are missing, a minimum value of 1 ton, or .000001 MMT is used.

Finally, as noted in Box 1, certain adjustments may be made in the pre-processor to ensure consistencies between supply and demand in individual countries, as well as between imports and exports across countries.

Industrial demand for crops

In the first year, two values related to industrial demand for crops are calculated. The first of these is a multiplicative shift factor (INDEMK), which is calculated as the ratio of actual to predicted industrial demand for crops.  The predicted value is given by a function that relates per capita industrial demand to GDP per capita, which is shown above.[17] This multiplicative shift factor remains constant over time. As with FEDDEM, one other value is calculated in the first year – IndToFoodRatI, which is the ratio between INDEM and FDEM. This is calculated for crops, meat, and fish, but is only used for the latter two categories in the forecast years, as described below.

#### Forecast years

In the forecast years, for crops, the initial value of industrial demand is updated using the table function above to get a predicted value for industrial demand per capita, which is then multiplied by population (POP) and the multiplicative shift factor (IndemK). At this point, a region-specific multiplier (indemm) can either increase or decrease the initial estimate of INDEM.

A first adjustment to INDEM is related to the world energy price (WEP) and reflects the use of crops for fuel production. Specifically, as the world energy price increases relative to the price in the first year, the industrial demand for crops increases.

$INDEM_{r} = INDEM_{r} *(1+ WEP_{t}/WEP_{t=1}) *FoodforFuel)$

Where

WEP is world energy price

FoodforFuel is the elasticity of industrial use of crops to world energy prices. It starts at a value given by the global parameter elagind, and declines to a value of 0 over 50 years.

The second adjustment relates to the world crop price (WAPf=1); as this increases relative to the price in the first year, industrial demand for crops declines.

$INDEM_{r} = INDEM_{r} *(WAP_{f=1,t}/WAP_{f=1,t=1} )^{elascd}$

'Where'

WAP is world crop price

elascd is a global parameter specifying the elasticity of crop demand to global food prices

A third adjustment is based on an assumed cap on per capita industrial demand for crops (IndemCapperPop—hard coded as 2. Specifically, INDEM is not allowed to exceed IndemCapperPop * POP.

For meat and fish, industrial demand is initially calculated by applying the Industrial demand to food ratio, IndToFoodRatI (calculated in the initial year of the model) to the value of food demand.

$INDEM_{r,f} = IndToFoodRatI_{r} * FDEM_{r,f}$

Note that there is no multiplier equivalent to indemmfor meat and fish.

Finally, as with FDEM and FEDDEM, INDEM may be adjusted to account for excessive consumer spending on food, as described in section 3.2.5 or due to shortages in crops, meat, or fish as described in this Section below.

### Food manufacturing demand

The final demand category, FMDEM, relates to the use of crops, meat, and fish in food manufacturing and processing.

#### Pre-processor and first year

The pre-processor reads in data from the FAO Food Balance Sheets and initializes values for the amount of agricultural commodities used in food manufacturing and processing.[18] Note that If data are missing, a minimum value of 1 ton, or .000001 MMT is used.

As noted in Box 1, certain adjustments may be made in the pre-processor to ensure consistencies between supply and demand in individual countries, as well as between imports and exports across countries.

Paralleling the case for INDEM, FEDDEM, and AGLOSSTRANS, one other value is calculated in the first year –FManToFoodRatI, which is the ratio between INDEM and FDEM. This is calculated for crops, meat, and fish, and used for all three in the forecast years, as described below.

$FMDEM_{r,f} = FManToFoodRatI_{r,f} * FDEM_{r,f}$

#### Forecast years

In the forecast years, for all three categories, demand is calculated using the Food manufacturing to food demand ratio, FManToFoodRatI, calculated in the first year of the model and the value of food demand.

$FMDEM_{r,f} = FManToFoodRatI_{r,f} * FDEM_{r,f}$

As with FDEM, INDEM, and FEDDEM, FMDEM may be adjusted to account for any shortages in crops, meat, or fish as described in Section 3.4: Stocks. It is not currently affected by excessive consumer spending on food, as described in Box 2

### Total agricultural demand and final adjustment to demand

#### Pre-processor and first year

AGDEM, which represents the sum of all uses. It is initialized in the first year of the model to ensure the balance with production, imports, and exports:

$AGDEM_{r,f=1-3,t=1} = AGP_{r,f=1-3,t=1} + AGM_{r,f=1-3,t=1} - AGX_{r,f=1-3,t=1}$

#### Forecast years

In the forecast years, AGDEM, is recalculated as the sum of the final values of feed, industry, and food demand and transmission losses:

$AGDEM_{r,f=1-3} = FEDDEM_{r,f=1-3} + INDEM_{r,f=1-3} + FDEM_{r,f=1-3} + FMDEM_{r,f=1-3} + AGLOSSTRANS_{r,f=1-3}$

Note that this occurs after any adjustments to the demand values as a result of excessive consumer spending on food, (described below), but before adjustments as a result of shortages, describe in Section 3.4: Stocks. Thus, it can be the case that the final value of AGDEM may exceed the sum of the individual demand values.

Final agricultural demand adjustment based on levels of consumer spending

One final adjustment is made to the agricultural demand variables in the forecast years.

If the preliminary estimate of total food demand in monetary terms (csprelim), is too large of a share of consumption, i.e., if

$CsPrelim_{r} = CSF_{r} *(FDEM_{r} * WAP_{f=1,t=1} + FDEM_{r,f=2} * WAP_{f=2,t=1} + FDEM_{r,f=3} * WAP_{f=3,t=1} )>0.85*C_{r,t=1}$

Where,

CSF is the ratio of consumer spending in the agricultural sector in the first year (CSr,s=1,t=1) to DemValr, a weighted sum of demands for agricultural products for food in the first year;

$DemVal_{r} = FDEM_{r,t-1} *WAP_{f=1,t-1} + FDEM_{r,f=2,t-1} * WAP_{f=2,t-1} + FDEM_{r,f=3,t-1} * WAP_{f=3,t-1}$

C is total household consumption in the first year

When this is the case, a series of steps are taken to bring these values back in line.

1. The necessary reduction (NecReducr), which is in monetary terms, is calculated as CsPrelimr – 0.85*Cr
2. A reduction factor (ReducFact) for meat and fish, assuming cuts would disproportionately be there,  is calculated as,

$ReducFact_(r,)=(NecReduc_{r}/csprelim)*2$

with a maximum value of 1 or full elimination

1. The physical demands for crops for meat and fish in tons (FDEM, categories 2 and 3) are reduced by reducfact, and the values of the meat and fish reduction are saved for the next step

$Meatreduc_{r} = FDEM_{r,f=2} *ReducFact_{r}$ $Fishreduc_{r} = FDEM_{r,f=3} *ReducFact_{r}$

$FDEM_{r,f=2,3} = FDEM_{r,f=2,3} *(1-Reducfact)_{r}$

1. An estimate of the necessary reductions in crops for food, in monetary terms is estimated by subtracting the savings obtained through the reduction in meat demand

$FoodReduc_{r}= NecReduc_{r} - MeatReduc_{r}* CSF_{r} *WAP_{f=2,t=1} - FishReduc_{r} * CSF_{r} *WAP_{f=3,t=1}$

The physical demand for crops for food (FDEM) is then reduced as follows

$FDEM_{r,f=1} = Max(0.1*FDEM_{r,f=1} , FDEM_{r,f=1} - FoodReduc_{r}/(CSF_{r} *WAP_{f=1,t=1} ))$

Note that this ensures that FDEM is not reduced by more than ninety percent.

Finally, given the changes above, the total demand is recalculated as the sum of the final values of feed, industry, and food demand and transmission losses

$AGDEM_{r,f} = FEDDEM_{r,f} + INDEM_{r,f} + FDEM_{r,f} + FMDEM_{r,f} + AGLOSSTRANS_{r,f}$

 Box 1: Adjustments in the Pre-processor to Ensure Proper Balances The pre-processor reads in data from the FAO Food Balance Sheets and initializes values for the amount of agricultural commodities used for direct human consumption, FDEM, feed (FEDEM), industry (INDEM), food manufacturing (FMDEM), as well as transmission losses (AGLOSSTRANS). All of these are measured in MMT per year. At the same time, it reads in data for production (AGP), imports (AGM), exports (AGX), and total domestic supply (AGDOMSUPP)[1]. A set of conditions should be meet for these variables for each category: AGDOMSUPP = AGP + AGM – AGX. This says that total domestic supply equals production plus imports minus exports. This equivalence can be broken if there are changes in stocks, which we will see in forecast years. Currently, however, we assume there are no such changes in the first year. Thus it may be necessary to make adjustment for the equivalence to hold in first year. This is done in the pre-processor, by keeping AGDOMSUPP the same and applying the following three rules: If AGDOMSUPP > AGP + AGM – AGX, i.e., stocks were being drawn down, increase AGP and AGM while reducing AGX. If AGDOMSUPP < AGP + AGM – AGX, i.e., stocks were being added to, decrease AGP and AGM while increasing AGX. Make sure that AGP, AGM, and AGX do not fall below a minimum value. Sum of AGM across countries = Sum of AGX across countries. This says that imports and exports need to match. If they do not, the model calculates the average of the two sums and adjusts AGM and AGX in each country proportionately. AGP + AGM – AGX = FDEM + FEDEM + INDEM + FMDEM + AGLOSSTRANS. This says that the total domestic supply, which accounts for production losses, has to match the total uses (including losses in transmission and distribution). The pre-processor includes procedures to ensure that these three conditions hold for the initial values in each country. This can lead to minor adjustments in the values for the supply and demand categories. These processes can also lead to changes in related variables, including the production of non-animal meat products (CAGPMILKEGGS), fish catch (AGFISHCATCH), aquaculture production (AQUACUL), the size of the livestock herd (LVHERD), and the breakdown of land areas (LD). The latter occurs because we do not want these processes to change crop yields (YL).

Consistent with the approaches within both the economic model and the energy model, trade of agricultural products in IFs uses a pooled approach rather than a bilateral one.   That is, we can see the total exports and imports of each country/region, but not the specific volume of trade between any two.  Offered exports and demanded imports from each country/region are responsive to the past shares of export and import bases and are summed globally.  The average of the totals is taken as the actual level of global trade and the country exports and imports are normalized to that level.

Price differentials across countries do not influence agricultural trade. Although the IFs project has experimented over time with making such trade responsive to prices, there is an increasing tendency globally for food prices to be more closely aligned across countries than was true historically.  Moreover, the use within IFs of local relative food surpluses or deficits (as indicated by stock levels) to adjust trade patterns is an effective proxy for the use of prices.

# Key User controllable parameters in the IFs agricultural model

 Name Unit Dimensionality Description Default Value Agconv years year agricultural demand convergence time to function 75 Aginvm Multiplier Base 1 year, country multiplier on investment in agriculture 1 aglossconsperc percentage year, country, food type (crop, meat, fish) waste rate of agricultural consumption 10 aglossprodperc percentage year, country, food type (crop, meat, aquaculture, fish catch) loss rate at point of production 10 aglosstransm Multiplier Base 1 year, country, food type (crop, meat, fish) loss rate from producer to consumer, multiplier 1 Agon switch (0-1) year switch to turn off or on linkages between ag module and other modules; default is on 1 aquaculconv years year time over which aquaculture growth falls to 0 50 Aquaculgr growth rate in percent year, country aquaculture growth rate, initial 3.5 Aquaculm dimensionless year, country multiplier on aquaculture production 1 Calmax Calories/person/day year maximum kilocalories needed per day per person.  This value should be a biologically-determined number that you will not normally change over time. 3800 Calmeatm dimensionless (0-1) year the maximum portion of calories that will come from meat.  The model increases the portion of calories taken in the form of meat with income up to this level (a value between 0 and 1). 0.7 clpcm Multiplier Base1 year,country Per capita calorie multiplier 1 Dkl depreciation rate in decimal form year depreciation rate of investment in land 0.01 Dstl dimensionless (0-1) year Desired stock (inventory) level in the economy.  It is in proportional terms so that 0.1 represents a 10% target stock level (of a base that usually includes annual production and may include demand, exports, or imports).  There is little reason for most users to want to change this parameter. 0.1 Elagind dimensionless year elasticity of industrial (incl. energy) use of crops with energy price 0.2 elagmpr1 elasticity of agricultural imports to prices elagmpr2 elasticity of agricultural imports to change in prices elagxpr1 elasticity of agricultural exports to prices elagxpri2 elasticity of agricultural exports to change in prices Elascd dimensionless year elasticity of crop food demand to prices -0.15 Elasfd dimensionless year elasticity of fish demand to prices -0.3 Elasmd dimensionless year elasticity of meat demand to prices -0.3 elfdpr1 dimensionless year elasticity of yield to stocks/inventories -0.5 elfdpr2 dimensionless year elasticity of yield to changes in stocks/inventories -1 Elglinpr dimensionless year elasticity of livestock grazing intensity to prices 0.5 eliasp1 dimensionless year elasticity of ag investment in land to return 0.2 eliasp2 dimensionless year elasticity of ag investment in land to change in return 0.4 elinag1 dimensionless year elasticity of ag investment to profit 0.15 elinag2 dimensionless year elasticity of ag investment to change in profit 0.3 ellvhpr1 elasticity of livestock herd size to stock level ellvhpr2 elasticity of livestock herd size to changes in stock level envco2fert No unit No unit Crop CO2 sensitivity 0.1365 envylchgadd percentage year additive factor for effect of climate on yield 0 envylchgm Multiplier Base 1 year, country multiplier on effect of climate on yield 1 feddemm Multiplier Base 1 year,country Livestock feed demand multiplier 1 fishcatchm Multiplier Base 1 year, country fish catch multiplier 1 Forest Multiplier Base 1 year, country forest land multiplier 1 fpricr1 dimensionless year food prices, response to stock level -0.3 fpricr2 dimensionless year food prices, response to change in stock level -0.6 Fprihw ratio year food prices (inertial delay) in change 0.8 fprimt1 dimensionless year fish prices, response to stock level -0.3 fprimt2 dimensionless year fish prices, response to change in stock level -0.6 indemm Multiplier Base 1 year,country Industrial agricultural demand multiplier 1 Ldcropm dimensionless year, country multiplier on land to be developed for cropland 1 Ldwf hectares/person year land withdrawal factor with population growth 0.05 Livhdpro dimensionless year livestock herd productivity with grain feeding 0.5 Lks years country, economic sector lifetime of capital 30 Lvcf tons crops/tons meat year global livestock to calorie conversion factor, compared to crops 2 malelimprecisesw switch (0-1) year,country elimination of hunger for only the undernoursihed population 0 malnelimstartyr year year,country start year for an elimination of hunger scenario 0 malnelimtargetyr year year,country Target year for an elimination of hunger scenario 0 Meatmax tons meat/person/yr year The maximum meat consumption per person, in tons per person per year.  This parameter is only used to restrict meat consumption calculations in the initial year, in case of unreasonable data.  If you wish to introduce scenarios around dietary patterns (for instance, to reduce meat consumption), use the parameter calmeatm. 0.12 Mhw dimensionless year iMport propensity, historical (inertial) delay in change.  Values near 1.0 imply very rapid adjustment and values near 0 imply little or no adjustment.  Significant changes in this parameter could destabilize model behavior. 0.5 Ofscth 10^6 tons fish year total global non-aquaculture fish production 80 Protecm Multiplier Base 1 year, country Trade protection multiplier.  A multiplier on the price of imported goods, unit-less, by region.  A value of 1 implies no change, while higher values proportionately increase the prices of imported goods and lower values decrease them. 1 Slr fraction (0-1) year slaughter rate 0.7 Tgrld growth rate in decimal form country target growth in cultivated land 0.1 Xhw dimensionless year eXport propensity, inertial delay in change.  This parameter computes a moving average of export propensity.  A value of 0.7 would weight the historical or moving average by 0.7 and the newly computed value by 1-0.7 or 0.3. 0.7 Ylexp dimensionless year yield, exponent controlling saturation speed 0.5 Ylhw ratio year yield, inertial delay in change 0.2 Ylm Multiplier Base 1 year, country yield multiplier 1 Ylmax 10^6 tons crops/10^6 ha crop land year, country crop yield, maximum 15 Ylmaxgr growth rate in decimal form year maximum growth in yield 0.075

# References

1. Meadows, Dennis L. et al. 1974. Dynamics of Growth in a Finite World. Cambridge, Mass: Wright-Allen Press.
2. Systems Analysis Research Unit (SARU). 1977. SARUM 76 Global Modeling Project. Departments of the Environment and Transport, 2 Marsham Street, London, 3WIP 3EB
3. Herrera, Amilcar O., et al. 1976. Catastrophe or New Society? A Latin American World Model. Ottawa: International Development Research Centre.
4. Levis, Alexander H., and Elizabeth R. Ducot. 1976. "AGRIMOD: A Simulation Model for the Analysis of U.S. Food Policies." Paper delivered at Conference on Systems Analysis of Grain Reserves, Joint Annual Meeting of GRSA and TIMS, Philadelphia, Pa., March 31-April 2.
5. Following table is used to update CDALF, GDP/Capita (PPP) Versus Cobb-Douglas Alpha (GTAP 5)
6. The ADJSTR function, used throughout the model, is a PID controller that builds in some anticipatory and smoothing behavior to equilibrium processes by calculating an adjustment factor. It considers both the gap between the current value of the specific variable of interest, here crop stocks, and a target value, as well as change in the gap since the last time step. Two parameters control the degree to which these two "differences" affect the calculation of the adjustment factor. In this case, these are the global, user-controllable parameters elfdpr1 and elfdpr2.
7. There is also an adjustment whereby ylmaxgr is reduced for countries with syl>5, falling to a value of 0.01 when syl>=8. Also, for countries with a yield greater than world yields, the additional growth rate in yields due to change in agricultural investment is restricted to a value that is equal to ylmaxgr.
8. Rosegrant, Mark W., Mercedita Agcaoili-Sombilla, and Nicostrato D. Perez. 1995. "Global Food Projections to 2020: Implications for Investment." Washington, D.C.: International Food Policy Research Institute. Food, Agriculture, and the Environment Discussion Paper 5.
9. Cline, William R. 2007. Global warming and agriculture: Impact estimates by country. Washington, DC: Peterson Institute for International Economics.
10. In every year of the model, the effect of aquaculm is removed on the aquaculture variable. This is because the multiplier in this case is used on a stock rather than a flow due to which the effect of the multiplier needs to be removed in each time step.
11. Note that although daily grams per capita are read in and used in the pre-processor, these are recalculated in the first year of the model
12. Equation is CalPerCap = 2468.972+155.778*ln(GDPPCP). Because this equation was estimated using a fixed-effects model, the intercept does not have the same meaning as in a regular regression. Rather, it is the average of the fixed-effect across countries with data. This is not a problem for countries with data, as the shift factor in the first year will account for this. For countries without data, however, this can give a misleading estimate of initial daily calories per capita.
13. In the model this is currently calculated as CLAVAL/caldem, where caldem = the predicted value of total CLPC (after accounting for calmax) times the total population. It could just as easily be calculated as the predicted value of total CLPC (after accounting for calmax) divided by the actual value of total CLPC from the pre-processor.
14. The function used is as follows, Exp((Log(5) - 46.95226 + 0.18422 * Log(HHINC / labsups)) / -5.643)
15. The specific equation is stored as “GDP/Capita (PPP) Versus Feed Requirements” and is defined by the two points (GDP/capita, fedreq) = (0, 2.5) and (30, 3.5).
16. The code, as written, ignores price effects that would reduce GLFeedEq. Since elglinpr is generally positive, this implies that decreases in world crop prices are ignored.
17. Equation is INDEM = 0.0376 + 0.000704 * GDPPCP
18. Note that the FAO Food Balance Sheets include data for agricultural commodities used for food manufacturing and as seed separately. We combine these into a single food manufacturing category.
19. Two other variables, defadjmul and ImportBoost, are included in the calculations to make some finer adjustments to the changes in exports and imports; these relate to the observed behavior for specific countries and are not discussed in detail here.
20. Note this occurs in DATAPOP, not DATAAGRI. The historic data series is SERIESCalPCap. Missing data are estimated based on access to water and sanitation or average income.
21. s in the subscript represents economic sector. s = 1 is defined as the agriculture sector.
22. Fs does have a global parameter agon that can be used to break the link between the agriculture and economic model, in which case INAG is not overwritten. This is done by setting agon to a value less than 0.5. Doing so treats the agriculture model as a partial equilibrium model rather than a general equilibrium model.
23. For details on the base year value of meat production, which is based on historical data related to production, imports, exports, and assumptions about expected meat consumption and production losses, see the description of agricultural data initialization in the pre-processor.