OKNODE checks block counts, i.e. the number of x,y, depth triplets or x,y pairs in each block of the input file and puts the correct count in the output file, at the same time noting in the log file if the stated and actual values do not agree. Similarly, the actual total number of nodes in the input file is palced in the first record of the output file and a note placed in oknode.log if this disagrees with the number stated in the input file; the number of boundaries is checked similarly.
OKNODE will approve x,y,depth records in which only x,y are given, provided that the record for some preceding point in the same data block has an explicit depth value. For records without a depth value, the program will infer that the appropriate depth to use is the most recent depth encountered in the foregoing records in the same block. A depth, either as given in the input, or inferred as above, is written in every x,y,depth record in the output file. Absence of a depth value in the first record of a block is noted as a serious error (i.e. uncorrectable by OKNODE), since no depth value can be inferred in the absence of a preceding value.
OKNODE treats any of the following records
88 88 888 888 88. 88. 888. 888.
as a continuation header, that is a marker indicating the beginning of a new block of x,y coordinate pairs. These headers are not used in NODE format files but this feature is included in OKNODE in anticipation of future use of NODE format in place of DIGIT format, where such headers are used to indicate a breakpoint where the outer boundary changes from coastline to open sea boundary, or vice versa. The user has the option whether to preserve these continuation heaaders in the output file or not.
Apart from the above mechanical checks on the data, OKNODE performs some simple tests on the quality of the data. For example, to check whether the data is well-scaled, the difference between the maximum and minimum values of each coordinate is compared to the mean of the maximum and minimum values. When this ratio is small, then calculating the distance between neighbouring nodes is likely to be inaccurate in the single precision Trigrid code. A warning is issued in such cases to alert the user to the advisability of moving the coordinate datum closer to the domain covered by the grid.
A continuity test is also applied to the points in each block of data. If the distance between successive points is more than 10 times the average distance between points in the block, then a warning of the possible presence of an unintended discontinuity is noted in the log file.
Next: Program OKNEIGH Up: OKNODE and OKNEIGH - Previous: Introduction