ABSTRACT

This chapter introduces the gawk programming language and uses it to pre-process an environmental data set. It explores how gawk can be used to reformat a particular data set so that it can be visualized in gnuplot. The ability to manipulate data is an important part of the environmental modeling process, and not only within the model itself. Where a model requires input values, for instance, the data must be presented in a form that the model can handle. Specifically, several columns of data were removed to reduce the size of the data sets, and the date and time information was reformatted to conform to the International Organization for Standardization 8610:2004 standard. The first thing that one might wish to do with the file rain98le.dat is to examine its contents on the computer screen. The gawk utility applies the “rules” specified in the program to the data contained in the file named on the command line rain98le.dat.