Agronomy Journal Grow Your Career With ASA
HOME HELP FEEDBACK SUBSCRIPTIONS ARCHIVE SEARCH TABLE OF CONTENTS
 QUICK SEARCH:   [advanced]


     


Published online 5 September 2006
Published in Agron J 98:1312-1317 (2006)
DOI: 10.2134/agronj2005.0210
© 2006 American Society of Agronomy
677 S. Segoe Rd., Madison, WI 53711 USA
This Article
Right arrow Abstract Freely available
Right arrow Figures Only
Right arrow Full Text (PDF) Free
Right arrow Alert me when this article is cited
Right arrow Alert me if a correction is posted
Services
Right arrow Similar articles in this journal
Right arrow Similar articles in ISI Web of Science
Right arrow Alert me to new issues of the journal
Right arrow Download to citation manager
Right arrow reprints & permissions
Citing Articles
Right arrow Citing Articles via HighWire
Right arrow Citing Articles via ISI Web of Science (1)
Right arrow Citing Articles via Google Scholar
Google Scholar
Right arrow Articles by Carlini, L.
Right arrow Articles by Donatelli, M.
Right arrow Search for Related Content
PubMed
Right arrow Articles by Carlini, L.
Right arrow Articles by Donatelli, M.
Agricola
Right arrow Articles by Carlini, L.
Right arrow Articles by Donatelli, M.
Related Collections
Right arrow Agroclimatology
Right arrow Software

Software

A Library to Generate Synthetic Precipitation Data

Laura Carlini, Gianni Bellocchi and Marcello Donatelli*

Agriculture Research Council (Research Institute for Industrial Crops), Via di Corticella 133, 40128 Bologna, Italy

* Corresponding author (m.donatelli{at}isci.it)

Received for publication July 15, 2005.

    ABSTRACT
 TOP
 ABSTRACT
 INTRODUCTION
 RAINFALL GENERATION APPROACHES
 APPLICATION AND AVAILABILITY
 CONCLUSIONS
 REFERENCES
 
A critical issue in biophysical modeling projects is to develop a set of reusable libraries to support the development of future applications. This is true for weather modeling as well. Rain is a software component providing a collection of stochastic approaches to generate precipitation data on daily and subdaily time steps. Synthetic data generated on a daily time step consists of precipitation occurrence and amount. Subdaily generation includes time of peak, peak intensity, storm arrival, and duration. The software design allows for extension of the models implemented without recompiling the component. The component, inclusive of a hypertext help file and of documentation generated from source code comments, has been released as compiled .NET and Java versions, allowing application development in either programming environment. Illustrative examples of Windows-based applications using Rain are provided as source code. A sample web service and a web application were also developed as possible use of the component.


    INTRODUCTION
 TOP
 ABSTRACT
 INTRODUCTION
 RAINFALL GENERATION APPROACHES
 APPLICATION AND AVAILABILITY
 CONCLUSIONS
 REFERENCES
 
LONG SEQUENCES of daily rainfall are increasingly required for driving many climate change and environmentally sensitive projects (Mearns et al., 1997; Bellocchi et al., 2004; Rivington et al., 2006). In particular, the availability of extended precipitation data is essential in the design and operation of hydrological and natural systems to quantify the uncertainty resulting from climatic variability. Most of projects focus on the daily time scale, as required by many impact models (e.g., hydrological and crop models). The shift of focus to deal with complex problems such as rainfall-related pollution effects, runoff-induced wash-off from impermeable surfaces, soil water infiltration, and rainfall-related soil erosion indicate the added uncertainties of the outcomes if high-resolution rainfall data are not available (Sivakumar et al., 2001). In such cases, methods should be available for reliably converting daily rainfall into breakpoint format (hourly or finer time resolution).

Unlimited sequences of weather variables, including rainfall, can be artificially produced through a stochastic process that preserves the statistical characteristics of the actual data as they naturally occur for a site (e.g., Wilks and Wilby, 1999; Srikanthan and McMahon, 2001). Usually, precipitation sequences are generated first, and other data sequences are derived using relationships between these data and precipitation, with different relationships used for wet and dry days (Richardson, 1981). Precipitation is commonly divided into an occurrence process (i.e., whether the day is wet or dry) modeled as a Markov chain, and an amount process (the amount of precipitation on a wet day) sampled randomly from an appropriate distribution. By using different random seeds, a large number of sequences can be generated, all of which have the same statistical properties as the original data used to parameterize the generator. These methods are implemented into software tools usually called weather generators. One of the first weather generators developed for rural water quality modeling purposes was WGEN (Richardson and Wright, 1984). Numerous other weather generators have developed since then, such as USCLIMATE (Johnson et al., 1996), Climak (Danuso, 2002), and ClimGen (Stöckle et al., 2001), largely based on the generation methods used in WGEN. Cligen, the weather generator originally developed by Nicks and Gander (1994) and incorporated within the WEPP (Water Erosion Prediction Project) model (Flanagan and Nearing, 1995), adds the capability of generating rainfall intensity and duration data necessary for the Green–Ampt infiltration model (Green and Ampt, 1911), which is the basis of many hydrologic and soil loss calculation models.

All such approaches illustrate that there is actually an abundance of solutions to the basic problem of generating rainfall data, coded in a variety of ways within ready-to-use, user-oriented tools. Because of the statistically based approach supporting the above models (that is data dependency of the solution), it may be necessary to compare different generation methods to provide reliable rainfall variables for case-specific applications. This requires the reimplementation of model approaches in new software applications.

A proper software design, targeted at achieving an intrinsic reusability of software units, can lead to sharing knowledge in an immediately reusable form. Several studies have been recently published (Acock et al., 1999; Rossiter and Riha, 1999; Donatelli et al., 2003; Fila et al., 2003; Mi et al., 2003), mostly designing reusable dynamic link libraries within the COM (Component Object Model) technology of Windows (www.microsoft.com/com; verified 10 July 2006). Component-oriented programming, which combines object-oriented and modular features, is becoming the leading methodology in developing systems in a variety of domains, including agro-ecological modeling (Argent, 2004). A component is a discrete unit of software, with explicit dependencies, developed for composition by third parties (Szypersky et al., 2002). The component development paradigm is to make the construction of software as a matter of plugging together independent components. This requires an environment that addresses the communication issues of component interactions. The platform-independent Java language (http://java.sun.com; verified 10 July 2006) and the .NET technology of Windows (www.microsoft.com/net; verified 10 July 2006) have now emerged with the aim to support interoperability between different components and therefore facilitate their integration process.

The same weather generation could be most efficiently addressed by amalgamating currently existing models into a component-based approach. Component-oriented tools are already available for producing synthetic solar radiation (Donatelli et al., 2006b) and evapotranspiration data (Donatelli et al., 2006a). To the best of our knowledge, component-based development has not been previously addressed for rainfall generation. We have implemented well-known rainfall generation approaches into a software component (Rain). The procedures implemented in the component, the scientific background, and some principles of usage are extensively illustrated in a hypertext help file.


    RAINFALL GENERATION APPROACHES
 TOP
 ABSTRACT
 INTRODUCTION
 RAINFALL GENERATION APPROACHES
 APPLICATION AND AVAILABILITY
 CONCLUSIONS
 REFERENCES
 
A stochastic modeling system is included to model a number of approaches approximating rain generation at various time scales (Fig. 1 ). A brief description of the approaches implemented follows.


Figure 1
View larger version (21K):
[in this window]
[in a new window]
 
Fig.1. Overall diagram of Rain features.

 
Daily Precipitation Occurrence
Most of the approaches assume the occurrence of wet or dry days to be a stochastic process, represented by a first-order Markov chain as described by Nicks et al. (1990). The transition from one state (dry or wet) to the other (wet or dry) is governed by transition probabilities, as characterized monthly by analyzing historic long-term daily precipitation data or monthly summaries for the site. The state at day i is simulated by a Markov process:

Formula 1[1]
where P is the transition probability matrix whose elements pi|j are defined by

Formula 2[2]
and S1 is the state of the first day of the generated sequence (conventionally assumed to be dry).

Alternatively, a multistate transition Markov-chain model can be used. According to Srikanthan and Chiew (2003), the daily precipitation amounts are divided into a number of up to seven states—dry, or wet from 1 (lowest level of rainfall) to 6 (highest level of rainfall).

Daily Precipitation Amount
On days when precipitation is determined to occur, the precipitation amount is generated by sampling from alternative probability distribution functions (Table 1). Most approaches are based on the two-state transition for dry–wet days (discussed above). The gamma distribution was even used by Srikanthan and Chiew (2003) to model precipitation amounts for the last state (highest level of rainfall) in the multistate transition probability matrix, while linear distribution was applied for the other states. The pattern of gamma plus linear distribution across various occurrence states exhibits a combined J-shaped function.


View this table:
[in this window]
[in a new window]
 
Table 1. Probability density functions alternatively used to sample daily precipitation in two-state and multistate dry–wet transition models.

 
Subdaily Generation
Short-time rainfall data are generated by disaggregating daily rainfall into a number of events, then deriving the characteristics (amount, duration, and starting time) for each event. Four approaches have been implemented to disaggregate daily amounts into 6-h or shorter resolution (as small as 10 min) amounts (Table 2).


View this table:
[in this window]
[in a new window]
 
Table 2. Main features of alternative subdaily precipitation models.

 
The method described by Arnold and Williams (1989) targets at 0.5-h time resolution and assumes that daily rainfall falls in only one event (event separation period of <30 min). The peak location is generated first according to a broken linear distribution. The other 0.5-h amounts are generated from an exponential distribution and relocated on both sides of the peak.

The other methods are more flexible and able to capture bursts of storm occurring discontinuously during the day. In the approach by Meteotest (2003), an autoregressive process and a Gaussian daily profile model have been combined to simulate the possibility of precipitation at any hour.

Two options are available to generate subdaily precipitation events at varying time steps. The cascade-based disaggregation from Olsson (1998) brings about the breakup of a time interval into two equally sized subintervals. The total amount is redistributed into two quantities according to two multiplicative weights from a uniform distribution: 24-h rain into two 12-h amounts, 12-h rain into 6-h amounts, and so on until 1.5-h resolution is achieved.

The approach by Connolly et al. (1998) allows disaggregation of daily rainfall into multiple events on a day, and the simulation of time-varying intensity within each event: (i) distinct storms are assumed to be independent random variables from a Poisson distribution, (ii) the storm origins arrive according to a beta distribution, (iii) storms terminate after a time that is simulated by a simplified gamma distribution, (iv) each storm intensity is a random value exponentially distributed, (v) time from the beginning of the event to peak intensity is given by an exponential function, (vi) peak storm intensity for each event is determined from an exponential function, and (vii) internal storm intensities are represented with a double exponential function.


    APPLICATION AND AVAILABILITY
 TOP
 ABSTRACT
 INTRODUCTION
 RAINFALL GENERATION APPROACHES
 APPLICATION AND AVAILABILITY
 CONCLUSIONS
 REFERENCES
 
Input and Outputs
The outputs that may be produced by Rain are listed in Table 3. The inputs required are listed in Table 4 (variables) and Table 5 (parameters). The MCE (Model Component Explorer, www.sipeaa.it/ASP/ASP2/utils.asp; verified 10 July 2006) is a Windows application that can be used to discover what models (strategies) are available, and for each of them, what the parameters, inputs, and outputs are. Also, given the list of outputs that can be produced by the component, the application shows which strategies estimate a selected output. Finally, the application allows exploration of the allowed range of variation of both variables and parameters of Rain; such ranges are also useful in implementing the test of pre- and postconditions, as discussed below.


View this table:
[in this window]
[in a new window]
 
Table 3. Rain output variables and their identification number (ID).

 

View this table:
[in this window]
[in a new window]
 
Table 4. Rain input variables and the outputs calculated using each input (ouput ID as from Table 3).

 

View this table:
[in this window]
[in a new window]
 
Table 5. Rain input parameters and the outputs calculated using each input (output ID as from Table 3).

 
Model Component Architecture
Implementation of model components separates the model equation component interface and its implementations into different software units as shown in Fig. 2 . This design feature allows concurrent development of both components and clients, and makes it possible to define units of reusability—model component implementations and model component interfaces—and units of interchangeability—model component implementations alone (Rizzoli et al., 2005). The units CRA.clima.rain.interfaces.dll and CRA.clima.rain.dll are the units of reusability, whereas CRA.clima.rain.dll is the unit of interchangeability. Both are needed to develop a new application based on a client server architecture.


Figure 2
View larger version (35K):
[in this window]
[in a new window]
 
Fig. 2. Component diagram of Rain.

 
The use of the component API is based on one method (function) only, Estimate(), as shown in Fig. 2. The caller passes by reference (i.e., it passes a pointer) to an instance of the class RainData, which is an input–output object. Also, it passes an instance of the model (strategy) class that must be used. After the call, the output is available. By using the MCE described above (the information is provided also in the documentation), the programmer of the client knows what parameters and inputs are needed for a given model and what its output is. Example code on how to do this is provided both in the documentation and in the example applications.

Sample Applications
The C# code (running under the Windows .NET platform) of two sample applications is provided with the installation package. They are illustrative of either using the component by calling some of the public methods available, or extending the modeling system. A web service and a web application have been developed as well, and the relevant C# code made available at www.sipeaa.it/tools (verified 10 June 2006).

Extending Models
The developer of an application that uses the component Rain may wish to make available to end users one or more approaches for generating daily and subdaily precipitation data. This can be done taking advantage of the Rain component architecture, using the design pattern "strategy" (Mesketer, 2004). The key feature is that such added models can be implemented by clients without the need of recompiling the component and still using the services provided (test of pre- and postconditions, see below).

The Design-by-Contract Approach
The design-by-contract approach (Meyer, 1997) requires preconditions (in this case input values within a given range, e.g., daily precipitation ≥ 0). While implementing the design-by-contract approach has an impact on quality aspects and the speed of software development, it also adds explicit knowledge to both the system being modeled and the models implemented. Also, setting preconditions allows an easier development of "unit tests," that is, numerical tests performed on each method implemented (the tests performed during model development are also reported in the help file) by narrowing the range of the tests (unit tests run during the development phase are provided in the help file).

Rain implements options to deal with input data violating preconditions, and to check postconditions by making use of the component Preconditions (www.sipeaa.it/tools). The output of pre- and postconditions tests can be directed to the screen, to an ASCII file, to an XML file, or to a custom-developed output (via an implementation of the design pattern strategy in the component Preconditions). If preconditions are violated, exceptions may occur. Rain includes exception handling, both preventing the application from crashing, and providing the user with information about the type and location of the exception.

Availability and Support
The component Rain is freely distributed to nonprofit users through the web site www.sipeaa.it/tools. The installation includes the compiled component, the source code of sample applications, and model and code help files. Requests about Rain can be sent to agronomy@isci.it.


    CONCLUSIONS
 TOP
 ABSTRACT
 INTRODUCTION
 RAINFALL GENERATION APPROACHES
 APPLICATION AND AVAILABILITY
 CONCLUSIONS
 REFERENCES
 
The overall objective of this research was to illustrate the development of a component in the context of weather generation. The precipitation generator Rain can be used in all weather generators with component-oriented programming. In particular, Rain is one of the units to be primarily used as subcomponent within a componentized weather generator, CLIMA (Donatelli et al., 2005), that includes utility components to estimate parameters, evaluate or estimate missing data in time series, and provide data at run time for use in simulation frameworks. The applicability of Rain is, however, more general, as its architecture separates the domain model, data management, and user interface. Therefore, the modeler can integrate the generation system of Rain into several software tools. Its design, rather than being targeted to a use in a specific modeling framework, intrinsically promotes reusability by limiting dependencies, by specifying interfaces, and by encapsulating the solution of a modeling problem in a discrete software unit.


    ACKNOWLEDGMENTS
 
This publication has been cofunded under the SEAMLESS integrated project, EU 6th Framework Programme for Research, Technological Development and Demonstration, Priority 1.1.6.3. Global Change and Ecosystems (European Commission, DG Research, Contract no. 010036-2), and under the project SIPEAA, Italian Ministry of Agricultural and Forestry Policies, Paper no. 31.


    REFERENCES
 TOP
 ABSTRACT
 INTRODUCTION
 RAINFALL GENERATION APPROACHES
 APPLICATION AND AVAILABILITY
 CONCLUSIONS
 REFERENCES
 




This article has been cited by other articles:


Home page
Agron. J.Home page
J. L. Steiner and J. L. Hatfield
Winds of Change: A Century of Agroclimate Research
Agron. J., May 7, 2008; 100(Supplement_3): S-132 - S-152.
[Abstract] [Full Text] [PDF]


This Article
Right arrow Abstract Freely available
Right arrow Figures Only
Right arrow Full Text (PDF) Free
Right arrow Alert me when this article is cited
Right arrow Alert me if a correction is posted
Services
Right arrow Similar articles in this journal
Right arrow Similar articles in ISI Web of Science
Right arrow Alert me to new issues of the journal
Right arrow Download to citation manager
Right arrow reprints & permissions
Citing Articles
Right arrow Citing Articles via HighWire
Right arrow Citing Articles via ISI Web of Science (1)
Right arrow Citing Articles via Google Scholar
Google Scholar
Right arrow Articles by Carlini, L.
Right arrow Articles by Donatelli, M.
Right arrow Search for Related Content
PubMed
Right arrow Articles by Carlini, L.
Right arrow Articles by Donatelli, M.
Agricola
Right arrow Articles by Carlini, L.
Right arrow Articles by Donatelli, M.
Related Collections
Right arrow Agroclimatology
Right arrow Software


HOME HELP FEEDBACK SUBSCRIPTIONS ARCHIVE SEARCH TABLE OF CONTENTS
The SCI Journals Crop Science Vadose Zone Journal
Journal of Natural Resources
and Life Sciences Education
Soil Science Society of America Journal
Journal of Plant Registrations Journal of
Environmental Quality
The Plant Genome