• Keine Ergebnisse gefunden

The Graphical User Interface (GUI)

4 The shell program NEXUS

4.1 The Graphical User Interface (GUI)

As part of the initial project, a set of four programs has been written: NEXUS, HYDRO, MIR and MuSc. The last three programs were developed originally by Jean Dauzat at the CIRAD, France. However, it was necessary to make some changes to the existing programs to grant a better compatibility with other programs. The parameterisation of these programs was made for Coffea arabica (RAPIDEL, 1995) and was included within the code, so that every new parameterisation leads to a great amount of rewriting and fitting the programs anew.

Furthermore, the programs were written procedurally. For reasons mentioned above, object oriented versions of the programs were necessary. There are two sets of programs. The first set contains text versions of the programs with very simple interfaces. These programs are provided for machines without x-server support and will not be maintained in the future.

The second set was programmed using the graphic support of Qt for XWindows applications.

All four programs were written following the same scheme, which provides a similar graphical interface as the one used by KDevelop. Each program can be started individually and each supports a set of command line parameters for facilitating its use. And all programs can be started using the interface included in NEXUS. Figure 4-2 shows the general graphical user interface (GUI). The GUI contains standard menu and tool bars for file management, data editing and for specific characteristics of each application. Each program contains a project window, which allows a better control of information flow. In this project window the

used files are shown following the classification similar to that of AMAP: image files, radiation files, linetree files containing the architecture and topological information of the trees (lig, arc and dta files), meteorological data, scene files (sce, scn and scu files) and result tables. The format of these files has been explained in section 3.2. On the right of the project window is an editor window. By double clicking on an item in the project window, the respective editor (text, table or dialog) is opened in this window. The only exception is the graphical view tool which works as an own application. Some items in the project cannot be edited, because it is not reasonable to do so, e.g. linetree files. The last window situated at the bottom of the application is an output window. Any temporal results, runtime messages and error warnings are written into this window. This window is not editable.

Figure 4-2: Generic graphical user interface (GUI) in the NEXUS project. 1) Project window.

2) Editor window. 3) Output window. 4) Menu and tool bars.

The most important menu items in NEXUS are:

The view menu. This menu provides some options for the optical appearance of the GUI and gives access to the configuration and species files. The content of the configuration and species files appears as a list in the editor window. By double clicking an

item a small input dialog appears. After changing any values the file can be saved. In the actual version, the name of these files cannot be changed by the user.

The windows menu. After opening an item into the editor window, existing windows remain open and can be selected using this menu.

The Growth Engines menu. With this menu the user can select the growth engine to be used. With the item “Start Growth Engine” a menu appears and parameters for running the growth engine can be selected.

The actual version supports only GROGRA and AMAP. However, AMAP cannot be started using a socket. A socket is a data transfer channel that can be used for the run-time exchange of information between two or more programs. The channel is a FIFO (first in-first out) stream. The data transfer can be unidirectional or multidirectional. In Figure 3-16 the GROGRA calling dialog is shown. For details about the command line parameters of GROGRA see KURTH, 1999.

The hydrology menu. In this menu the user can select between HYDRO and HYDRA as the main hydrology sub-model. A third possibility is combining both models to get the more exact transpiration and assimilation values from HYDRO and the water flow model from HYDRA.

The command line form for HYDRO is qhydro [-h] [-s <name>] [-p <name>] [-m <name>]

[-msc <name>] [-psi <float>] [-r <float>]. With:

-h, --help print a small help text -s, --scu <name> set the name of the .scu file -p, --plant <name> set the generic plant name -msc <name> set the name of the msc file -psi <float> set the soil water potential

-r, --root <float> set the hydraulic resistance of roots

The micrometeorology menu. In this menu the user can select and start both light sub-models MIR and MuSc. These models were designed as part of a model chain (see 2.1.4.1) and it is recommended to run MIR before running MuSc, otherwise the results can be unpredictable. Again, after

selecting an item an input dialog appears, where the user can directly select the command line parameters.

The command line form for MIR is qmir [-h] [-s <name>] [-p <name>] [-t <0-46>] [-l

<int>] [-o <0-4>]. With:

-h, --help print a small help text -s, --scu <name> set the name of the .scu file

-p, --XPM <name> set the name of the .xpm file for graphic results -t, --turtle <0-46> set the turtle sector to be calculated. 46 means all

sectors are calculated

-l, --limits set the limiting option to create small scenes -o, --output <0-4> set the output modus

These parameters can be also selected after starting MIR.

Figure 4-3: Parameter dialog of QMIR. The parameters can be selected directly in the command line. This dialog is also used in NEXUS to create the command line of MIR.

The command line form for MuSc is qmusc [-p <name>] [-l <int>] [-s <int>]. With:

-h, --help print a small help text

-p, --prb <name> set the name of the generic prb file name -l, --leaves <float> scattering coefficient of leaves

-s, --soil <float> reflexion coefficient of the soil

The tool menu. This menu contains different items for each application.

The general items are a graphical view application, a table editor, and a text editor. With the graphical view application the user can load the output graphics, make minor modifications like changing colours, setting

a monochromatic view, changing size etc., save and convert the graphics to other formats.

Formats available are: bpm, jpeg, pbm, pgm, png, ppm, xbm and xpm. The standard format is xpm. This application is based on a standard graphics tool provided by Qt using OpenGL, from DEC, IBM, Intel, Microsoft and SGI (BARTH ET AL., 1996). The scene converter is a small application for converting sce files into scn files and vice versa.

Figure 4-4: Picture generated by QMIR and viewed with the tool ViewPix. QMIR calculates the pixels that are hit by a light ray coming from an specific direction (ray tracing method). The output can follow different options. Here each plant has a different colour.

Figure 4-5: AMAP scene used to generate the picture in Figure 4–4.