Directory UMM :Data Elmu:jurnal:A:Agricultural Systems:Vol63.Issue1.Jan2000:
Agricultural Systems 63 (2000) 33±47
www.elsevier.com/locate/agsy
OWSimu: an object-oriented and Web-based
simulator for plant growth
X. Pan a, J.D. Hesketh b, M.G. Huck c,*
a
Biotechnology Center, University of Illinois, 330 ERML, 1201 W. Gregory Drive, Urbana, IL 61801, USA
Photosynthesis Research Unit, USDA-ARS, 190 ERML, 1201 W. Gregory Drive, Urbana, IL 61801, USA
c
Department of Natural Resources and Environmental Sciences, University of Illinois, 1102 S. Goodwin Avenue,
Urbana, IL 61801, USA
b
Received 15 December 1998; received in revised form 22 November 1999; accepted 23 November 1999
Abstract
OWSimu is a Java-based generic plant growth simulator. According to the principles of
object-oriented design, Java classes were programmed for plant growth simulation as well as
relevant input, output and user interfaces. The program was developed as a Java applet with a
user-friendly graphical interface running on the Web. With a Java (JDK1.1)-embedded Web
browser, users can link the run-time model and perform plant growth simulations at our
website. OWSimu is a convenient tool for researchers, teachers and students to use in the
general study of plant growth. It describes the growth of a typical plant that is free of pests
and diseases. The program is currently able to simulate plant growth for more than a dozen
crops and weeds under Illinois weather and three typical soil conditions. Additional data is
needed to modify OWSimu so that it can have a better carbon balance model for dierent
plant species and accommodate dierent varieties within a selected plant species for use in a
speci®c crop production management system. The program source code is highly reusable for
further development and for other crop modeling work. # 2000 Published by Elsevier Science
Ltd. All rights reserved.
Keywords: Java class; WWW; Interface; Crop simulation
1. Introduction
Plant growth refers to an increase in size, mass or complexity of cells or organs.
Plant phenology (the timing of growth processes) and carbon balance (including
* Corresponding author.
E-mail address: [email protected] (M.G. Huck).
0308-521X/00/$ - see front matter # 2000 Published by Elsevier Science Ltd. All rights reserved.
PII: S0308-521X(99)00071-2
34
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
photosynthesis and respiration) are closely related to plant growth. Materials (C, N,
H2O) stresses are important factors controlling plant growth. Leaf area expansion,
internode length extension, leaf area index (LAI) change and plant height growth
can be predicted based upon the eects of accumulated degree days, materials
stresses, etc., on leaf and internode phenological events (Pan, 1997). Leaf, stem and
root weight increases can be calculated and simulated from materials balance,
micro-environmental and phenological considerations (Jones et al., 1974; Baker et
al., 1983; Reddy et al., 1997).
As shown in Fig. 1, plant growth is controlled by genetic and environmental factors (e.g. weather, soil, water, nitrogen, agronomic practices, etc.). Genetic factors
in¯uence variation in form and function of plant organs that lead to dierences
among species, races or cultivars, the details of which can be inferred from experimental measurements. Weather components, including daily temperature measurements (maximum and minimum), solar radiation, rainfall, wind speed and humidity
strongly aect plant growth. Soil, having unique physical and chemical properties,
in¯uences both root and shoot growth. Water and nitrogen availability are also
important factors in determining plant growth. Agronomic practices, including
planting date, stand density, site location, irrigation and fertilizer application often
have signi®cant eects.
Plant growth and micro-environmental variables such as water balance and
nitrogen balance may also interact with one another. For example, leaf expansion
and the distribution of leaves within a crop canopy aect the plant photosynthetic
rate. On the other hand, nitrogen supply and photosynthetic rates have feedback
eects upon events controlling phenological development such as leaf and internode
growth rates, changes in LAI, or plant height growth. Plant water stress aects leaf
expansion, while leaf growth, in turn, in¯uences both plant water stress and the
amount of water transpired.
Plant growth can be described by a series of mathematical and logical models,
which can be combined into a complex computer simulation model programmed
Fig. 1. Plant growth versus its environment.
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
35
with one or more computer languages (Thornley and Johnson, 1990; Johnson,
1994). Such a computer simulation model can be used for plant growth prediction
purposes and as a means of helping to understand how the plant growth system
works. As a result, many computer-based models have been developed to simulate
plant growth.
However, most published plant simulation models (e.g. McKinion et al., 1975;
Jones et al., 1980; Baker et al., 1983; Mutsaers, 1984; Ritchie et al., 1985; Hoogenboom and Huck, 1987; Acock and Trent, 1991; Marani and Phene, 1993), are programmed in FORTRAN (a procedural computer language), rather than in objectoriented code. Although some models (Fu and Hesketh, 1996; Lemmon and Chuck,
1998; Caldwell and Fernandez, 1998), coded in C++, are object-oriented, they are
computer platform-dependent and cannot be used on the Web.
Object-oriented programming (OOP) has now reached the mainstream of programming. Its code is encapsulated in objects, which have both a public interface
and a private implementation, so programmers can rapidly develop prototypes and
group code into manageable chunks Ð even for very complex systems. In OOP,
objects can inherit the characteristics of other objects and override inherited characteristics, so programmers can easily reuse code, make their codes more compact,
and ®x or update codes in one place, which saves time and reduces bugs.
The World Wide Web (WWW or Web) is transforming our society. It provides
people with a very handy way to access information through the Internet.
The Java language (Cornell and Horstmann, 1996; Sridharan, 1997), developed by
Sun Microsystems, is thoroughly object-oriented. It mimics the object orientation of
C++ and includes extensions from Objective C for dynamic method resolution.
Creating network connections is easier in Java than in C or C++ because Java has
built-in routines for dealing with Internet Protocols. These routines make it as easy
to open and access objects over the Internet through URLs as it is to access a local
®le system. Java applets make it possible for a website to include a strong ability to
interact with data on the Web in real time.
PHENAPP, developed by Pan et al. (1997), is a Java program. It simulates the eects
of accumulated degree-days upon plant leaf and internode phenological events of various plant species (including ®eld crops, horticultural crops and weeds) that are free of
pests and diseases. Following the basic outline established for PHENAPP, we developed carbon balance, water balance and nitrogen balance models and combined them
into the more complex model described here: OWSimu, which is an object-oriented
generic plant growth simulator intended for research and educational purposes.
2. Object-oriented design for plant growth
2.1. Java classes with inheritance relationships
A Java class is a collection of attributes and methods that de®nes the implementation of a particular kind of object. Agroecosystem, Growth, SizeGrowth,
MassGrowth, Phenology, CBalance, H2Obalance, SoilWater, PlantWater, ET
36
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
(Evapotranspiration), NBalance, SoilN and PlantN were designed and programmed
as a set of Java classes to describe plant growth. The relationships among these
classes are illustrated in Fig. 2.
Class Agroecosystem is the super class of all the other classes. This class contains
common member data declarations such as simulation dates, agronomic data,
weather data, etc., and methods for data setting and computations.
Growth, H2OBalance, and NBalance are abstract classes which inherit class
Agroecosystem and then extend it, separately. These three classes also represent the
super classes of Phenology, CBalance, ET, SoilWater, PlantWater, PlantN and
SoilN, respectively. Furthermore, the properties of Phenology and CBalance are
inherited and extended by SizeGrowth and MassGrowth, separately.
2.2. Plant phenological model
The plant phenological model is described by classes Phenology and SizeGrowth,
which represent solutions to a set of regression-based models based upon the
experimental data sets described by Pan et al. (1998a,b). Output from class Phenology represents the in¯uence of heat units (expressed as degree-days) upon leaf and
internode phenological events. These events include leaf appearance, expansion and
death rates, as well as internode appearance and extension rates. Class SizeGrowth,
on the other hand, estimates the dynamics of leaf area, LAI and plant height based
upon the eects of accumulated heat measurement values and population density on
leaf expansion and internode extension. In class SizeGrowth, light interception is
also estimated from computed LAI and plant height.
Classes PlantWater, CBalance and PlantN are called to provide estimates of plant
water, carbohydrate and nitrogen stress, respectively, for estimating such stress
eects on plant leaf and stem growth and development rates in class SizeGrowth.
Fig. 2. Java object classes for plant growth modeling.
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
37
Class SizeGrowth is called to provide estimates of current LAI and light interception for use in estimating transpiration in class ET and in predicting photosynthetic rate in class CBalance, respectively.
The algorithm for calculating plant leaf area in class SizeGrowth is given below to
illustrate a series of steps by which OWSimu arrives at an estimate for plant phenology and size growth.
First, the eect of plant density on leaf growth (DE) is calculated based on the
algorithm of Marani (1996) in CALGOS, using the following equation:
ÿ
ÿ
P76 5 ÿ plants row=row spacing
;
1
DE 1 ÿ P75 1 ÿ e
where P75 and P76 are the 75th and 76th data, read from a table in the plant database and denote genotype parameters, plants_row represents the number of plants
per meter of row, and row_spacing denotes the distance (in meters) between two
adjacent rows.
Then, the area of the nth leaf (An) is calculated [Eq. (2)]:
An A max n DD ÿ DD0 n=DDd n;
2
where Amax(n) represents the maximum area of the nth leaf expansion, DD is the
number of degree-days accumulated from emergence until current day, DD0(n)
denotes the growing degree-days required for the nth leaf appearance, DDd(n) is the
growing degree-days required for duration of the nth leaf expansion. All of these
values are obtained by inheritance from class Phenology's methods.
The area of the nth leaf can then be adjusted using the result calculated from Eq.
(1) and the methods called from classes PlantWater, PlantN and CBalance based
upon Eq. (2) in the following manner:
An An DE H2 O:plantWaterStress N:plantNStress
C:plantCStress ;
3
where H2O.plantWaterStress() represents the current value of plant water stress,
which is obtained from the instance (H2O) of class PlantWater, N.plantNStress()
denotes the current value of plant nitrogen stress, derived from the instance (N) of
class PlantN, C.plantCStress() is the current value of plant carbon stress, calculated
from the instance (C) of class CBalance.
Therefore, the total leaf area (TA) for a plant at a speci®c accumulated growing
degree-day value (GDD) can be calculated as Eq. (4):
TA
ne
X
An ;
4
nn0
where n0 and ne represent the number of dead leaves and the total number of leaves
which have appeared to date, respectively.
38
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
2.3. Plant carbon balance model
The plant carbon balance model consists of classes CBalance and MassGrowth,
describing plant photosynthesis and respiration, carbohydrate partitioning between
shoot and root systems, plant biomass accumulation, leaf weight, stem weight, root
weight and the ratio of shoot/root.
For these two classes, programming for the plant photosynthesis and respiration
methods were based on two cotton models (Baker et al., 1983; Marani, 1996) and
were adjusted using the simulated results of the phenological model. The carbohydrate partitioning method was coded according to the algorithm in the ROOTSIMU
model of Hoogenboom and Huck (1987). Other methods were programmed based
upon the simulated results of the photosynthesis and carbohydrate partitioning factor methods.
Class CBalance calls classes PlantWater and PlantN to obtain estimates for plant
water and nitrogen stresses, required for calculating photosynthesis.
Class MassGrowth, in turn, is called by class PlantWater to obtain an estimate for
root weight growth, required to compute plant water uptake. It is also called by
class PlantN for biomass accumulation prediction, needed to simulate plant nitrogen
content and nitrogen stress.
An example of class MassGrowth calculations is given below to estimate cotton
plant root weight:
First, daily gross photosynthesis rate is estimated for the cotton plant by Eqs. 5
and 6:
pstand 2:3908 WATTSM 1:37379 ÿ WATTSM 0:00054136;
5
where pstand represents the potential for gross photosynthesis in energy units for a
standing non-stressed full canopy. This equation represents an empirical function of
WATTSM as used by Baker et al. (1972), in which the average daily global radiation
is expressed in units of (W mÿ2).
Then, the plant gross photosynthesis is adjusted by light interception (INT), plant
population density factor (popfac), CO2 eect (CO2_eect), H2O eect (H2O_eect),
and N-nutrition eect (N_eect):
pplant 0:10 pstand INT popfac CO2 effect H2 O effect
N effect;
6
where pplant represents gross photosynthesis for each individual cotton plant, popfac is a plant population factor (popfac = row_spacing/plants_row).
Cotton plant daily net photosynthesis (net_photo1) can be computed by subtracting photo-respiration and maintenance respiration (Marani, 1996) from pplant.
1
For other plant species, net_photo must currently be adjusted by the following equation:
net photo cotton net photo leaf area=cotton leaf area;
70
where leaf_area and cotton_leaf_area are total leaf area per plant for a target plant species and cotton,
respectively, which are calculated in class SizeGrowth.
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
39
Then, daily net photosynthesis partitioned by the root weight (root_weight1) is
computed as shown in Eq. (7):
root weight1 net photo TQ10 pw:root partitioning factor ;
7
where TQ10 is the biological Q-10, which implies a doubling of the reaction rate for
each 10 degree (C) soil temperature change. The pw.root_partitioning_factor()
represents the value of root partitioning factor which is simulated in class PlantWater.
Therefore, accumulated root weight (root_weight) can be obtained (Eq. (8)):
root weight root weight0 root weight1 ;
8
where root_weight0 is the accumulated root weight from the previous day.
2.4. Water balance model
Class ET was developed by entirely transferring GOSSYM (Baker et al., 1983)
subroutine ET, which was in turn adapted from the Ritchie (1972) model. It extends
class H2OBalance and mainly calculates water losses from both soil and plant by
evaporation and transpiration. In this class, SoilWater is called to use its soil water
potential method in computing evaporation. Then SizeGrowth is called to use its
LAI and light interception methods in calculating plant transpiration.
Classes SoilWater and PlantWater were programmed by translation of the FORTRAN source code of ROOTSIMU (Hoogenboom and Huck, 1987). They also
inherit and extend class H2OBalance. Class SoilWater estimates soil water potential
and soil water content for each component of the soil pro®le. Class PlantWater
describes plant canopy water potential and plant water stress.
Class PlantWater is called to estimate water uptake rate per soil layer, needed to
adjust soil water balance method in class SoilWater, whereas class SoilWater is
called to estimate soil water potential, required to compute plant water potential in
class PlantWater. Class PlantWater calls class MassGrowth for obtaining root
weight to estimate the total length of active roots, needed for predicting H2O
uptake.
2.5. Nitrogen balance model
Classes PlantN and SoilN were coded to estimate plant nitrogen content, soil
nitrogen content (in class SoilN) and plant nitrogen stress (in class PlantN) for each
system component.
Class SoilN calls classes SoilWater, PlantWater, SizeGrowth and MassGrowth to
estimate soil nitrogen content, whereas PlantN calls classes SoilN and MassGrowth
to compute plant nitrogen content and stress. PlantN is also called by classes Phenology and CBalance, which uses the plant nitrogen stress simulation method to
predict plant phenological events, size growth and photosynthesis, separately.
40
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
3. System input and output
3.1. Plant, weather and soil data input
Class DBMS was programmed to input plant, weather and soil data. OWSimu
can obtain these data from two possible alternative sources: databases or ¯at ®les
accessible to the operating systems.
3.1.1. Input from plant, weather and soil databases
Plant, weather and soil database development and their connection to the Java
programs have been described in another paper by Pan et al. (1998c).
In class DBMS, method ``connectDB()'' was coded to connect with the three databases
through JDBC-ODBC (Java Database Connectivity and Open Database Connectivity)
served by dbANYWHERE Server (Symantec, 1997). Methods ``readPlantDB()'',
``readWeatherDB()'' and ``readSoilDB()'' were programmed to get data from the
three databases. Methods ``setPlantData()'', ``setWeatherData()'' and ``setSoilData()''
were written to set the three types of data to the simulation models, separately.
3.1.2. Input from ¯at ®le system
Data in each table of the databases were converted and stored in a ¯at ®le. All of
these ®les were classi®ed and stored in plant, weather and soil directories, respectively. Then, the plant, weather and soil directories were made publicly accessible by
the Web server which publishes Java applet Simulator.
In Java class DBMS, methods ``readPlantFile()'', ``readWeatherFile()'' and
``readSoilFile()'' were coded to obtain the three types of data from the relevant ®les.
The ``setPlantData()'', ``setWeatherData()'' and ``setSoilData()'' mentioned above
can also be used to set these data to the simulation models.
3.2. Agronomic data input
Class Agronomy was programmed to facilitate user input of agronomic data. This
class cannot only transfer data for speci®c agronomic variables (e.g. latitude, planting date, plants per meter of row, row spacing, simulation start and simulation stop
dates) from the text ®elds which were built in the main graphical user interface
(GUI), but it also presents a graphical interface (Fig. 3) from which the user can edit
and apply the time and rate of irrigation or fertilization practices.
3.3. Output simulated results
Classes PlotItem, Plot and Text were programmed to display the simulated results.
Class PlotItem serves to display the simulated results in a time interval.
Class Plot draws xy coordinate and puts the simulated results displayed by class
PlotItem in this coordinate. For the xy coordinate, x represents month/day time
series, y denotes quantities of plant growth characteristics such as plant height in
centimetres, LAI, leaf weight in gram per plant, etc., for a plant species.
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
41
Text functions to show the output in text format.
The output content can be any of those listed in Table 1 as the users' choices.
Class GUI was programmed to generate the main user graphical interface for
OWSimu. As shown in Fig. 4, the upper part of the interface was designed for data
input, whereas the central section displays model output. The ``User Guides'' and
``Run'' buttons at the bottom of the interface permit the user to execute operations
to learn how to use OWSimu and to run the model. Menu choices in the upper-left
section allow the user to choose a target plant species, site-speci®c weather and
typical soil types, respectively. Data to describe agronomic practices can be entered
on the upper-middle and upper-right part. The graphical output is displayed in the
dark area to the left of center, whereas text-formatted output is displayed to the
right of the central section.
Class MenuMaker extends the PopupMenu from Sun Java standard library. It
produces the ``Run'' menu which contains choices needed to generate output contents.
4. System management
4.1. System organization
OWSimu system has been organized in a structure, as shown in Fig. 5.
The MAIN directory contains MODEL and IO packages (a package is a group of
related Java classes organized and packaged in a directory) as well as Java applet
Simulator and some Java classes for designing GUI. A simple HTML program
tagging the Java applet Simulator is also in this directory.
Fig. 3. Graphical user interface for irrigation.
42
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
Java classes Agroecosystem, Growth, SizeGrowth, MassGrowth, Phenology,
CBalance, H2Obalance, SoilWater, PlantWater, ET (Evapotranspiration), NBalance, SoilN and PlantN, simulating plant growth and its environmental eects,
were packaged in the MODEL.
The IO package, serving to deal with I/O problems, contains classes DBMS,
Agronomy, Plot, PlotItem, Text and Utility.
4.2. Object class management
Class Simulator was programmed to manage the entire OWSimu system. It calls
classes GUI and MenuMaker to show the graphical user interface, the classes in the
Table 1
List of output contents
Category
Sub-category
Output contents (simulation targets)
Size growth
Leaf area (cm2 / plant)
LAI (cm2 / cm2)
Internode length (cm)
Plant height (cm)
Mass growth
Plant biomass (g / plant)
Leaf weight (g / plant)
Stem weight (g / plant)
Root weight (g / plant)
Shoot/root
Phenology
Leaf expansion
Internode extension
Leaf and internode events
Carbon balance
Gross photosynthesis (g / plant / day)
Net photosynthesis (g / plant / day)
Respiration (g / plant / day)
H2O balance
Nitrogen balance
Soil water
Soil water potential (bar)
Soil water content (cm3/cm3)
Plant water
Plant water potential (bar)
Plant water stress
Evapotranspiration
Evaporation (mm/day)
Transpiration (mm/day)
Evapotranspiration (mm/day)
Soil nitrogen
Soil nitrogen content (mg/cm3)
Soil nitrate N content (mg/cm3)
Plant nitrogen
Plant available nitrogen (g/plant)
Plant nitrogen stress
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
43
MODEL package to simulate plant growth, and the classes in the IO package to
deal with system I/O problems.
4.3. Web publication
Class Simulator also inherits the characteristics of class Applet in the SUN Java
standard library. Thus, class Simulator can be used as an applet which can be tagged
into a HTML program and published on the Web.
Fig. 4. Main graphical user interface.
Fig. 5. A diagram of the OWSimu system structure showing how the Java object class were organized.
44
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
5. Program operation and simulation
OWSimu can be run on a user's client machine by using a Java (JDK1.1)-embedded Web browser and linking our website: http://th190-50.agn.uiuc.edu. OWSimu
will ®rst generate a GUI as described earlier when a user link to the Web page tagging Java applet Simulator.
He/she may wish ®rst to read the user guides by clicking the ``User Guides'' button on the GUI and link into the ``OWSimu User Guides'' Web page.
When the user has chosen a plant species from the menu choice marked with
``Plant Species'' for a plant growth simulation study, he/she may also wish to choose
environmental conditions from each of the other two databases containing site-speci®c weather and a set of soil characteristic values in the ``Weather Data'' and ``Soil
Type'' menu. The user must also specify relevant agronomic data, such as planting
date, row spacing, etc., in the text ®elds provided by the interface.
The buttons marked ``Irrigation'' and ``Fertilization'' are intended for use with
irrigation and fertilization application schedules. When users click either the ``Irrigation'' or ``Fertilization'' button, a window will be popped up so that users can
schedule the timing and rate of irrigation or nitrogen fertilization, and then input the
scheduled data into the system by clicking the ``Apply'' button in this popup window.
Output can be displayed in either graphical and/or text format after clicking the
``Run'' buttons and choosing the simulation targets (Table 1) from a popup menu
with submenu choices including Size Growth, Mass Growth, Phenology, C Balance,
H2O Balance and Nitrogen Balance. In its default mode, the output is displayed in
both ®gure and text formats.
Fig. 6. Simulation of soybean plant height growth.
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
45
For example, to simulate soybean plant height growth on clay loam soil under
Urbana weather conditions as recorded in 1996, ``Soybean'', ``Urbana 96'' and
``Clay Loam'' were selected from the three menu choices, presented. Then, ``40.1'',
``15'', ``0.76'', ``05/25/96'', ``06/05/96'', ``08/15/96'' might be typed into the text ®elds
marked ``Latitude'', ``Plants/m of Row'', ``Row Spacing (m)'', ``Emergence Date'',
``Simu. Start Date'', and ``Simu.Stop Date'', respectively. After that, 20, 15 and 15
mm water are scheduled for irrigation on ``7/15/96'', ``7/25/96'' and ``8/05/96'',
separately, in a popup window by clicking the ``Irrigation'' button. When running
OWSimu by pressing the ``Run'' button and choosing ``Plant Height'' from ``Size
Growth'' category in the popup menu, the output is displayed with both text and
graphical formats (Fig. 6). If the ``Text Output'' is not checked, the result would be
shown only with graphical format. Or if the ``Figure Output'' is not checked,
OWSimu will only display the simulation results in text format.
6. Discussion
OWSimu is a convenient tool for researchers, teachers and students to use in the
study of plant growth since it is Web-based facilitating communication and giving
access to a wide variety of potential users. It can be shared over the Web while
studying plant phenological events and growth of vegetative canopy in response to
micro-environmental variables.
OWSimu is an object-oriented plant growth simulator. Fundamental plant growth
processes, state-variables, environmental factors and cultural practices were coded
as objects into Java classes, which were packaged in the MODEL directory. These
classes can be inherited and extended by other newly programmed classes, facilitating easy update or reuse of code. New functions to the plant growth model can
easily be added by coding some new methods in the classes presented here, or by
programming a new class to extend the most relevant class in the MODEL. Other
model developers may wish to use the code by importing package MODEL and then
calling or extending its classes while writing their own Java programs for plant
growth or relevant ®elds. The IO package provides with powerful techniques and
rich resources to input data from databases and to output simulated results. In
extending these Java classes to their own Java code, other programmers may reuse
source code from this IO package and share these techniques and resources by
importing the existing IO package and overriding a few methods of the DBMS and
Plot classes.
OWSimu was developed as a generic simulation model describing plant growth for
more than a dozen dierent plant species. Plant growth processes and state-variables
may vary signi®cantly among dierent species, or even among cultivars of the same
species, under the same environmental conditions and cultural practices. Because
OWSimu currently describes only a typical variety for each plant species, it cannot
distinguish between varieties of the same plant species. So, at present, this software
is recommended only for general research and educational purposes. But when
additional data becomes available, it can easily be modi®ed to accommodate dierent
46
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
varieties within a selected plant species, and extended for use in a speci®c crop production management.
At present, the photosynthesis and respiration estimations in the carbon balance
model of OWSimu are based upon the cotton models GOSSYM and CALGOS. So
OWSimu may not be able to simulate plant biomass accumulation accurately for
most other plant species, though we have done some preliminary work in adjusting
the carbon balance model by using plant leaf area and plant leaf weight from the
phenological model simulation results [e.g. Eq. (70 )]. We must continue to explore
better algorithms, and to collect experimental data needed for adjusting the carbon
balance model applicable for use with other plant species.
7. System requirements
OWSimu requires a Java (JDK1.1 or above)-embedded Web browser such as
Netscape Communicator 4.07 or newer version, Microsoft Internet Explorer 4.0 or
higher version, HotJava BrowserTM 1.1 or newer version, etc.
Because OWSimu was developed under Windows 95 and 98, it has optimal performance when running under Windows 95/98/NT. OWSimu can also run under
UNIX, but its graphical user interface usually does not show well. OWSimu runs
well with Microsoft Internet Explorer 4.5 or higher version, but does not work with
current Netscape Communicator under Macintosh because JDK1.1 still has not
been fully embedded into the Netscape Communicator for Macintosh.
References
Acock, B., Trent, A., 1991. GLYCIM: the Soybean Crop Simulator. Idaho Agricultural Experimental
Station, Mis. Series Bulletin. No. 145, Moscow, ID, USA.
Baker, D.N., Hesketh, J.D., Duncan, W.G., 1972. The simulation of growth and yield in cotton: I. Gross
photosynthesis, respiration and growth. Crop Sci. 12, 431±435.
Baker, D.N., Lambert, J.R., McKinion, J.M., 1983. GOSSYM: A Simulator of Cotton Crop Growth and
Yield. South Carolina Agricultural Experimental Station Technical Bulletin No. 1089, Clemson, SC,
USA.
Caldwell, R.M., Fernandez, A.A.J., 1998. A generic model of hierarchy for systems analysis and simulation. Agricultural Systems 57 (2), 197±225.
Cornell, G., Horstmann, C.S., 1996. Core Java. 1st Edition. The Sunsoft Press: Java Series, Upper Saddle
River, NJ.
Fu, H., Hesketh, J.D., 1996. A crop phenology simulator for windows. Proceedings of the 6th International Conference on Computers in Agriculture, pp. 1013±1021.
Hoogenboom, G., Huck, M.G., 1987. ROOTSIMU: model simulating root and shoot growth. In: Hillel,
D. (Ed.), Advances in Irrigation, Vol. 4. Academic Press, Orlando, FL, USA, pp. 331±376.
Johnson, I.R., 1994. PLANTMOD 2.1: Exploring the Physiology of Plant Communities. Greenhat Software, Armidale, NSW, Australia.
Jones, J.W., Hesketh, J.D., Kamprath, E.J., Bowen, H., 1974. Development of a nitrogen balance for
cotton growth: a ®rst approximation. Crop Sci. 14, 541±546.
Jones, J.W., Brown, L.G., Hesketh, J.D., 1980. COTCROP: a computer model for cotton growth and
yield. In: Hesketh, J.D., Jones, J.D. (Eds.), Predicting Photosynthesis for Ecosystem Models Vol. I.
CRC Press, Boca Raton, FL, USA, pp. 204±241.
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
47
Lemmon, H., Chuk, N., 1998. CottonPlus: A Cotton Crop Model and Expert System to Support OnFarm Management. I. Theory and Equations of the Crop Model (http://home.earthlink.net/lemmon/
_private/papers/thry.htm).
Lemmon, H., Chuk, N., Reddy, V., Acock, B., Pachepsky, Y. 1997. Sigma Plus: A Cotton Crop Model.
The 27th Crop Simulation Workshop, Gainesville, FL.
Marani, A., 1996. CALGOS Cotton Simulation Model (http://asset.arsusda.gov/ WMRL/calgos.html).
Marani, A., Phene, C.J., 1993. ABSTRACT. CALGOS Ð a model of irrigated cotton. Agronomy
Abstracts, 1993 Annual Meetings, 7±12 November, Cincinnati, OH
McKinion, J.M., Baker, D.N., Hesketh, J.D., Jones, J.W., 1975. SIMCOT II: A Simulation of Cotton
Growth and Yield. USDA, ARS, Southern Series Bull. ARS S-52, 27±82.
Mutsaers, H.J.W., 1984. KUTUN: a morphogenetic model for cotton (Gossypium hirsutum L.). Agricultural Systems 14, 229±257.
Pan, X., 1997. Modeling Degree Day Eects on Plant Leaf and Internode Phenological Events. MSc.
thesis, University of Illinois, Urbana-Champaign, IL, USA.
Pan, X., Hesketh, J.D., Huck, M.G., 1997. PHENAPP: A Java Applet and Application for Plant Phenological Events. The 27th Crop Simulation Workshop, Gainesville, FL, USA
Pan, X., Begonia, G.B., Hesketh, J.D., 1998a. Quantifying Crop-Weed Competition (http://th19050.agn.uiuc.edu/).
Pan, X., Hesketh, J.D., Huck, M.G., 1998b. A database for scaling up from the leaf to the canopy.
PHOTOSYNTHETICA 35 (3), 329±334.
Pan, X., Hesketh, J.D., Huck, M.G., 1998c. A Web interface to databases associated with a plant simulator. Computers and Electronics in Agriculture 21 (3), 207±217.
Reddy, K.R., Hodges, H.F., McKinion, J.M., 1997. Crop modeling and applications: a cotton example.
In: Advances in Agronomy Vol. 59. Academic Press, pp. 225±290.
Ritchie, J.T., 1972. Model predicting evaporation from a row crop with incomplete cover. Water
Resources Research 8, 204±1213.
Ritchie, J.T., Godwin, D.C., Otter-Nacke, S., 1985. CERES-Wheat: A Simulation Model of Wheat
Growth and Development. Texas A&M University Press, College Station, TX, USA.
Sridharan, P., 1997. Advanced Java Networking. Prentice Hall, Upper Saddle River, NJ, USA.
Symantec, 1997. Visual Cafe for Java 2.0. Database Development. Symantec, Cupertino, CA, USA.
Thornley, J.H.M., Johnson, I.R., 1990. Plant and Crop Modelling: A Mathematical Approach to Plant
and Crop Physiology. Oxford Sci. Clarendon Press, Oxford.
www.elsevier.com/locate/agsy
OWSimu: an object-oriented and Web-based
simulator for plant growth
X. Pan a, J.D. Hesketh b, M.G. Huck c,*
a
Biotechnology Center, University of Illinois, 330 ERML, 1201 W. Gregory Drive, Urbana, IL 61801, USA
Photosynthesis Research Unit, USDA-ARS, 190 ERML, 1201 W. Gregory Drive, Urbana, IL 61801, USA
c
Department of Natural Resources and Environmental Sciences, University of Illinois, 1102 S. Goodwin Avenue,
Urbana, IL 61801, USA
b
Received 15 December 1998; received in revised form 22 November 1999; accepted 23 November 1999
Abstract
OWSimu is a Java-based generic plant growth simulator. According to the principles of
object-oriented design, Java classes were programmed for plant growth simulation as well as
relevant input, output and user interfaces. The program was developed as a Java applet with a
user-friendly graphical interface running on the Web. With a Java (JDK1.1)-embedded Web
browser, users can link the run-time model and perform plant growth simulations at our
website. OWSimu is a convenient tool for researchers, teachers and students to use in the
general study of plant growth. It describes the growth of a typical plant that is free of pests
and diseases. The program is currently able to simulate plant growth for more than a dozen
crops and weeds under Illinois weather and three typical soil conditions. Additional data is
needed to modify OWSimu so that it can have a better carbon balance model for dierent
plant species and accommodate dierent varieties within a selected plant species for use in a
speci®c crop production management system. The program source code is highly reusable for
further development and for other crop modeling work. # 2000 Published by Elsevier Science
Ltd. All rights reserved.
Keywords: Java class; WWW; Interface; Crop simulation
1. Introduction
Plant growth refers to an increase in size, mass or complexity of cells or organs.
Plant phenology (the timing of growth processes) and carbon balance (including
* Corresponding author.
E-mail address: [email protected] (M.G. Huck).
0308-521X/00/$ - see front matter # 2000 Published by Elsevier Science Ltd. All rights reserved.
PII: S0308-521X(99)00071-2
34
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
photosynthesis and respiration) are closely related to plant growth. Materials (C, N,
H2O) stresses are important factors controlling plant growth. Leaf area expansion,
internode length extension, leaf area index (LAI) change and plant height growth
can be predicted based upon the eects of accumulated degree days, materials
stresses, etc., on leaf and internode phenological events (Pan, 1997). Leaf, stem and
root weight increases can be calculated and simulated from materials balance,
micro-environmental and phenological considerations (Jones et al., 1974; Baker et
al., 1983; Reddy et al., 1997).
As shown in Fig. 1, plant growth is controlled by genetic and environmental factors (e.g. weather, soil, water, nitrogen, agronomic practices, etc.). Genetic factors
in¯uence variation in form and function of plant organs that lead to dierences
among species, races or cultivars, the details of which can be inferred from experimental measurements. Weather components, including daily temperature measurements (maximum and minimum), solar radiation, rainfall, wind speed and humidity
strongly aect plant growth. Soil, having unique physical and chemical properties,
in¯uences both root and shoot growth. Water and nitrogen availability are also
important factors in determining plant growth. Agronomic practices, including
planting date, stand density, site location, irrigation and fertilizer application often
have signi®cant eects.
Plant growth and micro-environmental variables such as water balance and
nitrogen balance may also interact with one another. For example, leaf expansion
and the distribution of leaves within a crop canopy aect the plant photosynthetic
rate. On the other hand, nitrogen supply and photosynthetic rates have feedback
eects upon events controlling phenological development such as leaf and internode
growth rates, changes in LAI, or plant height growth. Plant water stress aects leaf
expansion, while leaf growth, in turn, in¯uences both plant water stress and the
amount of water transpired.
Plant growth can be described by a series of mathematical and logical models,
which can be combined into a complex computer simulation model programmed
Fig. 1. Plant growth versus its environment.
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
35
with one or more computer languages (Thornley and Johnson, 1990; Johnson,
1994). Such a computer simulation model can be used for plant growth prediction
purposes and as a means of helping to understand how the plant growth system
works. As a result, many computer-based models have been developed to simulate
plant growth.
However, most published plant simulation models (e.g. McKinion et al., 1975;
Jones et al., 1980; Baker et al., 1983; Mutsaers, 1984; Ritchie et al., 1985; Hoogenboom and Huck, 1987; Acock and Trent, 1991; Marani and Phene, 1993), are programmed in FORTRAN (a procedural computer language), rather than in objectoriented code. Although some models (Fu and Hesketh, 1996; Lemmon and Chuck,
1998; Caldwell and Fernandez, 1998), coded in C++, are object-oriented, they are
computer platform-dependent and cannot be used on the Web.
Object-oriented programming (OOP) has now reached the mainstream of programming. Its code is encapsulated in objects, which have both a public interface
and a private implementation, so programmers can rapidly develop prototypes and
group code into manageable chunks Ð even for very complex systems. In OOP,
objects can inherit the characteristics of other objects and override inherited characteristics, so programmers can easily reuse code, make their codes more compact,
and ®x or update codes in one place, which saves time and reduces bugs.
The World Wide Web (WWW or Web) is transforming our society. It provides
people with a very handy way to access information through the Internet.
The Java language (Cornell and Horstmann, 1996; Sridharan, 1997), developed by
Sun Microsystems, is thoroughly object-oriented. It mimics the object orientation of
C++ and includes extensions from Objective C for dynamic method resolution.
Creating network connections is easier in Java than in C or C++ because Java has
built-in routines for dealing with Internet Protocols. These routines make it as easy
to open and access objects over the Internet through URLs as it is to access a local
®le system. Java applets make it possible for a website to include a strong ability to
interact with data on the Web in real time.
PHENAPP, developed by Pan et al. (1997), is a Java program. It simulates the eects
of accumulated degree-days upon plant leaf and internode phenological events of various plant species (including ®eld crops, horticultural crops and weeds) that are free of
pests and diseases. Following the basic outline established for PHENAPP, we developed carbon balance, water balance and nitrogen balance models and combined them
into the more complex model described here: OWSimu, which is an object-oriented
generic plant growth simulator intended for research and educational purposes.
2. Object-oriented design for plant growth
2.1. Java classes with inheritance relationships
A Java class is a collection of attributes and methods that de®nes the implementation of a particular kind of object. Agroecosystem, Growth, SizeGrowth,
MassGrowth, Phenology, CBalance, H2Obalance, SoilWater, PlantWater, ET
36
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
(Evapotranspiration), NBalance, SoilN and PlantN were designed and programmed
as a set of Java classes to describe plant growth. The relationships among these
classes are illustrated in Fig. 2.
Class Agroecosystem is the super class of all the other classes. This class contains
common member data declarations such as simulation dates, agronomic data,
weather data, etc., and methods for data setting and computations.
Growth, H2OBalance, and NBalance are abstract classes which inherit class
Agroecosystem and then extend it, separately. These three classes also represent the
super classes of Phenology, CBalance, ET, SoilWater, PlantWater, PlantN and
SoilN, respectively. Furthermore, the properties of Phenology and CBalance are
inherited and extended by SizeGrowth and MassGrowth, separately.
2.2. Plant phenological model
The plant phenological model is described by classes Phenology and SizeGrowth,
which represent solutions to a set of regression-based models based upon the
experimental data sets described by Pan et al. (1998a,b). Output from class Phenology represents the in¯uence of heat units (expressed as degree-days) upon leaf and
internode phenological events. These events include leaf appearance, expansion and
death rates, as well as internode appearance and extension rates. Class SizeGrowth,
on the other hand, estimates the dynamics of leaf area, LAI and plant height based
upon the eects of accumulated heat measurement values and population density on
leaf expansion and internode extension. In class SizeGrowth, light interception is
also estimated from computed LAI and plant height.
Classes PlantWater, CBalance and PlantN are called to provide estimates of plant
water, carbohydrate and nitrogen stress, respectively, for estimating such stress
eects on plant leaf and stem growth and development rates in class SizeGrowth.
Fig. 2. Java object classes for plant growth modeling.
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
37
Class SizeGrowth is called to provide estimates of current LAI and light interception for use in estimating transpiration in class ET and in predicting photosynthetic rate in class CBalance, respectively.
The algorithm for calculating plant leaf area in class SizeGrowth is given below to
illustrate a series of steps by which OWSimu arrives at an estimate for plant phenology and size growth.
First, the eect of plant density on leaf growth (DE) is calculated based on the
algorithm of Marani (1996) in CALGOS, using the following equation:
ÿ
ÿ
P76 5 ÿ plants row=row spacing
;
1
DE 1 ÿ P75 1 ÿ e
where P75 and P76 are the 75th and 76th data, read from a table in the plant database and denote genotype parameters, plants_row represents the number of plants
per meter of row, and row_spacing denotes the distance (in meters) between two
adjacent rows.
Then, the area of the nth leaf (An) is calculated [Eq. (2)]:
An A max n DD ÿ DD0 n=DDd n;
2
where Amax(n) represents the maximum area of the nth leaf expansion, DD is the
number of degree-days accumulated from emergence until current day, DD0(n)
denotes the growing degree-days required for the nth leaf appearance, DDd(n) is the
growing degree-days required for duration of the nth leaf expansion. All of these
values are obtained by inheritance from class Phenology's methods.
The area of the nth leaf can then be adjusted using the result calculated from Eq.
(1) and the methods called from classes PlantWater, PlantN and CBalance based
upon Eq. (2) in the following manner:
An An DE H2 O:plantWaterStress N:plantNStress
C:plantCStress ;
3
where H2O.plantWaterStress() represents the current value of plant water stress,
which is obtained from the instance (H2O) of class PlantWater, N.plantNStress()
denotes the current value of plant nitrogen stress, derived from the instance (N) of
class PlantN, C.plantCStress() is the current value of plant carbon stress, calculated
from the instance (C) of class CBalance.
Therefore, the total leaf area (TA) for a plant at a speci®c accumulated growing
degree-day value (GDD) can be calculated as Eq. (4):
TA
ne
X
An ;
4
nn0
where n0 and ne represent the number of dead leaves and the total number of leaves
which have appeared to date, respectively.
38
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
2.3. Plant carbon balance model
The plant carbon balance model consists of classes CBalance and MassGrowth,
describing plant photosynthesis and respiration, carbohydrate partitioning between
shoot and root systems, plant biomass accumulation, leaf weight, stem weight, root
weight and the ratio of shoot/root.
For these two classes, programming for the plant photosynthesis and respiration
methods were based on two cotton models (Baker et al., 1983; Marani, 1996) and
were adjusted using the simulated results of the phenological model. The carbohydrate partitioning method was coded according to the algorithm in the ROOTSIMU
model of Hoogenboom and Huck (1987). Other methods were programmed based
upon the simulated results of the photosynthesis and carbohydrate partitioning factor methods.
Class CBalance calls classes PlantWater and PlantN to obtain estimates for plant
water and nitrogen stresses, required for calculating photosynthesis.
Class MassGrowth, in turn, is called by class PlantWater to obtain an estimate for
root weight growth, required to compute plant water uptake. It is also called by
class PlantN for biomass accumulation prediction, needed to simulate plant nitrogen
content and nitrogen stress.
An example of class MassGrowth calculations is given below to estimate cotton
plant root weight:
First, daily gross photosynthesis rate is estimated for the cotton plant by Eqs. 5
and 6:
pstand 2:3908 WATTSM 1:37379 ÿ WATTSM 0:00054136;
5
where pstand represents the potential for gross photosynthesis in energy units for a
standing non-stressed full canopy. This equation represents an empirical function of
WATTSM as used by Baker et al. (1972), in which the average daily global radiation
is expressed in units of (W mÿ2).
Then, the plant gross photosynthesis is adjusted by light interception (INT), plant
population density factor (popfac), CO2 eect (CO2_eect), H2O eect (H2O_eect),
and N-nutrition eect (N_eect):
pplant 0:10 pstand INT popfac CO2 effect H2 O effect
N effect;
6
where pplant represents gross photosynthesis for each individual cotton plant, popfac is a plant population factor (popfac = row_spacing/plants_row).
Cotton plant daily net photosynthesis (net_photo1) can be computed by subtracting photo-respiration and maintenance respiration (Marani, 1996) from pplant.
1
For other plant species, net_photo must currently be adjusted by the following equation:
net photo cotton net photo leaf area=cotton leaf area;
70
where leaf_area and cotton_leaf_area are total leaf area per plant for a target plant species and cotton,
respectively, which are calculated in class SizeGrowth.
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
39
Then, daily net photosynthesis partitioned by the root weight (root_weight1) is
computed as shown in Eq. (7):
root weight1 net photo TQ10 pw:root partitioning factor ;
7
where TQ10 is the biological Q-10, which implies a doubling of the reaction rate for
each 10 degree (C) soil temperature change. The pw.root_partitioning_factor()
represents the value of root partitioning factor which is simulated in class PlantWater.
Therefore, accumulated root weight (root_weight) can be obtained (Eq. (8)):
root weight root weight0 root weight1 ;
8
where root_weight0 is the accumulated root weight from the previous day.
2.4. Water balance model
Class ET was developed by entirely transferring GOSSYM (Baker et al., 1983)
subroutine ET, which was in turn adapted from the Ritchie (1972) model. It extends
class H2OBalance and mainly calculates water losses from both soil and plant by
evaporation and transpiration. In this class, SoilWater is called to use its soil water
potential method in computing evaporation. Then SizeGrowth is called to use its
LAI and light interception methods in calculating plant transpiration.
Classes SoilWater and PlantWater were programmed by translation of the FORTRAN source code of ROOTSIMU (Hoogenboom and Huck, 1987). They also
inherit and extend class H2OBalance. Class SoilWater estimates soil water potential
and soil water content for each component of the soil pro®le. Class PlantWater
describes plant canopy water potential and plant water stress.
Class PlantWater is called to estimate water uptake rate per soil layer, needed to
adjust soil water balance method in class SoilWater, whereas class SoilWater is
called to estimate soil water potential, required to compute plant water potential in
class PlantWater. Class PlantWater calls class MassGrowth for obtaining root
weight to estimate the total length of active roots, needed for predicting H2O
uptake.
2.5. Nitrogen balance model
Classes PlantN and SoilN were coded to estimate plant nitrogen content, soil
nitrogen content (in class SoilN) and plant nitrogen stress (in class PlantN) for each
system component.
Class SoilN calls classes SoilWater, PlantWater, SizeGrowth and MassGrowth to
estimate soil nitrogen content, whereas PlantN calls classes SoilN and MassGrowth
to compute plant nitrogen content and stress. PlantN is also called by classes Phenology and CBalance, which uses the plant nitrogen stress simulation method to
predict plant phenological events, size growth and photosynthesis, separately.
40
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
3. System input and output
3.1. Plant, weather and soil data input
Class DBMS was programmed to input plant, weather and soil data. OWSimu
can obtain these data from two possible alternative sources: databases or ¯at ®les
accessible to the operating systems.
3.1.1. Input from plant, weather and soil databases
Plant, weather and soil database development and their connection to the Java
programs have been described in another paper by Pan et al. (1998c).
In class DBMS, method ``connectDB()'' was coded to connect with the three databases
through JDBC-ODBC (Java Database Connectivity and Open Database Connectivity)
served by dbANYWHERE Server (Symantec, 1997). Methods ``readPlantDB()'',
``readWeatherDB()'' and ``readSoilDB()'' were programmed to get data from the
three databases. Methods ``setPlantData()'', ``setWeatherData()'' and ``setSoilData()''
were written to set the three types of data to the simulation models, separately.
3.1.2. Input from ¯at ®le system
Data in each table of the databases were converted and stored in a ¯at ®le. All of
these ®les were classi®ed and stored in plant, weather and soil directories, respectively. Then, the plant, weather and soil directories were made publicly accessible by
the Web server which publishes Java applet Simulator.
In Java class DBMS, methods ``readPlantFile()'', ``readWeatherFile()'' and
``readSoilFile()'' were coded to obtain the three types of data from the relevant ®les.
The ``setPlantData()'', ``setWeatherData()'' and ``setSoilData()'' mentioned above
can also be used to set these data to the simulation models.
3.2. Agronomic data input
Class Agronomy was programmed to facilitate user input of agronomic data. This
class cannot only transfer data for speci®c agronomic variables (e.g. latitude, planting date, plants per meter of row, row spacing, simulation start and simulation stop
dates) from the text ®elds which were built in the main graphical user interface
(GUI), but it also presents a graphical interface (Fig. 3) from which the user can edit
and apply the time and rate of irrigation or fertilization practices.
3.3. Output simulated results
Classes PlotItem, Plot and Text were programmed to display the simulated results.
Class PlotItem serves to display the simulated results in a time interval.
Class Plot draws xy coordinate and puts the simulated results displayed by class
PlotItem in this coordinate. For the xy coordinate, x represents month/day time
series, y denotes quantities of plant growth characteristics such as plant height in
centimetres, LAI, leaf weight in gram per plant, etc., for a plant species.
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
41
Text functions to show the output in text format.
The output content can be any of those listed in Table 1 as the users' choices.
Class GUI was programmed to generate the main user graphical interface for
OWSimu. As shown in Fig. 4, the upper part of the interface was designed for data
input, whereas the central section displays model output. The ``User Guides'' and
``Run'' buttons at the bottom of the interface permit the user to execute operations
to learn how to use OWSimu and to run the model. Menu choices in the upper-left
section allow the user to choose a target plant species, site-speci®c weather and
typical soil types, respectively. Data to describe agronomic practices can be entered
on the upper-middle and upper-right part. The graphical output is displayed in the
dark area to the left of center, whereas text-formatted output is displayed to the
right of the central section.
Class MenuMaker extends the PopupMenu from Sun Java standard library. It
produces the ``Run'' menu which contains choices needed to generate output contents.
4. System management
4.1. System organization
OWSimu system has been organized in a structure, as shown in Fig. 5.
The MAIN directory contains MODEL and IO packages (a package is a group of
related Java classes organized and packaged in a directory) as well as Java applet
Simulator and some Java classes for designing GUI. A simple HTML program
tagging the Java applet Simulator is also in this directory.
Fig. 3. Graphical user interface for irrigation.
42
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
Java classes Agroecosystem, Growth, SizeGrowth, MassGrowth, Phenology,
CBalance, H2Obalance, SoilWater, PlantWater, ET (Evapotranspiration), NBalance, SoilN and PlantN, simulating plant growth and its environmental eects,
were packaged in the MODEL.
The IO package, serving to deal with I/O problems, contains classes DBMS,
Agronomy, Plot, PlotItem, Text and Utility.
4.2. Object class management
Class Simulator was programmed to manage the entire OWSimu system. It calls
classes GUI and MenuMaker to show the graphical user interface, the classes in the
Table 1
List of output contents
Category
Sub-category
Output contents (simulation targets)
Size growth
Leaf area (cm2 / plant)
LAI (cm2 / cm2)
Internode length (cm)
Plant height (cm)
Mass growth
Plant biomass (g / plant)
Leaf weight (g / plant)
Stem weight (g / plant)
Root weight (g / plant)
Shoot/root
Phenology
Leaf expansion
Internode extension
Leaf and internode events
Carbon balance
Gross photosynthesis (g / plant / day)
Net photosynthesis (g / plant / day)
Respiration (g / plant / day)
H2O balance
Nitrogen balance
Soil water
Soil water potential (bar)
Soil water content (cm3/cm3)
Plant water
Plant water potential (bar)
Plant water stress
Evapotranspiration
Evaporation (mm/day)
Transpiration (mm/day)
Evapotranspiration (mm/day)
Soil nitrogen
Soil nitrogen content (mg/cm3)
Soil nitrate N content (mg/cm3)
Plant nitrogen
Plant available nitrogen (g/plant)
Plant nitrogen stress
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
43
MODEL package to simulate plant growth, and the classes in the IO package to
deal with system I/O problems.
4.3. Web publication
Class Simulator also inherits the characteristics of class Applet in the SUN Java
standard library. Thus, class Simulator can be used as an applet which can be tagged
into a HTML program and published on the Web.
Fig. 4. Main graphical user interface.
Fig. 5. A diagram of the OWSimu system structure showing how the Java object class were organized.
44
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
5. Program operation and simulation
OWSimu can be run on a user's client machine by using a Java (JDK1.1)-embedded Web browser and linking our website: http://th190-50.agn.uiuc.edu. OWSimu
will ®rst generate a GUI as described earlier when a user link to the Web page tagging Java applet Simulator.
He/she may wish ®rst to read the user guides by clicking the ``User Guides'' button on the GUI and link into the ``OWSimu User Guides'' Web page.
When the user has chosen a plant species from the menu choice marked with
``Plant Species'' for a plant growth simulation study, he/she may also wish to choose
environmental conditions from each of the other two databases containing site-speci®c weather and a set of soil characteristic values in the ``Weather Data'' and ``Soil
Type'' menu. The user must also specify relevant agronomic data, such as planting
date, row spacing, etc., in the text ®elds provided by the interface.
The buttons marked ``Irrigation'' and ``Fertilization'' are intended for use with
irrigation and fertilization application schedules. When users click either the ``Irrigation'' or ``Fertilization'' button, a window will be popped up so that users can
schedule the timing and rate of irrigation or nitrogen fertilization, and then input the
scheduled data into the system by clicking the ``Apply'' button in this popup window.
Output can be displayed in either graphical and/or text format after clicking the
``Run'' buttons and choosing the simulation targets (Table 1) from a popup menu
with submenu choices including Size Growth, Mass Growth, Phenology, C Balance,
H2O Balance and Nitrogen Balance. In its default mode, the output is displayed in
both ®gure and text formats.
Fig. 6. Simulation of soybean plant height growth.
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
45
For example, to simulate soybean plant height growth on clay loam soil under
Urbana weather conditions as recorded in 1996, ``Soybean'', ``Urbana 96'' and
``Clay Loam'' were selected from the three menu choices, presented. Then, ``40.1'',
``15'', ``0.76'', ``05/25/96'', ``06/05/96'', ``08/15/96'' might be typed into the text ®elds
marked ``Latitude'', ``Plants/m of Row'', ``Row Spacing (m)'', ``Emergence Date'',
``Simu. Start Date'', and ``Simu.Stop Date'', respectively. After that, 20, 15 and 15
mm water are scheduled for irrigation on ``7/15/96'', ``7/25/96'' and ``8/05/96'',
separately, in a popup window by clicking the ``Irrigation'' button. When running
OWSimu by pressing the ``Run'' button and choosing ``Plant Height'' from ``Size
Growth'' category in the popup menu, the output is displayed with both text and
graphical formats (Fig. 6). If the ``Text Output'' is not checked, the result would be
shown only with graphical format. Or if the ``Figure Output'' is not checked,
OWSimu will only display the simulation results in text format.
6. Discussion
OWSimu is a convenient tool for researchers, teachers and students to use in the
study of plant growth since it is Web-based facilitating communication and giving
access to a wide variety of potential users. It can be shared over the Web while
studying plant phenological events and growth of vegetative canopy in response to
micro-environmental variables.
OWSimu is an object-oriented plant growth simulator. Fundamental plant growth
processes, state-variables, environmental factors and cultural practices were coded
as objects into Java classes, which were packaged in the MODEL directory. These
classes can be inherited and extended by other newly programmed classes, facilitating easy update or reuse of code. New functions to the plant growth model can
easily be added by coding some new methods in the classes presented here, or by
programming a new class to extend the most relevant class in the MODEL. Other
model developers may wish to use the code by importing package MODEL and then
calling or extending its classes while writing their own Java programs for plant
growth or relevant ®elds. The IO package provides with powerful techniques and
rich resources to input data from databases and to output simulated results. In
extending these Java classes to their own Java code, other programmers may reuse
source code from this IO package and share these techniques and resources by
importing the existing IO package and overriding a few methods of the DBMS and
Plot classes.
OWSimu was developed as a generic simulation model describing plant growth for
more than a dozen dierent plant species. Plant growth processes and state-variables
may vary signi®cantly among dierent species, or even among cultivars of the same
species, under the same environmental conditions and cultural practices. Because
OWSimu currently describes only a typical variety for each plant species, it cannot
distinguish between varieties of the same plant species. So, at present, this software
is recommended only for general research and educational purposes. But when
additional data becomes available, it can easily be modi®ed to accommodate dierent
46
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
varieties within a selected plant species, and extended for use in a speci®c crop production management.
At present, the photosynthesis and respiration estimations in the carbon balance
model of OWSimu are based upon the cotton models GOSSYM and CALGOS. So
OWSimu may not be able to simulate plant biomass accumulation accurately for
most other plant species, though we have done some preliminary work in adjusting
the carbon balance model by using plant leaf area and plant leaf weight from the
phenological model simulation results [e.g. Eq. (70 )]. We must continue to explore
better algorithms, and to collect experimental data needed for adjusting the carbon
balance model applicable for use with other plant species.
7. System requirements
OWSimu requires a Java (JDK1.1 or above)-embedded Web browser such as
Netscape Communicator 4.07 or newer version, Microsoft Internet Explorer 4.0 or
higher version, HotJava BrowserTM 1.1 or newer version, etc.
Because OWSimu was developed under Windows 95 and 98, it has optimal performance when running under Windows 95/98/NT. OWSimu can also run under
UNIX, but its graphical user interface usually does not show well. OWSimu runs
well with Microsoft Internet Explorer 4.5 or higher version, but does not work with
current Netscape Communicator under Macintosh because JDK1.1 still has not
been fully embedded into the Netscape Communicator for Macintosh.
References
Acock, B., Trent, A., 1991. GLYCIM: the Soybean Crop Simulator. Idaho Agricultural Experimental
Station, Mis. Series Bulletin. No. 145, Moscow, ID, USA.
Baker, D.N., Hesketh, J.D., Duncan, W.G., 1972. The simulation of growth and yield in cotton: I. Gross
photosynthesis, respiration and growth. Crop Sci. 12, 431±435.
Baker, D.N., Lambert, J.R., McKinion, J.M., 1983. GOSSYM: A Simulator of Cotton Crop Growth and
Yield. South Carolina Agricultural Experimental Station Technical Bulletin No. 1089, Clemson, SC,
USA.
Caldwell, R.M., Fernandez, A.A.J., 1998. A generic model of hierarchy for systems analysis and simulation. Agricultural Systems 57 (2), 197±225.
Cornell, G., Horstmann, C.S., 1996. Core Java. 1st Edition. The Sunsoft Press: Java Series, Upper Saddle
River, NJ.
Fu, H., Hesketh, J.D., 1996. A crop phenology simulator for windows. Proceedings of the 6th International Conference on Computers in Agriculture, pp. 1013±1021.
Hoogenboom, G., Huck, M.G., 1987. ROOTSIMU: model simulating root and shoot growth. In: Hillel,
D. (Ed.), Advances in Irrigation, Vol. 4. Academic Press, Orlando, FL, USA, pp. 331±376.
Johnson, I.R., 1994. PLANTMOD 2.1: Exploring the Physiology of Plant Communities. Greenhat Software, Armidale, NSW, Australia.
Jones, J.W., Hesketh, J.D., Kamprath, E.J., Bowen, H., 1974. Development of a nitrogen balance for
cotton growth: a ®rst approximation. Crop Sci. 14, 541±546.
Jones, J.W., Brown, L.G., Hesketh, J.D., 1980. COTCROP: a computer model for cotton growth and
yield. In: Hesketh, J.D., Jones, J.D. (Eds.), Predicting Photosynthesis for Ecosystem Models Vol. I.
CRC Press, Boca Raton, FL, USA, pp. 204±241.
X. Pan et al. / Agricultural Systems 63 (2000) 33±47
47
Lemmon, H., Chuk, N., 1998. CottonPlus: A Cotton Crop Model and Expert System to Support OnFarm Management. I. Theory and Equations of the Crop Model (http://home.earthlink.net/lemmon/
_private/papers/thry.htm).
Lemmon, H., Chuk, N., Reddy, V., Acock, B., Pachepsky, Y. 1997. Sigma Plus: A Cotton Crop Model.
The 27th Crop Simulation Workshop, Gainesville, FL.
Marani, A., 1996. CALGOS Cotton Simulation Model (http://asset.arsusda.gov/ WMRL/calgos.html).
Marani, A., Phene, C.J., 1993. ABSTRACT. CALGOS Ð a model of irrigated cotton. Agronomy
Abstracts, 1993 Annual Meetings, 7±12 November, Cincinnati, OH
McKinion, J.M., Baker, D.N., Hesketh, J.D., Jones, J.W., 1975. SIMCOT II: A Simulation of Cotton
Growth and Yield. USDA, ARS, Southern Series Bull. ARS S-52, 27±82.
Mutsaers, H.J.W., 1984. KUTUN: a morphogenetic model for cotton (Gossypium hirsutum L.). Agricultural Systems 14, 229±257.
Pan, X., 1997. Modeling Degree Day Eects on Plant Leaf and Internode Phenological Events. MSc.
thesis, University of Illinois, Urbana-Champaign, IL, USA.
Pan, X., Hesketh, J.D., Huck, M.G., 1997. PHENAPP: A Java Applet and Application for Plant Phenological Events. The 27th Crop Simulation Workshop, Gainesville, FL, USA
Pan, X., Begonia, G.B., Hesketh, J.D., 1998a. Quantifying Crop-Weed Competition (http://th19050.agn.uiuc.edu/).
Pan, X., Hesketh, J.D., Huck, M.G., 1998b. A database for scaling up from the leaf to the canopy.
PHOTOSYNTHETICA 35 (3), 329±334.
Pan, X., Hesketh, J.D., Huck, M.G., 1998c. A Web interface to databases associated with a plant simulator. Computers and Electronics in Agriculture 21 (3), 207±217.
Reddy, K.R., Hodges, H.F., McKinion, J.M., 1997. Crop modeling and applications: a cotton example.
In: Advances in Agronomy Vol. 59. Academic Press, pp. 225±290.
Ritchie, J.T., 1972. Model predicting evaporation from a row crop with incomplete cover. Water
Resources Research 8, 204±1213.
Ritchie, J.T., Godwin, D.C., Otter-Nacke, S., 1985. CERES-Wheat: A Simulation Model of Wheat
Growth and Development. Texas A&M University Press, College Station, TX, USA.
Sridharan, P., 1997. Advanced Java Networking. Prentice Hall, Upper Saddle River, NJ, USA.
Symantec, 1997. Visual Cafe for Java 2.0. Database Development. Symantec, Cupertino, CA, USA.
Thornley, J.H.M., Johnson, I.R., 1990. Plant and Crop Modelling: A Mathematical Approach to Plant
and Crop Physiology. Oxford Sci. Clarendon Press, Oxford.