Compact format

From Cybis Wiki
Jump to navigation Jump to search

Compact format was a data format created by Richard Holmes, basically to save space back in the days when space was an issue on hard disks and for archive facilities. It is a non-standard format, but is output by default in some of Richard Holmes programs (such as FMT). There are no reasons for using this format for storing data today.

In the example file below, two samples are recorded. We will discuss the first one. The first line is header/meta-data for the tree-ring measurements: 93 years, inner ring of 1898, sample ID is ZOC01A. The code (26F3.0) states that 26 measurements exist per line and the measurement is in 3.0 format, i.e 3 digits to be read as an integer value. The "-2" represents certainly the scaling factor to be used on the integers, i.e. 10-2 =0.01

One advantage of this format was that the precision was independent for each sample. One could have 2.0 or 3.0 for different cores in the same file.

CDendro (development version) can read compact format files. The file extension should be ".datc", i.e. rename it to e.g "myfile.datc". Usually such a file contains many members, i.e. it is considered to be a collection type file and should accordingly be opened through the Collections menu command in CDendro.

      93=N    1898=I ZOC01A                                          -2(26F3.0)~
280234187226177190170135184166128151159175216189174178154159163189145186264165
116204222195191171152167155162140144126227228145144165133140127124101113127 97
 98103139110 89174149128157 95126127240249193131222241221262212226147265141228
245193243255121158279147 63128 94129100189183
      75=N    1905=I RW_STD                                          -3(20F4.0)~
 976 9101152100910191153112711091072 796 993109511451115 791 897 766 836 893 984
1013 852 765 849 956 821 739 969 868 851 8681082119213641226 951116811671189 912
11001117 869 85710271232 886 993119611541113 734 90610781157 834 874 884 8931183
125810891080 8821031 93512001081 9311114 964 688 911 837 881
write(outfile,(lastyr-firstyr+1):8,'=N',firstyr:8,'=I ',sitecode);
for x := 1 to (48 - length(sitecode)) do write(outfile,' ');
writeln(outfile,'-2(',line_length,'F',format_code,'.0)~');

Pascal code used for creating Compact format in the program Convert5 This code has the scaling factor as a constant, so it works only for the first sample in the example above

Sources

The information and examples in this article is partly from a contribution by Henri D. Grissino-Mayer on the ITRDB email forum on February 1 2008.[1]

The second sample above is copied from a paper by Ed Bevilacqua showing a different scaling factor than in the first sample.[2]

Notes