The keydata section of the readings screen can be used to manually record and display data collected in the field. For example, plant height, fruit size, and pan evaporation could all be recorded and displayed. But in addition, functions (or formulas) can also be entered that will calculate and display a result based on other data.
Functions can be used either as keydata items in individual sites, or as global functions.
A keydata function will only calculate during an update of the readings screen, but the data will then be recorded and displayed. Keydata functions are entered as keydata items on. If a keydata function is entered or changed users must make sure the whole of the spreadsheet is updated, and not just the latest readings.
Global functions are the same as keydata functions, but can apply to all readings screens (below the keydata section), time graphs and readings reports.
For example, if a user wants to include data from
on every time graph, then the function
should be entered as a global function. A global function will calculate the result as the
data is displayed on the screen, or is printed or graphed. The results are not recorded.
The advantage of a global function is that it need be entered once only, but can be
applied to all readings screens.
Global functions are entered on
COTTON.GLB is supplied with the software.
A function can have only one (1) or two (2) terms. For example, if a keydata item
Pan had been used to manually record pan
evaporation data, then:
||will divide Probe DWU by pan evaporation|
The software decides that a keydata item is a function (rather than user entered data),
by looking at the first character. If it is a
@, then it assumes it is a function and attempts to work out what it
If it is
it looks for the next
/, checks for
valid keydata items, and calculates the result.
If it is an
@, it checks for a valid @function
name, checks inside the brackets for a valid keydata item(s), and calculates the result.
Functions can be entered in UPPER or lower case. The software looks at items in the following sequence:
1 Searches down the left hand column of the current site readings screen, starting with
Date, Time, 20cm ... ProbeDWU,Est DWU,.etc. If it finds a match, it knows that the value from that
row of the spreadsheet is required. The actual value used will be from the corresponding
column, or date, in the spreadsheet.
2 It then checks to see if a site constant.has been entered These are:
||planting date from|
||either Global DWU, or from(see site standard DWU below)|
||Full point from readings screen|
||Refill point from readings screen|
These reserved words will return the corresponding value. For example:
||water available in Root Zone 1|
4 It then checks to see if a number has been entered . For example:
||deficit divided by 2.54|
3 It then checks for a file name, by looking for the
. before the file name extension. It assumes that it is a file in
DWU format, and will load that file and calculate the DWU on the corresponding date. The
DWU file is day-of-year (1st June is day 182), so the date is converted to day-of-year.
||dwu from this file, on this date|
The following @functions, with examples, are available.
||add (vertically) all values in the range from the
||average VSW from 20-60 cm|
||count the number of valid data items|
||the rate of change of soil moisture at the 20 cm level.(the differential of the values in the 20cm row)|
||the cumulative water use of the crop (the integral against time of the values in the ProbeDWU row, starting at the planting date)|
||Smoothing of ProbeDWU, using a digital filter factor of 0.1. By changing the factor between 0-1, different degrees of smoothing will be obtained.|
:), but a global function
code is entered on . A
keydata function will default to format code 9 (general format) if a code is not entered.
For example, a keydata item:
||calculate days-since-planting, with display to the nearest day|
||0 decimal places|
||1 decimal place|
||2-7 decimal places|
||numeric, but general format (display to any accuracy)|
||DWU (mm/day etc)|
||Amount (Rainfall, mm etc)|
||Area (Ha etc)|
||Volume (Irrigation water applied, Ml etc)|
||Moisture (VSW% etc)|
||Root Zone (0-70cm etc)|
||Date (d/m/y etc)|
||Depth (50 cm etc)|
Where etc indicates that the displayed value will be depend on the preferences settings.
The Global DWU (GDWU) is calculated from a file set in. However, individual sites can have their own, local, GDWU. If a DWU file name is entered at , then the GDWU for that site will be calculated from the data in this file instead of the GlobalDWU. For example:
will calculate the GDWU for this site from the DWU data in
In later versions of the software this value will be called Site Standard DWU, but in addition it will become a full function, allowing for field compaction affecting standard DWU data.
The horizontal axis of the time graph is normally set to
However, it can also be set to any other keydata item. For example, if plant
height and number of
nodes had been recorded,
Horizontal axis: HEIGHT
will plot, if
is the selected item, a cross-correlation graph showing the relationship between plant
height and number of nodes.
Another example (if a global function of
+DATE-PDATE had been entered, to calculate days-since-planting) would be:
Horizontal Axis: +DATE-PDATE
which will plot horizontally days-since-planting, rather than actual date. If an
overlaid time graph report is generated, with the horizontal axis set to
+DATE-PDATE, then a time graph will be drawn that has
data from different sites plotted on the same graph, but the horizontal axis will be
days-since-planting, rather than the actual date. The graphs will therefore be
synchronised to days-since-planting, irrespective of the actual planting date, or even if
data is being compared from one year to the next..
Note that the formatting code after the
: is only required for keydata functions - it needs to be entered
separately for a global function.
||cumulative water use|
||copy ProbeDWU, possibly for later adjustments|
||DWU from file, in preferences units|
||days-since-planting, to nearest day|
||calculate the ratio of Probe DWU and pan evaporation. This ratio gives an indication of the relative water use efficiency of the crop.|
||calculate the rate of growth of the crop. If this is graphed against 0-70cm soil water content, growers can display the relationship between crop photo-synthesis and water supply.|
||calculate the total water use of the crop to date. Maize growers are finding that this function, when compared with cumulative evaporation pan data, is giving a good predictor of total crop yield.|
||calculate the ratio between the DWU of the current crop, and the long term
average DWU of cotton, from the file
The software can get confused when working out what the formula means.
Consider, for example:
is interpreted to mean
70 , and
the function will not work.
But, because the software analyses from left to right, the following function will work:
amount available in Root Zone 1
There are some additional problems with global functions, caused because the values are
being calculated each time the data is displayed. The problems occur when using
refer to other global function results (and not to data in the actual readings screen),
because the values from previous dates or other rows are required to calculate
This global function will not work:
||total water used by crop|
because the accumulating total water used is not available to the
@CUM() cannot be used, and
@RATE() will work only if it
refers to an item on the readings screen, and not an item on the global screen itself.
The functions and formulas have been developed in close consultation with users of the software. Some of the problems and future developments outlined above are being addressed, and will be included in future releases of the software. Research Services New England would be be pleased to hear about any errors, faults or suggestions for future developments to keydata or global functions