Implementation of an Algorithm for a Layered Soil Submodel
with Application to the CENTURY Model

Thomas E. Hilinski
Department of Soil and Crop Sciences
Colorado State University

February 2001


Summary

A new algorithm for managing layered soil information allows for an unlimited number of vertically distributed soil components over an unlimited number of layers. Operations include erosion and deposition, layer homogenization and splitting, and relevant statistical functions applied over depth and layer ranges. A soil component is any soil information which has a vertical distribution by layer. The algorithm includes a manager for the list of components, and the ability to insert and extract soil information in either a vertical or horizontal dimension. A soil base object provides the essential operations. Specific derivation of a soil object from this base object, for any modeling scheme must provide the implementation details for the kind of soil information required for the particular model. An example of the implementation of a soil object for the CENTURY version 5 model provides for texture, bulk density, water storage properties and amount, and soil organic matter.

Algorithm

The layered soil algorithm consists of vertically distributed soil components, a list manager for these components, and a base soil class for managing both the list and provide by-layer operations (see figure 1). Both the number of components and layers are not constrained by the algorithm. Soil information can be addressed in either a vertical dimension (a range of depths or layers) and a horizontal dimension (across components, that is, by layer). The application of this algorithm is to a one-dimensional, vertical view of a soil; no spatial information is managed.

Figure 1. Class diagram for the layered soil algorithm.

A soil component is any soil information which has a vertical distribution by layer. This information can be categorized into properties and pools. Properties have values that are independent of the depth dimension, for example, bulk density and field capacity. Pools are values which are dependent upon the spatial dimension, such as the amount of water or organic C within a layer, or over a depth range. Basic statistics regarding the magnitude of a component are provided for each type of information. For properties, the weighted mean can be calculated over a layer or a depth range. For pools, the total amount can be calculated over a layer or a depth range. The soil component object does not store the depth information for the layers (this information is in the soil base object). Data for a soil component consists of the following:

Operations provided by the component object include data access, comparison, and queries:

The component list manager handles the addition and removal of components. The manager contains zero or more soil components. There is only one component list manager per soil object. The manager is not accessed directly but through the soil base object. A derived object type, the soil layer, manages a list of components exactly one layer thick, and knows the layer thickness. There can be zero or more layers, however layers are independent of a soil object. Layers are intended for communication of information between soil objects (e.g., erosion and deposition), and for use in operations which view layer information. Operations provided by the component list manager are:

In addition to the operations provided by the component list manager, the soil layer object provides the following operations:

The soil base object contains management operations by layer, contains the component list manager, and provides the essential algorithms for managing the soil profile. This object is a base object only; there should never an instance of this object. Rather, its use is intended as the base for custom soil objects, which inherit all the features of the soil base object, and add their specialized data and operations for the particular modeling scenario in which they are used. Depth and layer thickness information is maintained by this object, and are constant for all soil components (but not for layer objects, which are independent of the soil base object). Operations provided by the soil object include:

Additional calculations are available:

Changes in the bulk density and thickness of a soil layer are based upon changes in organic C content (g m-2). This calculation assumes a constant mean bulk density of soil organic matter equal to 0.224 g cm-3 ( Adams, 1973 ). The change in thickness (cm) is calculated as:

Dt = DC (g m-2) * OMCF / (10000 cm2 m-2 * OMBD)

where OMBD = 0.224 g cm-3 is the mean organic matter bulk density ( Adams, 1973 ), and OMCF = 1.9 is the conversion factor for organic C weight fraction to organic matter weight fraction (Broadbent, 1965; Allison, 1965). Change in the bulk density (g cm-3) is calculated as:

DBD = –DC * OMBD / (C0 + DC)

For example, given an initial organic C content of 2000 g m-2, an increase of 5 percent (100 g m-2) will increase the layer thickness by 0.085 cm, and decrease the bulk density by 0.011 g cm-3.

Implementation

The layered soil algorithm is implemented in ANSI Standard C++, and uses extensively standard library containers and algorithms. Memory storage and speed is optimized through the use of smart, shared pointers in library containers in order to minimize copying of objects (an expensive operation) as the soil object is modified.

Features Planned but Not Implemented

Several features were planned for the layered soil algorithm but have not yet been implemented. These include the following features and operations:

Use in the CENTURY Model

The CENTURY model, version 5, requires information on soil texture fractions, bulk density, field capacity, wilting point, water content, and soil organic matter content over depth ranges. To implement this soil, a new soil object was derived from the soil base object. Several algorithms specific to Century's needs were added, modified from CENTURY version 4, including the following:

Class and File Names

Class Name Header File Name Description
TSoilVDCompBase TSoilVDCompBase.h Base class for the soil profile classes which describe and manage a vertically-distributed component of soil.
TSoilProperty TSoilProperty.h Describes and manages a vertically-distributed component of soil. Soil property is independent of the soil layer thickness.
TSoilPool TSoilPool.h Describes and manages a vertically-distributed component of soil. Soil pool is a quantity of something in a layer.
TSoilCompList SoilCompList.h List of vertically distributed soil components. Derived from std::vector.
TSoilLayer TSoilLayer.h List of soil components representing one homogenous layer. Each component vector can contain only one element reporesenting one layer. Derived from TSoilCompList, which differs mainly in that each component vector can contain many layers.
TSoilBase TSoilBase.h Base class to describe and manipulate soil physical characteristics.
TSharedPtr TSharedPtr.h A smart pointer that can be shared, and therefore can be used in standard C++ containers.
TCenturySoil TCenturySoil.h Soil object for the CENTURY model.

Revision History

Date Author/Editor Description
Feb 2001 Thomas E. Hilinski First version.
Nov 2001 Thomas E. Hilinski Added information on the conversion functions, and the calculation for change in bulk density and thickness due to changes in organic C content.

Copyright 2001 Thomas E. Hilinski. All rights reserved.