NCSOIL - Plant and Soil Sciences eLibrary

Soil Series 122
Winter 1986
NITROGEN CARBON
TRANSFORMATION IN SOIL
(NCSOIL)
USER’S GUIDE
BY
J.D. HASKETT
J.A.E. MOLINA
C.E. CLAPP
The University of Minnesota, including the Agricultural Experiment Station, is committed
to the policy that all persons shall have equal access to its programs, facilities, and
employment without regard to race, creed, color, sex, national origin, handicap, age, or
veteran status.
Department of Soil Science, Univeristy of Minnesota St. Paul Minnesota
Table of Contents:
NCSOIL Flow Diagram.................................................................................................... 4
Introduction ................................................................................................................... 5
The Structure of NCSOIL ................................................................................................ 6
The Time Step ................................................................................................................ 7
I The Components of the Model ...................................................................................... 7
The Plant Residue Pool................................................................................................... 8
Carbon Flow ................................................................................................................... 8
Transfer of Carbon to the Second Pool ........................................................................... 8
Breakdown of Humads .................................................................................................... 9
Nitrogen
................................................................................................................. 10
Transfer of Nitrogen to Second Pool ............................................................................. 12
Simplifying assumptions of Nitrogen Flow..................................................................... 13
Conditions of Excess Carbon ....................................................................................... 14
II. The Functioning Model ............................................................................................. 15
Day 1 ................................................................................................................. 15
Day 2 ................................................................................................................. 16
Day 3 ................................................................................................................. 16
III. Using the Model ...................................................................................................... 16
Data Entry
................................................................................................................. 17
Parameter locations in an NCDATA File ....................................................................... 17
Line One ............................................................................................................. 18
Line Two ............................................................................................................. 19
Line Three .......................................................................................................... 19
Line Four ............................................................................................................ 19
Line Five ............................................................................................................. 20
Line Six............................................................................................................... 20
Line Seven ......................................................................................................... 20
Lines Eight and Nine .......................................................................................... 20
Example of an NCDATA File .............................................................................. 21
2
Output ........................................................................................................................... 21
Appendix ....................................................................................................................... 23
1) Timestep Selection.................................................................................................... 23
2) Data Entry using NCDATA........................................................................................ 24
A) General ............................................................................................................... 24
B) Values for the Parameters .................................................................................. 24
C) Units ................................................................................................................... 24
D) Locations by Parameter Designation ................................................................. 25
E) Definitions of Parameter Designations ............................................................... 25
F) Example of an NCDATA File .............................................................................. 28
3) NCOPUT Column Key ............................................................................................. 28
A) Headings ............................................................................................................ 28
B) Group Titles ........................................................................................................ 29
4) Running the Model on Cyber ................................................................................... 30
A) Example of a run on the Cyber Computer .......................................................... 31
B) A Brief NOS Tutorial ........................................................................................... 32
NOS Commands in Brief ................................................................................... 36
C) A Brief XEDI Tutorial ........................................................................................... 37
XEDIT Commands in Brief ................................................................................. 39
D) A Brief MINITAB Tutorial .................................................................................... 40
Key to NCTAB Columns .................................................................................... 41
References.................................................................................................................... 43
3
4
INTRODUCTION:
NCSOIL is a program which simulates the biological transformation of
nitrogen and carbon in the soil: plant residue decomposition, nitrification, denitrification,
immobilization and mineralization of nitrogen, and soil organic matter decomposition
and formation. The program assumes a homogeneous soil at a constant temperature
and water content. For those interested in the underlying concepts and mathematics of
NCSOIL, the original articles presenting these aspects are referenced in the appendix
(Molina et al. 1983, Clay et al. 1984, Clay et al. 1985, Hadas et al. 1987).
Models have inherent limitations which are like those described in the
story that LewisCarrol tells about the methodical map makers. This group wished to
constantly increase the accuracy of their maps by incorporating ever increasing levels of
detail. Starting with maps of a scale of 1:72,000, they eventually managed to create a
map which had a scale of 1:1. However the farmers refused to let them lay it down.
This story illustrates that there is always a trade-off between the accuracy
of the model and its size and workability. A model is necessarily less accurate than the
thing it represents and as a modeler one can only hope that one has achieved the level
of detail which permits the model to fulfill its objectives.
Another limitation of computer models can also be illustrated by Carlyle's
observation about the recording of history. He said that although history occurs
simultaneously it is recorded sequentially. Similarly the NCSOIL model attempts to
mimic a system in which all of the processes which are operative occur simultaneously.
Yet the computer must follow sequential commands one at a time. This "round holesquare peg" problem is addressed through the convention of the timestep (see also
page 3 and appendix): the interval of time during which the computer calculates all the
various occurrences in the system and then records them at the end of the timestep "as
if" they had all occurred together.
The model lends itself to examining the soil system as a dynamic entity
rather than simply reading about it as a static entity. It is hoped that by manipulating the
program the user will gain a feel for the nitrogen -carbon cycle in the soil.
Although this manual is intended for a general audience, a conscious
decision was made to aim the text at the undergraduate user with little previous
modeling experience. This gives the manual the broadest applicability since it can then
be used as a teaching tool as well as a reference guide.
The directions which follow assume a certain familiarity with the Cyber computer system
and with the Xedit line editor on that system (a list of the CYBER commands
necessary to access the system, an example of a computational session with
CYBER and a list of references for using the system, appears in section 4 of the
appendix).
5
THE STRUCTURE OF NCSOIL:
The program NCSOIL simulates the biological cycling of nitrogen (N) and carbon
(C) as these elements move between a series of pools or compartments. NCSOIL
computes this flow through a system of controlling rates and decisional switches. The
rate controlling aspect may be envisioned as the faucets and drains on a series of
interconnected bathtubs which feed
into one another ( Figure 1), and whose levels are controlled by the rates of inflow and
the rates of outflow. Decisional switches are similar to switches on a railroad line. That
is, they are forks in a road, the program chooses one path or the other depending on
the current circumstances.
There are many flow configurations which arise due to different initial
circumstances and the interplay of factors in the system. This is a longwinded way of
saying that the flows do not follow one linear path. It is not A goes to B goes to C. After
"A" a number of different alternate paths can be followed depending on conditions. Each
path leads to a distinct series of consequences. This is especially useful for modeling
mutually exclusive biological occurrences at any particular place in the soil.
6
THE TIME STEP
In order to mimic the functioning of the system as it changes through time
the program uses a time step (A t). The program starts at time zero (t=O) and does a
series of sequential calculations which are intended to represent the simultaneous
interactions occurring during the first time step (to+A t). The
results of these calculations form the basis for the next pass through the program which
simulates the interactions during the next time step (ti +A t)
The modeller selects the duration of the time step which can vary from minutes to
weeks.(this will be detailed in the input section of the appendix).
1. THE COMPONENTS OF THE MODEL
When viewed diagramatically NCSOIL resembles a complex wiring
diagram, which can be understood if it is broken down into sections. NCSOIL models
the cyclical portions of the transformation system sequentially. In order to do this, it
does quite a bit of feeding back on itself. The initiation of decay of a residue left by a
crop on the surface of the soil, is a convenient starting place. In a sense this is the
reservoir which drains into the bathtubs of the system (ignoring for a moment the
degree to which they are already filled).
The Plant Residue Pool
The composition of the plant residue pool is very complex in nature,
consisting of all of the compounds found in dead plants. However this complexity is
skirted by the program, which divides plant residue into those portions which are only
decomposed slowly (which will be referred to as resistant), and those portions which are
labile, that is, readily decomposed.
This residue is what we have to start with and it is immediately subject to
microbial attack. The rate at which this decay proceeds is controlled by a number of
factors, including: temperature, available water, and the carbon - nitrogen ratios (C/N) of
each portion of the residue. Each portion of the residue has a specific rate of decay,
which is inversely related to its C/N ratio. Simply, the more C there is relative to a given
amount of N, the slower decay will be in the absence of other sources of N. Specific
decay rates are measured experimentally for a given temperature and water content.
Associated with the specific decay rate is the influence of the decomposers' population
during the experiment.
7
Carbon Flow
Carbon flow is accomplished by microbial consumption of plant residues. A
significant portion of the carbon removed from the residue by decay is lost as carbon
dioxide. Carbon flow from the residue pool into the first microbial population pool is
shown in Figure 2.
At the level of the microbial population, simplifying assumptions are made in the
same way that the composition of the crop residue was simplified. The cellular
constituents of the populations within this pool are again distinguished only as being
either resistant or labile. A single C/N ratio for each portion of the population of
microbes is assigned based on an estimated average of the various C/N ratios found.
Transfer of Carbon to the Second Pool
The transfer of C between the first and second pool is treated similarly to
that which occurred between the residue and the microbial pool. The second pool
consists of those products of microbial decomposition which are stable enough to
persist in the soil, but which have a much shorter residence time than soil humus.
These compounds are the humads. The flow from the microbial pool into the humad
pool differs from the flow from the residues into the microbial pool in that some of the C
which flows out of pool one (microbial pool) as a result of decay flows back into it
directly in a feedback loop. This is due to internal reincorporation occurring within this
pool. Thus, the initial flow of C lost to the microbial pool is split in three directions;
volatilization, recycling, and incorporation into the pool of humads (Figure 3).
8
Breakdown of the Humads
The final stage in this carbonacieous progression is the breakdown of humads in
the humus (Figure 4). Carbon from the humads is released by decomposition and is
incorporated into the humic material in the soil, lost to volatilization, or incorporated into
the microbial biomass.
9
Although similar to the two previous decay stages, the next stage incorporates
another aspect which can affect residue decomposition. This is the presence or
absence of soil tillage. As far as the program is concerned this is like an on/off switch.
Either there is tillage or there isn't. If there is tillage, the switch is on and this will transfer
a certain amount of C to a tillage pool from the humad pool. If there is no tillage, the
switch is off and there is no addition. The tillage pool decomposes more rapidly than the
humad pool. This is intended to mimic the increased microbial activity and hence the
increased decomposition of relatively stable compounds associated with the physical
disturbance of the soil produced by tillage. In this program there is only provision for one
instance of such an increase.
The final stage of C decomposition is where the initial C compartments are
redefined and made ready for the next time step. The end point can be viewed as
cyclical since some of the C has been reabsorbed by the microbial biomass, the C in
the humic layer is slowly reintroduced into the biosphere after a long period of being
sequestered, and the C volatilized as carbon dioxide is of course now available for
photosynthetic fixation.
It is important to note that although the microbes are only quantified at one
location in the program (the microbial pool), they act on other pools at several points in
the program. These points include the three decay processes already mentioned (decay
of residues, decay of microbial biomass, decay of humads).
Nitrogen Flow
N flow is treated similarly to C flow. Examples are presented which show how
flow is treated by the system.
For simplicity let us first examine a situation in which the residue to be
decomposed contains a large amount of N relative to the amount required for
decomposition. Let us also assume that the concentrations of ammonium-N and nitrateN in the soil are negligible.
In this instance the first transformation of N resulting from residue decay will be
analogous to that of C. The amount of N which moves is dependent on the amount of C
which moves and these factors are related through the C/N ratio. Of the N released by
decay only a certain amount will be added to the microbial biomass. This amount is
related to the C/N ratio of this biomass, since the microbes only add as much N as they
need for that amount of C incorporated ( in N limiting situations this is reversed and they
add only as much C as the amount of N available will permit, the leftover being
volitalized as carbon dioxide). This relation is controlled by the differences in the C/N
ratio of the residue which constitutes the supply, versus the C/N ratio of the microbial
biomass which constitutes the demand. Here we are postulating a lower C/N ratio for
the residue than for the microbial pool, so that as a result of residue decomposition N is
available in excess.
10
The N released but not incorporated into biomass goes into the ammonium pool.
This is different from the volatilization of C as carbon dioxide since the C is lost to the
model, while ammonium remains in the system, available for further cycling (Figure 5).
Let us now follow the flow of N through the various trophic levels which we have already
outlined for C.
11
Transfer of Nitrogen to the Second Pool
The transfer of N from the microbial pool to the humad pool (Figure 6) is
accomplished by the death and decay of cells in pool one. Some of the released N is
taken up by neighboring microbial cells, hence the recycling of some of the released N.
Another portion of the N is stabilized by the microbes in the form of the humads. The N
which is not absorbed into cell biomass or stabilized as humads is released as
ammonium.
The N in the humad pool released by decay, is incorporated into the soil humus
and into the microbial biomass pool (Figure 7).
The tillage factor is incorporated at this point and its operation is exactly identical
to C. Decomposition caused by tillage releases an additional infusion of N. This infusion
causes the switch to be set into the "off" position for the rest of the model's run, since
the effect of tillage is modelled to occur for only one timestep.
Having examined the part of the N flow which parallels the C flow, we now turn
our attention to the fate of the ammonium which was released.
Unlike the carbon dioxide which was lost, ammonium rarely disappears from a
soil system as a gas. Rather it flows into a soil pool of ammonium (Figure 8). The
ammonium pool may exist in the soil independently of the initial movement of N from the
residue thorough the two microbial pools. In the situation we are considering, the
release of ammonium at the various stages adds to this pre-existing pool.
12
In nature, the transformation of ammonium into nitrate is a two stage process
involving two distinct populations of bacteria. In the first step ammonium is transformed
into nitrite by the first population, and in the second step this nitrite is converted to
nitrate by the second population.
It is assumed by the model that ammonium is converted directly into nitrate. This
is a valid simplification because nitrite is a very short lived intermediate in most soils. In
other words, the conversion of ammonium to nitrite is the rate limiting step, and the
amount of nitrite present at any given time is considered negligible by the model.
A certain portion of the nitrate is denitrified by another bacterial population and is
lost by denitrification to the system as a gas (Figure 9).
Thus, the ammonium which flowed out of the decay steps is handed along from
the ammonium pool to the nitrate pool and ultimately may be converted to N2 gas. The
portion of the N which is held at each stage of the transformation constitutes the
quantity present in that pool.
So far we have been looking at possibly the simplest case. In this case the
necessary quantities of both N and C are supplied by the residue and then flow through
the system. This was done in order to identify all the pools in the system and give some
idea of how they relate to one another. Now let us turn to the other conditions which can
occur, in which these simple optimal levels are not present. In this instance the flow of C
is unchanged (although the flow rates will be changed), but there are signifigant
changes in the flows of N.
13
Conditions of Excess Carbon
The complexity of the system increases when the C/N ratio of the residue
is higher than the minimum amount required to provide the necessary building blocks
for microbial assimilation. Without another input of N, decay could not proceed at its
maximum rate. Once again the pools of ammonium-N and nitrate-N become important.
If such pools are present in the soil part of their contents furnish N for microbial
assimilation resulting from residue decomposition. The drain on both pools is
simultaneous and occurs in proportion to their relative quantities in the soil. For
example, if 25% of the soil N was in the form of ammonium and 75% was in the form of
nitrate, the model would draw 25% of the required N from the ammonium pool and 75%
from the nitrate pool.
The N drawn from the ammonium and nitrate pools is incorporated into the
microbial pool (Figure 10) in the quantities allowed by the incorporation of C and
required by the C/N ratio of the microbial pool. The N then cycles through the system in
the manner previously described.
If, however, these sources of N are inadequate, N fixed from the,
atmosphere by free-living N fixing bacteria can be used as an N source. This N also
enters the cycle by incorporation into the microbial pool. If all of these sources of N
prove inadequate, then the rate of decomposition of the residue slows down and less C
moves through the system. This situation stresses the importance of the influence of N
on the rate of decomposition.
14
II. THE FUNCTIONING MODEL
Having examined each portion of the model individually, let us now put them
together and see how they work in unison. It is best to have the whole flow chart (page
i) visible at this point to follow on it the steps outlined in the verbal description.
For example, at the start of this model run, the residue has a high C/N ratio,
pools of ammonium and nitrate each contain 50% of the soil inorganic N, tillage will
occur, all environmental factors such as temperature and moisture are optimal for
decomposition. For simplicity, the timestep is equal to one day, although in an actual
model run it would probably be much shorter.
Day 1: Breakdown of residue begins, the initial flush of decomposition of the
labile (easily decomposed)and recalcitrant portions of the residue provides sufficient N
for assimilation of the C released. Some of the C released by decomposition of the
residue is lost as carbon dioxide. Some of the N released from the residue goes into the
ammonium pool. The breakdown of a portion of the microbial pool occurs. Some of the
C released by this process is incorporated into the humad pool while the rest is either
recycled into the microbial pool or lost as carbon dioxide. Similarly the N released by the
microbial pool's decomposition is either stabilized into the humad pool, recycled back
into the microbial pool or goes into the ammonium pool. Breakdown of the humad pool
begins and at this point the tillage factor makes its single appearance adding a certain
portion of N and C from the humad to the tillage pool. The combined decomposition of
the humad and tillage pools releases C which is either recycled to the microbial pool or
lost as carbon dioxide. A tiny portion (not acknowledged by the program) of this
released C goes into the humus layer sink. The amount of N incorporated into the
humus is also very small, the balance being either recycled into the microbial pool or
going to the ammonium pool. The ammonium pool has been increased by additions at
every level of decompostion thus far. It also has been decreased since a certain portion
of the ammonium is converted to nitrate. Of this nitrate, a certain portion is converted to
N2 gas and lost to the
15
system. It is assumed that in this situation both nitrification and denitrification occur
simultaneously.
Day 2: It is assumed that the labile portion of the residue has been exhausted,
and that the quantity of N provided by the decomposition of the remaining recalcitrant
portion is now inadequate to meet the microbial assimilation demand. The model must
now draw N from the ammonium and nitrate pools to supply the microbial pool. With
regard to ammonium, the flow of N has thus been reversed. Otherwise the model
proceeds as it did on the first day except that now there is no addition due to the tillage
factor. Again at the end of this time step all pools have been recalculated and another
day is considered to have occurred.
Day 3: The decompositional demands of the C rich resistant portion of the
residue now exceed the quantities of N which can be drawn from the depleted nitrate
and ammonium pools. Even with the addition of N fixed by free living organisms, the
quantity of N available at the first step of the decomposition process is inadequate. Thus
the rate of residue decomposition now slows down. The decomposition rates of the
other pools won't be affected until the next timestep. The size of all pools have now
been recalculated and the run is over. The changes which have occurred are as follows:
1) The pool of residue has decreased, especially the labile portion.
2) The microbial pool has increased due to greater additions to its biomass than to its
degradation.
3) The humic pool has been slightly increased.
4) The pools of nitrate and ammonium have been depleted by greater microbial
assimilation than N mineralization.
5) Some N has been fixed from the atmosphere and incorporated into the soil pools.
III. USING THE MODEL
The appendix contains subsections with references and keys for:
a)Data entry via NCDATA (including a key to parameter designations).
b)The meaning of NCSOIL output columns.
c)Timestep selection.
d)Running the model on the Cyber computer including subsections on the use of: i)
NOS operating system commands ii) Xedit line editor iii) Minitab statistical package
Some of these topics are treated in more detail here.
16
Data Entry:
In order for NCSOIL to run it needs a set of input values which define the initial
soil system conditions.. These constitute the starting point which the model then acts on
and modifies in the course of a particular program run.
To set these parameters the user needs to access a file called "NCDATA" This
file is separate from the file "NCSOIL" which contains the program NCSOIL. NCDATA
can be accessed without accessing NCSOIL. Thus it is not necessary to make
modifications to NCSOIL itself in order to model various situations. This avoids the
possibility of entering errors to the main program in the process of entering input data.
The file NCDATA consists of nine lines of numbers. Each number is an input
parameter and its meaning is defined by its specific location in NCDATA. This means
that the user must be careful when changing these values to make sure that the location
of the desired change is maintained and that all parameters are still defined even if they
are defined as zero. All these parameters have designations within the program
NCSOIL; but the user is not required to use these designations in setting up NCDATA in
which the numerical values suffice (see page 18 for an NCDATA example). However,
for ease of use, these designations are introduced here to define the meanings of the
numbers in NCDATA and the key to NCDATA, which appears in the appendix, also
relies on them.
The cyber computer is very inflexible about the format of the data. Incorrectly
formated data will cause the computer either to refuse to run the program, or to print
pages of error messages, or both. Therefore these rules must be followed:
1) Every number must have a decimal point. Thus, one hundred would be
entered as "'! 00.", while one hundreth would be entered as ".01". (There are two
exceptions to this rule in NCDATA which will be discussed later.)
2)Each number must be separated from every other number by a comma.
However, no comma is needed at the beginning or end of a line. Thus a correct line of
numbers would look like this: 100., 10.,. 16,0.
NCDATA itself consists of nine lines of numbers. These numbers can be altered
using the XEDIT line editor. A basic guide to the use of XEDIT is provided in the
appendix. The following is a line by line definition of the various parameters which must
be set in NCDATA. These parameters define the initial soil conditions within which the
model will operate.
Parameter Locations in an NCDATA File
TO,T1,LENGTH, INTER
CONC(l),CONC(l 4),C0NC(2),C0NC(6),C0NC(1 5),CONC(l 6)
17
CF(l),CF(l 4),CF(2),CF(1 5),CF(l 6),CFTILL
EFFAC(1),EFFAC(2),EFFAC(1 5),EFFAC(l 6),EFSINK
CN(l 5),CN(l 6),CSTDEN,CSTSYM
FERNH4,FERN03
AER,TILL
CPER(1 5),CPER(l 6),CPER(1),CPER(1 4),CPER(2),CPER(6)
PER(l),PER(l 4),PER(2),PER(6),PER(8),PER(1 0),PER(l 1),PER(l 5),PER(l 6)
Line One
The first value in line one is time zero (TO) or the starting point for the program.
The next value is time one (Tl), the starting point of the next timestep. This value has
units of days or fractions of days. The duration of the timestep is equal to T1 minus TO.
Thus if one wanted the model to increment in terms of days with TO equal to zero, then
T1 would be 1, for weeks it would be 7, and for hours it would be .04167. TO dosn't
have to be equal to zero. For example, if one were simulating the growing season with
data whose time designations were in days after January 1, then TO might be equal to
155 (early May). A time step with a duration of one week could then be obtained by
setting T1 equal to 162. It is important to note that there is a trade off between accuracy
and computer cost inherent in the size of the time step. The smaller the time step the
more closely the model approaches the instantaneous changes which are occurring in
the world mimicked by the model. However the smaller the time step, the more
numerous must be the computations for any given period of time. This is the trade off
which the user must keep in mind when setting up the size of the time steps. That is,
how large a timestep can be used while maintaining the desired accuracy. A further
discussion of selecting a timestep appears in the appendix.
The next two numbers in line one are the exceptions to the decimal point rule.
This is because they are integers and are recognized by the computer as such. The first
of these numbers defines how many time steps the run will use. In a model run
representing a day and incrementing by hours, this number would be 24. In a run
representing a week and incrementing by days this number would be 7. The second
integer in this line refers to the number of time steps between each generation of output
data. This parameter is included for convenience and ease of data handling, so that the
model can be extremely accurate by the use of many small time steps, while generating
only a manageable amount of relevant information. For example, suppose that the
modeller is interested in the decomposition of residue and its effects on the soil over a
period of a week. For a high degree of accuracy the modeller selects a time step of one
hour. However the changes in the soil can be effectively monitored on a daily basis,
while the values at each hour would not show significant changes and would be
unwieldy and confusing to work with. For units of time the modeller selects days. For
this situation the first number (TO) would be 0. The second number (T1), the time step
of one hour would be .04167(1/24th of a day), the third number ("LENGTH" i.e. the
number of time steps) would be 168 (the number of hours in the week), and the last
number ("INTER") would be 24 (the number of hours/timesteps between outputs).
18
Line Two
The line two in NCDATA defines the size of the various C pools at the outset
of the model run. These pools are the residue,the microbial pool, and the humad pool.
Each pool is divided into labile and resistant fractions and each fraction is defined by a
separate input parameter. Thus there are six numbers in this line, representing the
labile and resistant fractions of the three pools. The units of these pools are defined by
the user, but do not appear directly in the program. Virtually any units are acceptable if
the same chosen units are used throughout. The output file will also be defined in the
same units. For example both grams of C per 100 grams of soil, and kilograms of C per
100 kilograms of soil would be acceptable. It is important that the same units be
used throughout this line and that the user keeps track of which units are in use.
The order of the various pools which are designated by "CONC" followed by a number,
is outlined in the appendix. The numbers used to identify the various pools are as
follows: (15) residue labile, (16) residue resistant, (1) pool one labile, (14) pool one
resistant, (6) pool two labile (tillage pool), (2) pool two resistant (humad pool). These
numbers retain their pool fraction meanings when referred to any of the other
parameters such as efficiency factors and C/N ratios.
Line Three
The numbers in the third line define the specific rates of decomposition of the
various C pools described above. These rate constants are expressed in fractions
per unit time. The unit time has been chosen in defining the numbers of the first line in
NCDATA. Thus, typical rates might be: pool one labile fraction decomposing at 0.332
per day, while pool one resistant fraction might be decomposing at 0.04 per day. The
specific rates are independent of the units used to define the pools, but the amount of
each pool which is actually decomposed per unit time is dependent on the preselected
units which define the pool. Thus, if 100 grams of labile C are present in the residue
along with an equal amount of resistant C, then, in this instance, 33.2 grams would
decay after the first day, while 4 grams of resistant C would decay in the same time.
The specific rates of decomposition of the various pool fractions are identified by CF
followed by a number, with the exception of the resistant fraction of pool two which is
designated as CFTILL, and is directly connected to the tillage factor discussed before.
Line Four
The definition of the efficiency factors constitutes the fourth line of the file.
These partition the C released by decomposition into that part which is actually
absorbed into biomass (under conditions of no N limitation) and that part which is
released as carbon dioxide. There are five efficiency factors. The first two in the line
deal with the efficiency of uptake of the recycled C available to pool one from the
decomposition of pools one and two. The next two numbers refer to pool one's
efficiency in absorbing C released by the labile and resistant fractions of the residue.
19
These parameters are designated by "EFFAC" followed by a number. The last
parameter in this line is the efficiency of uptake of pool two, this is designated simply as
"EFSINK". Since there is only one such parameter no numerical designation is needed.
Line Five
The first two values in this line are the carbon-nitrogen ratios of the labile and
resistant fractions (respectively) of the residue. These are referred to as "CN" followed
by a numerical designation.The numerical designation is a proportionality constant
which determines the amount of nitrate nitrogen which will be converted into N2 gas per
unit of C decomposed (i.e. C per N). This unique parameter is designated as
"CSTIDEN" and characterizes the process of denitrification. It is followed by the
parameter which defines the amount of N added (per unit of residue C decomposed) to
the system as a result of non-symbiotic N fixation, known here as "CSTSYM". Both of
these parameters are unitless ratios.
Line Six
The amount of N initially present in the soil is defined by the parameters of
the sixth line. The designation "FERNI-14" refers to the amount of ammonium in the
soil. The designation "FERNOW which follows refers to the amount of nitrate in the soil.
These include both that amount which was in the soil and that amount which was
initially added as fertilizer. The units of these amounts are the same as those defined for
the CONC series, which was defined in line two.
Line Seven
The aeration factor "AER", is the first value of the seventh line. This parameter
deals only with the effect of soil aeration on the nitrification - denitrification fork in the
program. If the soil is sufficiently oxygenated then only nitrification will occur and this
parameter is defined as 1.0. If the soil is flooded and anaerobic conditions prevail, then
denitrification will occur and this parameter is defined as 2.0. If the soil is partially
saturated both processes may be occurring in different parts of a given volume of soil
and the designation is 3.0 which causes both processes to be modeled simultaneously.
The other value in this line is the tillage factor "TILL". If the soil was tilled this parameter
is given a value of 1.0 and the tillage effect will be performed during the first timestep. If
no tillage was performed the value zero.
Lines Eight and Nine
The next two lines refer to the modeling of tracer experiments. In these
experiments a readily identifiable isotope of C or N is followed as it flows through the
system. The user can designate where in the system the tracer is to originate. Thus, line
eight contains the C tracer designations "CPER" followed by numerical designation of
the pool fraction. Line nine contains the designations for the tracer N called "PER", also
20
followed by numerical designations. Three of these (8,10,11) refer to the ammonium,
nitrate, and dinitrogen pools. All of these parameters are ratios of tracer N or C to the
total amount in the pools they are associated with. Thus in a run in which half of the
residue resistant C was labeled, CPER(l 6) would have the value of 0.5.
These are all the input parameters which can be varied to simulate various soil
conditions using NCSOIL. The user may wish to try to duplicate the conditions in a
particular soil, to see how it behaves, or create entirely hypothetical situations to see
how they run their course.
Example of an NCDATA File:
0.,.1,100,10
.56,.44,2650.,0.,2500.,2500.
.332,.0404,.006,.75,.02,.16
.0,.0,.0,.0,.2
1000.,1000.,150.,10.
0.,200.
2.,1.
1.,1.,1.,1.,1.,1.
0.,0.,0.,0.,0.,0.,1.,0.,0.
Output:
Once NCSOIL has been run it generates a voluminous output. However this
output is systematically organized into sections which are labeled as follows:
INORGANIC-N (the amounts of this substance in various inorganic forms), Cumul-N
(the cumulative concentrations of N in various forms), CUMUL-C02-C (the cumulative
release of carbon dioxide from various pools), ORGANIC-C (the amounts of C in
various pools other than carbon dioxide), MASS BALANCE (this keeps track of the total
amounts of each substance in the system and makes sure that all of it is accounted for,
so that the "books" balance), N1 5 FRACTION (this is the fraction of this N isotope in
various pools), N1 5 CONTENT (this is the actual concentrations of the isotope in the
same pools),C14 CONTENT (similarly, this is the actual concentrations of radiolabeled
C in various pools), C1 4 FRACTION (this is the fraction of radiolabeled C in the various
pools).
In each of these sections columns of numbers appear, the first column is labeled
"DAY". This is the column which identifies the time step which corresponds to that row
of numbers in each column. The first number in the day column is usually zero and,
thus, this row presents the initial values of these parameters at the start of the run,
corresponding to the numbers in NCDATA.
In order to decipher the meanings of the individual columns refer to the key
provided in the appendix. This will permit the user to follow changes in various aspects
of the system through time.
21
Although the type of output described here is very complete, it is generally
difficult to get an idea of what is happening in the system just from columns of numbers.
For this reason NCSOIL also generates output which is formatted to be used by the
"MINITAB" statistical package available on CYBER. A complete description of how to
use MINITAB is beyond the scope of this text, but a useful manual is available. A brief
summary of the basic MINITAB commands necessary to produce graphs, as well as a
key to the meaning of the various MINITAB column numbers, is provided in the
appendix.
22
APPENDIX:
This appendix has four sections. The first three are: 1) an explaination of
timestep selection, 2) a guide and key to the creation of the input file NCDATA, and 3) a
key to the output columns generated by the output file NCOPUT. These sections deal
with the internal operation of the program itself. The last section is a guide to the
external information needed to run the program. This includes a description of the Cyber
computer system and an example of what a computing session on Cyber would look
like. This section also includes subsections which detail the basic commands necessary
to use the Cyber system, the MINITAB graphics package and the XEDIT line editor. The
commands listed in these sections are the minimum necessary to run the program. For
a more complete description of these systems see the books listed in the reference
section which follows the appendix (page 42).
1) Timestep selection:
The two main considerations in setting a timestep are the level of accuracy
required and the amount of time and money available. As the size of the timestep
diminishes, the accuracy of the model increases. The level of accuracy is determined in
part by accuracy of the input parameters used. To set the timestep to the desired level
of accuracy one should start with a relatively large timestep and do successive runs of
the model until the results are invariant to the level of accuracy desired. For example
suppose that with a time step of 1 week (T1 =7,and TO=O, where TO is the input
parameter which defines the start of the first timestep, and T1 is the start of the next
timestep and, both parameters are in days) a particular output parameter had a value of
22.5934. When the timestep was reduced to 1 day (T1 =1) this parameter had a value
of 21. 3356. When the timestep was reduced to a half day (T1 =0.5) the parameter had
a value of 21.3328. The first timestep reduction was necessary since it changed the
output, while the second reduction was unnecessary since the change it produced was
outside the model's level of accuracy.
With the speed of the mainframe computer on which this model runs, changes in
timestep have virtually no effect on the operators perceived time of operation. However,
more timesteps do marginally increase the cost of running the model and this may be of
concern to some users.
A secondary consideration, with respect to timesteps, is how often the user
wishes the value of a particular output parameter expressed. For example, a timestep of
one minute may be desired for accuracy, while significant changes may only be
occuring on an hourly basis. Here the timestep would be one minute (T1 =0.0006944),
but the output of data would only occur every sixty timesteps (INTER=60, where INTER
is the input parameter determining the number of timesteps between output
expressions).
23
2) Data Entry Using NCDATA
A) General:
The file NCDATA must have a particular form if it is to be correctly read and
interpreted by the computer. It Is vitally important that the input parameters be in
their correct locations.
This key therefore, has two sections. The first section shows the locations of the
input parameters using symbols and acronyms. The second section defines these
symbols and acronyms. Finally there is an example of what a correctly created
NCDATA file looks like. As previously stated in the text, the rules of formatting are:
1) Every number must have a decimal point although defining zeros are not
necessary. Thus one hundred would be entered as "l 00.", while one one hundredth
would be entered as ".01 ".The exceptions to this rule are the LENGTH and INTER
parameters, which are integers and thus do not need decimal points. These parameters
appear in the first line of the NCDATA file.
2) Each number must be separated from every other number by a comma.
However no comma is needed at the beginning or end of a line. Thus a correct line of
numbers would look like this: 100.,l 0.,.16,0.
B) Values for the Parameters:
Although the user can designate any values desired for the various input
parameters, the new user may not know a likely range for the parameters. This is
especially true of the rate controlling internal parameters such as the efficiency factors
and the specific rates of decomposition. To get the user started, some values have
been provided for those essential internal parameters. While the authors believe that
these values are valid within a broad range of conditions, they are by no means the only
or "true" values of these parameters. Others working in this field would no doubt use
different values. The object here is merely to spare the new user an extensive literature
search, and to allow the user to begin experimenting with various soil situations as soon
as possible. Initial physical parameters such as the C and N contents of the soil, its
moisture content, and whether or not tillage will occur, seem sufficiently clear to allow
the new user to define them without external guidance. This is also true of the
parameters which define the degree of radiolabeling. Since these are merely fractions,
the user selects which pool should be labelled and what fraction of that pool will be
labelled with isotope.
C) Units:
The user may select any units which are appropriate to the situation to be
studied. Typically the units used are the same as those in which the source data is
24
presented. If for example one is modelling an experiment based on data which was
collected using kilograms per one hundred kilograms of soil, then these units would be
used throughout. The output will also be in these same units.
D) Locations by Parameter Designation:
TO,T1, LENGTH, I NTE R
CONC(l),CONC(l 4),CONC(2),CONC(6),CONC(1 5),CONC(l 6)
CF(1),CF(1 4),CF(2),CF(l 5),CF(l 6),CFTILL
EFFAC(l),EFFAC(2),EFFAC(l 5),EFFAC(l 6),EFSINK
CN(l 5),CN(1 6),CSTDEN,CSTSYM
FERNH4,FERN03
AER,TILL
CPER(1 5),CPER(l 6),CPER(1),CPER(1 4),CPER(2),CPER(6)
PER(l),PER(l 4),PER(2),PER(6),PER(8),PER(1 0),PER(l 1),PER(l 5),PER(l 6)
E) Definitions of Parameter Designations:
TO
T1
Initial time (time zero):This generally has the value zero, although it
can be set at other values if appropriate.
The start of the next timestep (time one) after time zero, the
difference (T1 -TO) between this number and time zero (both in
days) defines the duration of the timestep.
LENGTH
The length of the run in terms of total number of computational
timesteps.
INTER
The number of computational timesteps between output
expressions.
All the CONC parameters, which refer to the concentration of C in various pool,
are determined by the initial situation in the soil and by the units used. For example a
bog would have high values for CONC, while a sandy soil would have low values for this
parameter.
CONC(l)
CONC(l 4)
CONC(6)
CONC(2)
CONC(l 5)
CONC(l 6)
CF(1)
CF(14)
Concentration or quantity of pooll labile carbon.
Concentration or quantity of pooll resistant carbon.
Concentration or quantity of the humad pool's
labile carbon (tillage pool).
Concentration or quantity of the humad pool's resistant
carbon.
Concentration or quantity of residue labile carbon.
Concentration or quantity of residue resistant carbon.
The specific rate of decomposition for the microbial pool's
labile fraction. Suggested value: 0.332 (day-1).
The specific rate of decomposition for the microbial pool's
25
resistant fraction. Suggested value: 0.0404 (day-1)
CF(2)
The specific rate of decomposition for the humad pool's
resistant fraction. Suggested value: 0.006 (day-1).
CF(l 5)
The specific rate of decomposition for labile fraction of the
residue. Suggested value: 0.75 (day-1).
CF(1 6)
The specific rate of decomposition for the resistant fraction
of the residue. Suggested value: 0.02 (day-1).
CFTILL
The specific rate of decomposition for the labile fraction of
the humad pool. Suggested value: 0. 16 (day-1).
EFFAC(1)
The maximum efficiency factor for the recycling into pooll
of substances released by the decay of the microbial pool.
Suggested value: 0.6.
EFFAC(2)
The maximum efficiency factor for the recycling into the
microbial pool of substances released by the decay of the
humad and tillage pools. Suggested value:0.6.
EFFAC(l 5) The maximum efficiency factor for the uptake by the
microbial pool of substances from the labile portion of the
decayed residue. Suggested value: 0.6.
EFFAC(l 6) The maximum efficiency factor for the uptake by the
microbial pool of substances from the resistant portion of
the decayed residue. Suggested value: 0.6.
EFSINK
The maximum efficiency factor for the incorporation in the
humad pool of substances released by the decay of the
microbial pool. Suggested value: 0.2.
The carbon:nitrogen ratio of the residue is determined by the type of
residue being modelled. For example, dry straw would have a very high
carbon:nitrogen ratio, while freshly cut alfalfa would have a very low
carbon:nitrogen ratio. These values are readily available for most plant
residues, so suggested values are not given for them here.
CN(l 5)
CN(l 6)
CSTIDEN
CSTSYM
The carbon:nitrogen ratio of the labile fraction of the residue.
The carbon:nitrogen ratio of the resistant fraction of the
residue.
A proportionality constant relating units of carbon decayed
per unit of nitrogen lost through denitrification.
Suggested value: 25.0.
A proportionality constant relating units of carbon decayed per unit of
nitrogen fixed nonsymbiotically. Suggested value: 10.0 (this is an estimate
of a value which is largely unknown).
No suggested values are given for the following parameters since these represent
fertilizer additions and are determined by the situation modelled by the user.
FERNI-14
The concentration or quantity of the initial amount of
26
FERN03
nitrogen in the form of ammonium.
The concentration or quantity of the initial amount of
nitrogen in the form of nitrate.
The following parameteres are also determined by the type of situation the user wishes
to model, so no suggested values are given.
AER
This is the aeration factor which is decided by the degree of water
saturation of the soil and whether denitrification, nitrification or both will
occur (1 =nitrification, 2--denitrification, 3=both).
TILL
This factor tells the model whether or not tillage will occur during the
model run(l =tillage will occur during the first computational timestep).
In the parameters designating the degree and location of the tracer isotopes, the
users discretion is the key factor. Guided either by data from actual tracer experiments,
or by a desire to model such an experiment tracing particular C or N flows, the user
assigns certain fractions of tracer elements to selected pools using these parameters.
No values are suggested, and in many simple cases these parameters can simply be
ignored and given the value of zero.
CPER(1 5)
CPER(1 6)
CPER(1)
CPER(1 4)
CPER(2)
CPER(6)
PER(l)
PER(l 4)
PER(2)
PER(6)
PER(8)
PER(l 0)
PER(l 1)
The initial ratio of carbon 14 to total carbon in the labile
fraction of the residue.
The initial ratio of carbon 14 to total carbon in the resistant
fraction of the residue.
The initial ratio of carbon 14 to total carbon in the labile
fraction of the microbial pool.
The initial ratio of carbon 14 to total carbon in the resistant
fraction of pooll.
The initial ratio of carbon 14 to total carbon in the
resistant fraction of the humad pool.
The initial ratio of carbon 14 to total carbon in the labile
fraction of the humad pool.
The initial ratio of nitrogen 15 to total nitrogen in the
labile fraction of the microbial pool.
The initial ratio of nitrogen 15 to total nitrogen in the
resistant fraction of the microbial pool.
The initial ratio of nitrogen 15 to total nitrogen in the
resistant fraction of the humad pool.
The initial ratio of nitrogen 15 to total nitrogen in the
labile fraction of the humad pool.
The initial ratio of nitrogen 15 to total nitrogen in the
ammonium pool.
The initial ratio of nitrogen 15 to total nitrogen in the
dinitrogen pool (available through nonsymbiotic fixation).
The initial ratio of nitrogen 15 to total nitrogen in the nitrate
27
PER(l 5)
PER(l 6)
pool.
The initial ratio of nitrogen 15 to total nitrogen in the
labile fraction of the residue.
The initial ratio of nitrogen 15 to total nitrogen in the
resistant fraction of the residue.
F) Example of an NCDATA File:
0.,.1,100,10
.56,.44,2650.,0.,2500.,2500.
.332,.0404,.006,.75,.02,.16
.6,.6,.6,.6,.2
1000.,1000.,150.,10.
0.,200.
2.,1.
0.,0.,0.,0.,0.,0.,1.,0.,0.
3) NCOPUT Column Key
The NCOPUT file is the output from NCSOIL, it consists of series of columns.The
columns are divided into groups, each with a general title. Each column has a heading
identifying it with a particular output parameter, which is specific to the general catagory
in which it appears. For example; POOLI in the CUMUL-C02-C grouping refers to the
cumulative carbon dioxide release from the microbial pool, while POOLI in the
ORGANIC-C grouping refers to the amount of organic carbon present in the microbial
pool. The following list
gives the meanings of the headings, it is followed by a list of definitions of the group
titles, together these lists allow the identification of the output parameters.
A) Headings:
CARBON
C14
C02
C/N
CN
DAY
DENIT
EFFAC
N14
N15
NH4
The total amount of carbon in the system.
The total amount of labeled carbon in the system.
The amount or fraction of labeled carbon dioxide released
at each timestep.
The ratio of organic carbon to organic nitrogen .
The ratio of residue potentially available for
decomposition per day to the nitrogen available.
The timestep in units of days since the run began.
The total amount of nitrogen which has been denitrified at
each time step.
The actual efficiency factor for residue (labile and resistant)
decomposition.
The amount of this nitrogen isotope in the system.
The amount or fraction of this nitrogen isotope in the system.
The amount of nitrogen in the ammonium pool at
28
NH4+NO3
N03
NOSYMFIX
POOLI
POOLII
PI-LABI
PII-LABI
PI-NH4MI
PII-NH4MI
PI-RESI
PII-RESI
RESIDUES
RES-LABI
RES-NH4
RES-N03
RES-RESI
TOTAL
any given timestep.
The amount of nitrogen in both the ammonium and nitrate
pools at any given timestep.
The amount of nitrogen in the nitrate pool at any given
timestep.
The cumulative amount of nitrogen which was fixed
nonsymbiotically at any given timestep.
The microbial pool, including both its labile and resistant fractions.
The humad pool, including both its labile and resistant fractions.
The labile fraction of pool one.
The labile fraction of the second microbial pool.
The mineralized nitrogen from pool one.
The mineralized nitrogen from pool two.
The resistant fraction of the first microbial pool.
The resistant fraction of the second microbial pool.
The amount of carbon dioxide released as a result of residue
decomposition.
This refers to the amount of organic carbon in the labile
fraction of the residue.
Ammonium mineralized (>O) or immobilized (<O) from residues.
Nitrate immobilized (<O) from residues.
The amount of organic carbon present in the resistant fraction of
the residue.
The total amount of carbon released as carbon dioxide by the
system.
B) Group Titles:
INORGANIC-N
The nitrogen which is not in organic form (either NH4 or N03).
CUMUL-N
The cumulative transformation of nitrogen in the various pools.
CUMUL-C02-C
The cumulative amount of carbon lost as carbon dioxide from the
various pools.
ORGANIC-C
The carbon present in organic (not C02) form in the various pools.
MASS BALANCE
This group keeps track of all the carbon and nitrogen in the system
and insures that all of it is accounted for.
N 15 FRACTION
This is the fraction of N1 5 in the various pools.
N 15 CONTENT
The actual amount of N15 present in the various pools.
C1 4 CONTENT
The actual amount of C14 present in the various pools.
29
C14 FRACTION
The fraction of C14 in the various pools.
4) Running The Model On Cyber
The preceding portions of the appendix have dealt with the internal workings of
the NCSOIL program and NCDATA its data file. This section of the appendix deals with
the system on which this program runs. In order to run the program the user must be
able to log on the computer, access the program and order the computer to run it. In
addition the user must be able to modify the input data to suit the situation he or she
wishes to model. Finally the user should be able to retrieve the program's output and
render it into a meaningful form.
Before the user can log on the computer, a user number and password must be
obtained. At the same time it is a good idea to get two excellent references: the "XEDIT
Users Guide" and the "GUIDE TO CYBER INTERACTIVE COMPUTING". These may
be obtained from:
Academic Computing Services and Systems
Room 100
Lauderdale Computer Facility
2520 Broadway Dr.
Lauderdale 55113
Helpline (612) 626-5592
This part of the appendix is divided into four parts. The first part is an example of
what a session with the Cyber computer would look like. This example excludes the
portions of the sessions specific to the listing of files and the use of subprograms. It is
intended to give examples of logging on and off, and giving Cyber commands. This is
followed by a presentation of the basic commands needed to manipulate the general
operating system of Cyber. This system is called the "NOS" operating system, and all
subprograms are accessed from it.
Next, the first of these subprograms is discussed: the Xedit line editor. Xedit
allows the user to create and modify NCDATA data input files. It is accessed from the
main system but has a separate operating system with commands specific to it. These
commands are presented in a subsection of this portion of the appendix.
Another subprogram of interest is the MINITAB statistical package. Although it
has wide range of statistical abilities, only its use as a way to draw graphs will be
detailed here. Graphic output is often more intelligible than the columns of numbers
created by NCSOIL in the output file NCOPUT. For an in depth presentation of
MINITAB the user should consult the "MINITAB Student Handbook" (see reference
section).
30
A) Example of a Run on the Cyber Computer:
Having accessed the computer by calling it up and connecting a modem, the
session will proceed as follows (note computer reponses are in bold letters):
(user hits return key to initiate session)
UCC NETWORK UO. 1 PORT 1 H24
TO CONNECT TO MACHINE XX, TYPE C XX
WHERE XX IS CA, CB, OR ME.
*C CA
85/02/16 08.21.17. TERMINRL:44, P 40
UOFM CYBER 730 NOS 1.3 (06/13-CW).
FAMILY: ca
USER NUMBER: your user number
PASSWORD: your password
TERMINAL: 44 P 40/TTY
RECOUER/SYSTEM: (user hits return key)
old,ncdata
/xedit,ncdata
(at this point the user goes into the ncdata file and modifies it to create the
input parameters desired, and then goes back to the main operating system)
/old,ncsoil
/submit(ncsoil)
PASSWORD
your password
SUBMIT COMPLETE JOB NAME IS ROFIRWJ
(after waiting about two minutes the user can access the output)
old,ncoput
Anh
(the computer then shows the output)
old,nctab
minitab
(the user is transferred into the MINITAB subprogram while it generates
graphic output, and then returns to the main operating system using the "Quit"
command)
bye
ARC1234 LOG OFF 02/16/85
EFGH044 SRU
1.253 UNITS
(The session is now over and the user has been logged off).
31
B) A Brief NOS Tutorial
In order to run the NCSOIL program on the Cyber computer it is necessary to
know the overall system commands which tell the computer what to do. These
commands are part of the NOS control system. This system is based on the concept of
the "file". A file is a designated part of the computers memory which may contain data,
text or a program. It is best to visualize this as an actual file in order to keep track of the
meaning of the various commands. All commands are typed in and then followed by
hitting the return key. If a mistake is made the user can either backspace over it, or hit
the "DEL" or delete key, and the error is not transmitted to the computer.
To start the computing session the user must get the file he or she is interested
in from the computers memory. The files in memory are the "permanent" files. To work
with a particular file it needs to be made "local" to the user. This means that a copy of
the file is directly available to the user, while the original version of the file remains in
memory. To summon an existing permanent file the user types in the following
command:
old,filename
Where "filenamew is the name of the desired permanent file.
In the current instance the user would type in "old,NCSOIL", and NCSOI would
then be a local file available for use.
However, NCSOIL cannot be run by itself; it requires a data file of initial
parameters called NCDATA. If such a file doesn't exist it is necessary to create it. This
is done using the command:
32
new,filename
Command creates new file without using “old,filename”.
This creates a local file with the given name. The file is empty and to fill it the
user must stop giving the computer commands and enter the contents of the file. This is
done by leaving the command mode (after creating the new file) and entering the text
mode. While in text mode, entries are not regarded as commands but are placed in the
current filename. To enter text mode type in the command:
text
Once all the text has been entered the user can leave text mode and return to
command mode by holding down the control key and typing the letter "C". Now, in order
to save the current contents of the local file which has been created, the following
command is used:
save,filename
This takes the local file named and saves it as a permanent file in the computers
memory.
Errors often creep into text as it is being entered. In order to correct them it is
necessary to enter the text editor XEDIT. While not actually separate from the Cyber
system, Xedit can be regarded as a distinct subsystem with its own commands. To use
Xedit the file of interest must first be made local using the "old,filename" command. This
is followed by the command:
Xedit,filename
This puts the file under the control of the Xedit system with its distinct set of
commands (which are presented later in this section of the appendix). Xedit allows the
user to make alterations to the local file.
When all the modifications have been made the user returns to the NOS
command mode. Now the corrected version of NCDATA is available and will be called
automatically by NCSOIL.
33
The user is now ready to actually run NCSOIL. This is done by sending the file
off to Cyber's central processing unit as a job for Cyber to do. First NCSOIL is made
local using the "old" command. Then NCSOIL is sent off using the following command: ,
submit(NCSOIL)
When Cyber has accepted the job and is going to get around to it, Cyber will
repond with a message saying: SUBMIT COMPLETE JOB NAME IS ABCDEFG
The job name is an identifier assigned by Cyber so that the user can check on
the status of each particular job sent in. To do this the user calls a file called "Dayfile".
This is a record of all of the jobs submitted. When a user wishes to view the dayfile, she
or he makes it local and then uses an abbreviation for "List the file with No Header".
Typed in, it looks like this:
old,Dayfile
LNH
The computer then begins printing out the dayfile. If the file of interest has run, its
job name will appear at the top of the dayfile. In order to find out if the job ran
successfully the user looks for the following key lines:
LGO(OP=F)
STOP
34
If these lines appear then the job ran to a successful conclusion. Anything else,
especially including the words "error" or "job aborted" means the job was not successful.
The user should then examine the NCIDATA file to try to find the error which prevented
the completion of the job.
Once several jobs have been submitted, the dayfile recording all this activity
becomes quite long. In order not to have the whole file printed out after each job the
user can type the command:
Stop
This is done while the printout is occurring and stops it. At the end of the session
when all the jobs have been run, the user can clear the dayfile for future use by typing
in:
Purge,dayfile
This command can also be used to remove any other file which is designated
after the word "purge".
When it runs, NCSOIL creates two kinds of permanent output files which are
present under two filenames when the job is complete. These are the files: "NCOPUT"
which is conventional printout whose key appears earlier in the appendix, and NCTAB
which is output specially formated for use with the graphics package MINITAB (the use
of MINITAB is detafled later in this part of the appendix).
35
To view this output the procedure is the same as with the dayfile:
old,NCOPUT
LNH
MINITAB is like XEDIT, a subsystem which must be entered using the command:
MINITAB
Once a job has been run successfully the user may wish to change the input
parameters and see how this effects the system. If NCDATA is changed and the
NCSOIL is resubmitted it will replace all the data present in NCOPUT from the previous
run with the new data which has just been generated. To keep the original data it must
be given a new designation before the next job is submitted. This is done using the
following command:
change(newfilename=oldfilename)
The permanent file now has the new filename and the next job can be run
without losing the current output.
Finally when the user wishes to end the session and log off the Cyber he or she
simply types in:
Bye
NOS Commands in Brief
BYE
End the session, log off the computer.
CHANGE(new filename=oldfilename)
Rename file under a new designation, save it
as a permanent file under that designation.
LNH
Print out a listing of the current local file.
MINITAB
Enter the MINITAB subsystem.
NEW, filename
Create a local file called "filename".
OLD, filename
Get the local file called filename and make
it a local file.
PURGE, filename
Destroy the permanent file called "filename".
36
SAVE, filename
Save- as a permanent file called "filename".
STOP
Stop printing out the current file.
SUBMIT (filename) Send the file "filename " containing a program to the Cyber central
processing unit, to be run as a job.
TEXT
Enter text mode. All entries following this command are regarded
as text and not commands by the computer. To leave text mode
hold down the control key and type a "C".
XEDIT
Enter Xedit line editor subsystem.
C) A Brief XEDIT Tutorial:
Xedit is a subsystem which allows the user to create and modify the NCDATA
file. Xedit is a line editor, which means it moves through a file line by line, and that its
command structure is in terms of lines. Like NOS all commands are followed by the
return key. To enter Xedit one uses the NOS command stated previously:
Xedit,filename
This opens the Xedit subsystem with the named file as its subject ( note that the
file has to have been called using the NOS command "old,fi le name). Now the counter
for Xedit (which determines where it is in the file) is automatically set at the top of the
program. Assuming for the moment that the user is working on an existing file such as
NCDATA, the user may want to see the whole file listed out. To do this the user types:
Print *
This causes the printing of the rest of the file starting with the current line. If the
user only wants to see a few lines then "Print" is followed by a number (representing the
number of lines to be printed) rather than a "*".
Having looked over the file and noticed a place needing modification the user can
go directly to that place by using the "Locate" command which has the form:
Locate/string/
Where "string" is any group of characters which occur in the line of interest and
will identify it. Note that Xedit only searches through the file line by line until the end of
the file where it stops. If the desired line was above the current line, it won't be found.
For this reason it is often necessary to go back to the beginning or top, of the file. This is
done with the command:
Top
37
Assuming that the editor is now at the line which is to be changed, this can be
done using the command:
Modify
Type "modify" followed by return key before typing in changes.
This command is different from the previous commands in that it has two parts.
After the user types in "Modify" the computer prints out the line to be modified. Then the
user types characters under appropriate sections of the line which modify it. These
characters are:
#
^ string#
&
Delete the character above.
Insert the string of characters between the "^" and the “#” before the
character above the
Replace the character above with a blank.
Any other character will replace the character above it on the line being
changed.
An example of how these commands might be used is as follows. The computer
reponses are in the more bold print. Starting by moving the pointer to the top of the file:
Top
I think that I shall never see
Locate/billboard/
R billboard louey assa treee
Modify
A billboard lovey assa treee
^|# &
#
A billboard lovely as a tree
At times the user may wish to move around within the program without having to
start from the top and use the locate command. This can be done using the command:
Next n
Where "n" is the number of lines.
This command moves the pointer down the number of lines specified in the
command. In order to move up in the file use the same command followed by a
negative number.
So far we have been dealing with manipulating existing lines, but it is also
possible to add new lines. This is done by hitting the return key twice at the desired
point in the file. The computer will respond with the word "Input", and all further lines will
be regarded as text and not commands. To leave input mode again hit the return key
twice and the computer will respond with the word "Edit". It is now ready to receive
38
commands again. A common error is to enter input mode inadvertently and then wonder
in frustration why the computer isn't responding to the commands.
This brings us the the issue of removing errors. If an error has been typed but the
return key has not been hit, the error can be cancelled by hitting the "DEL" delete key. If
a whole line or lines need to be removed, the following command is used:
Delete/string/n
Where string is the set of characters identifying the offending line,
and "n" is the number of lines to be deleted. If a string of characters
is not specified, then Xedit deletes the next "n" lines.
Finally the user wishes to leave the Xedit subprogram. This can be done in
several ways. If the user simply wishes leave the program and keep the file just as it
was before she or he entered Xedit, then the appropriate command is:
Stop
However the user may wish to keep the original version of the permanent file and
also keep the new modified version of the file as a permanent file under a new name.
This is done by using the command:
Quit,fi lename,Save
Where filename is the new name for the new version of the
file which is to be saved.
On the other hand the user may want to save the new version as the permanent
file and delete the old version. This is done using the quit command with the following
modifier:
Quit,filename, Replace
Both the "Stop" and the "Quit" commands return the user to the NOS command
system. The user should be careful, when leaving Xedit, that the file will be handled
correctly. For example, the "quit,filename, replace" will replace any file named, not just
the original file which was read into Xedit. In general it is a good idea for the user to
become acquainted with Xedit by having a few practice sessions with it before trying to
work with important files.
Xedit commands in Brief:
Delete/string/n
Delete next n lines containing string. If string is not specified, delete
next n lines.
Locate/string/
Locate the line containing string.
Modify
Modify the line according to the directives entered.
39
Directives:
#
Delete the character above.
^string#
Insert string before character above "^".
&
Replace character above with a blank.
blank
Leave character above unchanged.
Any other character entered replaces the character above it.
Next n (or -n)
Move forward (n) or backward (-n) lines.
Quit, filename,mode
Exit Xedit and write changes on filename according to mode.
Modes:
Replace
Save
Stop
Replace all changes on permanent file "filename"
Create a permanent file "filename" with all changes
Exit Xedit without writing changes anywhere.
To enter text type return key twice to enter "INPUT" mode. To leave input mode
type return key twice to re-enter "EDIT" mode.
To remove an error before hitting return key hit "DEL" delete key.
D) A Brief MINITAB Tutorial:
MINITAB is a statistical package which is available on the Cyber. Although it can
perform many statistical functions, we will only be concerned with its ability to draw
graphs. Those interested in the broader range of functions should obtain the "MINITAB
Students Handbook" (see reference section).
NCSOIL is designed to produce a permanent output file which is specifically
formatted to be read by the MINITAB subprogram. This file is called "NCTAB". To enter
the subprogram first make NCTAB local (old,NCTAB) then simply type:
MINITAB
Once in MINITAB it is necessary to give MINITAB some data to work with. This is
done by having MINITAB read in the data from the NCTAB file, using the following
command:
Read 'NCTAB' C1 -C44 Note: single quotes are used on the filename.
MINITAB deals with data as rows and columns. The "C" in the command above
is an abbreviation of "column". MINITAB now contains forty-four columns of data. The
key to the meaning of these columns follows this tutorial.
40
MINITAB can generate three kinds of graphs: histograms, scatter plots, and
multiple scatter plots on the same axes. In order to generate these graphs the user
need only specify which columns are to be graphed. For example:
Hist c5
Causes MINITAB to draw a histogram using column 5.
Plot cl 2 cl
Causes MINITAB to draw a scatter plot using data in column 12 for
the Y axis, and data in column 1 for the X axis.
Mplot cl 2 cl c5 cl
Causes MINITAB to draw a scatter plot with the data from both
columns 12 and 5 on the Y axis and data from column 1 on the X
axis.
MINITAB automatically chooses the appropriate scale for the axes, and assigns
the first column typed in as the Y axis and the second as the X axis. When multiple
scatter plots are requested MINITAB assigns the letter "A" to the first set of paired data
points, and the letter "B" to the second set of paired data points. Where points overlap
MINITAB assigns a number indicating the number of data points which overlap at that
point on the graph.
If the user wishes to see the data on which the graphs are based MINITAB will
list the data from the columns requested using the following command:
Print c,...,c
Where the "c"s are the desired columns.
When the user is done with MINITAB and wishes to exit from it he or she merely
types in:
Quit
Since so few MINITAB commands are required they will not be listed again.
However, it is necessary to know what the forty four columns in NCTAB consist of. Thus
a key to their meaning follows.
Key to the NCTAB Columns:
Column
Designation
C1
C2
C3
C4
C5
Time
Sum of nitrogen (ammonium and nitrate)
Ammonium nitrogen
Nitrate nitrogen
Actual efficiency of carbon incorporation from
residue.
C/N ratio of the organic fraction of the soil
(residue+pooll +pool2).
C6
41
C7
C8
C9
C10
C11
C12
C13
C14
C15
C16
C17
C18
C19
C20
C21
C22
C23
C24
C25
C26
C27
C28
C29
C30
C31
C32
C33
C34
C35
C36
C37
C38
C39
C40
C41
C42
C43
C44
Optimum rate of residue decomposition divided
by the inorganic nitrogen available minus the
nitrogen provided by residue decomposition in
that timestep.
The kinetic decay curve for nitrogen
Ammonium mineralized from pool 1
Ammonium mineralized from pool 2
Net mineralization from residue to pool1
Nitrate nitrogen from pool 2 immobilized
Nitrogen denitrified
Nitrogen fixed
Rate of total carbon from carbon dioxide expelled
Total concentration carbon in pool 1
Concentration of labile carbon in pool 1
Concentration of resistant carbon in pool 1
Concentration of labile carbon in pool 2
Concentration of resistant carbon in pool 2
Concentration of labile carbon in residue
Concentration of resistant carbon in residue
Total concentration of carbon in residue
Ratio N15 labeled fraction of pool 1
Ratio N15 labeled labile fraction of pool 1
Ratio N15 labeled resistant fraction of pool 1
Ratio N15 labeled labile fraction of pool 2
Ratio N15 labeled resistant fraction of pool 2 (tillage pool)
Ratio N15 labeled in ammonium pool
Concentration of N 15 in pool 1
Concentration of N1 5 in labile fraction of pool 1
Concentration of N 15 in resistant fraction of pool 1
Concentration of N15 in labile fraction of pool 2
Concentration of N 15 in resistant fraction of pool 2
Concentration of N15 in ammonium pool
Concentration of N1 5 in nitrate pool
Concentration of C1 4 in residue
Concentration of C1 4 in labile fraction of residue
Concentration of C1 4 in labile fraction of pool 1
Concentration of C1 4 in resistant fraction of pool 1
Concentration of C1 4 in labile pool 2
Concentration of C1 4 in resistant pool 2
Concentration of C1 4 in total pool 1 (labile+resistant)
Concentration of C1 4 in average of total C02 output ( C02
released at each stage i.e. residue--> pool1, pool1-->pool2,
pool2--> humus, is added together and divided by 3)
42
References:
Guide to Cyber Interactive Computing, U.C.C. Staff U. of Mn.,1 982
MINITAB Student Handbook. Ryan,T.A.,B.L. Joiner, B. F. Ryan. Duxbury
Press Boston, 1983
MINITAB 11 Reference Manual, E. Hinckley Ed. U.C.C.,U.of Mn.,1980
NCSOIL. A Model of Nitrogen and Carbon Transformation in Soil:
Description.Calibration. and Behavior. 1983, Molina, J.A.E., C.E. Clapp, M.J. Shaffer,
and W.E. Larson. Soil Sci. Soc. Am. J. 47 pp 85-91
Nitrogen-Ti Ilage- Residue Management, 1. Simulating Soil and Plant Behavior by the
Model NGSWAP 1984, Clay, D.E., C.E. Clapp, J.A.E. Molina and D.R. Linden, Plant
and Soil 84 pp. 67-77
Nitrogen-Tillage Residue Management, 11 Calibration of Potential Rate of Nitrification
by Model Simulation, 1985, Clay,D.E., J.A.E. Molina, C.E. Clapp, and D.R. Linden. Soil
Sci. Soc. Am. J. 49 pp. 322-325
Relative mineralization rates of indigenous and recently incorporated N-1 5-labelled
nitrogen 1975, Chichester, F.W., J.0. Legg, and G. Stanford, Soil Sci. 120 pp. 455-460
Simulation of Nitrogen-1 5 Immobilization By the Model NCSOIL, 1987 Hadas, A.,
J.A.E. Molina, S. Feigenbaum, C.E. Clapp, Soil Sci. Soc. Am. J. 51 pp. 102-106
XEDIT Users Guide. U.C.C. Staff, U. of Mn.,1 980
Note: Special thanks to B. Bellison for her comments and criticisms during the
preparation of this manual, and to the undergraduates who tested it in its
developmental form.
43