In order to develop specific class diagrams for individual models, each participating class in the template is populated with attributes and methods representing the model-specific input requirements and processes. This structure clearly shows the model data input requirements and the processes represented and can be used to organize code. Figure 10-5 represents a class diagrams for a water-balance model developed by Ritchie [Rit98]. Ritchie's model requires certain weather data, such as rainfall, solar radiation, and minimum and maximum temperature; therefore, class Weather has been provided with the attributes to store those corresponding values. Class Weather is provided with a method named calculatePriestleyTaylorET, which is used to calculate reference ET. Depending on the method used, calculation of actual évapotranspiration may involve weather, soil, and plant data. Therefore, class SoilPlantAtmosphere has links to Weather, Soil, and Plant classes. Reference ET is calculated solely from weather data; this provides a basis for the estimate of évapotranspiration. This reference ET, is normally then modified to determine the actual évapotranspiration. Actual ET is determined by the crop characteristics and by the soil moisture content. Different crops have different water requirements, which vary temporally, and the actual amount of water that can be physically removed from the soil is limited by the amount of water actually stored in the soil. Methods of calculating actual ET from reference ET may use crop information, soil data, or both. Therefore, it is necessary for class SoilPlantAtmosphere to have relationships with classes Cell, Weather, and Plant to access to all these data. Unlike estimates of actual ET, reference ET calculations, such as the method calculatePriestleyTaylorET in Figure 10-5, were assigned to class Weather.
Reference ET is determined solely from weather data and represents potential évapotranspiration rates based on weather conditions, rather than any processes occurring in the plant or soil or interactions between the two. Online weather systems, like the Florida Automated Weather Network (FAWN) [BJ98] or MetBroker [LKN02], sometimes provide already-calculated reference ET values. If these systems are used, reference ET could be imported from the data provider system.
The class SoilPlantAtmosphere is provided with behavior to determine the water loss through evaporation and transpiration. Ritchie's model separates these processes, considering evaporation and transpiration separately. Therefore, class SoilPlantAtmosphere is provided with two methods: calculateSoilEvaporation and calculateTranspiration. Soil evaporation and transpiration are calculated using soil moisture data and leaf area index is required in the calculation of transpiration.
Ritchie's model considers the soil profile as consisting of a number of layers and allows the representation of numerous layers in the simulation. Thus, the multiplicity of the association composedOf between classes SoilProfile and SoilLayer is one-to-one-or-many. This model requires a great number of layer data and it calculates many layer-related processes because the water movement into and out of layers is considered and modeling of water use is detailed, being partitioned between layers. Processes and attributes pertaining to the profile as a whole are assigned to class SoilProfile. Ritchie's model uses a whole-profile drainage coefficient stored in the attribute drainageCoefficient.
Class Cell is provided with data and behavior to calculate the amount of water that enters the soil surface. Ritchie's model uses The United States Soil Conservation Service (SCS) to determine run off and, in turn, calculate the infiltration amount. Therefore, class Cell is provided with attributes runoffCurveNumberSCS, soilSurfaceA Ibedo, and I im itFirtsStageSo il Evaporation and methods calculateRunoff calculatelnfiltration, and calculateAlbedo. Ritchie's model uses the depth of the groundwater layer; therefore, class Groundwater is created and provided with the attribute depth to store the corresponding value.
Was this article helpful?