GSJ Open-File Report, no. 518 December, 2009

Library Software for Geophysical Data Processing and Representation (3)

Tadashi Nakatsuka (Institute of Geology and Geoinformation, GSJ, AIST)

Japanese

1. Introduction

  We have been engaged in the research on aeromagnetic survey. During the course of our work, various versatile softwares were developed. As the publication of them was considered to be beneficial to another people, the library software consisting of many subprograms was reported (Nakatsuka, 2003, 2006).
  This report is a revised version for the previous GSJ Open-File Report no. 442 (Nakatsuka, 2006). The points of revision are
    1) expansion of contouring (cont) program to enable non-integer contour intervals,
    2) improvement of the assistance to read-in process parameters, etc. (lwkdir) program,
    3) change of argument specification of the theoretical magnetic anomaly calculatrion (calma) program,
    4) adjustment for newer FORTRAN compilers,
    5) restructuring of appendix utility programs,
    6) minor improvement and modifications in abilities (including BUG fix).
  In relation to this revision, the software system for aeromagnetic / magnetic anomaly data processing (Nakatsuka, 2007) utilizing this library is also to be revized (Nakatsuka, 2009).

2. Outline of the Library Software

  This library 'libgm' consists of versatile subprograms coded in C language with interfaces with FORTRAN language, and a small FORTRAN language subporogram getargs.f. There are 13 groups of function listed bellow, and each has multiple entry point names to realize various function systemtically.
  In the Geological Survey of Japan, a library software called "GSJLIB" (Nakatsuka et al., 1986, 1990) was developed, and the ideas in it are also succeeded in our library. The subprogram calculating IGRF is taken from the report by Nakatsuka (2005).
  Manual ducumentations by Adobe Systems Inc. (1990, 1994) were informative for the coding of subprograms generating PostScript output.

3. Files included in this Report

  All subprograms are coded in C language, and the filenames of sources have ".c" (specifier) extensions, with only one exception that getargs.f is in FORTRAN language. There are also HTML documentations (manual) how to use the library subprograms. The trailing "E.html" (specifier) indicates English documentation HTML, while those without "E" are in Japanese. Some utility programs are also stored as an appendix.
  All the contents of this report are stored in a CD-ROM with a tree structure bellow.

  In actual environment of utilizing the software, the directories lib, prog and data are assumed to be stored under the directory path of /home/SHARE.

        <<< Tree structure of files included in this report >>>
(root)
 +-- openfile0518.html  Cover page HTML (in Japanese)
 +-- index.html      Introduction HTML in English (This document)
 +-- indexJ.html     Introduction HTML in Japanese
 +-- man.tgz         Gzipped Tar Archive of the directory 'man'
 +-- lib.tgz         Gzipped Tar Archive of the directory 'lib'
 +-- prog.tgz        Gzipped Tar Archive of the directory 'prog'
 +-- shore.tgz       Gzipped Tar Archive of the directory 'data/shore'
 |     (This file is not included in this time revision.)
 |     (Linked with the target in the Report no.442 before this time revision.)
 +-- igrfcf.tgz      Gzipped Tar Archive of the directory 'data/IGRFCOEF'
 |
 +-- man/           (Directory containing Manual HTMLs)
 |    +-- libf.html       Index to manual pages (for FORTRAN) (in Japanese)
 |    +-- libfE.html      Index to manual pages (for FORTRAN) (in English)
 |    +-- libc.html       C language prototype and summary (in Japanese)
 |    +-- libcE.html      C language prototype and summary (in English)
 |    |
 |    +-- axis.html, calma.html, cont.html, igrf.html,     |
 |    |    lwkdir.html, pspaint.html, psplot.html,         | Manual pages for
 |    |     ptext.html, rand.html, sml.html,               |  each subprogram
 |    |      wshore.html, xw84t.html, xyconv.html          |   (in Japanese)
 |    |
 |    +-- axisE.html, calmaE.html, contE.html, igrfE.html, |
 |    |    lwkdirE.html, pspaintE.html, psplotE.html,      | Manual pages for
 |    |     ptextE.html, randE.html, smlE.html,            |  each subprogram
 |    |      wshoreE.html, xw84tE.html, xyconvE.html       |   (in English)
 |    |
 |    +-- prog.html       Description of utility programs (in Japanese)
 |    +-- progE.html      Description of utility programs (in English)
 |    +-- samples.f.html  FORTRAN program to generate Manual Page illustrations
 |    +-- figs/          (Directory containing Manual Page illustration images)
 |         +-- axis.png, cont.png, csymbl.png,             |
 |              gsymbl.png, pmark.png, pspaint.png,        | Manual page
 |               ptext1.png, ptext2.png, test.png,         |  illustration images
 |                wshore.png                               |
 |
 +-- lib/           (Directory containing Library program sources)
 |    +-- @mkall          Script to make Library Archive file 'libgm.a'
 |    +-- axis.c, calma.c, cont.c, igrf.c,                 |
 |         lwkdir.c, opnpin.c, pspaint.c, psplot.c,        | Source of
 |          ptext.c, rand.c, sml.c, wshore.c,              |  each subprogram
 |           xw84t.c, xyconv.c, getargs.f                  |
 |
 +-- prog/          (Directory containing Misc.Utility program sources)
 |    +-- @mkall          Script to make all Executable files
 |    +-- cats.c, cat4.c, cat8.c, crlf.c, onlycr.c,        |
 |         onlylf.c, cview.c, cviewe.c, uncview.c          | Source of
 |          hdump.c, hdumpe.c, xtw84.c, xw84t.c,           |  each utility
 |           utmcal.c, xycal.c, xiken.c, xenik.c,          |   program
 |            igrfcal.c, job.c, job1.c                     |
 |
 +-- data/          (Directory containing various Data)
      +-- shore/         (Directory containing Coastline data etc.)
      |    |     (Files in this direcory are not included in this report.)
      |    |     (For the contents of the directory, 
      |    |       refer to Report no.442 before this time revision.)
      |    +------ Many directories containing fine data of coastlines, etc.
      |    +------ Coarse data files of coastlines, etc.
      |                [wriver.jpn, wriver.jpn, world.cst]
      |
      +-- IGRFCOEF/       (Directory containing IGRF coefficients data)
           +-- igrf01.coef, igrf02.coef, igrf03.coef,      |
                igrf04.coef, igrf05.coef, igrf06.coef,     | Gauss coefficients data
                 igrf07.coef, igrf08.coef, igrf09.coef,    |  for each generation IGRF
                  igrf10.coef                              |

4. Manual Documentation

  Manual ducumentations how to use this library from a FORTARN language program are included in this report in the form of HTML files. As the further detail adjustment or advanced use of the libarary might be possible from C language program, a brief documentation on the prototype definitions and the summary of functions is provided. The explanation of the miscellaneous utility program (appendix) is also available.

  Library Manual
(for FORTRAN)
Prototype & Summary
(for C language)
Appendix Utility
Brief explanation
Japanese   libf.html   libc.html   prog.html
English   libfE.html   libcE.html   progE.html

5. Coastlines etc. data

  This library includes the subprogram WSHORE drawing coastlines, rivers/lakes, and prefecture boundaries. This program assumes that the coordinates values of coastlines etc. are stored in the '/home/SHARE/data/shore' directory.
  The report no. 442 before this time revision included the data files of coastlines, etc. reconstructed from
    1) "Digital Map 25000 (Spatial Data Framework)" by the Geographical Survey Institute, Japan ,  and
    2) "Coastline Extractor" by NGDC/NOAA .
Those data are not included in this report (this time revision). Because, if even the same data are to be included in this report, it is considered another procedure is neccesary. Refer to the previous report no. 442 (Nakatsuka, 2006) if neccesary.

References

  1. Nakatsuka, T., T. Miyazaki, N. Ando, Y. Kinugasa, and I. Sato (1986) Computer subprogram library "GSJLIB" at the Geological Survey of Japan. GSJ Open-File Report, no. 25, 156p., Geol. Surv. Japan.
  2. Nakatsuka, T., T. Miyazaki, N. Ando, Y. Kinugasa, and I. Sato (1990) Computer subprogram library "GSJLIB" at the Geological Survey of Japan (second version). 164p., Geol. Surv. Japan.
  3. Nakatsuka, T. (2003) Library Software for Geophysical Data Processing and Representation. GSJ Open-File Report, no. 400, 86p.+ 1 CD-ROM, Geol. Surv. Japan, AIST.
  4. Nakatsuka, T. (2005) Calculation of the International Geomagnetic Reference Field (4). GSJ Open-File Report, no. 423, 39p.+ 1 Diskette, Geol. Surv. Japan, AIST.
  5. Nakatsuka, T. (2006) Library Software for Geophysical Data Processing and Representation (2). GSJ Open-File Report, no. 442, 102p.+ 1 CD-ROM, Geol. Surv. Japan, AIST.
  6. Nakatsuka, T. (2007) Software system for aeromagnetic data processing, grid data manipulation, and reduction and quantitative interpretation of magnetic anomaly data. GSJ Open-File Report, no. 449, 29p. + 1 Diskette, Geol. Surv. Japan, AIST.
  7. Nakatsuka, T. (2009) Software system for aeromagnetic data processing, grid data manipulation, and reduction and quantitative interpretation of magnetic anomaly data (2). GSJ Open-File Report, no. 519, 70p. + 1 CD-ROM, Geol. Surv. Japan, AIST.
  8. Adobe Systems Incorporated (1990) PostScript language tutorial and cookbook. 16th printing, 244p., Addison-Wesley Publishing.
  9. Adobe Systems Incorporated (1994) PostScript language reference manual, 2nd ed. 11th printing, 765p., Addison-Wesley Publishing.