GSJ Open-File Report, no. 648 January, 2018

AMSS3: Software system for Aeromagnetic data processing,
Grid data manipulation, and Reduction and quantitative
interpretation of magnetic anomaly data (3)

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


Content
1. Introduction
2. Outline of each group of programs
      2.1 Program group DPAM
2.2 Program group GDMP
2.3 Program group ANAM
2.4 Program group ANAMX
2.5 Subprogram library 'libgm'
2.6 Miscellaneous utilities 'utils'
3. Common characteristic feature
4. Important points of full revision
5. Files contained in this report
References   [in chronological order]

1. Introduction

This report is a fully-revised and expanded version for the previous GSJ Open-File Report no. 519 "Software system for Aeromagnetic data processing, Grid data manipulation, and Reduction and quantitative interpretation of magnetic anomaly data (2)" [Nakatsuka, 2009f], with adding newly developed programs (ANAMX) of higher sophisticated analysis methods such as 3D imaging interpretation and Generalized crossover analysis of aeromagnetic data. Also, this report includes an update of Library Software (GSJ Open-File Report no. 518 [Nakatsuka, 2009e]).

We have been engaged in the research on aeromagnetic survey, and developed various kinds of programs for data processing, analysis and interpretation. The outlines of them have already been reported on the scientific journals and at the scientific meetings [Nakatsuka and Okuma, 2005b, 2005c, 2006a, 2006e, 2009a, 2011, 2014; Nakatsuka et al., 2009c; and others : see 'References' section]. Their source codes are open to public through the GSJ Open-file Reports.

In this report, We deal with six groups of programs for the aeromagnetic survey, as follows.
    (1) DPAM: programs for aeromagnetic survey observation data processing,
    (2) GDMP: programs for grid data manipulation,
    (3) ANAM: programs for analysis of magnetic anomaly data,
    (4) ANAMX: programs for 3D imaging and generalized crossover analysis of aeromagnetic data,
    (5) libgm: library subprograms for geophysical analysis and graphic presentation,
    (6) utils: miscellaneous utility programs.
This software system is in a style of program libraries, consisting of many individual programs of rather simple functions. Then the actual process to some target/objective would require a series of program executions. The data formats used in this system are customized for our own original style. However, as for its design, all data are handled in the form of ASCII text, so that the user can easily convert data to/from another style of formats.

Among six program groups, (1) DPAM, (2) GDMP, and (3) ANAM are the succession from the GSJ Open-file Report no.449, while (4) ANAMX are the lately developed programs for higher sophisticated analysis methods. (5) libgm, and (6) utils are the newest updated version for the GSJ Open-file Report no.400 "Library Software for Geophysical Data Processing and Representation", but be aware that there exist some major changes of specification.

2. Outline of each group of programs

2.1 Program group DPAM

DPAM group consists of programs for aeromagnetic survey data processing as follows.
alog2asc
daq2asc
bdaq2asc
dmaq2asc    
xldam
xldpn
xldhg
filtadasc    
despike    
dvcorr
ecomp
fcomp
ggrid
ggrids    
xslin
xslina
pframe
pltrk
pchkdv    
 
pchkmag
pchkres
pchkcomp
 

Programs alog2asc, daq2asc, bdaq2asc, and dmaq2asc converts aeromagnetic raw acquisition data (specialized for our survey system) into common ASCII file format. alog2asc / daq2asc correspond to the stinger type survey system of (old) AIRLOGS / (newer) AMDAQ, bdaq2asc for bird type survey, and dmaq2asc for newly developed multicopter (drone) or some other mobile surveys.

Programs xldam and xldpn generate line data (DPAM line data) file from aeromagnetic ASCII raw data, making use of Real-time GPS and PostNav processed DGPS position data, respectively, and the program xldhg generates similar line data (HGAM line data) file from helicopter-borne gradiometer aeromagnetic data acquired. In addition, xldam, xldpn and xldhg also calculate the IGRF residuals. The program filtadasc was newly added to suppress high frequency noise caused by helicopter, when such situation occasionally took place.

The program despike eliminates spike noises in magnetic field values (total magnetic field and IGRF residual) of DPAM line data, the program dvcorr performs the diurnal correction of magnetic field data making use of Ground-Station magnetic field data, and the programs ecomp and fcomp execute the compensation of aircraft's magnetic effect for compensation flight DPAM line data and for survey flight DPAM line data, respectively, using the method described by Nakatsuka and Okuma [2005c].

The programs ggrid and ggrids generate grid data from random points data (i.e., DPAM line data or equivalent) by using the method of "continuous curvature splines in tension" as developed by Smith and Wessel [1990]. Only the magnetic field (IGRF residual) data are converted into grid by ggrid, while ggrids applies the method also on the altitude data.   The programs xslin and xslina extract simple standard line (StdLIN) data from random point data. Various formats of random point (line) data are supported by xslin as input data, while xslina deals with only DPAM line data but with the function of averaged re-sampling.

The program pframe draws an illustration of coordinates framework of survey area for easier setting of grid location parameters, program pltrk plots trackline paths from DPAM line data, and program pchkdv plots the ground station magnetic data to reveal the diurnal magnetic variation.
  The programs pchkmag, pchkres and pchkcomp are used to plot magnetic field data in order to inspect the data quality. Total magnetic field data is plotted in black by pchkmag, and IGRF residual data is plotted in blue by pchkres, while pchkcomp plots IGRF residual magnetic data both before and after the compensation of aircraft's magnetic noise in red and blue colors.

2.2 Program group GDMP

GDMP group consists of programs for grid data manipulation as follows.
sel
seldb
seldb2    
gtopo
adjlv
gadd
gsub
gtrim    
govlay
gojoin
gmerge    
txproj
altchg    
gtrf
altx
rearx
plmap
plmapc
plmapl
plmapcl    
plmapg
plmaps
plmapcs    
shade
xplmap
xplmapc
xplmapcs
 

The programs sel, seldb and seldb2 generate new grid data from an existing grid data with re-gridding. For sel program, the existing grid data should be assigned as the input filename parameter, while grid data from "Aeromagnetic Database of Japan" [Geological Survey of Japan, 2005a] * (AMDB) is selected by the code-name input for seldb, and data from "The compilation of magnetic anomalies at a smooth surface of 1,500m above terrain by using the Aeromagnetic Database of Japan" [Nakatsuka and Okuma, 2009b] ** (AMDB2) for seldb2. Program gtopo generates grid data of topographic elevation from "DEM40" data *** (Digital Elevation Model 40m).
    *   AMDB grid data must be stored under the directory /pub/AMDB/DATA/ defined by AMDBDIR parameter in the seldb.f90 source (survey area data within subdirectory grd, and district data within subdirectory reg), and filenames must be "code.gd", where code is small letter filename of original.
**   AMDB2 grid data must be stored in the directory (/pub/AMDB2/DATA/) defined by AMDB2DIR parameter in the seldb2.f90 source, and filenames must be "MMNN.mgc", where MMNN is the primary mesh code of the correponding area.
***   DEM40 is a group of topographic elevation data files, reconstructed from Digital Maps (50m mesh elevation, Japan-I, Japan-II and Japan-III) by the Geographical Survey Institute (GSI). Refer to "How to generate DEM40 data files" genDEM40mE.html. Data files must be stored under the directory (/home/SHARE/data/DEM/dem40/) defined by DEMDIR parameter in the gtopo.f90 source, and divided into subdirectories 'Z??' corresponding to its UTM zone number ??.   [If older version DEM data (wm40) is prepared already, see the description at the bottom of Section 4.]

The program adjlv adds a constant value to all grid data in order to adjust DC level, the program gadd adds 2 sets of grid data, and the program gsub subtracts the 2nd file grid data values from the 1st set grids, to generate a new grid data. The program gtrim replaces values of input grid data with NULL (undefined) data value for the range where the values of reference (2nd) grid data are NULL data value, to generate a new grid data.

The program govlay overlays multiple grid data sequentially with placing slit zone, the program gojoin joins multiple grid data sequentially with placing transient zone surrounding the overlaid data, and the program gmerge merges multiple grid data sequentially with placing transient zone along overlapping zone, to create a new grid data. The program txproj translates grid data into another map projection with re-gridding.

The standard format magnetic anomaly grid data file also include the information of the observation surface altitude, in the form of second set of grid or as a constant elevation value in the header part of magnetic anomaly data. The program altchg changes the altitude information of magnetic anomaly data, by replacing only altitude information. The program gtrf translates IGRF residual grid data into another reference IGRF model. The program altx extracts the altitude information into a standard grid data form, and rearx extracts the selected set of grid data from multiple sets grid data file.

The programs plmap, plmapc, plmapg, plmaps, plmapcs and shade produce illustrations of 3D surface given as altitude distribution of grid data, by line contour map (plmap), color-graded contour map (plmapc), gray-scale grading map (plmapg), shaded-relief contour map (plmaps), shaded-relief color-grading map (plmapcs) and shaded-relief map (shade), all on an A4 sheet. The program plmapl generates line contour map with drawing trackline paths, and the program plmapcl generates color-graded contour map with trackline paths, both on an A4 sheet.

The programs xplmap / xplmapc / xplmapcs create line contour map / color-graded contour map/ shaded-relief color-grading map of grid data, respectively, with adding various supplementary items on a selectable size of sheet up to B0.

2.3 Program group ANAM

ANAM group consists of programs for the altitude reduction and quantitative interpretation of magnetic anomaly data as follows.
emag
amag
cmag
plamag
plamagc    
emagf
amagc
cmagf
 
calmas    
tmcorr
tmcfix
lcecorr    
aaptdp
galtf
emeq
ameq
ameqc    
cmeq
galts
emeqs
ameqs
ameqsc    
cmeqs
rpmeqs
edeq
adeq
adeqc    
cdeq
 
edeqs
adeqs
adeqsc
cdeqs
rpdeqs

The programs emag, emagf, amag, amagc, cmag and cmagf are used for the magnetization intensity mapping [Okuma et al., 1994a; Nakatsuka, 1995]. First, emag / emagf calculates the contribution coefficients matrix COEF, then amag / amagc executes inversion process of magnetization intensity mapping by the method of conjugate gradients (CG), and cmag / cmagf may be used to calculate the synthetic magnetic anomalies on a desired altitude surface by using the result of amag / amagc. The source model is approximated into rectangular blocks in emag / cmag, while the surface undulation is considered in emagf / cmagf. The iteration of CG method is controlled by the number of loop count (amag) or by convergency tolerance (amagc). The programs plamag / plamagc plot the result of the magnetization intensity mapping in the form of line contour map / color-graded contour map, respectively, with masking the surrounding source region.

The program tmcorr executes the correction of topographic effect on the magnetic anomaly grid data, assuming a uniform terrain magnetization, while the program tmcfix executes the correction of topographic effect with the assigned value of terrain magnetization. The program lcecorr estimates the railway loop-current effect in the observed magnetic anomaly grid data, and correct for it. The program aaptdp is for the semi-automatic modeling by point-dipole sources for observed magnetic anomaly grid data. These processes were used in the data interpretation of aeromagnetic data in the Kobe-Kyoto area [Nakatsuka et al., 2004b].

The program galtf interpolates observation altitudes of StdLIN data into grid data (for the purpose of illustrating observation altitudes), and the program galts generates grid data of smoothed observation altitude from StdLIN data (for the purpose of using as the reference in altitude reduction).

The programs emeq, ameq, ameqc and cmeq are for the altitude reduction from grid data, and the programs edeq, adeq, adeqc and cdeq are for the altitude reduction from random point data, by equivalent anomaly method [Nakatsuka and Okuma, 2005b, 2006a]. First, emeq or edeq calculates the contribution coefficients matrix CMUP or CFUP, and ameq / ameqc or adeq / adeqc executes inversion process of equivalent anomaly derivation by CG method. The iteration of CG method is controlled by the number of loop count in ameq / adeq, or by convergency tolerance in ameqc / adeqc. Then the reduction calculation is performed by cmeq or cdeq program.

The programs emeqs, ameqs, ameqsc, cmeqs and rpmeqs are for the altitude reduction from grid data, and the programs edeqs, adeqs, adeqsc, cdeqs and rpdeqs are for the altitude reduction from random point data, by equivalent source magnetization method [Nakatsuka and Okuma, 2005b, 2006a]. First, emeqs or edeqs calculates the contribution coefficients matrix CMUPS or CFUPS, and ameqs / ameqsc or adeqs / adeqsc executes inversion process of deriving equivalent source magnetization by CG method. The iteration of CG method is controlled by the number of loop count in ameqs / adeqs, or by convergency tolerance in ameqsc / adeqsc. Then the reduction calculation is performed by cmeqs or cdeqs program, and the reduction-to-pole anomaly on that surface is calculated by rpmeqs or rpdeqs program.

The program calmas calculates theoretical magnetic anomaly distribution on the specified observation surface, caused by a simple source model.

2.4 Program group ANAMX

ANAMX group consists of programs for the 3D imaging analysis of magnetic anomalies and generalized crossover analysis in aeromagnetic survey, as follows.
eimgd
eimga
fimgs
fimgsc    
aimgn
aimgnc    
aimgs
aimgsc
nimgn
nimgnc    
nimgs
nimgsc
cimgn
cimgnc    
cimgs
cimgsc
plsim
plsimc
plxim
plximc    
plimv
plimvc
 
plmvarc    
exdeq1
exdeq2
exdeq3
exdeq4    
axdeq
axdeqc
cxdeq
genroff

The programs eimgd, eimga, aimgn, aimgnc, aimgs, aimgsc, nimgn, nimgnc, nimgs, nimgsc, cimgn, cimgnc, cimgs, cimgsc, fimgs, fimgsc are used for 3D magnetization imaging analysis [Nakatsuka and Okuma, 2011, 2014a]. First, eimgd or eimga calculates the sensitivity coefficients matrix CFIM and scaling coefficients matrix FSCL, then one of the other 14 programs is used to perform 3D imaging analysis of each regularizing condition preferred.
    When CG method is applied to 3D imaging of quite many unknown parameters to be solved, the least squares fitting solution tends in general toward minimum norm solution, which leads the solution to a shallow structure of magnetization distribution. To avoid this disadvantage, parameter scaling is required. Program eimgd uses a parameter scaling concerned with the source depth, and eimga adopts an automatic parameter scaling with taking account of CFIM matrix character.

Now 3 types of 3D imaging analysis programs are available, depending on the selected regularization. aimgn, aimgnc, aimgs, aimgsc perform simple inversion with no regularization, and nimgn, nimgnc, nimgs, nimgsc perform minimum norm inversion, while cimgn, cimgnc, cimgs, cimgsc perform a inversion with minimum effective source volume (compact) constraint. Here, 4 programs in each type analysis correspond whether source elements thickness is considered at scaling (-s, -sc) or not (-n, -nc), and two method of iteration control [by loop count (-n, -s) or by convergency tolerance (-nc, -sc)]. In addition, fimgs and fimgsc are further modified version for cimgs and cimgsc, where magnetization values are forced to be within predefined range throughout iterative optimization.

Programs plsim, plsimc, plxim, and plximc visualize a vertical cros-section view of 3D imaging result. plsim / plsimc is for NS or EW section along the grid, and plxim / plximc is for arbitrary line segment section in any desired direction, each with line contours / with color-graded contour map, respectively. Program plimv / plimvc show the whole 3D imaging result in a bird's-eye view, with line contours / with color-graded contour map, respectively.

Programs exdeq1, exdeq2, exdeq3, exdeq4, axdeq, axdeqc, cxdeq, genroff, and plmvarc are used for the processing of generalized crossover analysis in aeromagnetic survey [Nakatsuka and Okuma, 2006e; Nakatsuka et al., 2009c]. The principle of the method is an extension of edeq "Altitude reduction from survey line data" introducing additional unknown parameters describing mis-tie adjustment. That is, the inversion to equivalent source anomaly and mis-tie adjustment is combined into simultaneous equation, and solved with CG method.
  First, exdeq1, exdeq2, exdeq3, or exdeq4 calculates the contribution coefficient matrix CXFUP. Program exdeq1 deals with constant level shift each survey line, exdeq2 accepts linear variation for each line, and exdeq3 permits variations at all cross-over point (linear between the points). Program exdeq4 is used for the analysis of magnetic anomaly change between two time-epochs survey lines crossing each other, similar to exdeq3 case but only one epoch's parameter is variable.
  Next, axdeq / axdeqc executes inversion process of CG method to obtain optimum model of level shift. Then, cxdeq calculates the altitude reduction result including cross-over adjustment.

For the case of exdeq4, program genroff converts the level shift (control point) data from axdeq / axdeqc into a random point distribution data (StdLIN form) of magnetic anomaly change. This random point data can be transformed to a grid data of distribution (e.g. using ggrid), and then program plmvarc is used to plot the magnetic anomaly change map (color-graded contour map) with illustrating control point distribution.

2.5 Subprogram library 'libgm'

Library libgm is composed of subprograms listed in the table below.
NameFunction Entry-name (for Fortran)
psplot   LINE graphics
  postscript output
psopn, plots, plote, pscls, epsbox
plot, scisor, factor, where     newpen, penatr
wrect, wpolyg, wcirc
pspaint   SURFACE graphics
  postscript output
dftone, dfrgbt, dfcols, dfc40s
dframe, dframo, paintm, paintw, dresol
dfpcol, paintc, paintr, paintp
ptext   Draw Font Text and
  Centered Symbol
ptext, lstyle, pcstr     pmark
cont   Draw line contour map conts, contso, contx, contr    
wshore   Draw coastlines, etc. wshore, rshore, pshore    
igrf   IGRF calculation gigrf, igrfc, igrfm, sigrf, spgrf, sdgrf
xyconv   Convert map projection xyconv, nxycnv, utm, ikconv, nikcnv, utmik
cvinit, cviken, cvenik, cvdinit, cvdiken, cvdenik
sml   Regression analysis sm1opn, sm1ex, sm1cls, sm1rv
sm2opn, sm2ex, sm2cls, sm2rv
sm3opn, sm3ex, sm3cls, sm3rv
randD   Generate random number     rand1, randg
xw84t   Geodetic translation
(WGS84 <=> Tokyo datum)
xw84t, xtw84, xw84td, xtw84d
hgeoid   Get geoid height sgeoid, hgeoid, jhgeoid/td>
calma   Calculate synthetic
  magnetic anomaly
magafd, mpoint, mvline, mhrect, mprism, calma
lwkdir
opnpin
getargs  
Message output, Progress display,  
  setting up Working directory,
    and Process parameters, etc.
prompt, premsg, dpcini, dpcent, strdtm, lrtrim
abend, abendm, opnpin, clspin, lwkdir
parmin, gparma, gparmi, gparmf, gparmd
gparmif, gparmid, gparmi2, gparmf2, gparmd2>
getargs

Descriptions of function and usage of each subprogram in the Library libgm are available through the page "libgm: Library Subprograms".

2.6 Miscellaneous utilities 'utils'

Following miscellaneous utility programs are available.
cats
cat4    
cat8
 
crlf
onlycr
onlylf
hdump    
cview
cviewe
uncview    
hdumpe
qpencode
qpdecode
b64encode
b64decode    
cxtw84
cxw84t
igrfcal
hgeoidcal    
utmcal    
xycal
cxiken
cxenik
job
job1
 
 

Programs cats, cat4, cat8, crlf, onlycr, onlylf, cview, cviewe, uncview, hdump, hdump, qpencode, qpdecode, b64encode, b64decode are simple programs to assist user's operation under the common environment of UNIX system. Programs cxtw84, cxw84t, igracal, hgeoidcal, utmcal, xycal, cxiken, cxenik support the usage of Library libgm subprograms, in such a way that the function of each individual subprogram is utilized interactively with dialog on a terminal.

    Programs job, job1 are used to realize our own style of "Batch process" of sequential execution of various programs with assigning parameter data. This is intending an easy Job control language (JCL) as was utilized in the legacy "mainframe computer". Our system "AMSS3" of aeromagnetic data handling, reduction, analysis and interpretation is designed to match with this "Batch process", and if the source data and the job control file (plus preferably log file record of actually executed process) are saved, the completely same processing can be repeated easily.

3. Common characteristic feature

We have developed these programs on a Linux system, on which the GNU Compiler Collection [http://www.gnu.org/software/gcc/] and one component 'gfortran' included in it are installed, and almost all programs are coded in Fortran90 language, except that those in libgm and utils groups and a limited number of programs/subprograms are coded in C language. The programs were developed step by step during the years of research activities on aeromagnetic survey at the Geological Survey of Japan, AIST and they were verified to function well by some practical data. Some programs, however, have been revised further for the improvement on reasonable data handling or easier operation. So there is a little possibility that some unaware bugs are left. But, we convince the user will easily correct bugs, as the source codes are presented.

In these programs, the subroutine library 'libgm' starting at Nakatsuka [2003] is utilized quite frequently. So, on this time update of software, the subroutine library 'libgm' (also updated a little) has been included in this report.

Most programs use some array variables, and the necessary size (dimension) of the array is dependent on the actual data to be dealt with. (Although too large size definition does not harm the correct result, the memory resource may be wasted, or program may not work because of memory shortage.) The definitions of such dimensions had been often given by using 'parameter' statement in source codes, to enable easier adjustment. Actually the definitions of such parameters was inconsistent among programs even in the same group. On this time software revision, rather new function of Fortran programing, dynamic allocation of array area was utilized. Then, even in case of requiring giant array, new programs can work without recompilation. Also, in this time revision, we used some other newer functions, such as free format coding, structured programming excluding statement number, C-like comparison operator, etc. As a result, some of the source programs cannot be compiled with old Fortran77 compilers.

When executing these programs, a few to several or more parameters have to be specified, along with selecting working directory path. In these programs, the LWKDIR (assist to set-up working dir. and process parameters, etc.) function with 'opnpin' mechanism of the subroutine library 'libgm' is implemented. The use of this function provides us two merits.

  1. One is that the parameter input is prompted with informative message or valid choice, which is very useful to learn how to operate the program.
  2. The other is that the same program is used to the non-interactive process for predetermined parameters with the help of 'opnpin' mechanism.
The latter style of program execution is realized by creating 'Job Control File' and submitting job / job1 command (in the 'utils' Utility programs). Refer to the section of "Job Control File" in [utils: Utility Programs], with respect to the detail of executing a series of job steps with the help of 'opnpin' mechanism.

4. Important points of full revision

This report contains various points of renewal and augmentation againt the previous version software. The most important point of augmentation is the newly added group programs ANAMX performing the 3D imaging and generalized crossover analysis of aeromagnetic data. Actually, there are some programs (4 DPAM, 4 GDMP, and 5 utils programs) newly added, but they are not so important but rather simple tools useful.
  Besides, a lot of existing programs were improved or revised during the process of re-coding into Fortran90 style, but the basic functions of them are unchanged even if the way of use or the function is a little changed. And we didn't list up the minor change of specifications. Such minor changes of specifications are reflected on the documentation HTMLs of program groups.

This software system had a historical limitation of specification. At this time full revision of software system, we made effort of mitigating the effect of out-of-date specification, in two main points as follows.
  [New Standard GRID data file Format v2018 and New Coordinate Number]
  In order to define 2-dimensional distribution of physical quantity, grid data are frequently utilized. In our "Standard GRID data file Format", the spatial position is identified by the combination of the coordinate number indicating reference geodetic system and map projection type, and the coordinates in that map projection. In the 20th century in Japan, Japanese original TOKYO datum based on the Bessel ellipsoid had been used, and later we moved to "Japanese Geodetic Datum 2000" (JGD2000) [= World Geodetic System (WGS84)] after April, 2002. In that occasion, we assigned coordinate numbers 200-399 for WGS system, with continued coordinate numbers 0-199 for existing TOKYO datum. Nowadays, however, it is common and reasonable to use WGS basically. So, at this time full revision of the software, we decided to move to the new definition of coordinate number: 0-199 is used for WGS, 800-999 for (old) TOKYO datum, and define new "Standard GRID data file Format v2018" to enable converting old coordinate number into new one automatically.
  [Globalization in Filename naming convention of service data files]
  From the older version of this software, we prepared useful data of Japanese Islands, such as location data of coastlines, rivers and lakes, prefecture boundaries, and altitudes data of DEM and geoid. But, the directory and filenames convention is specialized to the North-Eastern Semi-hemisphere because of the location of Japan, and there was a limitation that the data of Western hemisphere or Southern hemisphere cannot be handled. At this time full revision of the software, we updated the program and directory/filename convention to enable worldwide processing.

"Standard GRID data file Format v2018", described in the Documentation for GDMP programs, seems there is little revision. To be focused, however, are
  (1) "4x,i4" in 1st Header format was "i4,4x" in old version, and
  (2) the description on earth ellipsoid is transposed and new coordinate numbers
      are 0-199 for WGS, and 800-999 for old TOKYO datum.
  There is redundant 4-column space in "1st Header Format", and it was used to distinguish old and new coordinate number. Also, as GRID data format other than the part of 1st Header is common between new and old format description, users can convert old GRID data into new format v2018 quite easily.
  All programs included in this report are equipped with the automatic distinction of old and new format, and old coordinate number is converted to new coordinate number. Accordingly, users can use old Format GRID data files as it is, only by giving new "coordinate number" parameter correctly, if it is required.

The program revision for the globalization is so as to enable successful program execution even in case of Southern Latitudes or Western Longitudes, and the main point was re-definition of directory-filename convention. If any parameter of latitude or longitude is to be read in, South Latitude and West Longitude should be given as minus values. (If it is specified with degrees and minutes, both should be minus. Usually program will only regard [deg.Value + min.Value/60.] be the resultant deg.Value.)
  As for directory/filename convention, DEM data read by gtopo program and the shore data handled by wshore subprogram are the files of [1 deg.Lat. × 1 deg.Long.] range each, and filenames are related to the SW corner of the range (e.g., N33E135, S20E046, N19W090, etc.), and files are stored under subdirectories indicating its UTM zone number, in order to avoid too many files in a directory. Next table shows the concrete examples of old and new filenames contrast.
[Examples]Old Filename New Filename
DEM data wm40/33135.alt dem40/Z53/N33E135.alt  
coastlines, etc.  
(WGS84)
SW33/cst135.jpn   Z53/N33E135.coast
SW33/riv135.jpn Z53/N33E135.river
SW33/prf135.jpn Z53/N33E135.prefb
coastlines, etc.  
(Old Tokyo datum)
SH33/cst135.jpn   t53/N33E135.coast
SH33/riv135.jpn t53/N33E135.river
SH33/prf135.jpn t53/N33E135.prefb
In order to change the path names as above for the old version data, script files renewal_script are placed in corresponding directories in this report, for reference. (This is only for renaming, and the DEM data are in old version Standard GRID data file Format v2005.)

5. Files contained in this report

Source programs coded in Fortran90 language have the filenames with .f90 (specifier) extensions, and those in C language with .c (specifier) extensions. To compile these programs under UNIX environment, @mkall script in each directory can be used, provided that the subroutine library 'libgm' is at first installed as the archive file libgm.a under the directory of /home/SHARE/lib, and the command names 'fort' and 'gcc' is aliased to (or the name of) the desired Fortran and C compilers. The executable program after compilation is stored in the directory /home/SHARE/bin with the name same as the source filename without the extension. It is recommended the users set their own environment variable PATH to contain the path /home/SHARE/bin, for comfortable environment of execution.

There are also HTML documentations for each of six program groups, DPAM, GDMP, ANAM, ANAMX, libgm, and utils. The explanation of the function of individual program is given briefly, and the parameters required to execute the program are described.

In the CD-ROM appended to this report, HTML files, Fortran90 and C source files, templates of Job Control files for non-interactive (Batch Job) execution, and TGZ archive files are stored, in the tree structure below.

===( Service data of Japanese DEM and coastlines etc. not included )===
    [Data of Japanese DEM] DEM40 is a group of files of terrain elevation data in Japan, extracted from Digital Maps (50m mesh elevation, Japan-I, Japan-II and Japan-III) by the Geographical Survey Institute, Japan (GSI) [Publication discontinued]. The source data are subject to GSI's copyright. The procedure how to generate DEM40 files from GSI's Digital Maps is presented in genDEM40mE.html. Data contents are not included in this report, because it requires a procedure of getting approval from the Authority (GSI). Data contents are not modified in this time software revision, but only the file path names are changed because of the globalization update. If old style data are existing, a script file data/DEM/renewal_script is useful to change file paths.
    [Data of Japanese Coastlines etc.] The data of coastlines, lakes and rivers, and prefecture boundaries of Japan are subject to be changed the file path name because of the globalization update of library subprogram "wshore", although the data contents are not modified. If old style data is existing, a script file data/shore/renewal_script is useful to change file paths. But data contents are not included in this report, because it is considered a procedure of getting approval from the Authority (GSI) is necessary. Refer to the former report no. 442 [Nakatsuka, 2006c], if necessary.

        <<< Tree structure of files included in this report >>>
        (Large size files are colored (> 5 MB) with rough size, or else (> 1 MB).

openfile0648.html   Cover page HTML
no0648/             (Directory containing all contents except Cover page HTML)
 |
 +-- indexE.html      Overview of this report (This document)
 +-- dpamE.html       Documentation for DPAM programs
 +-- gdmpE.html       Documentation for GDMP programs
 +-- anamE.html       Documentation for ANAM programs
 +-- anamxE.html      Documentation for ANAMX programs
 +-- libgmE.html      Documentation for Library 'libgm'
 +-- utilsE.html      Documentation for 'utils' programs
 +-- genDEM40mE.html  How to generate DEM40 files
 |
 +-- index.html       Overview of this report (in Japanese)
 +-- dpam.html        Documentation for DPAM programs (in Japanese)
 +-- gdmp.html        Documentation for GDMP programs (in Japanese)
 +-- anam.html        Documentation for ANAM programs (in Japanese)
 +-- anamx.html       Documentation for ANAMX programs (in Japanese)
 +-- libgm.html       Documentation for Library 'libgm' (in Japanese)
 +-- utils.html       Documentation for 'utils' programs (in Japanese)
 +-- genDEM40m.html   How to generate DEM40 files (in Japanese)
 |
 +-- html.tgz         TGZ archive of 16 HTML files above
 +-- libgm.tgz        TGZ archive of directory 'libgm'
 +-- lib.tgz          TGZ archive of directory 'lib'
 +-- utils.tgz        TGZ archive of directory 'utils'
 +-- dpam.tgz         TGZ archive of directory 'dpam'
 +-- gdmp.tgz         TGZ archive of directory 'gdmp'
 +-- anam.tgz         TGZ archive of directory 'anam'
 +-- anamx.tgz        TGZ archive of directory 'anamx'
 +-- Tplate.tgz       TGZ archive of directory 'Tplate'
 +-- data.tgz(10MB)   TGZ archive of directory 'data' with NGA geoid contents
 |
 +-- libgm/           (Directory containing 'libgm' documentation)
 |    |
 |    +-- libcE.html, psplotE.html, pspaintE.html, ptextE.html, contE.html,
 |    |    wshoreE.html, igrfE.html, xyconvE.html, smlE.html, randE.html,
 |    |     xw84tE.html, hgeoidE.html, calmaE.html, lwkdirE.html   (in English)
 |    +-- libc.html, psplot.html, pspaint.html, ptext.html, cont.html,
 |    |    wshore.html, igrf.html, xyconv.html, sml.html, rand.html,
 |    |     xw84t.html, hgeoid.html, calma.html, lwkdir.html      (in Japanese)
 |    |
 |    +-- figs/       (Directory containing figures for document)
 |         |
 |         +-- cont.png, pmark.png, pspaint.png, ptext.png, ptext2.png,
 |              test.png, wshore.png, cont.ps, pmark.ps, pspaint.ps,
 |               ptext.ps, ptext2.ps, wshore.ps, samples.f90
 |
 +-- lib/             (Directory containing 'libgm' subprogram sources)
 |    |
 |    +-- @mkall      Script to compile all subprograms
 |    +-- psplot.c, pspaint.c, ptext.c, cont.c, wshore.c,
 |         igrf.c, xyconv.c, sml.c, rand.c, xw84t.c,
 |          hgeoid.c, calma.c, lwkdir.c, opnpin.c, getargs.f90
 |
 +-- utils/           (Directory containing 'utils' source programs)
 |    |
 |    +-- @mkall      Script to compile all 'utils' programs
 |    +-- cats.c, cat4.c, cat8.c, crlf.c, onlycr.c, onlylf.c,
 |         cview.c, cviewe.c, uncview.c, hdump.c, hdumpe.c,
 |          qpencode.c, qpdecode.c, b64encode.c, b64decode.c,
 |           cxtw84.c, cxw84t.c, igrfcal.c, hgeoidcal.c, utmcal.c,
 |            xycal.c, cxiken.c, cxenik.c, job.c, job1.c
 |
 +-- dpam/            (Directory containing 'dpam' source programs)
 |    |
 |    +-- @mkall      Script to compile all 'dpam' programs
 |    +---- sml5.c, gsurf.c    (common subprograms)
 |    +-- alog2asc.c, daq2asc.c, bdaq2asc.c, dmaq2asc.c,
 |         xldam.f90, xldpn.f90, xldhg.f90, filtadasc.f90,
 |          despike.f90, dvcorr.f90, ecomp.f90, fcomp.f90,
 |           ggrid.f90,  ggrids.f90, pframe.f90, pltrk.f90,
 |            pchkdv.f90, pchkmag.f90, pchkres.f90, pchkcomp.f90,
 |             xslin.f90, xslina.f90
 |
 +-- gdmp/            (Directory containing 'gdmp' source programs)
 |    |
 |    +-- @mkall      Script to compile all 'gdmp' programs
 |    +---- xplgobj.c    (common subprogram)
 |    +-- sel.f90, seldb.f90, seldb2.f90, gtopo.f90,
 |         adjlv.f90, gadd.f90, gsub.f90, gtrim.f90,
 |          govlay.f90, gojoin.f90, gmerge.f90, txproj.f90,
 |           altchg.f90, gtrf.f90, altx.f90, rearx.f90,
 |            plmap.f90, plmapc.f90, plmapl.f90, plmapcl.f90,
 |             plmapg.f90, plmaps.f90, plmapcs.f90, shade.f90,
 |              xplmap.f90, xplmapc.f90, xplmapcs.f90
 |
 +-- anam/            (Directory containing 'anam' source programs)
 |    |
 |    +-- @mkall      Script to compile all 'anam' programs
 |    +-- emag.f90, emagf.f90, amag.f90, amagc.f90, cmag.f90, 
 |         cmagf.f90, plamag.f90, plamagc.f90, tmcorr.f90,
 |          tmcfix.f90, lcecorr.f90, aaptdp.f90, galtf.f90,
 |           galts.f90, emeq.f90, ameq.f90, ameqc.f90,
 |            cmeq.f90, emeqs.f90, ameqs.f90, ameqsc.f90,
 |             cmeqs.f90, rpmeqs.f90, edeq.f90, adeq.f90,
 |              adeqc.f90, cdeq.f90, edeqs.f90, adeqs.f90,
 |               adeqsc.f90, cdeqs.f90, rpdeqs.f90, calmas.f90
 |
 +-- anamx/           (Directory containing 'anamx' source programs)
 |    |
 |    +-- @mkall      Script to compile all 'anamx' programs
 |    +-- eimgd.f90, eimga.f90, aimgn.f90, aimgnc.f90, aimgs.f90,
 |         aimgsc.f90, nimgn.f90, nimgnc.f90, nimgs.f90, nimgsc.f90,
 |          cimgn.f90, cimgnc.f90, cimgs.f90, cimgsc.f90,
 |           fimgs.f90, fimgsc.f90, plsim.f90, plsimc.f90,
 |            plxim.f90, plximc.f90, plimv.f90, plimvc.f90,
 |             exdeq1.f90, exdeq2.f90, exdeq3.f90, exdeq4.f90,
 |              axdeq.f90, axdeqc.f90, cxdeq.f90, genroff.f90,
 |               plmvarc.f90
 |
 +-- Tplate/
 |    |
 |    +-- dpam_tp/        (Directory containing templates for 'dpan' programs)
 |    |    |
 |    |    +-- alog2asc.tp, daq2asc.tp, bdaq2asc.tp, dmaq2asc.tp,
 |    |         xldam.tp, xldpn.tp, xldhg.tp, filtadasc.tp,
 |    |          despike.tp, dvcorr.tp, ecomp.tp, fcomp.tp, 
 |    |           ggrid.tp, ggrids.tp, pframe.tp, pltrk.tp,
 |    |            pchkdv.tp, pchkmag.tp, pchkres.tp, pchkcomp.tp,
 |    |             xslin.tp, xslina.tp
 |    |
 |    +-- gdmp_tp/        (Directory containing templates for 'gdmp' programs)
 |    |    |
 |    |    +-- sel.tp, seldb.tp, seldb2.tp, gtopo.tp,
 |    |         adjlv.tp, gadd.tp, gsub.tp, gtrim.tp,
 |    |          govlay.tp, gojoin.tp, gmerge.tp, txproj.tp,
 |    |           altchg.tp, gtrf.tp, altx.tp, rearx.tp,
 |    |            plmap.tp, plmapc.tp, plmapl.tp, plmapcl.tp,
 |    |             plmapg.tp, plmaps.tp, plmapcs.tp, shade.tp,
 |    |              xplmap.tp, xplmapc.tp, xplmapcs.tp
 |    |
 |    +-- anam_tp/        (Directory containing templates for 'anam' programs)
 |    |    |
 |    |    +-- emag.tp, emagf.tp, amag.tp, amagc.tp, cmag.tp, 
 |    |         cmagf.tp, plamag.tp, plamagc.tp, tmcorr.tp,
 |    |          tmcfix.tp, lcecorr.tp, aaptdp.tp, galtf.tp,
 |    |           galts.tp, emeq.tp, ameq.tp, ameqc.tp,
 |    |            cmeq.tp, emeqs.tp, ameqs.tp, ameqsc.tp,
 |    |             cmeqs.tp, rpmeqs.tp, edeq.tp, adeq.tp,
 |    |              adeqc.tp, cdeq.tp, edeqs.tp, adeqs.tp,
 |    |               adeqsc.tp, cdeqs.tp, rpdeqs.tp, calmas.tp
 |    |
 |    +-- anamx_tp/       (Directory containing templates for 'anamx' programs)
 |         |
 |         +-- eimgd.tp, eimga.tp, aimgn.tp, aimgnc.tp, aimgs.tp,
 |              aimgsc.tp, nimgn.tp, nimgnc.tp, nimgs.tp, nimgsc.tp,
 |               cimgn.tp, cimgnc.tp, cimgs.tp, cimgsc.tp,
 |                fimgs.tp, fimgsc.tp, plsim.tp, plsimc.tp,
 |                 plxim.tp, plximc.tp, plimv.tp, plimvc.tp,
 |                  exdeq1.tp, exdeq2.tp, exdeq3.tp, exdeq4.tp,
 |                   axdeq.tp, axdeqc.tp, cxdeq.tp, genroff.tp,
 |                    plmvarc.tp
 |
 +-- data/            (Directory containing Service data)
 |    |
 |    +-- DEM/
 |    |    |
 |    |    +-- renewal_script     Script to update filename path of DEM40 data
 |    |    |
 |    |    +-- dem40/
 |    |         |                   (Directory for DEM40 data)
 |    |         +-- Z51/, Z52/, Z53/, Z54/, Z55/, Z56/
 |    |
 |    +-- IGRFCOEF/
 |    |    |                        (IGRF coefficients files)
 |    |    +-- igrf01.coef, igrf02.coef, igrf03.coef, igrf04.coef,
 |    |         igrf05.coef, igrf06.coef, igrf07.coef, igrf08.coef,
 |    |          igrf09.coef, igrf10.coef, igrf11.coef, igrf12.coef
 |    |
 |    +-- geoid/
 |    |    |
 |    |    +-- world.hgeoid(12MB)   World geoid height data (Low resol.) [NGA]
 |    |    |
 |    |    +-- NGA/
 |    |         |         (Directory for NGA geoid height data)
 |    |         +-- Z51/, Z52/, Z53/, Z54/, Z55/, Z56/
 |    |                 Contents data to be stored in these directories
 |    |                  are contained in the TGZ archive "data.tgz".
 |    +-- shore/
 |         |
 |         +-- wcoast.jpn, wriver.jpn    Small scale map data
 |         +-- world.cst                 World map data
 |         |
 |         +-- renewal_script     Script to update filename path of shore data
 |         |
 |         +-- Z51/, Z52/, Z53/, Z54/, Z55/, Z56/,
 |              t51/, t52/, t53/, t54/, t55/, t56/
 |                                  (Directory for [shore, etc.])
 +-- PDFs/
 |    |
 |    +-- openfile0648.pdf     PDF version of this report (Cover page)
 |    +-- English.pdf          PDF version of this report (English portion)
 |    +-- Japanese.pdf         PDF version of this report (Japanese portion)
 |
 +-- TESTs/
      |
      +-- Tdpam.tgz(35MB), Tgdmp.tgz, Tanam1.tgz, Tanam2.tgz(7MB), Tanam3.tgz,
           Tanamx1.tgz, Tanamx2.tgz, Tanamx3.tgz, Tanamx4.tgz, Tanamx5.tgz
                      [TGZ archives of Test data and results] 
                       They are records of Test Batch execution of programs,
                        and the same test can be repeated easily.
                         See the files "@Memo.txt", "@scrlog*.txt", "cntl*",
                          and "cntl*.log", if interested.
                      (Not for the purpose of showing good looking result.)

References     [in chronological order]

  1. Nakatsuka, T. [1986] Calculation of the International Geomagnetic Reference Field. GSJ Open-file Report, no.27, 25p., Geol. Surv. Japan.
  2. Kanazawa, T. [1988] Calculation formula for the relationship between WGS-84 and Tokyo Datum indicated on Japanese charts. Data Rept. Hydrogr. Obs., Ser. Satellite Geodesy, no.1, 76-81.
  3. Nakatsuka, T. [1989] Systematization of aeromagnetic survey (II) —Data processing software—. Bull. Geol. Surv. Japan, 40, 99-111.
  4. Smith, W.H.F., and P. Wessel [1990] Gridding with continuous curvature splines in tension. Geophysics, 55, 293-305.
  5. Nakatsuka, T. [1991] Source of data processing program for airborne magnetic survey at the Geological Survey of Japan. GSJ Open-file Report, no.163, 162p., Geol. Surv. Japan.
  6. Okuma, S., M. Makino, and T. Nakatsuka [1994a] Magnetization intensity mapping in and around Izu-Oshima Volcano, Japan. J. Geomag. Geoelectr., 46, 541-556.
  7. Nakatsuka, T. [1994b] Magnetization intensity mapping with surrounding sources —Minimum norm inversion of underdetermined problem—. Proc, 91st SEGJ Conference, 77-81, Soc. Explor. Geophys. Japan.
  8. Nakatsuka, T. [1995] Minimum norm inversion of magnetic anomalies with application to aeromagnetic data in the Tanna area, Central Japan. J. Geomag. Geoelectr., 47, 295-311.
  9. Okuma, S., T. Nakatsuka, S. Takakura, and R. Morijiri [2002] Helicopter-borne EM survey over Usu Volcano, Hokkaido, Japan, with a special reference to the Usu 2000 Eruption. Bull. Volc. Soc. Japan, 47, 533-546.
  10. 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.
  11. Nakatsuka, T., and S. Okuma [2004a] Passive magnetic compensation for stinger sensor in helicopter-borne magnetic survey. Proc, 110th SEGJ Conference, 318-321, Soc. Explor. Geophys. Japan.
  12. Nakatsuka, T., S. Okuma, R. Morijiri, and M. Makino [2004b] High-resolution aeromagnetic anomaly map of the Kobe–Kyoto area (1:100,000). Total Intensity Aeromagnetic Maps, no.42, Geol. Surv. Japan, AIST.
  13. Geological Survey of Japan [2005a] Aeromagnetic Database of Japan. Digital Geoscience Maps, P-6, (2 CD-ROM discs), Geol. Surv. Japan, AIST.
  14. Nakatsuka, T., and S. Okuma [2005b] Data processing system for helicopter-borne aeromagnetic survey. Proc. 113th SEGJ Conference, 239-242, Soc. Explor. Geophys. Japan.
  15. Nakatsuka, T., and S. Okuma [2005c] Development of a helicopter-borne magnetic survey system in use of a nose boom magnetic sensor and its passive compensation for aircraft's magnetic field. Butsuri-Tansa (Geophys. Explor.), 58, 451-459.
  16. Nakatsuka, T., and S. Okuma [2006a] Reduction of geomagnetic anomaly observations from helicopter surveys at varying elevations. Explor. Geophys., 37, 121-128; Butsuri-Tansa (Geophys. Explor.), 59, 121-128; Mulli-Tamsa (Geophys. Explor.), 9, 121-128.
  17. Nakatsuka, T., and S. Okuma [2006b] Crossover analysis for the data of aeromagnetic survey with varying elevations, and its application to extracting magnetic anomaly change. Proc. 114th SEGJ Conference, 174-177, Soc. Explor. Geophys. Japan.
  18. Nakatsuka, T. [2006c] Library Software for Geophysical Data Processing and Representation (2). GSJ Open-file Report, no.442, 102p. (+ 1 CD-ROM), Geol. Surv. Japan, AIST.
  19. Nakatsuka, T., and S. Okuma [2006d] 3D subsurface imaging by aeromagnetic data. Proc. 115th SEGJ Conference, 196-199, Soc. Explor. Geophys. Japan.
  20. Nakatsuka, T., and S. Okuma [2006e] Crossover analysis for the aeromagnetic survey at varying elevations, and its application to extracting temporal magnetic anomaly change. Butsuri-Tansa (Geophys. Explor.), 59, 449-458.
  21. 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.
  22. Nakatsuka, T. and S. Okuma [2009a] Aeromagnetic 3D subsurface imaging with source volume minimization. Extended Abstracts, 9th SEGJ Intl. Symp., 6 (4p.), Soc. Explor. Geophys. Japan.
  23. Nakatsuka, T. and S. Okuma [2009b] Compilation of magnetic anomalies at a smooth surface of 1,500m above terrain by using the Aeromagnetic Database of Japan. GSJ Open-file Report, no.516, 24p. (+ 1 CD-ROM), Geol. Surv. Japan, AIST.
  24. Nakatsuka, T., M. Utsugi, S. Okuma, Y. Tanaka, and T. Hashimoto [2009c] Detection of aeromagnetic anomaly change associated with volcanic activity: An application of the generalized mis-tie control method. Tectonophysics, 478, 3-18.
  25. Okuma, S., C. Stotter, R. Supper, T. Nakatsuka, and R. Furukawa [2009d] Aeromagnetic constraints on the subsurface structure of Stromboli Volcano, Aeolian Islands, Italy. Tectonophysics, 478, 19-33.
  26. Nakatsuka, T. [2009e] Library software for geophysical data processing and representation (3). GSJ Open-File Report, no.518, 107p. (+ 1 CD-ROM), Geol. Surv. Japan, AIST.
  27. Nakatsuka, T. [2009f] 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.
  28. Nakatsuka, T. and S. Okuma [2011] Aeromagnetic 3D subsurface imaging in the Otoge Cauldron, Shitara area, Central Japan. Proc. 10th SEGJ Intl. Symp., 285-289, Soc. Explor. Geophys. Japan.
  29. Nakatsuka, T., and S. Okuma [2014a] Aeromagnetic 3D subsurface imaging with effective source volume minimization and its application to data from the Otoge cauldron, Shitara, Central Japan. Explor. Geophys., 45, 16-23.
  30. Okuma, S., T. Nakatsuka, and Y. Ishizuka [2014b] Aeromagnetic Constraints on the Subsurface Structure of Usu Volcano, Hokkaido Japan. Explor. Geophys., 45, 24-36.
  31. Nakatsuka, T. [2015] Calculation of the International Geomagnetic Reference Field (5). GSJ Open-file Report, no.614, 24p. (+ 1 CD-ROM), Geol. Surv. Japan, AIST.
  32. Okuma, S., and T. Nakatsuka [2016] Aeromagnetic 3D subsurface imaging of geothermal areas —A case of Akita-Yakeyama Volcano, northeast Japan—. Butsuri-Tansa (Geophys. Explor.), 69, 41-51.