;This is a water conductivity file, a comma separated ASCII text file ;A semicolon starts a command line ;Offset is the distance between the conductivity meter and first ;electrode in meters Offset=17.0 ;date, time, WaterRes(ohm-m) 2005-03-04, 18:00:18, 0.315822053 2005-03-04, 18:00:48, 0.315059762 2005-03-04, 18:01:18, 0.314602132 2005-03-04, 18:01:48, 0.315970342The process of preparing the YSI 600 XLM data for use with the resistivity processing was rather lengthy. The YSI data needed to be related to the resistivity data based on time. First, the raw YSI data were separated by day of acquisition into separate worksheets. Then a new column was added to reflect UTC time by adding 4 hours to the YSI time (local time).
BEGIN { FS="," } { FS="," if ((NR != 1) && ($4 != 0)) { resyear=2010 resmonth=substr($2,3,2) resday=substr($2,1,2) restime=$1 reshr=substr($1,1,2) resmin=substr($1,3,2) ressec=substr($1,5,2) ohms= $4 outfile=$3 "_water.confmt" printf("%s-%02d-%02d, %02d:%02d:%02d, %s\n",resyear, resmonth,resday, reshr, >resmin, ressec, ohms) >> outfile } }
files=`ls *.confmt | cut -d. -f1` for file in $files do awk -f addoffset $file.confmt > $file.con doneThe AWK script addoffset:
{ if (NR==1) { printf("Offset=17.6\n") } print $0 }For April 15 data, the offset value was changed form 17.6 to 16.0.