A FORTRAN Software Application to Decode Geographical , Lithological , Political , and Bibliographical Information from the IGBADAT International Database on Igneous Rocks

GEOLITH is a FORTRAN program designed primarily to extract and decode geographical, lithological, political, and bibliographical information from the international igneous rocks database IGBADAT. It fetches the following information: sample name, sample latitude and longitude locational coordinates, name of specimen contributor to the database, nominal field and proper rock names, name of geological unit, name and title of rock groups, name of country and province of sample, and sample cultural location. Rock group name and title and geological unit name are decoded directly by simple manipulation and translation of text strings, while other types of information utilize pneumonic representations for decoding. Users interrogate the IGBADAT (and similarly-structured databases) fully, producing a voluminous wealth of data. Output from the GEOLITH software tool is a flat ASCII text file containing the decoded information. A spreadsheet-compatible file containing the output results is also produced. The latter file is ready for inclusion into a spreadsheet like EXCEL. An error file also results from the application of the GEOLITH program.


Introduction
The geological community is provided in this paper with a simple and powerful FORTRAN software tool GEOLITH (GEOGRAPHICAL-LITHOLOGICAL).It is created for the sole purpose of retrieving geographical, lithological, political, many well-known journals of geological disciplines and other earth science publications.Yet other information resides in less known proprietary sources, such as natural resource agencies, mining companies and industrial surveys.Graduate student theses in universities also contribute such information.Some of these sources are difficult to access and may incur costs for their release into the public domain.Petrological databases like IGBADAT permit access to such compiled information and their exploitation.For example, the KAYDER database [2] [3] is a database molded along the IGBA (IGNEOUS BASE) structure and contains data of igneous rocks from Turkey.PETROS is another database on igneous rocks housed by the National Oceanographic and Atmospheric Administration (NOAA) [4].These databases host a large volume of information on igneous rocks in easily-accessible database formats.
Since the middle of the 1980's, the author embarked on a long-term campaign to develop IGBA algorithms necessary to tap the vast wealth of information housed in the IGBADAT database.The FORTRAN programs decode stratigraphic age data (STASSAGE) and chronological age data (PHASS99) [5] [6], and geographical-lithological-political-bibliographical data (GEOLITH-this study).In addition, a maintenance program-NOGAP-was developed by [7].
Other developers of such decoding programs assist in such decoding efforts [8] [9] [10] [11].These programs facilitate and enhance the visibility and popularity of the IGBADAT database and the IGBA system.They allow data mining and exploitation of the database.

The IGBA System
A brief description of the IGBA system is provided here so that readers become familiar with the nature of the IGBADAT database and the goal of the GEOLITH software program described in this contribution, The IGBA-related literature (e.g.[1] [8] [12] [13]) gives a detailed explanation of the IGBA system.
The IGBA system of igneous rocks information is an international repository of published information on igneous rocks [14].It has four components: the IGBADAT database, a companion bibliography file, a collection of FORTRAN retrieval and decoding programs, and a DECIGB library.Several maintenance programs also form parts of the IGBA system.Details of the various components are described fully in the IGBA literature [1] [12] [15] [16].The IGBA system possesses unique and proprietary structure, syntax, grammar, and vocabulary [17] [18].It utilizes pneumonic representations for many of the data types, and alphanumeric text strings manipulations for the rest of the data.
Both the IGBADAT database and the companion bibliography files are ASCII Readers are referred to [10] [17] [18] for information on the proprietary syntax, vocabulary, and grammar.In the 1990s, the IGBA system migrated to the INTERNET platform [12] [14].
The IGBA petrological database system was originally developed in the Carnegie Institution of Washington, D.C. [19], and formally published in [1].Its history is described in [15] [16] [20], which describe the design and generation of the database.
The IGBADAT database is supervised and maintained by the International The current version of the IGBADAT database contains more than 25,000 descriptions of plutonic and volcanic rocks and more than 3 million records.The bibliography file is created according to the proprietary rules of the IGBA system [18].During the creation of a bibliography file, a two-slash string (//) is automatically inserted between the three conventional elements of a reference, author, title, and source.The string also appears at the end of a reference to signal its completion.The GEOLITH program utilizes these "//" strings to parse the reference string in the database and to generate the name, title, and source strings for output.

Retrieval and Decoding Programs
Each type of information in the IGBADAT database has its specific extraction and decoding routine program.Each of these programs interfaces with the DECIGB (DECODE IGBA Library) (below) to access the corresponding library sections needed for interrogation of the database, and selection only of the requisite information.These retrieval programs operate individually in an isolated manner.

The DECIGB Library
The DECIGB library [21] [22] is an assortment of FORTRAN subroutines that are called by the retrieval programs in the previous section.This library functions in two fashions.It can be inserted in each of the retrieval programs to generate bundled and robust programs, or it compiles separately to produce an external executable module.The module links to each of the retrieval programs individually.The GEOLITH program borrows a few of the DECIGB library subroutines that are pertinent for its operation.The geographical location subroutines LCNM and LCNF are examples of such routines.The GEOLITH program inserts these subroutines in its ensemble of subroutines and compiles them together to create a stand-alone GEOLITH software application.

Maintenance Programs
The IGBA system maintenance programs are stand-alone software applications that each performs a task.A description of the types of information extracted and decoded by the GEOLITH software application follows.When subjected to the GEOLITH execution, the IGBADAT database (and similarly-structured files) yield geographical, lithological, political, and bibliographical information, and other types of ancillary information.

Geographical Information
The geographical information extracted by the GEOLITH program are locational coordinates expressed as north-south and east-west positions.Each sample in the database has a unique location position placed in the first line of each sample description.An example is 21367N 39373E, which decodes to 21.367N and 39.373E.
In addition to the Cartesian coordinates above, an optional cultural location is produced.A cultural location, if detected in a specimen description, is included in the output.It appears as an additional information tag "XL" in the "C" block of the sample description.A null output is retrieved if this tag is lacking or empty in the sample description.An example is "50 meters from the intersection of Highway 301 and Glendale Avenue".

Lithological Information
A variety of lithological information types shows as text strings in the IGBADAT database.Information appears as rock groups and rock samples within groups.
Each rock group contains one or more samples.Input files may contain more than one rock group.

Rock Group Name
A rock group name is identified by a 3-letter name located in the first three positions of the first line of each rock group.Example is "CJL".

System Specimen Name
The system specimen name of a rock specimen contains the 3-letter rock group name to which it belongs, and an appended 1-letter in position 5 of the first line of the sample description.All samples belonging to a rock group carry the same rock group name designation.An example is "CJL A".Records within each sample appear sequentially (A, B, C.) in succeeding sample lines.
Field Rock Name Each sample has a nominal field rock name and a proper rock name [23] [24] [25] [26].An example of this dual naming may be "siliceous" and "granite" or "mafic lava" and "basalt".The position of the nominal field rock name is immediately after the location coordinates in the first line of each sample.The proper rock name, on the other hand, appears at the end of the second line for each sample (i.e. the major-chemistry line).It is indicated by a 4-digit character string.

Rock Group Title
Each rock group has its title.It is a character string occupying positions 7 to 80 of the first line of each rock group identifier record.An example of a rock group title is "Southern Sinai Granitoids".
Geological Unit A geologic unit is a collection of related rock specimens forming a subgroup within a rock group.A rock group in the IGBADAT database can potentially include more than one geological unit or rock formation.Each geological unit or rock formation contains one or more samples of the same rock group.The position of a geological unit or rock formation is the last string in the first line of a sample declaration.A geologic unit in the rock group above may be "Wadi Kid Granite-Sinai".

Political Information
The political information retrieved for each sample by the GEOLITH program is a country name and a political name of a province in the country.The pointer for this information in the database is in the additional information tag "XP" in the "C" block of the specimen description.This information is optional.This tag, if recognized in the sample description, decodes to a proper country name and province in that country, according to the FIPS (Federal Information Processing Standard Publication) code [27].Examples of this dual political naming, is "EG" for Egypt and "US56" for the state of Wyoming in the USA.The pneumonic symbols for political entities are 4-character strings like "SA" or "VM37".

Bibliographical Information
Source Reference Each sample in the IGBADAT database has associated with it a literature source reference identifier.The identifier is represented by a 2-digit number pointer which leads to the position of the source reference in the reference vector line in the second line of each rock group.The GEOLITH program employs this pneumonic number to search the bibliography file for the correct source of information for a rock sample.The bibliography source reference for each sample is filtered from the bibliography file.Once selected, the reference is parsed into three strings: author, title, and source of publication.
Contributor Name Information in the IGBADAT database is extracted from sources in the literature by many contributors.The contributors feed the data manually into IGBA data forms [10] [28].After verifying data in the forms [29], contributors transfer such data electronically into digital input text files in computers.The name of a contributor appears in the database in the second line of each rock group, immediately after the nominal regional location coordinates.

Spreadsheet Capability
An exceptionally beneficial feature of the GEOLITH software is its ability to generate a space-delimited output files, which are ready to be exported to spreadsheets.This ability permits users to take advantages of spreadsheet's powerful capabilities.The capabilities include numerical, statistical, and graphical aids.The creation of publication-ready plots and figures is paramount among these facilities.

Flow Chart of the GEOLITH Software
Figure 1 is a flow chart describing the sequential steps followed by the GEOLITH program.It details the cascading processes followed during the simultaneous processing of the IGBADAT database file (or similarity-structured files), and the companion bibliography file.Sections "README" and "INSTRUCION MANUAL" (Appendix A and Appendix B, respectively) should be consulted when analyzing the flow chart; they render the explanation and understanding of the GEOLITH software application easy and straightforward.

Examples of GEOLITH Files Input Files
Several testing file examples constitute the input file ensemble for testing the GEOLITH software application.Three test input data files from this ensemble were chosen for testing in this paper, along with a bibliography file.The bibliography file is applicable to these three input data files.The input data files are LITHTEST.015,PERFECT.010, and FATAL.050, and the associated bibliography file is A16.T.These files appear in Supplementary Materials A, B, C, and Q, respectively.To illustrate the diversity of data handled by the GEOLITH program, some fake information was intentionally inserted into the input data files.The error files display such permutations of information.The only input information required from users is the name of the input data file and the name of an associated bibliography file.
File LITHTEST.015(Supplementary Material A) is an input file containing missing data in some of the positions in the input data file reserved for some of the extracted information.Some information was intentionally deleted from the The spreadsheet-compatible file will be empty.A spreadsheet will not be created for such input files.

Discussion
The GEOLITH software tool presented in this contribution is a decoding program designed specifically to produce geographical, lithological, political, and bibliographical information from the international IGBADAT database [1].The database is a global data bank housing a multitude of information on plutonic and volcanic rocks from many countries.The geographical information is represented by the positional coordinates of each sample in the IGBADAT database.The lithological information is described by several attributes.Sample field name and proper rock name [24] [30] form the most important identifier of samples.In addition, samples are tagged by names of rock groups and geological unit to which they belong.Political information of samples decodes to names of countries and provinces within countries.The bibliographical information returned by the GEOLITH program is the name of author(s), the title of reference, and the journal specifications.The GOELITH tool produces three output files.
One of the files is spreadsheet-compatible and is ready to export to spreadsheets like EXCEL.
Regrettably, the IGBADAT database is not known by many researchers.A major reason for the database obscurity is due to the lack of computer programs capable of extracting and decoding of information stored in it.[23] discuss the potentialities of the IGBADAT database and comments on its neglect by the petrological community.Prior to the GEOLITH appearing on the scene, the geographical, lithological, political, and bibliographical information were mostly inaccessible and hardly amenable to decoding in a simple, flexible, and fast manner.The decoding programs developed by [5] [6], and this study and others [9] retrieve and decode this information.Such decoding programs provide users with the required tools to interface with the IGBADAT database in a simple and easy fashion.The GEOLITH program, along with the STASSAGE and the PHASS99 programs [5] [6], extract and decode much of the information in the IGBADAT database.Other types of information will be targeted for decoding by this author in future decoding programs.For example, a program is under planning to secure geochemical information from the IGBADAT database; major elements oxides and minor elements contents of igneous rocks will be the subject of a future decoding application program.

Conclusion
I present in this paper the GEOLITH software application for retrieval of geographical, lithological, political, and bibliographical information from the IGBADAT international igneous rocks database.The program searches for these information in the database, extracts and decodes them, and translates them to data file.Absence of such file is detrimental to the operation of the decoding programs.The bibliography file contains all the literature source references of published information contained in the database file.Each reference in the database shows as one or more lines of record.All lines of a reference contain in the first five positions a unique 5-digit number ranging from 1 to 99999.All lines of a reference record must contain the same identifier number.The identifier reference numbers for different references need not be sequential.

Figure 1 .
Figure 1.A flow chart for the program GEOLITH.It shows the sequential process of information extraction and decoding by the software tool.

3 .
Files with Fatal ErrorsInput files sometimes have faulty information, misallocated data or other trouble sources, leading to the fatal termination of the execution of the GEOLITH software.Such severe circumstances result into aborted jobs.All data decoded prior to the abortion of jobs are written to the output files.The input file FATAL.050 is an example of faulty files.Output files from this input file are three.The first output file FATAL.LTH (Supplementary Material L) contains the retrieved and decoded information in the ASCII text format.The second output file FATAL.SPH (Supplementary Material M) shows the same output data as in the file FATAL.LTH, but organized according to the structure of common generic spreadsheets.The third output file is the error file FATAL.ERR (Supplementary Material N) which displays diagnostic and error messages generated by the GEOLITH program.Output files show all extracted data before abortion.
Design and development of programs to obtain information from the IGBADAT database lead to popularization of the database among the petrologi-A.T. Al-Mishwat DOI: 10.4236/jsea.2018.11100222 Journal of Software Engineering and Applications cal and databases community, by simplifying the process of data acquisition.Besides the GEOLITH software primary purpose of production of voluminous information needed by researchers, the software is fast and simple during its execution.This simplicity adds to the increased visibility and popularity of the IGBADAT database.Every effort has been taken to provide the IGBADAT and earth science community with an efficient and error-free software tool.
English.Sought-after information is stored in the database as alphanumeric character text strings.Pneumonic strings are utilized heavily to represent much of the data in the IGBADAT database.Input for the GEOLITH program is an IGBADAT-style data file and a related bibliography file.Output is three files, one of which is exportable to a spreadsheet like EXCEL.Users of the GEOLITH software tool obtain much information that is germane to their research.Interface with the program is simple, straightforward, and transparent.Users do not need a programming knowledge to use the GEOLITH software tool.

The GEOLITH Software Program 3.1. General Description The
GEOLITH software tool is a program written in the FORTRAN language.It is simple, user friendly, and does not require computer programming knowledge by users.It is a medium-sized algorithm.Below is a description of the various types of data retrieved from the IGBADAT database by the GEOLITH software program.Other types of information in the database decode by other programs [5] [6].The GEOLITH software program source code is in Supplementary Material Q.The executable version GEOLITH exists in Supplementary Material P. The present version of the GEOLITH software tool was designed, written, compiled, and optimized under the LAHEY-FUJITSU FORTAN 95 Compiler For example, one program creates IGBA data files (e.g.IGBADAT) according to the IGBA structure and rules.Another program creates the bibliography files.Yet another program checks data files for accuracy and verifies their adherence to the IGBA proprietary formats.For example, NOGAP [7] is a program to remove redundant space between additional information tags in the C block of specimen descriptions.Other programs perform A. T. Al-Mishwat DOI: 10.4236/jsea.2018.11100216Journal of Software Engineering and Applications miscellaneous maintenance IGBA operations.3.environment(SHASTA) Version 7.60.02.It underwent a repeated and extensive testing to improve it and verify its robustness and accuracy during information decoding.It works on the WINDOWS platform.