INQUA Sub-Commission on Data-Handling Methods

Newsletter 15: January 1997

CNT-WIS.XLM: AN EXCEL MACRO FOR CONCATENATING POLCOUNT FILES FOR IMPORTATION INTO TILIA

Richard Telford
Institute of Earth Studies
University of Wales
Aberystwyth, UK
E-mail: rjt95@aber.ac.uk

I have recently been using POLCOUNT (Maher, 1992) for recording diatoms in cores from Ethiopia. I find the program very useful. However, combining the count files into Wisconsin format, prior to importing them into Tilia, is both time consuming and tedious as I have over 50 samples per core. With this in mind, I have written an Excel macro that performs this task. CNT-WIS.XLM is an Excel 4 macro, but it works on Microsoft Excel 7 for Windows 95. Before being used on an Apple Macintosh it might need a little editing.

POLCOUNT produces a series of output files, each beginning with a title, the number "102" and then data for 102 taxa, like the following sample:

            Mud Lake = 01-12-97
            102
            1  250 1.5 0 7 12 1 1 16 5
            0 33.5 13 172 5 3 5 10 5 1
            1 1 1 2 0 0 2 0 0 0
            0 0 0 0 0 24 11 5 153 4
            13 0 1 1 4 2 0 1 2 3
            0 0 0 0 0 7 5 2 21 38
            0 0 0 0 0 0 0 0 0 0
            0 0 0 0 0 0 0 0 0 0
            0 0 0 0 0 0 0 0 0 0
            0 0 0 0 0 0 0 0 0 0
            0 595

POLCOUNT also uses a file that contains the names of a site's taxa. It starts with a title, the number "101," and a taxon list like the following sample scrap that might be called MUDTAXA.TAX:

            Mud Lake Taxa 
            101
            Marker Grain 00 
            Taxon 01 
            Taxon 02 
             ...
            Taxon 98 
            Taxon 99 
            Sum(Taxa 01-99) 100 

Save the POLCOUNT files without any extension; you might name your Mud Lake files ML0001, ML0010, ..., ML1500 to identify both site and sample number in the file name. Put both CNT-WIS.XLM and the *.TAX file in a directory, and put copies of the data files in a sub-directory by themselves.

To combine the count files, start Excel, select "Files," and open the macro CNT-WIS.XLM. The macro will load and announce that it concatenates POLCOUNT files into the Wisconsin format, that it assumes the count files will have no extension (and that all other files will), and that to start, you should type the three-key combination Ctrl-Shift-W.

In sequence you will be asked for 1) the path to the directory with the count files, 2) the name of the taxon file, 3) the name of the site, and 4) the name of the Wisconsin- format file (with extension ".RAW") that you wish to produce.

Finally, the macro will remind you to run REMZEROS on the *.RAW file to remove the taxa that never received any counts, before importing the Wisconsin file into Tilia. Owing to the number of files the macro has to open and close, it is rather slow, taking about 3 seconds per count on my 386.

It is important to remember that only "extensionless" files that you wish to include in the Wisconsin file should be in the directory. The *.TAX file should be in the form listed above; that is: Title, 101, Markers.... The macro takes care of cutting off the first two lines and inserting the sample depth. The macro may not place all the POLCOUNT files in correct order in the *.RAW file, but that can be quickly taken care of in Tilia.

After running REMZEROS.EXE to remove unused taxa, import the *.RAW file into Tilia (Load data file, Wisconsin format). (In 1.x versions of Tilia, you may have to delete the first line (Ctrl-Y) which is the sample depths.) Then press Alt-E to edit the samples | F3 to sort | N to sort on sample number. Then save as a Tilia file. CNT-WIS.XLM and some sample data can be found in the self-extracting zipped file called CNT-WISZ.EXE in the INQUA File Boutique.

Reference.

Maher, L. J., 1992, Turn your expensive old pc into a dumb pollen counter, INQUA-Commission for the Study of the Holocene, Working Group on Data-Handling Methods Newsletter 8:24-27.


Copyright © 1997 Richard Telford
Home page
Newsletter 15 index
Author index
Subject index
WWW pages by K.D. Bennett