Total crop demand (AGDEM, category 1) has three components: feed (FEDDEM), industrial (INDEM) and food (FDEM). Here we describe the basic calculations for food use of crops. Note that in forecast years additional adjustments are made to a number of the demand variables, so the discussion here will not fully complete the determination of FDEM.
The demand for crops for food in the base year is not computed in the pre-processor. Rather, in the first year of the model, the demand for crops for food (FDEM) is calculated as the residual of total agricultural demand for crops minus the demand for crops for feed and for industry. 
Given earlier calculations of the total demand for calories and of the share of that demand to be met by meat, it was possible to calculate the calories needed from crops, mostly grain around the world (calfromgrain). From this it is possible to calculate food demand using the factor relating the conversion from crops to calories (sclavf), an adjustment based on world crop prices, and a multiplier that can be used to increase or decrease demand.
FDEM is bound from above based on the assumed maximum calories per capita ( calmax ), and the multiplicative shift factor on calories per capita (adjustforinitialdevc).
 It is bound to be between 0.1 and 1000.