a fortran iv program for the determination of the … · 2019. 12. 31. · fortran iv program is...

130
Reports of the Department of Geodetic Science Report No. 2 1 2 A FORTRAN IV PROGRAM FOR THE DETERMINATION USING OF THE ANOMALOUS POTENTIAL STEPWISE LEAST SQUARES COLLOCATION by C. C. Tscherning The Ohio State Univer&y Department of Geodefic Science 1958 Neil Avenue Columbus, Ohio 4321 0 July, 1974

Upload: others

Post on 02-Mar-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

Reports of the Department of Geodetic Science

Report No. 2 1 2

A FORTRAN IV PROGRAM FOR THE DETERMINATION

USING OF THE ANOMALOUS POTENTIAL STEPWISE LEAST SQUARES COLLOCATION

by C. C. Tscherning

The Ohio State Univer&y Department of Geodefic Science

1958 Neil Avenue Columbus, Ohio 4321 0

July, 1974

Page 2: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

Repor t s of the Depar tment of Geodetic Science

Repor t No. 212

A FORTRAN IV PROGRAM FOR THE DETERMINATION O F THE ANOMALOUS POTENTIAL USING STEPWISE LEAST SQUARES COLLOCATION

by

C. C. Tschern ing

The Ohio Sta te Universi ty Depar tment of Geodetic Science

1958 Neil Avenue Columbus, Ohio 43210

July, 1974

Page 3: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

Abstract

The theory of sequential least squares collocation, as applied to the determination of an approximation ?? to the anomalous potential of the Earth T, and to the prediction and filtering of quantities related in a linear manner to T, is developed.

The practical implementation of the theory in the form of a FORTRAN IV program is presented, and detailed instructions for the use of this program are given.

The program requires the specification of (1) a covariance function of the gravity anomalies and (2) a se t of observed quantities (with known stan- dard deviations).

The covariance function is required to be isotropic. It is specified by a se t of empirical anomaly degree-variances all of degree less than or equal to an integer I and by selecting the anomaly degree-variances of degree greater than I according to one of three possible degree-variance models. The observations may be potential coefficients, mean o r point gravity anomalies, height anomalies o r deflections of the vertical. A filtering of the observations will take place simultaneously with the determination of ?.

The program may be used for the prediction of height anomalies, gravity anomalies and deflections of the vertical. Estimates of the standard e r ror of the predicted quantities may be obtained a s well.

The observations may be given in a local geodetic reference system. In this case parameters for a datum shift to a geocentric reference system must be specified. The predictions will be given in both the local and the geo- centric reference system.

N

T may be computed stepwise, i. e. the observations may be divided in up to three groups. (The limit of three is only attained when potential coefficients a r e observed, in which case these quantities will form the f irst set of observations. ) Each set of observations will determine a harmonic function and Twill be equal to the sum of these functions.

N

The function T determined by the program will be a (global o r local) solution to the problem of Bjerhammar, i. e. , it will be harmonic outside a sphere enclosed in the Earth, and it will agree with the filtered observations.

Page 4: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

Foreword

This report was prepared by C. C. Tscherning, Research Associate, Department of Geodetic Science, and the Danish Geodetic Institute. This work was sponsored, in part, by the Danish Geodetic Institute, and in part by the Air Force Cambridge Research Laboratories, Bedford, Massachusetts, under Air Force Contract No. F19628-72-C-0120, The Ohio State University Research Foundation Project No. 3368B1, Project Supervisor, Richard H. Rapp. The Air Force Contract Monitor is Mr. Bela Szabo and Dr. Donald H. Eckhardt is Project Scientist.

Funds for the support of certain computations and program developments described in this study were made available through the Northern European University Computer Center, Lyngby, Denmark and through the Instruction and Research Computer Center of The Ohio State University.

A travel grant was supplied by the NATO Senior Fellowship Scheme.

The reproduction and distribution of this report was carried out through funds supplied by the Department of Geodetic Science. This report was also distributed by the Air Force Cambridge Research Laboratories as document AFCRL-TR-74-0391 (Scientific Report No. 17 under contract no. P19628-72- c-0120).

The writer wishes to thank Dr. R. H. Rapp for valuable suggestions and critic ism and Jannie Nielsen for relieving me of most of my household respon- S ib ilities in the period when this report was being prepared.

iii

Page 5: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

Table of Contents

1. Introduc tion 2. The Basic Equations

2.1 Least Squares Collocation 2.2 Equations for the Covariance of and Between Gravity

Anomalies, Deflections of the Vertical, Height Anom- alis and Potential Coefficients.

2.3 Stepw ise Collocation

Data Requirements

3 .1 Observed Quantities 3.2 The Reference Sys tems 3.3 The Covariance Function

4. Main lines of function of the IWRTRAN IV Program. 5. The Storage of the Normal Eq~~at ions and the Function of the

Sub-Programs.

5.1 The S torage of the Normal Equations 5.2 Solution of the Normal Equations and Computation of the

Estimate of the E r ro r of Prediction, Subroutine NES. 5.3 Transformation BetweenReference Systems, Subroutine

ITRAN. 5.4 Computation of the Normal Gravity, the Normal Potential

and the Contributions from the Potential Coefficients. Sub- routines GRAVC and IGPOT.

5. 5 Coinpu ta tion of Euclidian Coordinates, Convers ion of Angles to Radians, Subroutines EUCLID and RAD.

5.6 Subroutines for Output Management and Prediction Statis- tics, HEAD, OUT, COI\IPA.

5.7 Subroutines for the Computation of Covariances, PRED illld SUMK.

6. Input Spec ifieations 7. Output and Output Options 8. Recornmendat ions and Conclus ions.

References Appendix

A. The FORTRAN program. B. An input example.

Page 1 3

C. An output example. iv

Page 6: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

1. Introduction.

The theory of least squares collocation has been discussed extensively by Kramp (1969), hloritz (1972, 1973), Lauritzen (1973), Grafarend (1973) and Tscherning (1973). Collocation was originally introduced by Krarup (1969) a s a method for the deter~nination of the anomalous potential using different kinds of observations. Primari ly Moritz (1972) has extended the theory to a wider field. This report will only consider the use of least squares collocation for the deter- mination of the anomalous potential, T and the estimation of quantities dependent on T.

We will regard the problem of the determination of T a s being equivalent to the solution of the Bjerhammar-problem, i. e. the determination of a function, harmonic outside a sphere totally enclosed in the Earth and regular a t infinity, which agrees with observed values of e. g. gravity anomalies and deflections of the vertical.

It is not required, that the observations and the solution agree exactly. The observations will contain a certain amount of "noise", the magnitude of which is specified by an estimatecl stmckird e r ro r .

Least squares collocation will fil ter out some of this noise, and the solution will agree cxactly with t,he filtered observations.

N

Having determined a solution, T , to the Bjerhammar problem, this function can naturally he used to compute geoid heights (or more correctly, height anomalies), gravity anomalies o r deflections of the vertical in points in the s e t of harmonicity. Hence, by solving the Bjerhammar problem, we have implicitly also solved e . g. the problems of interpolation o r extrapolation (pre- diction) of gravity anomalies o r deflections and the problem of astrogeodetic o r astrogravimetric geoid computation.

An Algol-program, which used this approach was published in Tscherning (1972). The program could only handle a very limited amount of observations. In the FORTRAN IV program presented in this report, we have taken advantage of the availability of a computer (IBhI System 370), which has large core storage and fast peripherial units (disks), s o that very large amounts of data can be treated. Thus, the use of FORTRAN IV, which does not have variable dimension- ing of amays , has required that certain (arbi trary) limits have been put on e.g. the number of observations, which the program can handle.

Page 7: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

h section 2 we will present the basic equations of least squares collocation a s applied to the Bjerhammar problem. We will also discuss the method of step- wise collocation, which differs solnewhat from the p

r

ocedure described by Moritz (1973). All the observed quantities must be in the same reference system. This requirement is discussed in section 3. The main lines of function of the FORTRAN IV program is described in section 4. The most important details a r e given in the following section, which especially discusses the subprograms used. Input and output options a r e described in sections G and 7 respectively, and the final section 8 contains some recommendations and conclusions. The FORTRAN program, an input and an output example a r e contained in an ap- pendix.

References a r e given by author name and year, with one exception: Heiskanen and Moritz, Physical Geodesy, will be referenced only by PG, because references to this book occur frequently.

Page 8: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

2. The Basic Equations

There a r e two ways of approach to least squares collocation. A mathe- matical (functional analytic) and a statistical. The mathematical approach is the most well founded and without dark spots. But its appreciation requires a math- matical background, which not yet is common among geodesists. The statistical approach is with a first glance less difficult and gives a sufficient insight. This means, that a geodesist, well educated in the theory and application of least squares adjustmcnt, will be able to use the method.

We will, without hereby having questioned the intellectual ability of the reader, use the statistical approach in the following presentation of the basic equations of least squares collocation.

2 .1 Least sauares collocation.

Let us suppose, that T is an element of a sample space H of functions harmonic outside a sphere totally enclosed in the Earth. We will denote the probability measure of H by @. Let the random variables Yp be the mappings, which relate a function in H to the value of the function in the point P , i.e. Yp (T) = T(P). The variables Yp will then form a stochastic process with the se t of harnzonicity a s index set (provided P fulfills some basic requirements see e. g. Grafarend (1973)). The covariance between two random variables Yp , YQ will be denoted cov(Tp , TQ ) , because Yp(T) = T(P) and YQ (T) = T(Q). It is equal to:

We will require, that the variance cov(Tp , Tq) is finite.

Example. Following Meissl (1971), the probability measure 9 may be defined by specifying the distribution of the random variables, Y, , which maps

m T into its coefficient v& in a development of T a s a series in solid spherical har- monics. Let u s suppose that this random variable has a Gaussian distribution with mean value zero and variance oe(T, ~)/m only depending of the degree 4, we will then have

Page 9: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

where $ is the spherical distance between P and Q, r and r' the distance of P and Q from the origin, R the radius of the (l3jerhammar)-sphere bounding the set of harmonicity and Pi (cos J r ) the Legendre polynomial of degree 1.

The constants ol(T, T) a r e called the (potential) degree variances. The CO-

variance function will be isotropic, i. e. invariant with respect to rotations of the pair of points P and Q around the origin*

From the random variables Yp we may form a second order stochastic field. This field consists of all random variables, which a r e linear combinations o r limits of linear combinations of a finite number of these random variables and which have finite variance, (cf. e.g. Parzen (1967), page 260).

Their covariances can all be derived from the covariance (1). Let us regard

Then

And generally for quantities si and s , where

we have

(We have here implicitly presupposed, that cov (Tp, S J ) regarded a s a function of P and Y j (cov(Tp, TQ )) regarded a s a function of Q, a r e elements of the sample space H, i. e. that they a re harmonic. This will be proved below).

The equation (3) is the so called law of propagation of covariances, Moritz (1972, page 97).

Page 10: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

We wi l l denote

(4) c l j = cov(s,, s j ) , C = {c l j ] a q x q matrix,

( 5 ) cp1 = cov(Tp , si) , Cp= {cP1 ] a q-vector and

(We will below use subscripted quantities in brackets, { ] to denote vectors o r matrices. In case the limit(s) of the subscript(s) a r e not obvious, the upper limit(s) will be indicated by subscripts, i, e. C = {cil l,,, ).

We will have to regard one more kind of random quantities (independent of the above discussed), namely the random noise, n. A random variable will be associated with each of the random varial~les Ys. They a r e al l supposed to be Gaussian distributed with mean value zero, known variance (denoted 0:) and un- correlated. The covariance matrix, which hence is a diagonal matrix, will be

2 denoted D = {dl j 3 , dil = OS

Following Moritz (1972), the basic equation of llobservationfl is

where X is the measurement o r observation, S' the corresponding l1signalU and n is the noise. X, S' and n a r e q-vectors, where q is the number of observations. The n-vector X comprises n parameters, and A is a known q x m matrix.

Let us now assume, that we want to estimate the outcome S of a stochastic variable Ys , given a set of observed quantities X, Denoting C = C+D we obtain from Moritz (1972, eq. (2-38) and (2-35))

where the superscript T means transposition.

The corresponding estimate of the e r r o r of estimation m?(of S) and Exx (of X) a re , cf. Moritz (1972, eq. (3-38) and (3-33))

Page 11: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

T - 1 with h, = C. C and C,. is the variance of S.

The program presented in this report can only handle the non-parametric (i.e. X = 0) case. But the general equations a r e presented here, so that we later on can point out the main changes, which will have to be made in order to incorporate the parameters X.

The special case we will consider here can then be described by the follow- ing equations :

T --l (12) s = C . C x and

T The filtered observations E'are obtained from (12) by substituting C for

c:.

The equations (12) and (13) differ from the equations given by PG(eq. (7-63) and (7-64)) only in that C has been substituted for C and that we a r e not restricted to consider only gravity anomalies.

The quantities we want to consider here a r e potential coefficients, gravity anomalies, deflections of the vertical and height anomalies. They a r e all (at least in spherical approximation) expressible a s either linear combinations o r limits of linear combinations of values of the anomalous potential. We will pre- suppose, that the variances of the corresponding stochastic variables al l a re finite. Equation (3) is hence valid for these kinds of quantities.

The value of the Laplace operator A, applied on T and evaluated in a point P in the set of harmonicity,

is related to a stoclmstic variable, YATp. This variable will also belong to the stochastic field (variance zero) and we will have for an arbitrary stochastic variable Y, :

Page 12: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

Hence, the covariance between a quantity S and the value of the anomalous potential in P is a harmonic function (regarded a s a function of P).

Let us now assume, that we want to estimat the value of T in a point P from a se t of observations X = {X, 1, i = l , . . . ,q. We then have from (12),

Introduc ting the solution vector

we have 9

N

(17) T (P) = C: b = [ c o v ( ~ , , S, )IT [b, } = 1 cov (Tp, S, )bl i= l

Using (11) we see that Q

i. e. ?? (P ) is a harmonic function.

By also requiring, that the functions in the sample space H a r e regular a t infinity, it can be shown, that ?(P) is regular a t infinity a s well.

We have then obtained a solution to the problem of Bjerhammar, if we 2 can prove, that the g, = S, = X, for us, (or d,,) = 0. But this is easily seen, '

because a

This fact makes available an easy test of a collocation program. The used obser- vations a r e predicted and it is checked, that the predictions agree with the obser- ved values (and that the estimates of the e r r o r of prediction a r e zero).

Page 13: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

2.2 Equations for the covariances of and between gravity anomalies, deflections of the vertical, height anomalies and potential coefficients.

The relation (3) between the signal and the anolnalous potential has been given in Tscherning and Rapp (1974), eq. (30)-(33)) in spherical approxima~ion for gravity anomalies, height anomalies and deflections of the vertical. We have for the height anomaly in P

the latitude component of the deflection of the vertical

the longitude component of the deflection of the vertical

the point (free-air) gravity anomaly

and the mean (free-air) gravity anomaly

where r is the distance froin the origin, rp the latitude, X the longitude, y the reference gravity and A the area over which the mean gravity value is computed.

We may, a s explained in Tscherning and Rapp (1974, section 10) repre- sent mean gravity anomalies by point anomalies in a certain height above the center of the a r ea A. For this reason we will not in the following distinguish be- tween mean and point gravity anomalies. The program is able to use all the quantities (20)-(24) a s observed quantities for the computation of ?. The same kind of quantities may also be predicted by the program.

One more kind of quantities, potential coefficients, can be used, though only a s observed quantities. The given coefficients will generally be the coefficients of the potential of the Earth, W, expanded in spherical harmonics and not the coefficients of the ano~nalous potential. Denoting the normal potential by U we have

Page 14: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

and for W and U expanded in fully normalized spherical harmonics

Wa +- ( r * s i n ~ ) ~ and 2

W

k M a l J24 - w2 (26) U(P) = ( 1 - )C ( ) J = = ~ P,Q(COS a))+, ( r sin Q)',

a= l

where w is the speed of rotation of the Earth, 6 = 90' - 9, kM the product of the gravitational constant and the total mass of the Earth, the coefficients and - Cam the potential coefficients, and X ( c o s 8 ) an associated Legendre polynomial, normalized so that

The coefficients J8a in (26) a r e given in PG, (eq. (2-92)).

For the potential coefficients we then have the following equation

where wis the surface of the sphere with radius equal to the semi major axis a and with center in the origin. (We a r e now denoting two quantities by W , but since they a r e used in a different context, we hope, that no confusion is caused).

In the program it is possible to use one of three different kinds of (isotropic) covariance functions, which we below will distinguish by a subscript k, k = 1, 2 or 3. They a r e al l specified by a so called anomaly degree-variance model, i.e. by the coefficients a , , ~ (Ag, Ag) of degree A greater than a constant I of the covariance function of the gravity anomalies developed in a Legendre series:

Page 15: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

where r' is the distance of Q from the origin, R the radius of the Bjerhammar A

sphere, Jr = the spherical distance between P and Q and a~ (Ag, Ag) a r e empirically determined coefficients.

The three different kinds of covariance functions correspond to three of the five anomaly degree-variance models discussed in Tscherning and Rapp (1974, section 8). The models a r e for l < = 1 ,2 and 3:

where A, , k = l , 2 and 3 a r e constants integer (denoted IK in the program).

of dimension mgn12 and E is apositive

A part of the specification of the degree-variance model is the value of the radius of the Bjerhammar sphere. In the program this quantity is specified through the ratio R/R, , where R, is a mean Earth radius, (equal to 6371.0 km in the program).

The covariance function of the anomalous potential may be expanded in a similar way in a Legendre series, cf. Tscherning and Rapp (1973, eq. (144)),

where t = cos J r , S = -7 R' and r r

(Degree-variances of degree zero and one wi l l always be equal to zero.)

10

Page 16: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

We rearrange (33):

Denoting

we will have

From this covariance function all the other covariance functions can be derived using the "law of propagation of covariances", eq. ( 3 ) and the equations (20)- (24) and (28) relating the observed quantities to the anomalous potential.

Due to the linear relationship (39) we generally have for two arbitrary randoin variables Y and Y j

where S, = Yi (T) and s J = Y J (T).

For either s i equal to Agp o r < p 2nd s j equal to A& or can the quantity cov: (si , sl) be represented by a closed expression, cf. Tschcrning and Rapp (1974, equations (105)-(107), (115)-(117) and (130)-(132)).

Page 17: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

For the other part, cov; (si , s J ) we have (from Tscherning and Rapp 11974 equations (145)-(150) and (50)))

with

Covariance functions, cov(si, sj ), where either si o r s j is a deflection component can not explicitly be found in Tscllerning and Rapp (1974). But using the equations (20)-(24) we get (K = K ( P , Q) = cov, (Tp Tq )):

Page 18: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

Applying these equations on cov, (Tp, TQ), (39) shows, that the quantities we need to determine a r e (apart from the derivatives of t with respect to the latitude and longitude) :

The last term in each of the equations (51)-(53) a r e identical to Tscherning and Rapp (1974, eq. (108)-(110), (118)-(120) and (133)-(135)) for k = 1 ,2 ,3 .

For the first term in each of the three equations we have, using (41), (42) and (43):

I

Page 19: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

with pi ( t ) = DtP (t) and ~,"(t.) = D:P,(~). A a

The sums (54) - (56) a r e evaluated in the program (subroutine PRED) using the recu

r

sion algodhm given in Tscherning and Rapp (1974, section 9 ) .

To avoid numerical prohleins for P near to Q, the following expressions a r e used fo r the evaluation of t and the derivatives of t with respect to and cc': (denoting: d X = X - X / a ~ ~ d d ~ = c o - ~ ' ) :

I (57) t = c o s $ = s i n a 0 s i r , ~ + c o s ~ * c o s c o ' ~ c o s ( d ~ )

=cos (dq) - cos cp ' cos * (1 - COS ( d X ) )

= 1 - 2 (S in2 (&o/2)+ cos cos c; sin2 (dA/2))

(58) Dpt =cos'p * sin cpl- sin rp COB COS (dX) = -sin(dv)+Zcos q'* sin9 sin2 ( d ~ / 2 ) ,

(59) Dmtt = sin(dcp)+2cosrp singis in2 (dh/2) and

(60) D' ~t =cos cp * cos c p t + s h ~ * s h v ' * cos(d~)xos(d~~)-( l -cos(dX)) *sins* sinv' cpcp

We will now introduce a compact notation for the normalized surface harnlonics, which will facilitate the presentation of the covariances between the coefficients of T developed in spherical harmonics and other quantities. Denoting

Page 20: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

and the coefficients of T developed in spherical harmonics by vAE we have

where s = a in this integration and P is on the surface of the sphere of radius a. From equations (28) we get

1

(2 1+1)' for m = 0 and Aeven, (63) vAm = a * k M * for m > 0,

for m < band m = 0 and J! uneven

We will now compute the covariances covk(vR,, S!) where S, is either v,!, !Q, ?')Q , A&, o r CQ . These covariances a r e not exylicitly used in the program, so we will not distinguish between the different covariance models, but denote the degree-variances by uQ(T, T), uA(T,Ag) and uA(Ag, Ag).

From eq. (62) and (33) we get

Using the well lcnown summation formulae, (PG(~-81'))

and the orthogonality propcrty of the surface harmonics, we get

Page 21: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

1 v, (0: A') , dw

Again using (62) and the orthogonality property we see, that

Ra a+1 % ( T , T ) ( ~ ) f o r l = A a n d j = m

- -

otherwise.

Thus, the covariance of two different anomalous potential coefficients is zero and their variance is equal to the degree-variance multiplied by a constant depending on R, a and the degree A.

The other covariance functions can be derived using (66) and (20)-(23):

and

Page 22: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

2.3 Stcpwise collocation.

The solution of the normal equations (8) and (9) may be a difficult numeri- cal task even when using a large computer, when the number of unknowils is greater than a few thousands.

Moritz (1973) uses the term sequential collocation when the observations a r e divided in two o r more groups and when the corresponding normal equations then a r e solved by inverting only the submatrices containing tlae covariances between the observations within one group.

Let us f irst consider an example, where the observations have been divided in two groups containing m, and m, observations respectively:

where X, is a m, vector and X, a m, vector of observations. The covariance matr ix is then divided in four subma1;rices accordingly:

and the vector of the covariances between the quantity S to be predicted and the observations becomes

Hence, according to Moritz (1973, eq. (1-22)) we have

Let u s regard the case where we want to estimate T(P). Denoting

Page 23: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

(80) bg = c l l ~ ~ ~ d l x , and

we see that

N

Hence, we a r e by using stepwise collocation, getting an estimate T which is equal to the sum of two other estimates.

The f i r s t estimate ?,(P) is computed by (76) and (77) from the observations X, using the original covariance functions. The residual observations d, % (78) is then computed. Then the second estimate ?,(P) can be obtained from (80) and (81) using the covariances of the residual observations, dlCZ2 and dlCp, (79). (Supposing the "noise" matrix D to be zero we easily see

which is nothing but the i, jth element of the matrix dlC2,. )

The formulae (76)-(81) .can be generalized a s to describe a partition of the observations into more than two groups. Such equations can for example, .be found in (1973, eq. (5-1)-(5-14)). We will here use a slightly different type of general equation.

For a partition in k groups,

and with

Page 24: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

we have the estimates (P) and based on the residual observations dI- ,xi (Le. on all sets of observations with subscript less than i):

and the final es tinmtes

Page 25: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

(As usual, the l inear equations corrcsponding to (80a) are denoted the normal- equations and b, the solution to the norinal equations. j

One of the main advantages achieved by using stepwise collocation is according to Moritz (1973, page 11, that the normal equation mat r ices to be in- verted a r e smal le r than the original c matrix. Thus, a s may be realized from equations (79) and (go), the total s torage requireinents a r e not diminished. So, when using a computer, which has peripheral storage units with fast access , stepwisc solution of the nornlal equations is of no r ea l advantage.

Thus, a cons iderable simpiification of the computations may be achieved when the residual covariances ~ J C l and d jCpi (79a) can be computed analytically. In this case, only the bl vectors (80a) a r e needed for the representation of and for the computation of p

r

edictions. The residual covariance inay naturally be computed analytically, when the datasets a r e ~ n c o r ~ e l a t e d , i. e. when d iC = CIi . But the possibility for analytical covariance also exists , when the f i r s t dataset x1 consis ts of potential coefficients.

The mat r ix Cl, is in this case a diagonal mat r ix with diagonal elements equal to the s u m of the q ~ ~ a n t i t i e s given in (67) and the e r r o r variances of the observed coefficient, o&. We will suppose, that a l l the variances a r e the s a m e for the same degree, R , and denote this variance by o:(R).

The elements of the vector b, a r e equal to the observed coefficient divided by the corresponding diagonal element. Let us then suppose, that potential coefficients up to degree I have been observed. The est imate 5 is then (cf. eq. (66), (67) and (77)):

Page 26: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

Using equations (6G), (67)-(79) and (85b) we easily see, that the residual obser- vations (78), d,x, a r e nothing but the original ,-., observations, but now referring to a higher order reference field, U1 = U + T1.

For the i, j'th element of dlCzz we get from ( G G ) and (79), supposing e.g. that S,, = T(p), S,, = T(Q) and that G ~ , xz, a r e the corresponding observed values (and P different from Q):

with

This quantity is zero for o ? ( ~ ) equal to zero. The covariance function (84) is in this case a local I'th order covariance function, cf. Tscherning and Rapp (1974, Section 9).

It is supposed in the program, that the e r r o r variances a: can be either a, disregarded or that they only depend on the degree. The program will, in the latter case, require that the quantity

Page 27: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

&- -- q2 (86) dluA (Q, Ag) = dlo (T, l') B a X"

is specified. The quantity will be treated as if it was an empirical degree-variance.

We have here seen, how we in one case explicitly can derive expressions for the covariance, c o v j d , ~ , , c ' r , ~ , ~ ). Anolher method would he simply to estimate a covariance f m c tion for the rcs idual. observations d1 x, . However, the program can only use three types of covariance fmct ions, and they a r e all isotropic.

We a re then restricted either to divide the observations x in groups of quantities, which a r e nearly uncorrela.ted or to find a kind of observations, which we can treat like the potential coefficients.

The potential coefficients a re (in a general sense) weighted mean values of the anolnalous potential. Mean gravity anomalies a r e also mean values, weighted with a function, which is equal to one in the considered a rea and zero outside.

A mean gravity znolnaly fieid will represent an amount of information which is e l a l to the znlount of information contained in a se t of potential coefficients 01 degree less than o r equal to an integer I. The magnitude of I will depend on the size of the area over which the mean anomaly is computed. 1 will be large mhen the a rea is small and small when the a rea is large. ( I will be zero when the a rea is the whole Earth and infinite when we are dealing with points). An estimate of the degree may be hund in the following way: The total number of equal a rea mean anomalies of a particula

r

size is theoretica!ly equal to the total area of the Earth divided by the a rea of the basic mean anomaly. Let us call this number N. For the,perfect recovery of N quantities we need a se t of coefficients of degree up to N5. This method of estimation will give us N Z 202 for l0 equal area anom- alies. The degree may also be estimated in a more empirical way. This can be done by first estimating the empirical covariance function of a se t of residual ob- servations (gravity anomzlies) cl,%. The first zero point of the empirical. co- variance ft~nction (regarded a s a function of the spherical distance $) will then give a reasonable estimate of the degree (cf. Tscherniag and Rapp, (1974, Section

9))s

As an example, the program described in this report was used to compute residual point gravity ano~nalics in a 2" 30 x 3" 40' square in the state of Ohio, U. S.A. The data set x did consist of three groups. The se t X, was a se t of po- tential coefficients of degree upto and inclusive of 20, given by Rapp (1973, Table G ) . X, consisted of 157 1" x 1' mean gravity znomalies surrounding the area and r;, was a se t of 420 pojllt gravity anomalies, spaced zs uniform a s possible with

Page 28: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

a distance of 7%' in latitude and 10' in longitude between the points. The data- sets X, and X, was regarded as errorless.

The covariance function recommended by Tscherning and Rapp (1974) was used (i.e. given by eq. (32) with B = 24 and A, = 425 mga12). The covariances d1CeiaJ can then be computed using a corresponding local 201th order covariance function (i. e. with degree-variances of order up to and inclusive of 20 equal to zero), cf. (84).

The function ??, is then computed without actually solving any normal equations. We have (cf. (83a) and with of( R ) = 0):

We will now, a s mentioned above represent the mean gravity anomaly a s a point anomaly in a certain height 11' above the center of the area. Let us denote this point by Q and its distance from the origin r'. (We have in this case used h f = r f - R, = 10.5 ltm, cf. Tscherning and Rapp (1974, Section 10)).

The residual anomaly is then, cf. eq. (78a) and (71):

Page 29: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

Figure 1: Empi?-ically determined covariance values of res ikml point gravity anomalies com- pa

r

ed with the local 205'th order covariance function,page 25,for varying spl-lerical distance $.

+ empirically determined values

- graph of the local covariance function

Page 30: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

i. e. , the mean anomaly computed with respect to the higher order reference field UT= US Tl. (The program does not use this equation for the computation of the res idual anomaly. The contribution from is evaluated us ing the actual length of the gradient of U1 , see the description of the subroutine IGPOT, Section 5.4).

N

The residual obsclvations dlx2 was then used to determine T, , this time by actually solving a se t of normal equations, obtaining the solution vector b2*

The residual point gravity anomalies were then computed by

d,x,=x,- d,~:, b, - * bl

T cf. (78a). The term CL? bl is again here the change due to the higher order reference field U1 .

The empirical covariance h n c tion was computed using d, x3 by taking the sample mean of the products of the residuals sampled according to the spherical distance between the points of observation. The size of the sample interval m7as 1 72'. The covariance function

with R/R, = 0.9998 was found to have the same zero point as the empirical covariance function, see Figure 1.

We then see, that the two mentioned methods give nearly the same es-timate of the integer L This agreeinent should merely be taken a s an illustration and not as a proof. It shows one of the inany kinds of coinputaticns the FORTRAN program can perform.

The choice of a proper covarinnce function is a delicate task, but we point out that the presented program may use three different degree-varianc e models and hence be usefd in test computations using different covariance functions.

2 5

Page 31: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

-. The program may compute T i n up to three steps. The different possibil-

ities a r e illustrated in Table 1. Note, that potential coefficjents always form a separate data se t , which will be the data se t X,.

Table 1

rU

Different: options for the Computation of T.

Number of s teps

Dataset May Contain:

1 xa I X3

Page 32: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

3, Data Requirements.

In this section the data requirements will be discussed. The precise

specifications a r e given in Section 6.

Three types of information a r e needed f o r the determination of T: obser- vations, information about the reference system of the observations and a co- variance function.

The observed quantities we want to use a r e (a) potential coefficients, (b) point o r mean f ree a i r gravity anomalies o r measured gravity values, (c) height anomalies and (d) deflections of the vertical.

The potential coefficients available will generally all be of a degree l e s s than 25. There has then only been reserved space in co re s to re for up to 625 coeflicients.

The program accepts potential coefficients, which a r e fully normalized and multiplied by 106. The coefficients can naturally only be used, when a value of kM and ihe s e m i major zxis a art! specified.

An observation (different f rom a potential coefficient) will be given by (1) the geodetic latitude and longitude, (2) a potential difference, (a geopotential number, for example), conve

r

ted into a metr ic quantity e. g. by dividing the dif- ference with the reference gravity and ( 3 ) the measured quantity. The height above the reference ellipsoid is regarded as unknown except, naturally, when i t itself i s the observed quantity.

A11 measured gravity values will have to be given in the same gravity reference sys tem o r a correction must be known. Measured gravity values a r e converted to free- air anomalies. The orthometric height must hence be known. The geodetic latitude (which i s used to evaluate the normal gravity) would princi- pally have to be given in a geodetic reference system consistent with the gravity reference sys tem (i .e. with the same flattening and s e m i major axis as used for the computation of the coeffic icnts in the e'xpression for the normal gravity). But the variation of the normal gravity with respect to the latitude i s so smal l , that this requirement can be neglected here. The point o r mcan gravity anomalies will all have to be free- air anomalies. They must al l r e fe r to the same normal gravity field. LE they a r e not a l l given with respect to the same gravity base reference system, the correction to be applied for the conversion must be known.

Page 33: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

A mean gravity anoinaly will be represented a s a point gravity anomaly a t a point of a certain height, h, above the ccnter of the area over which the mean value is computed. This height is specified by the ratio, R P between the sum of this height and the mean Earth radius R, and the mean Earth radius, i.e.

A height anomaly will have to be given in the same reference system a s the geodetic lat ik~de and longitude. This will generally require, that a height anomaly obtained through an absolute position determination and given in a geocentric ref- erence system must be transferred back to a local geodetic refe

r

ence system, before it can be used in the program.

We a re , with observed deflections of the vertical, faced with a complicated problem. The deflections a re equal to the difference between the astronomical coordinates of a point on the geoid and the geodetic coordinates of a point on the reference ellipsoid (multiplied with cosine to the latitude for the longitude difference).

We have herehy implicitly int~oduced assun~ptions about the mass densities in between the geoid and the astronomical station. To avoid this, the deflections should have been given at the proper height ( i .e . the height of the observation stations).

Thus, heights of astronomical stations a r e seldoin found recorded together with the deflections. But if the heights a r e actually recorded, the program will treat the deflections as quantities, which have not been reduced to the geoid.

The astronomical coordinates may carry systematical e r ro r s due to sys- tematic differences between s ta r catalogues o r due to the neglect of corrections for polar motion. The observations may be corrected for ltnown systematical e r ro r s , if they can be specified in the same way a s a datum shift, i. e. by specify- ing the corrections in the latitude and the longitude com~onents a t a certain point. Systematic e r ro r s in the height anornalies may be corrected in the same manner.

In Section 2 .2 we mentioned, that the equations which related the obser- vations and the anomalous potential was given in spherical approximation. This means, e.g. that all points onthe surface of the Earth a r e regarded as lying on the mean Earth sphere. This fact has been used in the program to speed up the computations. This is done by using the fact that the quantities

Page 34: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

will be the same for a group of input data.

Data which actually a r e observed above the surface of the Earth must be grouped s o that they all refer to a sphere with radius equal to a mean height of the points plus the mean Earth radius, R,. As for mean gravity anomalies, the height is specified in the program through the value of the quantity R P , (ey. (87)).

The standard deviations of observations, different from potential coef- ficients,will have to be given in meters for the height anomaly, in mgal for gravity observations and in a r c sec for deflection components. The standard deviations may be specified (1) individually for the single observations, (2) for a group of observations o r (3 ) a s being zero for all observations.

3 .2 The Reference Systems.

We have to know the parameters specifying the geodetic coordinate system. The program requires the semi major axis, a , and the flattening, f , to be specified.

The gravity formulae may then either be given (1) through the values of kX4, U, a, and f, (2) by specifying that the international gravity formulae and the Pots- clgm referencc system has bccn used o r (3 ) that the Szcdetic Refererce Systerr, 1967 has been used. One of the three excludes the others.

The covariance functions which can be used, will all have the degree- variances of degree .zero and one equal to zero. This implies, that we, in the computations, have to use the best possible kM value and a geodetic coordinate system which has origin coinciding with the gravity center of the Earth, Z-axis parallel to the mean axis of rotation and Z-X-plane equal to the mean Greenwich meridian plane.

We will also require the global mean value of the gravity anomalies, the height anomalies and the deflections to be zero. This requirement implies, that we have to use the best possible semi-major axis. The geodetic latitude and longitude may then be transformed into such a reference system by specifying the new kM, a, f values, the translation vector, the scale change and the three rota- tion angles for the rotations around the X, Y and Z axes respectively.

- The approximation T will be given in the same reference system a s the one

specified through the transformat ion parameters, i. e . in a geocentric reference sys tem. Predictions will be given in both the original and the new reference sys tem .

Page 35: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

3 . 3 The Covariance Function.

We explained in Section 2.2 how an isotropic covariance function can be specified through (1) a set of empirica.1 anonia7.y degree-variances of degree less than o r equal to an integer I, bl(ag, Ag) and (2) an anomaly degree-variance model for the degree-variances o , , ~ (Ag, Ag) for R greater than I.

The values of the empirical degree-variances will depend on the radius of the Bjerhanlmar sphere, R. We have, therefore chosen to specify these quantities on the surface of the mean Earth9 i. e. the quantities

must be given together with the ratio R/R,. The quantities (88) must be given in units of mga12.

The anomaly degree-variance model is for k = 1 and 2 specified through the constants A, and A, (eq. (30) and (31)) and for k = 3 through the constant A3 and the integer B (eq. (32)).

Thus, in the program the models a r e specified not through the constants A,, k = 1 , 2 o r 3, but through the variance of the point gravity anomalies on the surface of the Earth.

This qualltity is then used for the determination of A,. We have from (29):

Let us now, for example regard model 2, i. e. a2,p, (Ag, Ag) = A,@- 1) . Then (1- 2)

Page 36: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

I 2 $+2 h

(90) A,= (cov(Ag~ , Agp ) - 7 4 (Ag, Ag) !A

A = O

The infinite sum may be computed by the formula given in Tscherning and Rapp (1974, Section 8), and A, (and in the same way A, or A,) can then be found.

We will finally mention, that the ratio R/R, is used by the program for the computation of the radius of the Bjerhammar sphere.

Page 37: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

4. Main Lines of Function of the Program.

In Section 2 we mentioned that the program could be used to estimate ? N

from maxiinally three sets of observations X, , x, and X,. T would then be equal N N

to the sum of up to three harmonic functions, T, , T, and ?, . The limit of three was only attained, when potential coefficients formed the f irst se t of observations,

X1 *

We will here clescribe the function of the program, when we a r e in this situation, i.e. when we have three datasets X,, x, and x3, and X, is a se t of potential coeffic ients .

The flow of the program is illustrated in Figure 2. Several logical vari- ables determine the flow. The logical variable LPRED will e. g. be "false" until the estimation o f ? is finished and will have the value fltrue", when predictions a r e computed.

The program will s t a r t by initializingdiffermt variables. It will require illformation about the reference systems of the observations and use this infor- mation to select e . g. the proper formulae for the normal g~av i ty .

When the reference sys tem is not geocentric o r when the normal gravity does not correspond to a proper kM value, the necessary transformation elements and the kM value must be given.

The next step is then to read in the observations X,, the potential coef- ficients. The normal equations (12) will not have to be solved in this situation, cf. Section 2.3. ?, is represented by (83).

The following two steps, where we explicitly use the equations for collocation, will be denoted Collocation I and Collocation 11. We will f irst have to specify the covariance function and observations used in Collocation I:

The covariance h n c tion for the residual anomalies d, X, must be specified through the selection of an anomaly degree -var ianc e model and contingently by specifying a se t of low order empirical. deg

r

ee-variances.

The observations X, (and later X,) may be subdivided in different files according to format, kind of observed quantity etc. Each single observation i s f i rs t transformed to a geocentric reference system (if necessary). Then the residual observation is computed, by subtracting the contribution from Tl from the observed value. After the input of a file, the value of a local variable LSTOP will be input, which will signify if more files belonging to X, will have to be input.

Page 38: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

Figure 2

Flow-Chart of Program.

The main flow is determined by the values of the following logical variables:

LTRAN - coordinates and observations must be transformed to a geocentric reference system and gravity observations must refer to a gravity formulae consistent with the refe

r

ence sys tem.

LPOT = potential coefficients from first se t of I1observed" quantities.

LCREF= second set of observations (or third when LPOT is true) will be used, and the harmonic function computed by Collocation I will be used a s an improved reference field. LCREF is initialized to be false and will get its final value after Collocation I is finished.

LPRED = predictions a r e being computed.

LGRID = the predictions a r e computed in the points of a uniform grid.

LERNO = the e r r o r of prediction inus t be computed.

LCOMP= compare observed and predicted values (an observed value is input together with the coordinates of the point of prediction).

Legend:

T = true F= false

\input operation /

/butput operation\

reference system of observations

I \input LTRAN, LPOT]

arame ters

~~~~F I T

ut potential coefficients/ I I

SpecjIy kind of degree- ariance model to be used

1

Page 39: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

Figure 2 (cont'd)

~ p e c l ~ 6 C " i ~ r . s in the elected

-. F & ~ R ID) \ Specify kind an1 formkt of file 1 + T

of obsei-vations o r fi le of coor

[-{reference svs tern I V-

I ~ o n q m t e contribution from reference ] ],F k l f i e l d given by potential coefficients I

1~ {&/I and the residual observations when I l

ution from Collocation I ancl

ut u s o utions A

1 Pu tput p

r

ediction l Y

rid o r file ?

Page 40: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

After the las t file has been input, the vector d, ,u, is stored on a disk. The coefficients of the nornml equations a r e then computed and stored on the disk a s well.

A subprogram NES, which only uses a limited amount of core store, will then compute the solution vector b, and in this way 'i;, is determined.

N The solution vector may be output on punched cards , s o that the function

T, can he retrieved without computing the coefficients of (and solving) the normal equations.

Collocation I is now finished. It is then possible either to s t a r t the compu- tation of predictions o r to s t a r t Collocation 11. -4 logical variable LCREF is used to distinguish between the two situations. Thus, LCREF will have to be true in this case , because we have decided to describe the situation, where three data- s e t s a r e used.

The covariance function of the residual observations d,% is then f i rs t specified. It is done in the same way a s for the covariance function used in Collocation I, though the kind of anomaly degree-variance model used will have to be the same.

The different files of the dataset X, can then be input. Each observations is f i r s t transformed to a geocentric reference system. Then the contribution f rom F, and F, i s computed, so that finally &X, can be stored. The coefficients of the new normal-equations can then be computed and the equations solved. Again, here the solution b, may be output on punched cards. (In case b, o r b, had been com- puted in previous runs of the program, their respective values would have been input and the coefficients of the normal equations a r e then not computed.)

When the equations have been solved, the reduced normal equation matrix i s retained on a disk, s o that e r r o r s of estimation can be computed, using equation (13).

The estimate of the anomalous potential is then, cf. eq. (82a)

rU N

T(P) = Tl (P) + ?'a (P) + ?,(P),

with T, (P) given by eq. (83),

Page 41: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

cf. eq. (81a).

The prediction of a height anomaly, a gravity anomaly o r a deflection component can now be computed using eq. (82a). The computation is based upon exactly the same type of information as w a s used for the computation of F, and and T, , i. e. geodetic latitude and longitude, and a height. The program itself may generate l is ts of coordinates. Such a l.ist is generated, when the logical LGRID is true. The l i s t will consist of coordinates of points lying in a grid. The grid i s specified by its south-west corner, and the number and magnitude of the grid increments in northern and eastern direction. The heights of the points a r e specified by the ratio R P (equation (87)).

The prediction of a quantity, e.g. a gravity anomaly will then be computed by f i r s t determining the difference between the anomaly given in a geocentric reference system and the reference system of the observations, Ago. The contri- bution && is then evaluated from ?, and the contributions from ?, and F, using (81a), i. e.

The predicted value i s then, (cf. eq. (82a)):

Predictions of other quantities a r e computed in the same way. A special facility for the comparison of observed and predicted quantities can be used, when the logical LCOMP is true. The differences between observed and predicted quantities a r e in this case, computed together with their mean value and variance. A sampling of the differences is done in intervals of a specified magnitude.

The processing time ( o r more correctly, the central unit processing time) will va ly depending on (1) the covariance function used, (2) the number of obsema- tions and (3) the number of cluantities to be predicted and estimates of e r r o r s to be computed. The program has been used for a variety of test computations, though never with more than 500 observations. The used processing times for anumber

Page 42: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

of situations a r e presented in Table 2. The computations were all made on the IBM system/370 inodcl 165 computer of the Instruction and Research Computer Centcr, Ohio State University. The so called Fortran H-extended compiler ( B M (1972)) was used for the compilation of the program. The normal equations were stored on an LBM model 3330 disk.

Table 2

Examples of Processing Times for Different Input Data and Covariance Functions. Potential Coefficients of Degree up to 20 Used.

Collocation I

Model

Collocation II**

Irde r of local zovar. fct. I

110 110 1 GO 160 110 110

Predictions

Number of

Total pro- cessing time

m sec

0 43 0 43 2 31 3 22 2 57 4 09 2 54 4 09

**Normal equations not computed and solved in Collocation I.

Page 43: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

5. The Storing of the Cocffic ients of the Normal Eq~mtions and the Function of the Subprograms . We will in this section discuss in more detail the function of an important

part of the main-program and the different subprograms which have been used. However, the most detailed clcscription is hund in the appendix, where the FOR- TRAN program, which includes a large number of comment statements, is repro- duc ed . 5.1 The storing of the normal equations.

The IBM system 370 model 165 computer of the Instruction and Research Computer Center of the Ohio State University makes available a 630K !byte) core storage for a usual program. Let us suppose, that w e have used 180 I< for the storing of the program and variables different from the coefficients of the normal- equations. We a r e then left with 450K bytes, which can be used to store these quan- tities. When the coefficients a r e represented a s double p

r

ecision variables (8 bytes), it is then possible to store 450* 1024/8=57600 coefficients in the core.

A system of equations with N unknowns, and a full symmetric coefficient matrix plus a constant vector of length N + l will totally occupy (N+2)* ( ~ + 3 ) / 2 8 byte positions. This implies, that we maximally can s d v e a system of eqmtioxls with 336 unknowns, if we want to store all the coefficients in the core.

The solution to the problem is naturally to divide the upper (or lower) tri- angular part of the matrix in blocks, which then a r e stored on a disk and later read into core storage when needed. The subdivision in blocks can be made in several ways. h case we wanted to compute the inverse matrix, the optimal subdivision seeins to be a subdivision in squares submatrices, a s used by Karki (1973). It is unnecessary to compute the inverse matrix for our purpose. The solution vector b (16) and the estimate of the e r ror of prediction (13) may both be computed without using the inverse matrix. It is enough to compute the so .called reduced matrix L',

where L is a lower triangular matrix, cf. Poder and Tscherning (1973). T computation of L is most easily programmed, when the upper triangular

The part of -

C is subdivided in blocks, which contain a number of consecutive columns, stored in a one-dimensioned array with the diagonal element having the highest subscript cf. Figure 3.

Page 44: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

Block Number

Number of last row stored in block

Figure 3. Blocking of 400 X 400 matrix

It is necessary, that two blocks can be stored sin~ultaneously in the core storage, i.e. the maximum block size is then 225K or (450/2) * 1024/8 = 28800 double pre- cision coefficients. This number is then also the upper limit for the dimension of the normal equation matrix, N. (Another limit is set by the magnitude of the disk unit used. For the I13M model 3330 disk used here, N will have to be less than c i rca 5000).

We have in this program edition preferred to limit the total storage re- quirements to 252K (which for the present operative system gives a reasonable turn-around time). Thus, 90K can be used for the storing of the required two blocks and for the buffer area necessary for the transfer between core store and disk.

Page 45: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

On a disk it is practical to block data in groups which occupy an integer number of tracks. We have then chosen to work with data partitioned into blocks of size 4800 *8 bytes, covering three tracks and to use a buffer area of 1200* 8 bytes. The total area occupied in core storage is hence 2*(38400) + 9600 bytes o r nearly 86K. (The disk discussed is, a s mentioned above, an BM model 3330 disk). Figure 4 shows the number of tracks used a s a function of the number of observations, N.

Tracks

Figure 4. Number of tracks used on an IT3M model 3330 disk unit for a varying number of uulmowm, N (12800 bytes used on each track).

40

Page 46: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

When a coefficient of the normal equation matrix C (eq. 12) i s computed (subroutine PRED) it will f i rs t be stored in an a r ray C of dimension 4700 (the last 100*8 bytes are used to hold two catalogues). Where the a r ray C is filled up with a s many columns a s possible, the content will be transferred to the disk and stored in a direct access dataset (see IBM (1973, page 67)). The constant vector of observations, X is stored together with the coefficients, a s if it was an extra column. The ficticious diagonal element of this column will contain the normalized square sum of the observations.

As mentioned above, the last 100*8 bytes of a block a r e used to hold two catalogues. The f i rs t catalogue contains the subscripts of the diagonal elements of the columns stored in the block. The second contains the subscript of the last zero element encountered in a column, starting the inspection of a column from the top. This catalogue may especially be used when C is a sparse matrix (e. g. when potential coefficients a r e not necessarily stored). In this program C will always be a full matrix, so the catalogue entries a r e just equal to zero. (Their value may be changed by the subroutine NES, in case singularities a r e encountered).

5.2 Solution of the Normal Equations and Computation of the Estimate of the E r ro r of Prediction, Subroutine NES.

The equations are , a s mentioned in Section 5.1, solved by f i rs t computing the upper triangular matrix L? (cf. (91)). This method is the well known Cholesliyls factorization method.

b

We obtain, from (15) and(91) by a left multiplication with L - ~

T The algorithm for the computation of the elements of L , 1 1 is

and nearly exactly the same for the computation of the elements b: of (92):

Page 47: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

i.e. the algorithm (93) will compute (92), when x is regarded and stored a s an extra column of the matrix E. When b' has been computed, b can easily be obtained from (92) by a so callcd back-substitution procedure. We note, that we have (cf. eq. (6) and (13)):

Then, using the algo

r

ithm (93) for j = m + l with C , ~ subst.ituted for c i J , we will obtain the quantity L-'C, for i = l, . . . ,m. By defining an element c , + ~ , , + ~ = CSs and using (9 3) for i = m + l we will have computed the quantity G", (13).

The sub

r

outine NES uses these algorithms for the computation of the vector b and the quantity 1%:. The elements of c a r e stored in the positions on the disk, where ear l ie r the coefficients of the upper triangular part of C w e r e stored.

The matrix @ is theoretically, always positive definite. Thus, mis takcs may be made, which make E non positive definite. The Choleskys algorithm (93) will not work in this case, because the diagonal element of L', J l l , is computed by taking the square- root of equation (93), where both sides have been multiplied with J i i . The occiireuce of a negative quantity

will not stop the execution of the program. NES will regxrd the column and corres- ponding row a s deleted, and b l will be put equal to zero.

Choleslyts method i s very favorable numerically. But the proper use of the method requires that the sum of the products II,, R,, in (93) a r e accun~ulated in a variable, which in this case would be in quadruple precision. The final product sum would then have to be rounded properly to double precision. Unfortunately rounding is not done by simply requiring the quadruple precision variable to be stored in a double precision variable, but supplementary statements have to be used. Thus, the solution vector by is heye obtained by computations performed in double precision only, which in this case anyway, gives a satisfactory number of significant digits.

'N \3 The solution vector b, is obtained in 0.71 Lz0; seconds, where N is the

dimension of the normal equation matrix.

Page 48: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

5.3 Transformation Between Reference Systems, Subroutine ITRAN.

We pointed out in Section 3, that it was necessary to transform the co- ordinates and measurements into a geocentric reference system. This transfor- mation is performed for the coordinates, the deflections and the height anonlaly by the subroutine ITRAN.

The subroutine uses the euclidian coordinates X, Y, and Z for a point with geodetic latitude and longitude X and with the ellipsoidal height equal to zero.

These coordinates a r e then transformed into geocentric coordinates,

XI Yl , Z, by

where (AX, AY, AZ) a r e the coordinates of the center of the old reference ellipsoid given in the new coordinate system, AL the scale change and (c, , c,, c,) the three infinitesimal rotations around the X, Y, Z axes respectively .

The new geodetic latitude 9 and longitude X, of this point is computed using the ite

r

ative procedure given in PG (p. 183). This computation will also furnish us with the change in the height anomaly, which is identical to the height of the point (Xl, Y,, Z1) above the ncw reference ellipsoid.

The change in the deflection components a r e then determined using the differences col - cp and X, - X.

A contingent correction for systematical e r r o r s in the deflections o r the height anomaly (cf. Section 3 . 2 ) , specified by the changes 65,, 6 ~ , , 65, in a point with coordinates cp,, X o , is conlputed by the subroutine using the equations given in PG (eq. (5-59)).

5.4 Computation of the Normal Gravity, the Normal Potential and the Contri- butions from the Potential Coefficients. Subroutines GRAVC and IGPOT.

The normal gravity may be given in two ways. Either by a gravity formula o r by specifying a norinn1 gravity field, from which the gravity formulae then can be derived, (cf. P G , Chapter 2). The only gravity formulae which can be used is the international gravity formulae, PG (cq. (2-126) and (2-131)). The normal gravity fields which can bc used, a r e those for which the reference ellipsoid i s an equipo tential surface, i. e. it i s specified by the values of kM, a, f and U.

Page 49: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

We may need to kuow the reference gravity in two situations. Firstly when free-air anomalies a r e computed using measured gravity values and secondly, when we want to compute the change in the gravity anomalies due to the use of a new reference sys tern.

The subroutine GRAVC will compute and store the constants (PG, Section 2.10) necessary for the computation of the normal gravity in one o r two reference systems. The constants used to compute the value of the normal potential (J,,, n s 5 in eq. (26)) and the change in the latitude component of the deflection of the vertical 5 due to the curvature of the normal plumbline (PG(5-34)) a r e computed as well. When the height exceeds 25 km, the derivatives of the ser ies (26) with respect to the latitude and the distance froln the origin, will be used for the compu- tation of the normal gravity and the change in 5 . Thus, this method of computation can, unfortunately, not be applied when the international gravity formula is used.

The values of the normal gravity, the normal potential and the change in S are computed by calling separate entries to the subroutine. The subroutine IGPOT computes the value of the potential W(P) and the three components of thz gradient of the potential, the value of kM, a and w , cf. eq. (25).

Let us, as usual, define V by

The coefficient modification method is used for the computation of the values of V and the gradient of V. This method uses the fact, that the derivative of a har- monic function with respect to euclidian coordinates again is a harmonic function. The potential coefficients of the (three) new harmonic functions D,TJ, DyTJg and DZV a r e computed by means of a recursion algorithm given in James (1969, eq. (3) and (4)). The recursion algorithm is identical to the algorithm used for the evaluation of the values of the solid spherical harmonics. This fact simplifies the computations very much. It furthermore makes it unnecessary to store the three se ts of modified potential coefficients. They a r e conqmted for each call of the subroutine from the original potential coefficients. The algo

r

ithm may easily be modifjed to compute higher order derivatives (without extra storage requirements). Thus, the algorithm may also be used in case the program is extended to use second order derivatives as observed quantities.

The value of the potential and the gradient is used to compute the residual observation d,%i :

The value of the potential is used together with the value of the normal

Page 50: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

potential (as computed by GRAVC) to compute a residual height anomaly. The gradient is used to compute the residual gravity anomalies and deflection compo- nents :

A where y, is the normal gravity, q j is the geodetic latitude plus a correction for the curvature of the plumbline and X , the longitude.

The components of the gradient used in (97a) a r e evaluated in a point with height equal to the orthometric height plus the distance h. between the reference ellipsoid and an equipotential surface of U1 = U + T1 with potential equal to the potential of the normal potential, U on the ellipsoid. The separation h, is computed by evaluating Tl / y oil the eliipsoicl. The other gradieiits a r e evaluated iil the height equal to the orthome tric height.

5.5 Computation of, Euclidian Coordinates, Conversion of Angles to Radians, Subroutines EUCLID, RAD.

The subroutine EUCLID computes the euclidian (rectangular) coordinates for a point with geodetic coordinates p, X , h (ellipsoidal height) given in a reference system with semi-major axis a and second eccentricity e by the equations PG (5-3) and (5-5).

RAD converts angles given in either (1) degrees, minutes, a r c seconds, (2) degrees and minutes, (3) degrees o r (4) (400) grades into units of radians. Other options may easily be added.

5 . 6 Subroutines for Output h'lanagement and Prediction Statistics, HEAD, OUT and COMPA.

The output requirements a r e discussed in Section 7. The main require- ment is, that a determination of ?must be a s well documented as possible. ?! may be computed in several ways, cf. Table 1. This implies, that the output may vary in just as many ways.

Page 51: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

An a r r a y 013s is used fo r the s torage of the observed quantities, the resid- ual observations, the contributions f rom the different s e t s of observations and the predicted quantities. The s torage sequence of these quantities is determined by BEAD, which a,lso will print proper headings. The coordinates of an observed o r predicted quantity and the quantities s tored in OBS a r e printed on the line pr in ter by OUT, which also will punch a pa r t of this information when requested (see Sec- tion 7).

COMPA uses the content of OBS for the computation of prediction s tat is t ics . The difference between observed and predicted quantities a r e sampled in c lasses defined by a specjfied c l a s s width. The number of differences in each c lass is printed by COVA af te r the final predictions have been computed. The sampling i s done separately for Ag, 5 and v. No sampling i s done for 5.

5.7 Subroutines for the Computation of Covariances, PRED and SUMK.

PRED computes :

(a) the vector dim ,Cs o r dl-, C l , (cf. eq. (78a) and (82a)). (h) a colunm of the upper triangular pa r t of the normal equation mat r ix

(eq. (80a)) diCii o r (C j Ihe p i . 0 6 ~ ~ t S x i ~ d i S = d , ~ : b i , (cf. cq. (8 Ia ) ) .

The subroutine may theoretically work even when the observations (different f rom potential coefficients) a r e divided in more than two groups, as long as the total number of observations do not exceed 1600 minus the number of groups minus one.

When the observed quantity i s a pa i r of deflections of the vert ical it is very easy to compute the two corresponding colunms of the upper triangular pa r t of C a t the same time. This is due to the s imilar i ty of the equations for the covariaaces (44)-(50) for 5 and v. This fact is used in the subroutine.

We mentioned in Section 3 .1 , that ic would facilitate the computations if the observations were grouped according to cominon character is t ics , i. e . , e. g. gravity amoinalies on the surface of the Ear th in the f i r s t groilp, deflections in the second group, gravity anonxilies in 10 kinf S height in the third group, etc. The group character is t ics (the type of observation and the quantity RP, ($7)) a r e s tored in two a r r a y s INDEX and P, which will a l so contain the subscripts of the f i r s t observation in the group within the total s e t of observations and a quantity related to the square root of the v a r i m c e of the observations. This quantity i s used for the scaling of the normal equations (in which all the diagonal elements will be equal to me).

Page 52: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

The covariances a r e computed using the equations given in Section 2.2. Thus, fo r degree-variance model 3, the covariances will be evaluated using the subroutine SUMK a s well. This subroutine computes the sum of the infinite se r i e s

CD Q, m 1 a 1 1-1 1 p - 2

L - S Dt Pa(t) and - S k t L ( a + B ) 2 @+B) D: pkt) ;

which a r e needed for the computation of the quantities cov:(si, s J ) , cf. eq. (39) and Tscheming and Rapp (1974, eq. (130) - (135)).

Page 53: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

6. Input Spec if icatioils . We can divide the input data in different (sometimes overlapping) groups:

(A) Data (generally true/false values of logical variables) determining the flow of the program (LTllAN, LPOT, LCREF, LGRID, LERNO, LSTOP),

(B) Data specifying selected input/output options,

(C) Data specifying the reference systems used for coordinates and obser- vations,

(D) Data specifying the degree-variance model used,

(E) Data used for the determination of T (i. e potential coefficients, gravity values, deflections, etc. ) and solutions to normal equations, and

(F ) Data used to specify which quantities we want to predict.

The input flow is roughtly sketched in Figure 5. The position of the integers i -5 in the diagram indicates the beginning of the input data beionging to one of the 5 groups described below:

up to one repetition

Figure 5: The Input Flow.

@ Input data of category

(A)-(F) mentioned in text.

Up to 8 repetitions, when the input data has significantly different characteristics

Unlimited number of repetitions

Page 54: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

The input consists exclusively of data on 80-column punch-cards. We will describe the content of each card, but not the format of thc card. Instead, the for- mat statement number will be given (in brackets) together with a two to five digit number, e.g. 3.013. This number will be used to identify the corresponding card shown in the input example, Appendix B.

We will divide the data in 5 categories:

(1) Data of type (A), (B) and (C) , i. e. data describing the reference systems used,

(2) Data of type (A), (B) and (E), where the data of type (E) a r e the potential coefficients,

(3) Data of type (A) , (B) and (D), i. e. data related to the degree- variance models,

(4) Data of type (A), (B) and (E), where the data of type (E) a r e obser- vations of gravity anomalies, measured gravity values, height anom- alies and deflections of the vertical,

(5) Data of type (A), (B) and (F).

The first digit in the identifying number will be the number of the category to which the card belongs. The other digits a r e used to indicate to which group o r subgroup within the category the card belongs. In case an input situation de- pends on the content of e. g. the card 3.01 and there a re two different input pos- sibilities, the two cards will have the numbers 3.011 and 3.012 respectively. (Data of type (A) and (B) will, as mentioned above, in many cases be the true o r false value of a logical variable. The function of a logical variable can be explained by writing e. g. : LE is a logical variable, which is true when XXX and false other- wise. Thus, we will in several cases below simply write LE = XXX.)

Categoq 1. (The numbers in brackets are, a s mentioned above, the corresponding ---- - format statement numbers).

1.0 (105) The (true or false) values of five logical variables: LTRAN= the observations must be transformed to a new reference system, LPOT= potential coefficients a r e part of input data (observation data. set XI), LONEQ = output the coefficients of the normal equations on the line printer, LLEG= output a legend of the tables, which will be printed and LE = the standard deviations of the observations to be input (otherwise they a re se t equal to zero).

Page 55: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

1.1 (103) A text of maximally 72 characters included in apostrophes, which identify the r e f e r ace sys tem of the observations.

1.2 (120) The semi-major axis (meters) and the inverse of the flattening of the Geodetic Reference System. The value of two logical variables, LPOTSD = the gravity a r e given in the Potsdam system and LGRS67 =

the gravity data a r e given in the Geodetic Reference System, 1967.

In case the gravity data a r e not in the Potsdain system o r in GRS 1967, input of:

1.21 (121) The product of the gravity constant and the mass of the Earth (kM) in units of me ters3/ sec2.

When LTRAN is true input of:

l. 3 (131) The new semi-major axis (meters), the new kM (meters3/sec2),

the inverse flattening, the translation vector (dX, dY, dZ) (meters) , dL =

one minus the scale factor, the three rotation angles (c, , c,, c,) (arc sec) and the value of a logical variable, LCHANG, which is true when the deflections and the height anomaly a r e to be corrected for a systematic error . (The correction must be given as a change 65,, 6q0, 65, a t a point with coordinates p,, X,, cf. Section 5.2).

When LCHANG is true, input of:

1.31 (133) cp, and X. in degrees,minutes and a rc seconds, 65, , 6q0 in a rc seconds and 6C0 in meters.

Category 2. Data of this category a r e only input, when LPOT (card 1.0) is true. The values of kIvI and a , input on card 2.1, will have to be the best available estimates, cf. Section 3.2. They must be identical to the values input on card 1.3, when LTRAN is true.

2.0 (103) A text of maxiinally 72 characters, describing the source of the potential coefficients.

2.1 (137) kM (meters3/sec"), a (meters), the normalized coefficient c2*, multiplied by 106, the maximal degree of the coefficients and the value of a logical variable, LF&I, which is false, when the coefficients E! , , a r e punched on a separate card, and C,, , S,, on the same card in a sequence increasing with i and j , and true w11en the coefficients a re punched in the same scqxnce , on a number of cards, but with a fixed number of coef- ficients on each card. The first coefficient will, in both cases, have to

Page 56: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

be C,,, (even when this is zero) and all cards must have the same format, as given by 2.1. All the coefficients have to be fully nornlalized and multiplied by 10~.

2.2 (103) The format of the cards on which the coefficients a r e punched (in brackets).

2.11 (format as given by 2.2). When LFM is false, the coefficients with c,O on one card and Clj and SIS on one card.

2.12 (format as given by 2.2). When LFM is true, the coefficients in a se- quence increasing with i and j on a number of cards.

Catezory 3. We can select one of three anomaly degree-variance models, by -- --- giving the variable KTY PE the value 1 , 2 o r 3, cf. Section 2.2 eq. (30), (31) and (32).

When KTYPE is equal to 3:

3.01 (107) IK = the variable B in equation (32).

The degree-variance model is then specified by giving

(a) the ratio R/R, between the radius of the Bjerhammar sphere and radius of the mean Earth,

(b) the variance of the gravity anomalies on the surface of the Earth (VARDGB), (from which the constant A, in the equations (30)-(32) a r e computed, cf. , e . g. equation (go)),

(c) either the "order" Ll'vfAX of the local covariance model to be used o r a zero, which will indicate, that empirical anomaly degree- variances a r e used, and in this case

(d) the empirical anomaly degree-variances, given on the surface of A

the Earth, aE(Ag, Ag), (88). a

When IMAX is equal to zero, input of the maximal degree, IMAXO of the degree- var iances &; (A g, A g).

Page 57: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

3.12 (103) The forinat of the degree-variances. These must be punched on one o r more cards, sequentially from degree 2 to IMAXO.

3.13 (format a s given on card 3.12). The quant,ities &;(ng, Ag) in units of mga12.

Category 4. hpu t of up to 9 clatasets with ~i~gnif icantly different characteristics. ------ One dataset can, for example, be two separate.datasets punched differently, but both being gravity anomalies on the surface of the Earth. Another clataset may consist of mean gravity anomalies, all with the same format. Before each separate dataset, there will be input of 2 o r more cards specifying the characteristics of the dataset.

All the records in a dataset must, be punched im the same way. There a r e the following restrictions (o r options): A station number may be punched. In this case it must be the f i r s t datafield on the card and maximally occupy seven positions. The next two data- fields must contain the latitude and the longitude (in an arbi t rary se- quence). When the height is given, it must be punched in the next datafield.

The following (up to four) datafields will have to contain the observed quantity (or quantities in case of pairs of deflecti n components) and P its standard deviation. When the observation is a pa i r of deflections, they have to be punched in the same sequence a s the latitude and the longitude a r e punched. In t,he las t datafield the value of the logical S T O P has to be punched, generally false ( = blank), but true for the las t record in the dataset.

4.0 (103) The format of the records (in brackets).

4.1 (202) INO=l when a station number is punched, 0 otherwise, ILA = the number of the datafield occupied by the latitude, ILO = the number of the datafield occupied by the longitude (ILA and ILO will be equal to 1, 2 o r 3), am integer IANG specifying the units used for the latitude and the longitude (1 for degrees, minutes, arc. sec . , 2 for degrees and minutes, 3 for degrecs and 4 for 400-grades), IH= 0 when the height is zero and not punched and otherwise the number of the datafield in the record in which the height i s punched (generally 3 o r 4), IOBSl= the datafield number of the f irs t observation in the record, IOBSB = the clatafield nunlber of the second observation (zero when there is only one observations), the

Page 58: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

value of an integer XI?, specifying the kind of observation: 1 for height anomalies, 2 for measured gravity o r gravity anomalies (point o r mean), 3 for pairs of deflections, 4 for the latitude component 5 and 5 for the longitude component 7) .

Then the ratio R P (87) between the sphere on which the observations a r e situated atid the mean Earth radius and finally 5 logical variables: LPUNCH =

punch observations together with the difference between the observed quantity and a possible contribution from the potential coefficients and a contribution from Collocation I, LWLONG = longitude is measured positive towards west, LMEAN= the gravity is a mean value, LSA = the standard deviations a r e the same for al l observations, LKM= true when the height is in units of kilo- meters and false when the height is in meters.

When the observation is a height anomaly it will have to be given in units of meters, and when it is a deflection component in a r c seconds. But when the observation is a gravity anomaly o r a measured gravity quantity, it is possible to specify tivo constants DhI and DA, which when DA is f i rs t added and the sum multiplied with DM will bring the observed quantity into units of mgal.

4.11 (203) DM, DA and a logical variable LMEGR, which is true, when the ob- servation is a measured gravity value.

When LSA is true, the records of observations will not contain a standard deviation of the observed quantity, and the standard deviation will then have to be input separately:

4.12 (212) the standard deviation of the observations. Then the observations a r e input record after record, not exceeding a total number of 1598.

4.2 (format given on card 4.0). Input as specified on card 4.1, last record with LSTOP equal to true.

WhenLSTOP is true, a logical variable with the same name (i.e. LSTOP) is input. It is true when the las t dataset is the final dataset used in Collocation I o r 11. The final card will hence have the value true (T) punched in the f i rs t datafield. On this card, in this case, the values of two other logical variables can be punched.

4.3 (230) The value of LSTOP, and when LSTOP is true, the values of two logical variables, LRESOL = input the solutions to the norinal equations (they must then have been produced in a previous i-un of the program) and LWRSOL= punch the solutions to the normal equations.

Page 59: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

When LSTOP is false, the input process will he repeated from card 4.0. When LSTOP is t m e and LRESOL is true, input of the solutions to the normal equations: F i rs t an identification card is read, then the solutions:

4.31 (361) Input of solutions, i.e. the cards produced in a previous m n of the program, where the logical variable LWRSOL was true.

When the se t of observations is the f i r s t one (the variable LC 1 is false), input of a logical variable LCREF, e lse jump to 5.0.

4.4 (230) LCREF = a new se t of observations, which will be used in collocation 11, will have to b e input,

For LCREF= true, jump back to 3.1.

Category 5. Data specifying quantities to be predicted. This specification will naturally have to be done in much the same way, a s when the obser- vations were specified. We need coordinates and some variables, which specifies tile type of quantity to be predicted. There a r e then two possibilities, which a r e distinguished by the true and false value of the variable LGRID.

When LGRID is false, we will proceed in exactly the same way a s above, dealing with data of Category 4. The quantities to be pre- dicted will be specified by a l i s t of coordinates and 2 o r more cards specifying format and type of quantity to be predicted.

The l i s t of coordinates may in fact be a l i s t of observed quantities, which we want to coinpare with the quantities to be predicted. If this is the case, a logical variable LCOMP has to be true.

When LGRLD is true, the predictions will have to take place 1n points which form a grid. The south-west corner of thegrid will have to be specified together with the distance between the mesh points in northern and eastern direction and the num- ber of mesh points having the same longitude and the same latitude.

5.0 (200) Input of the logical values of LGRID, LERNO = estimate of e r r o r of prediction is n m t e d and LCOMP = compare predicted and observed quan- tities.

F i rs t time LCOMP is true, two constants used to specify the sampling width for a frequency distribution of the difference between observed and predicted gravity

Page 60: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

anomalies (VG) and deflections (VF) must be input (e. g. equal to 2.0 mgal and 0.5 a rc . sec. ). (The differences a r e sampled in 21 groups. )

5.01 (203) VG and VF.

When LGRID is true:

5.02 (201) Coordinates (latitude and longitude in degrees and minutes) of the south-west corner of the grid, the increments in latitude and in longitude (minutes), the number of increments in northern and in eas tern direction, the value of the R P giving the type of quantity to be predicted (see 4. l), R P (see 4. l), L & A P = print the predicted quantities on the line pr in ter with all values which a r e predicted in points with the s a m e latitude on one line and al l values predicted in points with the same longitude above each other, LPUNCH = punch coordinates, predicted quantity and when LERNO is t rue the estimated e r r o r , LiLIEAN= gravity to be predicted i s a mean value.

When LGRID is true, jump to ca rd 5.1.

Now, when LGRID is false, we may input l i s t s of coordinates just as above:

5.030 a s 4.0 (format of records)

5.031 a s 4.1, with the following changes; When LCOMP is true, LPUNCH will mean the same a s in 4 . 1 and the e r r o r of prediction will be punched when LERNO is true. When LCOhlP is false, the predicted quantity a s given in the new and in the old reference system will be punched together with the e r r o r of prediction, when LERNO is true. The logical variable LSA has no function in this phase of the computations.

When no observed quantity i s contained in the record, both IOBSl and IOBS2 will have to be put equal to zero. Thus, in this case the record will have to contain the height. (The program requires the presence of a t leas t one datafield be!xeen the datafields occupied by the latitude and the longitude and the datafield occupied by the logical variable LSTOP).

When IKP= 2 (we a r e predicting gravity quantities):

5.033 input a s specified by 5.030.

Page 61: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

5.1 The value of LSTOP, true when no more quantities a r e tb be predicted.

When ISTOP is false, jump to 5.0.

An input example is printed in Appendix B.

Page 62: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

7. Output and Output Options.

The output from the FORTRAN program has been designed with the purpose, that the determination of ? and subsequent predictions should be a s well documented a s possible. This means, that nearly everything, which is used a s input also will be output.

There a r e a few exceptions:

(a) data of type (A) and (B) (cf. Section 6) a r e not printed,

(b) the potential coefficients a r e not printed,

(c) a measured gravity value is not printed, but the corresponding free-air anonlaly is,

(d) more than two decimal digits of coordinates given in minutes o r seconds and of observations a r e generally not reproduced.

With these exceptions all input of type (C) to (F) a r e printed with proper headings 02 the !ize printer.

We will now distinguish between non-optional and optional output. The out- put can be made on h 7 0 units, unit 6 the line printer and unit 7 the card punch. Non- optional output is output on the line printer exclusively.

-A program identification is printed giving date of program version. -The used mean Earth radius and the reference gravity used on the sphere in equations (20)-(22) is printed.

-The equatorial gravity and the potential of the reference ellipsoid a s computed from the constants specifying the reference systems.

-The residual observations di-,X,, and if meaningful: the contribution from the datum transformation, from the potential coefficients, the first dataset (Collocation I) and the second dataset (Collocation IT) and the sum of these contributions,

-The pedicted quantity and if meaningf~tl: the contributions from the datum trans- formation, the potential coefficients, Collocation I and 11.

-The solutions to the normal equations, -The estimaLcd variance of the residual observed and predic ted quantities, and -Error messages in case e. g. certain a r ray limits a r e exceeded.

Page 63: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

Optional output on the line-printer:

-A legend of the labels of observations and preclic tions, (LLEG - tme) , -The difference between observed and predicted quantities (LCOMP = true), -The estimated e r ror of prediction (LERNOZ true), -A primitive "map" of the predictions (LGRID = true and LMAP = true). (The predicted quantities multiplied by 100 will be printed with the values predicted in points with the same latitude on one line and the values predicted in points with the same longitude above each other, see the ' tmaptf, Appendix C, page 125. )

-Mean value and variance of difference between observed and predicted quantities and table of distribution of the differences samples according to specified sample width (LCOhZP is true).

Optional output on the card punch:

-The solutions to the normal equations b, and b, (LWRSOL = true) -the observed quantities and the residual observations (LPUNCH= true), -the predicted quantities, the estimated e r ro r (LERNO = true), the difference

between observed and predicted quantities (LCOMP = true), and when LCO&ZP is false, the predicted quantity in the original and the new reference system.

The solutions to the normal equation can be used a s input to the program, cf. Section 6, input specification No. 4.31.

An example of the output on the line printer is given inn Appendix C.

Page 64: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

8. Recomn~endations and Conclusions.

A development of a computer program a s the one presented here is a task, which can be continued for years. But a t some point it is necessary to stop and present a fully documented program version, even if it is obvious that improve- ments can be made.

Most of the recent ideas and investigations in the field of least squares collocation a r e used in the program. Hence, the program may principally be used for

N

-the determination of an approximation to the anomalous potential, T and

-prediction and filtering of gravity anomalies, deflections and height anomal ie S.

The determination of may be improved in several ways. The program should be changed so that other types of data a s e. g. density anomalies, satellite orbit perturbations, and gravity gradients can be used a s observations and pre- dictions. The program should also be able to predict potential coefficients. The covariance models, which can be used in the program a r e all isotropic. The use of a non-isotropic covariance model may improve the determination of y.

In Section 3.2 it was pointed out, that the data had to be given in a geo- centric refe

r

ence system. Thus, the necessary translation parameters may be estimated by including these quantities as parameters X, cf. eq. (7) and (g), Tscherning (1973) and Moritz (1972, Section 6).

It is also possible to add new data to an original set of observations, with- out having to conlpute and invert the full covariance matrix. This type of compu- tation is denoted sequential collocation cf. Moritz (1973). This feature may very easily be incorporated in the program, especially because of the flexible design of the subroutine NES (cf. Section 5.2 and the comments given to the subroutine in Appendix A) .

The determination of potential coefficients and datum shift parameters may also be incorporated without difficulties. But the other proposed improvements can not be made before the theoretical background and the necessary algorithms have been developed.

Page 65: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

References

Grafarend, Erik: Gcodetic Frediction Concepts, Lecture Notes, International Summer School in the Mountains, Ramsau, 1973 (in Press) .

Heiskanen, W. A. and 1-1. Moritz, Physical Geodesy, W. H. Freeman, San Fran- cisco, 1967.

( B M ) : IBM OS FORTRAN IV (H Extended) Compiler,Programmer's Guide, SC28-6852-1, 1972.

(BM): IBM System/3GO and Sys tem/370 FORTRAN IV Language, GC28-6515-9, 1973.

Jamcs, R. W. : Transformation of Spherical Harmonics Under Change of Reference Frame, Geophys. J . R . a s t r . Soc. (1969) 17, 305-316. J

Karki, P. : A FORTRAN IV program for the Inversion of a Large Sylnlilet.ric Matrix by Block Partitioning, Department of Geodetic Science, OSU, Report No. 205, 1973.

Krarup, T. : A contribution to the Mathematical Foundation of Physical Geodesy, Danish Geode tic Institute, Meddel else No. 44, 1969.

Lauritzen, S. L. : The Probabilistic Background of some Statistical Methods in Physical Geodesy, Danish Geodetic Institute, Meddelelse No. 48, 1973.

Meissl, P. : A Study of Covariance Functions Related to the Earth's Disturbing Potential, Dep. of Geodetic Science, OSU, Report No. 151, 1971.

Moritz, H. : Advanced Least-Squares Methods, Dep. of Geodetic Science, 'OSU, Report No. 175, 1972.

Moritz, H. : Stepwise and Sequential Collocation, Dep. of Geodetic Science, OSU, Report No. 203, 1973.

Parzen, E. : Statistical Inference on Time Series by Hilbert Space Methods, I, Tech. Rep. No. 23, Stanford. Published in Time Series Analysis Papers, Holden Day, San Francisco, 1967.

Page 66: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

Poder, K. and C. C. Tscherning: Choleskyls Method on a Computer, The Danish Geodetic Institute, Internal Report No. 8, 1973.

Rapp, R. H. : Numerical Resu1.t~ from the Combination of Gravimetric and Satel- lite Data Using the Principles of Least Squares Collocation, Dep. of Geodetic Science, OSU, Report No. 200, 1973.

Tscherning, C. C. and R. H. Rapp: Closed Covariance Expressions for Gravity Anomalies, Geoid Undulations, and Deflections of the Vertical implied by Anomaly Degree Variance Models, Department of Geodetic Science, OSU, Report No. 208, 1974.

Tscherning, C. C. : An Algol Program for Prediction of Height Anomalies, Gravity Anomalies and Deflections of the Vertical, The Danish Geodetic Institute, Internal Report No. 2, 1972.

Tscherning, C. C. : Determination of a Local Approximation to the Anomalous Potential of the Earth using llExactll Astro-Gravimetric Collocation, Lecture Notes, International Summer School in the Mountains, Ramsau, 1973 (h Press) .

Page 67: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

Appendix

A. The FORTRAN 1V program.

B. An input example.

C. An output exanzple.

Page 68: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

Appendix A.

T h e program is written in the language FORTRAN IV, cf. B M (1973). It may be run on an 113M model. 370 computer equipped with an B M model 3330 disk unit. The program may be compiled and executed using the catalogued pro- cedure FORTXCLG, cf. IBM (1972, p. 89) using the following job control language statements:

// EXEC FORTXC LG, PARM. FORT='OPT(2) ' , // TIME. FORT=(, 3O), REGION=2521< //FORT. SYSIN DD *

program statements

//GO. F T G G F O O l DD DSN=DASET, CNITSYSDA, // SPACE=(12800,920), DISP=(, DELETE) , DCB=(DSORG=DA, BUFNO=l) //GO. SYSIN DD *

input data / * //

Page 69: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

a: C PPOGRAM G C O D E T I C C O ! - L J C A T l C ! h S V E R S I O N 2 0 APR, 19749 F O R T ' Z A N T V 9 ( ? F P C 3 6 Q / ? O ) , PPnGKLCiYkD 6 V C , C o Y C U E R h % N G ~ D A N I S H G F O O E T l C I N S T I T U T E / CFP , Q G E O D E T I C S C I t N i t ? OSL~, C SHE PROGRAM C O V P U T E S A N A P P K 3 X I M A T 1 3 Y T O T H E A Q 9 M A L O U S P O T F Y T I A L '-IF C THE E A R T H U S I h G S 7 E r ' W I S E L E A S T SQUAXE-F C O L L O C A T l O N e T H E MFTHrIT) 9FL)U.I- 6 K E S T H E S P F C l F 1 C A T l W i OF ( P I @!vE Oh TWC $ C Y D I N A S P F C I A L C A S E T P Q F E ) C SETS O F Q Y S E K V E D O U A i J T I T I E S W I T H KVfJH1\l S T A N D A R D O F V I A T I f l N S AQD ( 2 1 P N F C OR TWO C D V A R I k k ' C E F U Y C T I O N S . C THE C f i V k R I A N C C F U Y C 7 I C I N S U S F D A R E I S O T R O P I C e T H E Y A R E q P F C I F 1 ED S Y A C S E T OF E M P I R I C A L A ~ P 4 A L Y D E G R E E - V A R I A Y C E S O F P E G R F F L E S THAY AY C I K T E G E W V P Q I P F L E I M b X t R Y D E Y A ANOMALY DFS!iFE-VA?IA?4CE MOOFL F R 9 T H E C D E G P E F - V A F I b h C E S @F D F G P E F C R F A T H F R T H A N I M A X . & THE OF. S E R V A T I O N S M A Y 3 F P O T F I J T I A L C O E F F I C I F Y T S 9 bIEAN 9 R P U I n l T G S P V I T Y C A M O M A L I E C , H F l G H T A N O W L L I E S P44D I J E F L E C T I P Y S C F TUE V E R T I C A L . B F I L - C T t R I N G OF THF ' - I M S F 9 V A T i W ! S 1 A Y F S P L A C E I / r U L T A Y E 3 U S L Y W I T H T H F D E T E R - C M I I J A T I O V O F T t * E AM3VALOIJS F f J T F U T I A L . C THE D E T F R M I k A T I L ' t : I S V P C I F 1N A AI',LVREQ G F S T E P S Ff 'UAL TO T H E N U Y S C Q O F e stvs CF oe:Enva-rrrr%s, WHEN P O T E N TI AL C O F F F I C ~ E N T S A F E U S F P ~ WI LL THF- C E S E F f l R M A S F P E F b T E S F T AFID T H E T O T A L Y L V M Y E 9 OF S E T S EIAY Ir\l T H I S C A S E C AMnUNT TQ T H R I F , C E A C H D A T A S E T IFLCH S T F P ) W I L L D E T E R M I U E A ) - ; IAQMOYIC F U Y C T I D Y y A V D T H E C PPiOMALI3US P O S E N T I A L N I L L 5E E Q U A L T O T H E SUY OF T F E F S F ( ? l A X I M b L L Y C T t i R F F 1 F U h C T EDhS. C P O T E N T I A L C n E F F L C I E N T S W I L L D E T E R V I W F A F U N C T I O F l F Q U A L TO THE C V F F F H - C C l E N T S M U L T I P L I E D B Y T H E CUC.RFSDONDIi '4G S O L I D S P H E R I C A L r - ' A Q M O U I C C . T H E C U P T O TWO c F T ? UF D A T A D I F F F F E N T FRPM P O T F N T I A L C O E F F I C I F V T S W I L L C F A C H RE U 5 F D T O D E T E R P I X E C O N S T A Y T S E ( 11, T H E C O F ' ? E S P r ] Y r l l ? l G H A Q M n Y I C C F U N C T I O V S 4RE T H F X F Q U A L TO T H E E S E C O l r S T A Y T 5 M U L T I P L I F r 3 r SY T Y E COVA- C R l A N C F E E T h F E N THE P E S E R V A T I D N S A\D THE V A L U E OF T H E AVOMALOUS POT- C F N Y I 4 L I N A P C t L h T p P s

C %"F M A I N F U U C T l r N P F T U F PqOOPAM I S , R E S I P E S T H E C ' I M P Y T A T I O N O F T H F C C O Y S T A N T S E ( I S , TYE P R E D I C T I ~ Y C:F THE G U ~ T I T I E ? F T A , G E L T A e , u s r C AND E T A 191 P O I N T S Q . TH-rE P R E D I C T E D V A L U E I S E C U A L TO THE P R g D U C T SUY C OF B ( I ) ANP T E E C D V P R I A Y C E E E T W E F N O B S E R V A T I O N Y 0 . I AND TtJE O U A V T I T Y C T O @ F P R F D I C T E D . C C R E F ( A 1 : T S C " t R N I N G p C * C - AND R - H e R A P P : C L O S E P C O V A R I A N C E F X P U E S S I O t ' I S C F09 t - S A V I T Y A N O M A L I E S , G E O I O L !YDULATIPY!Ss A h D D E F L E C T 1 nUq P F C T H E V F R T I C AL I M P L I ED E Y A'V3MALY DEGREE-VAR I A V C E M ' J 9 E L 5 , D E P - C A R T M F N T OF G F O G E T I C SC l E N C F t T P F O H I O S T A T E UY I V E 9 S I T Y 9

C R E P O R T NO* 708 t 1974 C R E F ( R ) : TSCHERNI r \ ;G ,CoCe : A F O R T R A N 1V " R C C R A P FTIR T H t D E T F R M I N A T I P N e nF T ~ E ANOMALOUS POTEN TI AL USIQG S T E P W I S E L E A S T S Q U A ~ F ~ CPL- C L D C A T l O N t DEFAFTME ' !T O F GEODFT I C SC I F U C F I T H E O H I D S T A T E U Y I - C V E S S I T Y , 9 F P D R T N O * 2 1 2 9 19749 & R E F f C ) : H F I S K A N F N b.1.A- AND H.MC1R I T ? : P H Y S I C A L GEOCIFSYp 1067. C R E F ( D 1 : J A M E S r R e W * : G E D ~ H Y S ~ J ~ R ~ A S T R ~ S O C ~ I ~ ~ Q ~ ~ ) 17, 3 0 5 - c

I M P L I C I T S Y T E G E P ( ~ ~ J ~ K ~ M I Y ) ~ L f l G I C A L ( L ) t R E A L * R ( A - H q O - Z )

Page 70: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

C O M M Q Y / P R / S I G M A ( 2 5 0 ) T C , I G M A n ( 2 5 0 ) v i3 ( 1 6 C ! r ) ) ~ P ( 4 2 ) r * S I N L A T ( 1600) r C O S L A T ( 1 6 0 r ) ) I P L A I ( l 6 n n ) , R L f l K G ( 1 6 , 0 0 1 v C ~ ~ S L A P T S I ' J L A P T * R L A T P T E L O N G P T Q P T P P E T k P 9 P R E D P ~ P W O L f l N F C f l T L ? < K S I p q L N E T A P T L D F F V D T L P d ~ F P T

* L G k P ~ L N G K q L K € Q l ~ L K E 6 3 T L K N E 1 T I V 1 t h I q N f < p K T Y P € ~ I ' d D F X ( 4 ? ) C 1N / P R / A K F S T O R E D : D E G R E E - V A R I A N C E S ( S IGf-?A T S I G Y A O ) 9 T H E C P N S T ( I U T S C e c r ) , THO C A T A L O G E S OF ~ E ) S E R V P . T L U N S ( 9 Ahrn I N D E X) , LATITUDF A W CO:, C S I N H E R E D F A V P L n N G I T U U E D F T H E O b S E P V A T I ( 3 , . J P 9 I V T ( $ I Y L A T , C O S L 4 T . ' L A T r C R L O Y G ) C C S S E S P O N D I K G Q U A N T I T I E S F O S P O I V T DF P F C E r l C T I 9 V (''17 9 A T I 9 R P C B E T h ' E F N R A G l U S O F S P H E K E GN W H I C H P I S S I T U A T E D PND P 3 , TWO V A L I I A E L F S C 1N W H I C H F P . E D l C , T I C N S A R F A C C U F I U L A T E D ( P F F D P T P R E T A P ) ? A C I U A N T I T Y 9 E L A - C T E D T O T"E V A k I A N C E O F T H E O P S E R V A T I O N S U2 P R E D I C T I O % S ( p a l T L O G I C A L C V A R I A E L E S U S E D T O D I S T I N S U I SH B E T W E E N lj I F F E P E N T P s C D I C T I O N S I T U A T I O N S C ANP COVAR I Ah!CE MOPE LS.

COMMON /CKW/WOEiS( 1 6 0 0 C I R / C P N / A R E STORFC) T H E A W I D K I S T A N D A R T ; D E V I A T I f i N S A S LflkG A S T H E M C A P E NEEDED. T V f S T O R A G E LOCATIC!?:S A R E L A T E R U S F P FCQ O T H E R P U R P O Z F S o

CCMMON / E U C L / X q Y y Z r X Y , X Y 2 T D I S ' T r ! ~ E i S T 2 C I Y / / E U C L I D / A P E STf leED: T H E E U C L I D I A N C O O P . 3 I N A T ' E S PF A P O I N T T TUE C O l S T A N C E A V @ T V F S O U A P E O F T H E D I L T A Y C E F P O Y T H E Z - A X I S X Y r X Y 3 ANn C T h E G I S T A % C E AND T H E S Q U A R F O F T H E D I S T A N C C FROM T P F n ? l G I Y O I S T O AN,P C D I S T ? ,

COMMOY / N E S U L / C ( 4 7 0 0 ) r ? J C A T ( l O O ) T I ~ Z E ( ~ ~ ~ ) T ~ ~ L ( ~ ~ @ ) T ~ A X @ L ~ 19 C I N / N E S Q L / A R E S T O R E D : T P E A R F ? A Y C U S E D T D T R A N S F E R 7°F C P E F F l C l E N T S C OF T H E N O R M A L F Q U A T I O Y S AND T P E SCJLUTI rJNS T O A V D F Q 3 M D I S K - S T n " A G E q C N C A T T I S Z E AND N B L H O L E S I N F O Q M A T I Q N A 6 O U T THE STCiRAGE CEC'UEYCE 3 F T H E C C O L U M W S P4XF.L I S T H E KUFlEFP FF F L F C K S VF S I Z E C + N C A T + I S Z E U S F C "N T H F C D I S K * I Q P O I N T S ON T H E T R A C K O N T H E D l S K A R E A I N W H I C H D A T A I S TO EE C S T O P E D OR E E T F I V E D ,

C O M M ~ ' \ I / O U T C / K Z T K ~ T Y ~ T I U r K 2 1 r I U l r I A Y G T L P U N C H ~ L O U T C T L Y T R A N ~ L Y F ' L \ I O * r L K 3 0

CDMMON / C ~ E A D / I A T I R T I H ~ I P T I T T I A ~ ~ I E ~ ~ ~ ~ ~ ~ I T ~ T I C ~ ~ I C ~ ~ ~ ~ ~ ~ I ~ B S ~ ~ * I D R S ~ ~ L P C T T L C ~ T L C 2 y L C K E F 7 L K Y

C 1 N / O U T C / ANE /Ct ; 'EAC/ A R E STClREO I N F O R M A T I O N USED TO HAYDLE T H E D I F - C F E R E N T I / O S I T U A T I D N S o

C O M M C t V / 0 5 S E F / 9 b S ( 2 0 ) COMMON / D C O N / D O T D ~ T P 2 COMMON / S C K / I K t L K O T 1 K l r I K 2 7 I K A

c

Page 71: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

C MFNSION OF TFE b R K A Y N P L ( I N 1HF 60i4elOU R L Q C K / N F S n L / ) , D E F I N E F I L F 8 ( 5 ? O 9 3 2 O O t U , I Q ?

e C l N I T l A L I Z A Y l O N OF V b R I A P L E S t WHICH ARE I Y CnMMOhJ B L C C K S o

DO = O * O D O o i = n , n w D 2 - Z 0 0 D 0 D 3 = 3 a O G O P ( 1 9 = DO P ( 2 1 B = DO C O S L A T t 1600 J = D 1 S I N L A T f l t , O O ) = U0 RLkTd P t ~ Q O I = DO RLONG(16001 = D O C L A = PO W P ( 1 1 = RF+*S /GP W = S E * * 2 / G l A * 2 O 6 ? 6 t , 8 0 6 L O WP(2 ) = D 1 W P ( 3 ) = W W P ( 4 1 = I4 WP(51 = W B T = 0 1 P = 0 LNFRtL'3 = L T L C P E F = L F L C 1 = L F L C 2 = L F I N D E X ( I 1 = 0 D@ 12OG I = 1, 2 5 0

1700 S I G M A O ( 1 1 = D0 C C H E A D I N G S AND D E F I N I N G C P N S T A N T S .

k l R 1 T E ( 6 ? 1 0 4 ) 104 F O R M A T ( a 1 G F O D E T I C C O L L O C A T T O N I V E R S ~ O Y 2 0 APR 1 9 7 4 a F / / %

M R I T E ( h r l l 3 ) 113 F O R P A T ( "Oh'C!TF T H A T THE F U h C T I O N A L S A R E I N S P q F R P C A L A P P P f 7 X % Y A T I f l N B

*/B M E A N R A D I U S = RE = 6371 KM AND M E A V G R A V I T Y 9 8 1 K G A k U S E D e * ) e C I N P U T OF 5 L O G I C A L V A R I A B L f S v L T R A N = C F O R G I N A T F S A R E T f SE T 4 A V S - C FORMED TO N E N R F F E R E N C E S Y S T E M ? L P O T = P O T E Y T I A L C D r F F I C I E \ ! T S A Q c T O

BE U S E D A S F I R S T S E T OF O B S E R V A T l O Q T t L O N E Q = O U T P U T C O E F F I C I F U T S 3 F C NCRKAL F Q U A T I G N S ON U N I T 69 L L E G K = O U T P U T L E G E N D VF T A P L E S ? F 0 9 S F P - C V A T I O Y S OR P R E D P C T P O N S AND L E = T A K E ERRORS CIF O F S E R V A T I O R S I N T P b C - C C C U N T e

R E A D ( ~ ~ L O ~ ) L T R A N I L P O T , L U N E Q ~ L L E L ~ L E B 0 5 FORMAT (5LF ' )

L N T R A N = .NOT.LTi?AN LNPOT = .Nf lT .LPOT I F ( e N Q T - L E ) W R L T E ( 6 t l l 8 )

118 FORMAT l ' FF.RORS I N I 1 b S E R V A T l C I N S ARE NOT T A K F N i N T O A C L f l U V T - ' 1

Page 72: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

C I F ( L L F G ) W R H T F ( 6 s l l 4 )

114 FORMAT ( 'C'LEGEND O F T A B L E S OF O S S F R V b T I O V S ARD P R F D T C T l n N q :' ,/ 9

* ' 0 6 s = O P S E K V E D V A L U E (k lHFs l B O T H C O M P D W F Y T C '1F D F F L E C T I q Y S A I ; F B / e * @ O B S E R V E I E T A R F L O W K C l ) p D I F = T H E D I F F E Q F V C F R E T W E F R I 0 3 S F 9 V F D 8 / 9 * I AND P P F r I C T F D V A L U F p WHFV P R E D I C T I O N S ARE: C P Y D U T F D A K D F L C C ' / v

S s THF K F r I l C j r J P L ( > R S F P V A T I O : 4 , E R ? = F S T l r l A 7 E I ) FPRO' I O F P R F ~ ) I C T I C Y V / P 4'3 TRA = C P V T P I Z U T I P Y FROM D A T U M T S A Y S F G R M A T I C ' Y p P O T = C n Y T ? I - ' / v * ' B U T I n Y F P O V P f l T E Y T l A L C D E F F I C I E Y T S v C O L L = C O Y T Q T E U T I ~ U " 3 ! 4 ' / 9

*' C O L L C I C A T J O ' I D E T E R W I N E P P A i i T U F F S T I f l A T E ? WHF'! T H F F C O N L Y ' + A S " , * @ PEFY U S k D ONE S E T O F G B Y E S V D T I O N C ( D I F F E R E N T Fs fJ '4 P 'JTgCOCF!= , ) ' 6 , * v C O L L I = C P k ' T X I k U T L O N FPPF E S T I V A T F OF ANflXbLOUS P O T . D F T F R - @ / v * @ MIYFL' I F S O M F I R S T S F T O F O i 3 S E 9 V A T I O N S ~ C O L L Z = C 3 Y T R I B U T I T ) " . ' / r * @ F P O V E S T I Y A T E C J R T A I Y E D F R O M S E C D V D 5 E T PF C l F S F R V A T I T l Y S , P Q E D = ' / , S ' P R E D I C T F D V A L U E I Y YEW R E F F R E Y C E T Y S T F M I WHFY P R F 9 I C T I 7 Y S A P F ' / * * l COMPUTFCI ANO F L S E Tt-IF SUlZ O F T H E C O N T % I B U T I 7 N S F R f k l T H F P D T . s / t * ' C O E F F I C I E h T S A K D F 1 Q S T T S T l b 4 L i T E O F ANDMDLCJIJS P O T E N T I A L . A W J ' / p

* ' P R E C - T R A = P R E D I C T I P N P R ?Ui+ O F C O N T R I E U T I O N S I N T H F n L r P E - @ / ?

* ' F E R E N C t S Y S T E M . ' ) C. C. I N P U T OF P A T A OF R E F E R F Y C F S Y S T E M .

W K I T F ( 6 , 1 0 6 ) 106 F O R g A T ( ' O o E F E Q E h ! C E S Y S T E M : ' )

C I N P U T OF T F X T R E S C i Z I R I F i G R E F E R E N C E S Y S T E H I FqkX.72 C H A R C I C T L F S R E A D ( ' T 9 1 0 3 ) F M T W R I T E ( h q F f 1 T )

C I R P U T O F S F Y I - M P J O R A X I S ( M E T F R S ) ? l / F L A T T E N l Y G , V A L U E OF TWO L O G I C A L C. V A 4 1 A b L E S I L P C j T S D = G Q A V I T Y I Y D O T S E A M S Y S T F M A V C L G R S 6 7 = G P A V I T Y R F - C FER TT; GRS 1967,

R E A D ( ~ ~ ~ ~ ~ ) A X ~ / P F O ~ L P O T S D / P L G X S ~ ~ 120 F @ R M A T ( F l O . L y F l P e 5 , 2 L 2 )

F 1 = D I / F n E 2 1 = F l * ( P 2 - F 1 ) I F ( L P O T S n . O R . L G R S h 7 ) 50 TO 1 0 2 1

C. I K P U T OF GM CIF- P E F E R E N C F- S Y S T F M OF D P S E R V A T I D N S . R E A L ( 5 1 1 2 1 ) C M 1

1 2 1 F O K M A T ( D l 5 . 8 ) 1021 I F ( . Y 3 T g LCTRSh7) C A L L C S A V C ( A X ~ , F I , G M ~ V ~ T L F O T S D I U R E F O T ~ R ~ F )

I F ( L C F S 6 7 ) C A L L G R A V C ( 6 3 7 8 1 6 0 . 0 C 0 , D 1 / 2 ? 8 . 2 4 ? 1 7 D O 1 3 . 4 ~ 6 0 3 D 1 4 ~ ~ ~ * L F y U ? F F O T G Q E F )

W R I T F ( h , 1 7 7 ) A X l p F O , G P , E F p U C i E F O 122 F O P M A T ( O 0 A - ' 7 F 1 0 . 1 7 ' H V T

4 ' 1 / F = @ T F 1 O . F / p

* @ R E F . G Q A V 1 T Y A T F Q U A T O Q = ' ? F 1 2 . 2 ~ ' M G A L ' / r 8' P O T F ? < T I A L A T K E F - F L L . = 0 ~ F 1 ? . 2 r ' M * * 2 / S E C * * ? ' / t

G R A V I T Y F O Q W J L A : ' ) I F ( L P P T S D ) N R l T F ( 6 ~ 1 7 3 ) 1 F (,NOT. ( L P O T S r s C I F o L G K S 6 7 ) ) W I ? I T E ( ~ T I ~ ~ ) G M ~

123 F O R M A T ( I ~ V T E R V A S I O Y R L G K P V I T Y F C P M U L A t P O T S O A M S Y q T E M o W ) 174 FnRMATB C O E F F I C l E Y 7 S C O M P U T E C q U S I Y G GM = ' y D I 5 , D / )

Page 73: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,
Page 74: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

C C INPUT OF TFXT D E S C R I B I N G SOUrlCE OF THE P O T E N T I A L C O E F F I C I E N T S ( M A X , 73 C CHARACTF? S ).

RFAD( S 9 l O 3 ) FMT W P I T E ( h , l 3 0 )

1 3 0 FORYAT(@OSOURCE OF THF P O T F N T I A L C D F F F I C I E Y T S USED: ' ) WRITE(h ,FMT)

C C lNPUT OF GM (P'ETERS**3/SEC*+2) A ( M E T E Q S ) 9 THE WOPVALIZFD C n F F F I C I FNT C C'F DEGREE TWO ARD OPCEP ZERI: ( T H F F C O Y D DFCRFF ZDklAL YA9! lORIC) MEL- C T l P L l E D 3 Y Z e O D h T THE MAXIMAL DEGhEF DF THE C n F F F l C I F Y T ' , A L C < I C A L C V A R I A B L E T TPUE WKEY THE C O E F F I C I E Y T S A R E PUYCHEO W I T H A F I X F D CL'U'IEER C ON EACH C A k n ANG FALSF, WhFhl THF L f i E F F I C I E U T Y DF TtJF ZOPIAL HA9'AnUTCS C ARF PUNCHFn SEPFRATLY ON OWE CARP AhG TYE q T H F 4 C C F F F I C I E h T S W I T H THF C COEFFIC1E:UC OF THF S A M F PRT!€R ANI j DEGRFF O N € ( ? V C CAR>. I N PC)Tq C A 5 E S C MUST TUE CCIEFFICIENTS EF PU%C"ED LCCDpDINC TO I V C P E P S I N G DEGREE A R D C OKDERa A L L C O E F F I C I E Y T S MUST E E YOkk?ALI ZED AND M U L T I P L I E D !3Y l .OD6a

READ( 5 7 ~ ~ ~ ) G M P T ~ X I C I ! F F ( 5 ) th !VAXtLFX 137 F 0 Q M A T ( 0 1 5 s 8 9 F l l . l r F 1 0 ~ 4 p 1 4 T L S )

WRITE ( ~ T ~ S ~ ) G V P ~ A X I C O F F ( ~ ) T K M A X 1 3 8 FORMAT ( ' 0 G 1.1 A CC'FF ( 5 ) MAX.DCGRFE',/

* D 1 5 e B 9 F l l - l 9 F 1 0 a 4 r 1 4 ) I F (Nb iAXmLTa24) GO TO 1 0 P 9 b d R I T F ( b r l 4 0 )

1 4 0 FORMAT( * Y M A X TOO 6 I G .' GO TO 9999

C 1 0 0 9 NZ = (NMPY+1 ) * *2

C INPUT OF FOQPiAT OF COFFF. READ(5 ,1O? )FMT I F ( L F 2 ) CO T f i 1 2 3 5 R F A D ( 5 r F P T ) ( C D F F ( 1 ) 9 l = 6 9 9 ) JM = 9 DO 1 2 2 4 J = 3 , N M A X J N = J M i 1 JM = JY+2*J R E A D ( 5 r F M T ) C O F F I J N ) J N = J N + 1

1 2 2 4 R E A D ( ~ T F M T ) ( C O F F ( I ) 9 I = JNT JM) GC TO 1 2 2 6

1225 READ( 5 , F M l ) (COFF( 1 ) I = 6, N Z ) 1226 DO 1 0 3 4 1 = 1, 4

COFF ( I + Y 2 = DO 1 0 3 4 COFF( 1 ) = GO

C C A L L IGPPT(GMP9 A X ~ C D F F T N ~ + ~ T N M A X ) I F ( .VOTaLTRAN) C A L L G R A V C ( A X ~ F ~ T G M P T ~ S ~ L F ~ U ' ? E F O T G Q F F )

C C COLLOCATION SFCTION: I N I T I A L I Z A T I O N OF V A R I A b L E S . C

Page 75: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

1050 N - O W R 1 7 E ( 6 9 l O Q 8

109 F P R M A T ( @ O C T A R T rF C T L L O C A T I C Y 1: C I N P U T CIF T E F INBECiEP K T Y P E D E T E G P l I N I I N G T Y P E O F D E G R E E- V A R I A N C E Yf'PFL C U S F D FOR P F G R E E - V P R Z A N C E S O F P E G K E E GREATHER T H A Y I V A X ( S E E B E L O W ) C K T Y P E MAY L!? F C U A L TO l e 2 A N D 3 C O R R E S P O N D I N G T O T H E D E G R E E - V A Q I A N C F C FIU.lELS l* ? AKD 3, CF. R E F ( B ) ? S E C T I O N 7 a 2 s

W E A D ( 5 9 1 0 2 ) K T Y P E L K F Q l = K T Y P E e F Q e I L K E Q 3 = KTYPE.EQ.3 L K N E l = . V O T . L K F W l I F ( K T Y D f c.LT.31 GO TO 1 0 3 6 R E A D ( 5 p l Q 7 ) I K

B07 F n R r 4 4 T ( 14 .1 I F t K T Y P E e L E O O a O X . K T Y P E - G E . 4 ) GO TO 9999

C I N l T I k L I Z P I T ICJY CIF: V R Q I A R L F S I N COMMON B L O C K / S C K / . TKO = 1 K - f I K I = I K + l IKZ = I K t . 2 T K A = I K 4 Y I K 1

C 1026 W R I T E B h , 1 4 1 ) 141 F O R M A T ( ' O T H F MODF L A 'JOMALY D E G P E E - V A R I A V C E S A R E E Q U A L T O R / *

A * ( T - l ) / s l GO T9 ( l O 3 7 9 l 0 3 E p l O 3 9 ) , K % Y P E

P037 WRTTE(6rl42) 142 F O R M A T ( B + 6 ~ 9 X o ' I . ' 1

cc7 Ti) Inno 1 0 3 8 W h I T F ( b p l 4 3 )

143 F O R M h T I ' + O q Y X , V I - Z ) . ' 1 GO TO 1COO

1039 k J R I T E ( 6 9 1 4 4 ! % K 144 F n R . X A T I s + " 9 X 9 ' ( ( I - 2 1 * ( I + ' 9 1 4 P ' ) 1 * ' l

C 1000 C X R = Dn

DO 1 0 3 5 I = 1 9 250 1 0 3 5 S I GMA I 1 = L 0

s u e s = DO S U M S l G = DO S U K R S ? = DO I V 1 = -1 M A X C 1 = li

C C I W U T OF C:I%STANTS USF-0 FOR THE F I N A L S p E C l F I C A T I O N O F T1 iF DFG9EE-VAK- C I A N C E FEODFL* R = R A T I T ! b E T , + E F N THE BJERc lAVMAR S P H E R E R A D I U S A K n T H E C M E A N F A R T u R A D l U S 9 V F R D C 2 = V A R l A N C E O F T K E G R A V I T Y A N D M A L J E S A N 9 I M A X C W H I C H I S F O U P L TO T H E (3FDFR OF T U E L P C A L C O V O R I A N C E F U N C T I C I N U S F 9 . C TtJUS I M A X = n I k P l C A T E S 9 T H A I WE ARE U S L N G A G L O B A L C O V A 9 I A N C F F 2 Y C T I O N . C I N T H I S L A S T C A $ € 4 S E T DF E C l P I 9 I C A L ANOMALY D F G 9 E E - V A ' I I A V C F S '3F ORDER C UP TO I M A X O C A % D E I N P U T , T H E E S E D E G P E E - V A R I A N C E S WILL H A V E 10 BE

Page 76: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

C G I V F N ON T H E S U P F A C E O F T P E M E A N F A X T H v C F o R F F ( E ) r E Q o ( P f J ) o R C A D ( S p l G l ) R ~ V A R D S 2 ~ I P A X

101 F ! l R M A T ( k 9 e 6 , F 7 0 ? r 1 4 ) I F ( R . G T . D l m n R , V k F D G 2 . L T ~ G O m D R m l M A X . L T , O ) GO TO 0999 L Z F P 7 = I M A X . Y E m 0 I M A X l = I & ! A X + l I F ( L Z E Q O ) G O T O 1040

C I N P U T OF TPF F C R M A T O F T T H F P I G H E S T D F G R E F O F 9 A N D T H F E M D I P I C A L ANR- C K A L Y D E G R E F - V A R I A K C E S I V U Y I T S O F MGbL**2.

1 0 2 F O R M A T ( I 2 9 R E A D ( 5 t l C 2 I I M A X O IPLlAX = I R A X O I M A X 1 = I V A X + 1 READ( S , 1 0 2 F b 4 T

P03 F U F t / l k T ( Q A P R E A D ( 5 , F M T I ( S I r l N A ( I ) t I = 39 I M A X l )

C ROTE T V A T T H E D F C R F C - V A R I A V C E OF OF'OEP I I S S T O R F D I N S I G M A (I+I 1 , C

D O 1001 I = 3 r I M A X l 1001 S U M S I S = SUMS I G + S I G Y A ( I) 1040 I F ( I t l # r X 1 + I S o L T . 2 5 0 ) GO T D 1002

W R I T E ( 6 , 1 F E ) l 0 8 F n R M A T ( ' S U S S C R I P T S OF A R P A Y 5 I G M A E X C E E D S A P Y A Y L I M I T t S T f l P * O

GO TO 99Q0 C

1007 S = R W S2 = S * S R L = ( D l - k ) * ( D l + R ) S 1 = R L R L N L = D L D G ( Q L ) I F ( I M E X . L T . 3 ) GO T O 1004 R I = G F L O P T ( I t 4 A X ) D0 1 0 0 3 J = 39 I P A X G O T O ( 1 1 0 1 ~ 1 1 0 ? ~ 1 1 0 3 ) ~ K T Y P E

1101 R & = ( F I - F l ) / R I G O T O 1105

1 1 0 2 R A = ( R I - ? l ) / ( R I - P 2 9 GO TO 1105

1103 R A = (RI-Cl)/((EI-@2)*(kI+IK)) 1 1 0 5 S U M R S T = ( S U M R S T + R A ) * S 1003 R I = R I - D 1

C S U M R S T = S U K R S T * 5 2

1004 D I F = V A R T G Z - ' U M S I G I F ( D I F , L T , P O ) GP T f l 9999

C C C I M P U T A T I O N OF T H E N O R F A L l Z l N G C C Y S T A N T A 9 C F o R E F , ( B ) F A R A o 3 0 3 0 G@ TO ( I l ~ 6 r 1 1 0 7 ~ 1 1 ~ 8 ~ ~ K T Y P E

1106 R A = K L Y L + 5 / q L - - S Z / D Z GO TO 111P

1107 R A = D 1 / R L - S 2 * R L N L - S Z - S - n 1

Page 77: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,
Page 78: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

C W H E N P R F - D I C T I P Y S S H A L L RE Y A D F I N P D I N T S C'F A U P I F O F V G R I D , L F K N D I S C T F U F T W " t N T p E t S 7 I M A F F D E R R P R O F P K E P I C T I C I Y S t f A L L P E C '3KPUTED. L C n M P C I S T R U E T WHCN PEiSE '?VTD k\D F P F D I C T E D V A L U E S S U A L L BE C n M P A I R E D m

2 0 0 0 P E b O ( " 2 0 0 ) L G P I n r L F F ~ N O ~ LCOMP 200 F U R H A T ( 3 L 3 )

1 F ( .NDTo ( L F R k O . A M D . L k E S O L ) 1 GO TO 3 0 0 2 LER lJO = L F W R I T E ( h ? Z ? t )

226 F O R M A T ( ' *** ERROR WILL NOT BE COMPUTED l F .EQUIRED YFQ Y O T S T P R E D e ****l)

2002 LCOMP = LCOMP .AND. (,?;QT.LGRID) I F (LCOM.CIRe( o N O T m L C O R P ) GO TO 2 0 0 5 LCOM = L T

C l N P U T OF S C A L E F A C T P Q S , U S E D FOR T P B L E OF D l S T R I R U T I O Y O F D I F F E n F N C E ? C SEE S U B R O U T I Y F CO14PA.

R F A D ( ~ T ? O ? J ) V G T V F C A L L C f iWPA(L1G1VF

C VC, I N FAGAL A P D VF I N A R C S F C . C

2005 L N F R N O = .NOT.LERNO L M A P = L F LMEGR = L F DM = D 1 @ A = D@ I F ( .NQT .LGRID ) G C T O 2000

C C INPUT c n n n n ~ h + k r c ~ r \ u ~ i u r I E S ( L L T I T U E E p L D Y G I T L I D E IN PEG9EE.S A';? D F i . OF r.7 IF:;- C T F S ) O F S3UTH-WEST CORYER O F G Y I D ? M A G Y I T U D E CIF G Y I D I V C P E P F Y T S I N C N 0 9 T H F K N A N P ' A S T E R Y D I R E C T I O Y S ( V 1 Y U T E S ) r YUWBFP n F I Y C S F Y F Y T C I N C TPE S A M E D I ' E C T I O N S ? T H E V A L U E O F I K P : ( l F O R Z E T A p 2 FOR D F L T b C G, 3 F O R K S I , 4 FCR F T A A K D 5 FOR ( K S I ? E T A ) ) R P = THE ' ? A T I T B C T W F E N C THE R A D I U S O F THE S P H E R E OV W H I C H T Y E P O I N T S PF P R E D I C T I C X A9E ' I T U A - C TED ANG R E ? TUE V A L U E O F LMAP, WUIC" I S TRUE 9 Wk'FN T V E P R E D I C T I O ' I S C S H A L L 6 E PR I N T F D AS A P S I XI T I V E M A P ? T H E V A L U E O F LPUYCI-I, W H I C H I S C TRUE WHEY T H E PREPlCTI f l ! ' IS S H A L L 9E P U V C H F D AND T H E V A L U E O F L u c A Y , C TRUE WHEN THE PRREDlCTED Q U A N T l T I E S A R E M F A N V A L U E ' ( B E C A U S E T H I S IF+ C P L I E S ? T H A T T P F Y A R E R E P R E S E N T E D AS P O I N T V A L U F S I N A C F R T A I V Y F I G H T ) .

R E A D ( 5 , 2 0 1 ) I D L A C T S L A C T I D L O C ? S L G C ? G L A ~ G L @ ? N L A ~ N L O ? I K P ~ R P T L M A P , * L P U N C H ? L P E A N

201 F O R M A T ( ? ( I 5 , F b - 2 ) I F I N L A . G T . 1 9 * O R - N L O . G T - 1 9 .OR. I K P e E Q . 5 1 L M A P = . F A L S E , LWLONG = L F L G R P = I K P , E Q e 2 N A I = 0 N O I = O I O B S 2 = 0 I H = 0 H = DC1 I F ( .NPT ,LMFAK) H = ( R P - D l ) * R E L K M = H-GE.1 .OD4

Page 79: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

H 0 = H OBS(P) = K IF ( L K M ) nescl, = M*I,OD-~ LSTUP = LT JANG = 2 NO = Q)

C 2001 SLAT = N A I * L L A a S L A C

SLOY = NC!I*GL@+SL@C I S L A = S L A T / 6 0 + O R 1 3 - 2 ]I SLO = SLOId/hO+n. 10-2 l D L A T = I D L A C + I S L A IDLOV = I D L C C + I S L O S L A T = S L A T - 6 0 4 I S L A S L O N = SkON-bO* I S L O NE = N C + l U = H 0 I F (NO1 . E G O NLO) GO TO 2 0 0 3 NO1 = " \ i O l + B GO TD 2 0 0 4

2003 NO1 = 0 N A I = (:,A I + P

2004 I F [ N A I e N E * O , C R . KQI o N E o 1)GO TO 3031 GD TO zon7

C C I N P U T OF O V E PATA- SET OF Ot jSERVATIONS 0 9 COOR.DINkTES OF P ? E D I C T I D % C POINTS. A L L RECORCIS YUST EE PUNCPCD K'\! THE SAME WAY, THERE ARE THE C FOLLOWING C E S T R ~ C T ~ T J N S ANb UPTIDNS: k S T A T I O N NUM9F9 MAY F E USFDp BUT C I T MUST OCCUPY THE F I R S T G A T A F I E L D O N THF RECCtRD. THE TiJ@ NEXT DATA- C F I E L D S MUST CCWTA1N TUE GEODETIC L A T I T U D E AND LOVGITCIDE ( I N P % \:R.FI- C TRARY O P 9 E R ) . I N CASE THE H E I G H T I S G I V E N * MUST I T BE PUNCHFD I? TPE C NEXT D A T A F I E L P . THE FDLLOkI ING UP TO FOUR D A T P F I E L D S W I L L WAVE T'3 C CONTAIN THE O E S E R V E D GUANT lTY (G!? Q U A N T I T T E Z WHFN A P A T T nF D E F L E C T I- C ONS ARE E b S F R V F D ) AND CONTINGENTLY THE STANOPRLi D E V I A T I P M S ('IIIHFN LE I S C TRUE AND LSA 1 5 F A L S E ) , A L I S T OF C 3 0 R U I Y A T E S OF PC:INTS W I L L V A V F TO C CONTAIN A UEIGL'T CR A F l C T I C I D U S OBSERVATION. TL'F LAST DATAFKFLD H A V F C TO HOLD T H E VALUE 13F A LOGICAL V A R I A 3 L E LSTClP? TSUE FOS THE L A S T C RECORD I N THE F I L E AND FALSE ( I . E . B L A N K ) OTHERWISF, C C INPUT OF THE FORMAT OF THE RECORDS H n L D I N G THE OBSESVATIDN @R THE CO- C OR.DINATES O F THE P R E E I C T I P N PG lNT , 2006 R E A D ( 5,103) F K T

C IYPUT OF V A R I A B L E S S P E C I F Y I Y G THE CCXTENT OF THF RFCOQDS. I N O = Z t C WHEN THE S T A T I O N NUMGER I S PUVCHEDT O DTHFRWISE, I L A * I L ' 3 THE VUKBEQ C OF THE D A T A F I E L D S OCCUPIEO F Y THE L A T I T U D E ANC! THF LONGI ' IUDE 2FCDFC- C T I V E L Y ? I A N G S P E C I F Y I N G U N I T S OF AhlGLES ( 1 FCI? D E G R E E S , M I N U T E S * ARC,- C SECONDSp ? FOR DEGREES, MI%I.!TES, 3 FUR G E G R E F S AND 4 F n R 4 0 0 - G R A D F S I r C Iu = THE NUMBEk f3F TUE D A T A F I E L D W L D l N G TUE V E I G P T ( P E 9 0 WHEN WO C HEIGHT I S C 3 N T A I N E D ) r I O P S 1 I O E S 2 = THE D 4 T A F I E L D NUMSER OF THE F I R S T C AND THF SFCOYC' OBSERVATION, RESPFCTHVELY ( Z E R f l WHEY N3 F I R S T OR SFCOVD

Page 80: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

C O B S E R V A T I D N I * I K P * S P E C I F Y I Y G THE K I V D OF O O S E ? V A T I O N ~ ( 1 F99 Z F T A ? 2 C FOR MEASU2EG G R A V I T Y * P O I N T OR MEAN G R A V I T Y A N D M A L I F S I 3 F9R K S I T 4 C FUR E T A AF!D 5 FPR P A l R nF C I F F L E C T I O N S ( K . S I V E T A 1 3 9 ( E T A , Y S I I ? ( I N THE C SAME nRDER AS THE L A T I T U D E AND THE L O N G l T U D T ) C TUEN TuF. P A T I P RP ( C F . R E F ( B ) r EQ-(07)) EETWEFN THE SPHERE O N WMICH Tt-!E: C O B S E R V A T I O N S A R E S I T U A T E D AYD RE, THE V A L U E S OF 5 L D G I C A L V 6 9 I A B L F S : C LPUNCH = PUNCH 0 9 S . Oi? P R F O I C l E D VALUE AY@ C C N T I M G F N T L Y T I ! E I 9 D I F F E - C RENCE* LWLONG = L O N G I T U D E I S P C J S I T I V E TOWARDS W E S T * L M F A N = THE DYED- C l C T E D OR OBSERVED Q U A N T I T Y I S A P E A N V A L U E * L S A = A L L OESFRVED CUAN- C T I T I E S 'JkVE T U E SC.HE STANDARD D E V I A T I O N S AND L K M = THE H E I G H T I S I N C L N I T S OF K I L U M E T E R S .

R E A D ( 5 9 2 O Z ) I N O r I L A * I L O * I A N G T I H * I O B S ~ ~ I O B S ~ ~ I K P * R P * L P U Y C H T L W L O N G * ,LMEAVrLSA,LKl - l

202 F O R M A T ( t 1 3 ~ F 1 0 . 7 9 5 L 2 ) G M = C j 1 DA = DO LGRP = I K P - E Q . 2 I F ( L G R P I R E A P ( 5 9 2 0 3 ) CMvDA*LF!F!GQ

C LrZiEG9 I S T 9 U F WHEN THE MEASURED G q A V I T Y V A L U E I S I N P U T . OM ArJD DA ARF C AN A D D I T I V E ANC! A M U L T I P L I C A T I V E C O N S T A N T * R E S P E C T I V F L Y ? W H I C H C A N BF C USED TO CI?NVERT I K P U T ' V A L U E S TO MGAL PK CORRECT FDR A S Y S T E M A T I C A L C ERROR-

203 FORMAT( 2 F 1 0 . 2 1 L Z I C I N P U T OF STANDARD D E V I A T L O N .

I F ( L S A I R E A G ( 5 * 2 1 2 ) W M 212 F O R M A T ( F6.2)

C 2007 L R F P E C = IYP ,FQ-5

C I N I T I A L I Z A T I n N OF V A R I A B L E S I N COMMON BLOCK /PR/ . L O N E C 9 = s N O T o L R E P E C L N K S I P = I K P o N E o 3 .AND. LONFCO L N E T A P = I K P o N E - 4 .AND- LONECO L D E F V P = I K P oGT- 2 L N D F P = ,biOT,LDEFVP LNGR = .NOToLGRP

C LREPEC I S TPUF, WHEN T N O COLUF!YS CAV BE COHPUTED A T THE SAME T I M E . C L N S K I P ? L N E T A P I S T R U E ? W W P \ I THE O B S E R V A T I O N OR REQUESTED P R E D I C T l O N C I N P I S N n T K S 1 P E S F . ETA.

L Z E T A = I K P - E Q . 1 L K S I P = ,MOT,LNKSlP I F ( R P o L T e R ) R.P = D 1

C CHECK? THAT P O I N T I S N O T I N S I D E THE BJFRHAMMAR-SPHERE, C C C O N P U T A T I O N O F CCINSTANT'S USED TO NORMAL I ZE THE NORMAL-EGUAT I O N S 0 9 C SCALE TEE F S T I M A T E S OF THE ERRCihS OF P R E D I C T I O N .

N I = MP,XCl P ( J Q ) = D 1 P ( J R + l ) = R P I N D E X ( J R + 1 ) = I K P PW = D 1

Page 81: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

C O S L A P = D l S I N L A P = DO R L A T P = P 0 R L O Q G P = Gn C A L L P R E P ( S ~ S R F F P U O ~ A ~ I S B I ~ Q Q ~ J R Y ~ ~ ~ ~ I Y A X I P L F ~ L F ~ L T ) PW = C ( M A X C 1 ) I F (PW.GT,CbO) PW = D S C Q T ( P W 1 P ( J R 1 = PW W = W P t I K P ) I F ( L N G R I W = W*RP*!?P I F B L Z E T A I W = W*RP P h O = P N * k PW2 = P W O ~ ~ P W O I F ( L C R E F I J V L = -1

C C O C T F U B OF H E A C I Y G A Y D I N I I I A L I Z A T I O N O F V A R I A B L E S .

L I N V P F = LONEC9c+OPe ( I O B S 2 ~ E C 8 0 ) . r ! t ? ~ ( I O 8 S l e L T . I n B S 2 ) L O U T C = L N F C B 0 2 ,LCOb4P I F ( L E F A R ) W R I T F ( b p 2 0 5 )

205 F O R M A T ( ' O T H E F C L L D W I N G Q U A K T I T I E S A P E M F A N - V A L U E S 9 AND ARE R F P R E S E * N T F D A S P C I N l V P L U F S IF! A H E I G H T Y e o )

I F ( R P e G T o l * 0 3 G 0 e A N D . ( L K C I P e G P e b G R P ) e P N D e ( L T P . A N e C R e L P n T I e A N D e * L P O T S D ) W F 1 T F ( 6 p Z O 4 )

204 F O Q M A T ( ' O * * WARNING: THE H E I G H T MAY B E TCO B I G FO? T H E C O M P U T A T I O N * DF'pBpt THE R E F E R E N C E G R A V I T Y O R THE C Y A N G E IN L A T I T U D E * * ' I

C C A L L EEAD i i K P ,LONECOt F i i O , XP 1

C I N l T l A L l Z A T I f ! Y OF L O G I C A L VAP I A E L E S U S E D TO D F T F R M I Y E W u l C u Q U A Y T I T I F S C WE WILL H A V E TO ADD T O G E T H E Q T O FOPE T H E F l Y A L D U T P U T OR TO Q E T F P M I N E C W H I C H Q U A N T I T I E S W1 L L € F I N D U T ,

L A D R A = T H . h E e I A L A D D B C = IE.NE, I C 1 L b D D B P = 1 S s N F e 1 P L A D G P R = L A D D B P , A q D . LREPEC L T Y B = L T R A l ! . A N D e ( I T . Y E e I G ) L T E B = L T R A N e A N D e ( I T . F Q e I B I L O E l = L E S A N D - ( , N O T - L S A .ANGeLO?iECO L O E 2 = L E e A h 1 D e ( e k C I T e L S A ) . A N D e L P E F E C

C K 1 "AS PEEN I I V I T I A L . I Z E C P Y T H E C A L L OF ' H E A D ' . I T I S E Q U A L TO THE NUM- C BER OF QUANTI TI ES R E A D IN T O TUE A R R A Y oes.

I F ( L O F 1 1 K 9 = K l + P I F ( L O E Z I K 1 = K 1 + 2

C I F ( L G R I D ) GO T O 2 0 3 1

C I F ( L C O M P ) C A L L C O M P B ~ I K P p L N G ~ ~ L P E P F C ~ L O h ' E C O )

C C l W U T OF C O C l Q D I N A T E S O F O B S E Q V A T I n N 09 P R F D I C T I O N P O I N T S 4 Y D C f l N T I N - C G F N T L Y THE O E S F R V E D Q U A N T I T I E S AND T H F I R S T A N D A R D D E V I A T I f l N S .

% J = I A N G * 2 + I N O - 1

Page 82: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

2033 GO T f l ( ? O 2 4 9 ? 0 2 5 9 2 0 2 6 9 2 0 2 7 ~ 2 0 ? P v ? 0 2 9 ~ ? 0 7 E 9 ? 0 7 9 ) 9 I J 2024 R F L D ( 5 , F M T ) I D L A T T M L A T ~ S L A T ~ ~ ~ L O N T M L O N ~ S L O ~ ~ ( D E ~ ~ 1 1 9 I = l v K l T L S T O P

GOTO 2 0 3 0 2 0 2 5 R E A D ( 5 P F M T ) N O r I D L A T t M L A T t S L A T T I D L n N T M L r ) Y t S L 3 V t ( O B S ( 1 ) ~ 1 = 1 ~ q l l T

* L S T O P GO TO 7070

2026 R E A D ( ~ * F P T T I I J L A T ~ S L A T ~ ~ D L O N ~ S L D N ~ ~ O E S ( I ) r I = l y K l ) r L S T O P GOTO 2 0 3 0

2027 H E A D ( 5 r F M 7 ) N O I I D L A T ? S L A T T ] :DLC!N*SLf) fVy ( O B S ( 1 ) t I = l y K l 1 9 L S T P 0 G D T O 7 0 3 0

2 0 2 8 R E A D ( 5 r F M T ) S L A T , S L O Y v ( O B S ( I 1 v ] : = l y K l T L S T O P GO TO 2030

2029 R E A D ( ~ , F M T ) ~ ! R ~ S L A T T S L C N ; * (C:BS( 1 ) 9 I = l t K l ) T L S T O P C

2030 I F ( 1 L A .LT. I L O I G C TO 2031 C C O R R E C T I N G I Y V E R T E D ORDER 3 F L A T * A X D L O N G *

I = I D L A T I D L A T = I f L G N I D L O N = I 1 = M L A T M L A T = M L P N MLOV = I A 0 = S L A T S L A T = S L D N S L O N = A 0

C 2031 C A L L R A D : I C L A T ~ ~ ! L A T q S L A T ~ R L A T ? t I A Y G 1

I F ( L W L Z N G - A V D * I A Y G . L E . 2 ) I D L O N = - 1 D L O N I F (LWLI)NG.AYD. IANG.GT.2) S L O Y = - S L O Y C A L L R A D ( I D L O N ~ M L O N r S L O X r R L O Y G P ~ 1 A N G ) C O S L A P = r c m ( Q L AT P S I N L A P = G S I N I R L A T P ) I F ( L G R I G ) GO T O 2 0 4 9

C I F ( L o t 3 1 W f l B S ( Y + l ) = O R S ( K 1 ) I F ( L E E 2 1 N O B S ( N + l ) = Q a S ( K 1 - l ) I F ( L O F 2 ) R G 5 S ( N + 2 ) = O B S ( K 1 ) I F ( I H . K E . 0 ) GO T O 2050 I F ( L R F P E C ) C B S ( 1 2 ) = O b S ( 2 ) O B S ( 2 ) = n e S ( 1 ) O R S ( 1 ) = E 0 GO TO 2 0 5 1

1 0 5 0 O E S ( l ? ) = O e S ( 3 ) I F ( L W L f ' N G - A h D e L K P e d T * 3 ) O B S ( 1 2 ) = -ClPS( 1 7 )

C C C R R F C T I N G TUF OR S E R V A T I O N f;Y AN ADO I T l V E AND M U L T I P L I C A T I V E C O V S T A N T C ( I S U S E D O N L Y F O R G R A V l TY O B S E R V A T I O N S ) .

2051 O R S ( 2 1 = O S S ( 2 ) * D M + ! ? A H = O R S ( 1 ) I F ( L K M ) H = H * 1 . 0 D 3

C C O N V E R S I O N OF P E I G H T I N T O METERS.

Page 83: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

2049 I F d L N G R ? GO 7 0 2 0 5 6 C

I F (".LT,25,0E3 . A N D * ( - N F T o L P O T S D I I C A L L E U C L I D ( C O S L A P 9 S I N L A P * * R L f l N G P s H ~ E Z l q P X I l

C A L L ? G 9 A V ( S I N L A P p H p O 9 C R E F l C C O M P U T I N G T H E G Q b V l T Y APiOMALY e

BF 6 L P F G R ) O b S ( 7 ) = Q B S 1 2 ) - G R F F C

2 0 5 6 % F ( L I N V D E I GO T O 2 0 3 2 O B B = D E S ( l 2 ) O B S [ % 2 ) = D S S ( 2 ) 0 6 5 ( 2 ) = C i E l I F ( e N O T m L E . 9 E . L S A ) Gn 7C' 2 0 3 2 MM = W O B S I N s l ) W C B S ( % + l b = W C P S I N + Z I W O R S ( Y + 2 1 = M M

C 70'2 O E S i I P . 1 = DO

I F ( L R E P E C 9 P H S ( I E 1 . I = DO I F I L N T P ) GC) TO 2 0 5 5

C IF I L N T R A Y ) G O -r3 2053 C A L L E U C L I D ( C O Z L A P ~ S I ! J L A P ~ R L ~ N G P ~ D O I € ~ ~ ~ A X ~ I C A L L 7 R A V S ( S I ? ~ i L P P q C f l S L A P q R L A T ' P t R L O N G P q I K P q I T I i I F { L N G R I GO TO 2 0 5 3 GREFP = G R E F I F (HeGE.25 -003 I C P L L E U C L I D ( C O S L A P ~ S I N L A P , P P L O N I ; P ~ w ~ E 2 2 ~ A X 2 1 CALL R i : ~ R k V i S 1 V L b . P p H r 1 5 r G k t F ) O B S ( I T 9 = G R E F 1 - G R E F I F ( L P O T S D ) O B S ( I T 1 = O E S ( 1 T ) - 1 3 . 7 0 0 GP.EF1 = GREF

C 2053 1 F ( L N P O T I GO T O 2 0 5 5

I F ( L V G R S GO TO 2 0 5 4 C C FfiR G R k V I T Y A N C I M A L l E S WE U S E ? T H A T T H E NEW R E F s P O T E N T I A L G I V E S A P F T - C TER E S T I M k T E CF T H E G E O M E T R I C H E I G H T ? S O T H A T T H E NEW REF. G Q A V I T Y C A N C BE C O M P U T E D A T T H I S H E I G H T ,

C A L L E U C L I G ( C F S L A P t S I N L A P ~ R L O I \ i G P t D O ~ E 2 2 q A X 2 1 C A L L S P O T ( R L A T P I C O S L A P ~ R L C V C ~ P ~ ~ ~ 1 1 9 G R C F 9 L i R E F O ? D O ) H = H + O B S I 1 1 I

2 0 5 4 C P L L E U C L I D ( C O S L A P 9 S I N L A P 9RLOrYGP ?H, E 2 2 q A X 2 I I F Q L Z F T A ) C A L L U R E F E R ( U R E F t l 5 , H l I F ( L k S I P ) C A L L C L A T ( C L A v 1 5 9 p 9 R L A T P I C A L L GFCJT ( R L A T P p C O S L A P v R L O I V G P v I K P I I P v G R E F v U Q E F T C L A ) I F ( L A D P B P ) O L S ( I B 9 = O S S ( I B I + O B S ( I P ) I F ( L A D R P R ) O P S ( I B l 1 = C ) b S ( I E 1 ) + O S S ( I P 1 )

2055 I F (,rYOT,LCREFl GO T O 2 0 5 2 C C THE V A R I A F L E I V P I S U S E D TO I N D I C A T E q T H A T T H E D E G R E E- V A R I A N C E 5 S T C R E D

Page 84: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

C I N S I G M k W I L L W A V E T@ B F CUAYCED F P P M C O L L O C L T I D N I T n C O L L O C A T I O N 1 1 , C T H E V A L U E I S TRANSFFR.RER TO P R E D BY T H F CCWMOY P L f l C K / P Q / .

C A L L P 9 F D ( S ? r F R E F R p U R O p A R , 0 9 0 ~ 2 p ~ O B S R ~ Y ~ F T I M A X ~ R ~ L T ~ L F T L ~ ) 1v1 = - 1 f l E S ( I C 1 ) = PRFDP*W I F ( L A G ~ J R C ) O E s Z ( I R ) = O F S ( 1 6 ) + 0 8 S ( l C l ) I F ( L O Y E C O ) GO T P 2052 O B S t I C 1 1 ) = FRFTAPWW I F ( L A D O B C ) o D s c r e i I = ossc r e i ) + o s s c r c 1 1 1

2052 I F ( L P P E L ) GO T O 3 0 2 1 C C S T O R I N G C O O K R I N A T F S AND R I G H T - H A Y D S I D E O F N O i l Y A L - E Q m p N C n U U T S T H E C C O L U V N S A Y D I C TLJE S T A T I O R S .

N = N + 1 I C = 1 C + 1

- I F ( L T K B ) O E S ( 1 U ) = O F S ( l ! 3 ) - G E S ( I T ) 1 F ( L T E R ) O I . S ( I 1 ) ) = + J F S ( I T ) I F ( L K S O ) 0 6 S ( 3 ) = C S S ( 2 ) - O B S ( l U ) O E l = V B S ( K 2 ) / P W O B ( Y ) = O S 1 I F ( L S A ) K O B S ( Y ) = W!-! SSORS = S S 0 5 S + O F 1 * * ? I F ( L R N E C C ) G P TC ?C33

C I F ( L T N S ) I f G C ( I U 1 ) = T ~ E S ( I B l ) - O B S ( I T l ) I F ( L T E B ) O E S ( I U 1 ) = - O b S ( I T l ) I F ( L K 3 0 ) O S S ( 1 3 ) = O B S ( 1 2 ) - O R S ( I U 1 ) O B 2 = O B E ( K 2 1 ) / P W G SSOGS = SSf€S+Clb2*=+2 N = N + 1 B ( N ) = P82 I F ( L S A ) WOBS(Y = \$M

2033 I F ( N , L E 1 1 5 ? E ) GO T O 2 0 6 0 C CHECK OF h U M F E R GF 0 5 S E Q V A T I O N S NOT E X C E E D I N G 4 R 9 A Y L I M I T

W R I T E ( 6 p ? 2 9 ) 229 F O R M A T ( ' NCMEER O F O E S E R V A T L D N S TOO B I G * *** S T O P * * * ' l

C 2060 C O S L A T ( I C = C O S L A P

S I N L A T ( I C 1 = S I R L A P R L A T ( 1 C ) = R L A T P RLORG ( 1C 1 = R L O N G P C N R = R L A T F * I C + C h R

C OUTPUT OF f l B 5 E R V A T I V N S . C A L L f I U T ( Y 9 r I D L A T T M L A T T S L A T T I D L ~ b I ~ M L ~ h ' p s L ~ N p L O N ~ ~ n ) IF( .NOT~LSTOP)GO T O m 2 3

C 230 F O R M A T ( 3 L 2 )

R E A D ( 5 9 2 3 0 ) L S T @ P , L R F S r L , L W R S O L C

I F ( L R E S O L m A N D . LWRSOL I G(3 T O 9999

Page 85: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

C C F S T A B L I W H V G A C A T A L n G U E OF THE O b S E 9 V A Y I P N S r M R X l r Z l A L L Y 9 S E T C ALLf'bJEDI

I N D F X ( J P 1 = I C + I $ R = JR t -2 1F I H N D F X ( J 2 - 3 ) .NEe I K P * O R * ( D A G S ( P ( ~ R - ~ ) - R P P ~ G T C ~ ~ O D - ? ) I

9Gl l TO 3 0 3 4 J R = JP- 2 I Y O E X ( J P ,- l 1 = I Y D E X [ J P + l )

2094 I F [ ( J R - I I ) . L T C 191 GO T f l 7035 H R I T F ( h , 2 9 8 )

298 FORMAT ( @ DPSFRVATSONP A S R A N G E D TOO C O M P L I C A T E D B

GrJ 10 q9G5 2035 HF ( , Y D T , L S T 3 P ) GO TO 3 0 0 6

C C FKD OF I N P U T CF O F S F 9 V A T I f V J S . M = N g M B E R OF C i b Z F S V A T T D Y S , l O 3 S = C R U P L F P CF I ' t L S F Q V A T I PI\' P C 1 K T ? .

100s = I C - 1 ' 0 N = N-ISP "41 = Y + l S ( N l + i S O ) = SSOPS

C I F I . Y n T . L F ) CO T O 2036 W R l T E ( b p 2 Q 7 ) I R O F S ( I + I S O l r I = 1 9 NI

297 F O E P A T I P O ~ J R " d 9 A K D D T V l A T I F Y S OF TUE P E S F R V A T I O N S 1 Y T W S P : I F SEOUF * N C E ' / t V A Y O l",' T H E SAME U Y I T S A S T H E O S S E S V A T L f l N S : ' / y f ' ' 9 l C F E * 2 ) )

C 2036 I F ( L Q F S G L ) GO TO 3 ? 2 [

C I F ( L D E F F ) GP Tfl 3027 L D E F F = L T N T = 3 I P L M C = L700

C I N T H I S P 9 R G P A b l - V F R S I O N t T H E A R R A Y C H A S D I Y E N S I O V I D E Y C A Y D I T S C V A L U E S A Q E S T b R f G G? R E T R I V E D F P O M U N I T 8 3 Y N T R E A D 07 W q l T E ?PERA- C T I O R S . C C S E T T I N G U P A C P T P L O G U E OF T H E NORMAL F Q C I A T I O N S C N b I S TPE P F C f l F D ?:UEIGESr I C C O U N T S T H E YUMBER n F C O L U M V S WIT'JRN A C R E C O R D * &"!D T P I S h:UME\FR I S S T O R F D I Y N C A T ( 1 0 1 ) $ . Y C A T [ I ) W I L L C n Y T A I Y C THE S U b S C Q I p T CF THE G I A G O N A L F L E M E N T O F C O L U F Y I - H p AWD A L L THE C F L E P F R T S @F I S Z F W I L L 6 F ZEP.0 B E C A U S E WE WORK W I T H A F U L L M A T R I X , C N B L ( I ) C O Y T A I V S J H E NUMBER OF T H E L A S T C O L U Y N I N RECORD 1-1 N O T E C T P A T M A X I I Y A L L Y GP C P L U M N S M A Y B E STORED I N ONE RECORD, 2037 Y E T = I

Y E L ( 1 ) = C ,

N5 = 1 I C = O If=O

C DO 2 3 0 4 I = I p N1

Page 86: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

I C = I C + l I S Z E ( I C ) = Q N C A T ( I C I - 1 1 H1 = Il+I 1?=11+1+1

C IF(BIZ.LE.IDIMC),AND,(I,NE~Nl~.ANDo(IC.LEoQU GO T O 2304 N C A T B I C + P ) = I1 I F B I e Y F o Y l l GO T O 2 3 0 3 1 2 = I 2 + N l + l I F ( l 2 . L E . I b I M C ) G O TO 2301

C S E C U R I X G T H A T T H F L A S T C O L L U Y N + ON€ MORE C A N BE S T O R E D I N T H F S A M E C R E C O R D .

N C A T ( l n O ) = I C - l W R I T F ( b f Y e T + ? ) C 3 t N C A T I I S Z E NET = I',E;T+NT N E = N B + l N B L W ) = ] - l N C A T ( 2 ) = N l I IL =N1

I[ c=1 C MAXC I S T H E S U S S C R I P T O F T H E D I A G C N A L E L E M F V T O F T H E C A S T COLUYnS, AN13 C M A X C 2 I S T H c S U b S C R I P T PF T H E F I C T I C I D U S C I A G f G U A L F L E M E N T O F T H E R I G H T C H P N D S l D E ( I N W H I C H T H E S U A R E - S U M O F T H E N O R M A L I Z E D D B S E R V A T I O V T I S C STOREDJ .

2301 M A X C = 1 1 - Y I M A X C 2 = I 1

C S T O R I N G T H F R I G H T- H A N D S I D E c 00 2307 J = l t N P

2302 C ( M A X C + J ) = b ( J + I S O ) C

2303 I1=0 N C A T ( 1 0 0 ) = I C I Q = N E T W R I T E ( B ' I Q ) C ~ N C A T ~ I S Z E N B T = N B T + N T I[ C=O ME=!\1!3 + l N B L ( N H l = I I F ( N b e L E o 3 0 9 ) GO T O 2304 W R I T F ( 6 r 2 9 q )

299 F O R M A T ( ' R E S E R V E D A R E A P N F I L E 8 T O O S M A L L ' ) GO TO 9999

2304 C O N T I VUF C

M A X B L = N R - l . M A X P L T = ( M A X B L - 1 ) * N T + 1

C C C P M P U T A T I D N O F E L E M E N T S OF N O R M A L E Q U A T I O N S ( F Q U A L T O T U E C O V A D I A N C E C B E T W E E N T H E D B S E R V A T I O N S ) c T N E C O E F F l C I E Y T S A R E S T P R E D I N T U E O N E - O I -

Page 87: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

C M F N S I O h A L A R R A Y C, C n L L U M N A F T F R C Q L L U H N p T M E D I A G O N A L E L E M E N T H A V I N G C T H E H E l G H E S T S U P S C R I P B e C G l N l T I A L l Z I N G V A R I A B L F ? : C N I I S I h M A % & T H E S U E I S C R I P T O F THE F I R S T FLEWFNT OF C O L U M N N C IQ A Q R A Y C C e I N THE S U b F G U T I N F P K E E p NI I S THE S U Z S C E I P Y f9F THF F L F M F N T S 3 F T H F C COLUMN, Nb 15 T H F N U M b F K O F THE BLQCk I N H H I C t l B E F C O V A R I A N C F S A R E C S T O K E D AYD I 1 IS TEE NUMBER R F TUE L A S T C P L U M Q S T O R E D I N BWE E L D C K , C H C Y E X T I S T H E N U M P E R O F T H E F I R S T COhUY'lsd H I T H I 3 A GROUP OF D A T A W I T H C T H E S A M E C H A R A C T E X I S T I C S , (THE C W A R A C T E R I S T l C S A R E G I V E N BY T P E A R R A Y S C I h D E X AYD P ( S U B S C R I P T S JC A N D J C + B I ) .

N I = 1 NC = 1 4 C = I I I V P =-l N@=E 19=PF3LI2) R f A D ( E ' N T I C 3 9 N C A T , H S Z E F I N l j ( 8 @ 1 9 N B T = l I C N E X T = ISO+l

C DO 3100 3C = l 9 I O B S I C C = I C + l S r 7 C O S L A P = C L S L A T ( I CC 1 S I N L A P = S I Y L A T ( I C C 1 R L A T P = R L A T ( I C C 9 R L O N G P = R L O N C ( I C C I

c I F ( I C C .NF. T C N E X T I G O 7 0 3003 IKP = I N D E X I J C + I )

C I N I T I A L I Z A T I O N OF V A R I A B L E S I N COMMON B L O C K /PR/, PW = P ( J C ) RP = P ( J C + l ) P C N E X T = I N D E X ( J C ) 4 C = J6+2 LREPEC = TKP ,EQe 5 L P N E C O = , N O T e L R E P E C LGRP = IKP.EQ.2 LNGR = .NOT,LGKP L N K S I P = I K P . N E - 3 -AND, L O N F C O L N E T A P = I K P - R I E .4 ,AND, L O N E C Q L O E F V P = I K P .GTe 2 LNDFP = ,NOT,LDEFVP

e PWO = P W * W P ( B K P I I F ( L N G R I P M 0 = PWO*RP*RP I F ( I K P e F G o P l P K O = P k O * R P

3003 LIRST=LF. ,EPEC eAh'D. ( K C e E Q e 1 1 1 C A S WE FOR L R E P E C = T R U E A R E C O M P U T I I K G TWT) C C L U M N S A T T H F S A M E T I M E o WE

Page 88: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

l

C PLIST, 1N C A S E T H t SFCONC) C C L U Y N I S T H E F I R S T ONE I N T H E N F X T R E C V P P C STORE T t ' l S ONE TEMPORARY 1Y ARRAY B. T H E PRLlCLEM WILL 7 N L Y OCCIJR WHEX C W E A Y E S E T T I Y G UP T H E N f l R M A L E Q U A T I O N S * L B S T = B- S T O R E * C

C A L L P ? E D ( S ~ S R E F ~ U O t A t I S t I S 3 ~ I I t I C t Q C t I X A X l t L F t L B S T t L T ) C

NE = N 1 - l D I A = C ( W ) I F ( L E ) C ( N D ) = D I A + ( W O G S ( N R - l ) / P W O ) * * 2 I F (LOYECf l ) G O TO 3020 I F ( L E ) D I A = D I A + ( w O t i S ( Y K I / P W O ) * * 2 I F ( L E S T ) b(NQ) = D I A I F ( . N C T , L b S T ) C ( N I + N C I = D I A

C THE P P E C E D I N G S T A T E M E N T A S S t I R E S * T H A T T P E D I A G O N A L E L F Y E N T CflRREZPON- C D I N G TO E T A P E',ECPP.',ES E Q U A L T O TcJkT OF K S I P -

NC = YC+l N I = h l + N C

C 3020 I F ( N C r n L T o I l * P N O - K C - L T . h ) GO TO 3100

C C S T O R I N G T P E C O t F F I C I E r V T S OF T H E N O S M P L - E B * O N F I L E 8, R E C O R D N?.

10 = Y B T K R I T E ( 8 ' 1 Q ) C t N C A T r T S Z E I F ( . N O T - L O k E C I G P TO 3 2 0 0

C C O U T P U T OF C n E F F I C I F Y T S OF N O R M A L- E Q U A T I O N S ,

WS 1 T E (h ,3hO)NB 380 F O R M A T ( ' O C D E F F I C 1 E N T S 3 F N O R M A L- E Q U A T I O N S * B L O C K ' t I 4 r / l

I 1 = N I - l I F ( N Q . E C o t 4 A X f ? L I I1 = M A X C 2

C W P I T E ( 6 p 3 6 1 ) ( C ( K I * K = L T 11)

3 8 1 F O R M A T ( ' ' 9 1 0 F 8 0 4 ) 3200 N 9 T = Y b T + Y T

NE,=9!3 + 1 N J = 1 I F ( N C - N E - N I 11 = N B L ( N E + l )

I F (NR.GT,t+AXBLI GO T O 3201 R E A D ( I Q I C l R E A D ( I Q I C 2 R F A D ( F ' I Q ) C 3 * K C A T * I S Z E

C WE H A V E TI) R E A D T h E WHOLE C O N T E N T OF R L X K NB I N T O A R R A Y C, R F C A U S E C WE M U S T B E S U P E T U A T T U E R I G U T - P A S 0 S I D E ( W u I C u A L R E A D Y I S S T O R F D I C I S P L A C F D C O P S F C T L Y .

F I N D ( P t N B 1 C

3 7 0 1 I F ( o N C T e L S S T ) GO T O 3 1 0 0 C

00 1 2 0 2 K = l * N C

Page 89: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

C B S E R V A T l C N S AND K O R P CF A P P R O X I M A T I O N C C S T O R I N G S O L U T I O N S D I V E D E D B Y A CDMMON F A C T O R .

N 1 = P J R N E X T = 1SO+I JP = I 1 DO 3 0 3 2 I = 1 9 HOBS I F ( ( I + I S C l ) . V E * J R K E X T I G O TO 3030 I K P = I N D E X ( J R + l ) LONFCf9 = 1 K P , L T , 5 J R N E X T = I N D E X ( JR) PW = P I J R ) 4R = JR+2

4030 I F ( L C I W E C C ) GO TO 3 0 3 % B ( N I + I S f l ) = C ( M A X C + Y I i / P W

Page 90: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

N I = N I + 1 3031 R f Y I + T 5 O ) = C ( M A X C + Y I ) / P W 3 0 3 2 N I = N I + 1

I F ( L C I ) GO T O 3116 C

L C 1 = L T C I N P U T O F L C Q E F . W H I C H I S T R U E WHEN O N E MORE S E T O F O B S E R V A T I O N 7 C S P A L L B E I Y P U T ANT) U S E D FOR T H E E S T l M A T I O U O F QNF MORE H A R Y O Y I C F U Y C - C T I O N .

R E A D ( 5 9 2 3 0 ) L C P F F I F ( .NOT,LCRFF) G O TO 3110

C C S T O R I Y G A d A Y T H E W E C E S S A R Y C O N S T A N T S F O R C O L L O C A T I O N I.

S R = S SREFR = S U R O = U 0 ICtRSR = I P B S A R = P I M A X l R = I M A X 1

N I R = N 1 C I N I T I A L I Z I N G V A K I A F i L E ? F O S S T A R 1 O F C O L L O C A T I O N 11.

I S = I N A X + 3 I 1 = 2 2 J R = 22 I C = n l I R + 2 N = 1 C I S 0 = I C I h D E X ( 2 l i = I C W R I T F t b v 3 4 5 )

345 F O F M A T ( ' 0 S T A S T O F C O L L O C A T I O N II:'/) GO TO 1 O O O

C C I N I T E A L I Z I Y G V A R I A B L E S FOP. P R F n I C T I O % . H A X C 1 I S T H E S U S S C R I P T 3 F THE C F I S S T E L E % F N T I & THE- C O L U M N FORKING THE Q I G H T - H A N D S I D E ,

3110 L P E F D = L T L N E Q = L F L E = L F L C 2 = L C R E F M A X C l = M A X C + l I k D E X ( 4 1 ) = 0 JR = 41 W R I T E ( 6 9 3 4 4 )

344 F O R M A T ( ' 1 P R E D I C T I D I \ I S : t / ) GCI TO 2 0 0 0

C 3021 N I = M A X C l

C O L L P P E D ( S ? S P E F v U O ? A ? I S v I S 0 9 1 1 9 J 1 3 B S v h l v I M A X I v L T * L F T L F Y N O ) I F ( L Y F R N O ) G O TO 3b22

C C ( M A X C 2 ) = D 1

Page 91: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

C i F ( L C O X P ) C A L L C O P i P C f i U i

e C A L L O U T ( K O ~ I D L A T ~ P L A T ~ S L A T P I P L O N ~ M L O Y ~ S L O N T L P N E C ~ I I F ( L M A P I I M A P ( N O 1 = O B S ( I U l * 1 0 0 I F ( L G R 1 D ,AND- N A I o L F * N L A I GO TO 2001

C KF ( ,NOT,LMAPI GO T O 3045

C K = N L A + 1 W R I T E ( 6 r 3 6 0 ) I D L A C y S L A C o I @ L O C p S L C C , G L A ~ G L C !

360 F O R M A T ( " M P PF P R E D I C T I O N S : @ / ' C O O R D I N A T E S OF SOUTH- WEST CORNER " / * c L A T I T U D E L O V G I T U D E AND S I D E L E N G T H L A T . LONG, s f g 0, U Y D M M M V / ~ ( I ~ T F ~ . ~ ) T ~ F ~ ~ ? T / ! )

DO 3044 J = l e K W R l T E ( b p 3 5 0 )

350 F D R M A T ( W @ P) NAP = NO-NLO W R I T E ( 6 r 3 5 2 ) ( I M A P ( I I e I = N A P 9 NO)

352 F O R M A T ( ' ' 9 2 0 1 5 ) 3044 NO = QAP-1

e 3045 I F t ,NOT .LSTDP) G O TO 2023

C

Page 92: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

R E A D ( 5 9 2 3 0 ) L S T O ? I F ( ,NOT .LSTGP) GO TO 2000

C I F ( L C O M ) C A L L OUTCOM

C 9999 S T O P

f h'D

S U E R D U T I N F YES( f ' 1Y t I I F C ? I I F R r L P S I F W ) C THE S U B 9 9 U T I V F W I L L ? U S I N G T H E C H 3 L F S K Y S P E T F O D : C ( 1 ) C n K P U T F THE REDUCED M A T D I X L C O Y Q E S P O h D l hG T f l A S Y M M F T S I C POS I T I V F C D E F I Y I T E ( N N - l ) * ( N N - l ) M A T R I X A t WHFN T H E J I F C C O L U P N S AND I I F R C P,C,WS O F L A R E YFU'OWNT ( L * L T = A T L T THE T R A N 5 P n S F D f3F L ) C ( 2 ) COMPUTE THE P E D L ~ C E D NY-1 V E C T O R ( L * * - ~ ) * Y . C ( 3 ) CCJMPUTF THE D I F F F R E N C E PW = YfiJ-YT*( A * * - l ) * Y m C ( 4 ) SGLVE THE E C V A T I O Y S L T * X = (L** - l ) ' ;YT ( T H F S O C A L L E D B A C K - S ' 3 L U T I O N ) C C THE REDUCEG S f W S A V 0 C O L U P N S C!F L ( T H E R E V A Y BE h C N E ) t T H F C O R F F S - C P C W D I N G U Y q E D U C F D U D P E Q T P I k N C t l L A R D A R T OF A t T H E N N - V E C T 3 9 FORMED C CY Y AVD Y Y Fn9MS AN U P P F R T F I A k G U L A k ? J Y * N V - M A T k I X , C THE M A T R I X I S 5 T O K E D C O L U K Y V I Z E I N N T * P A X S L F E C D Q P S O F A D I R E C T A C C E S Z C F l L E ( U N I T KUF:EER P ) . THE Y T RECQRDS ( Y T * 1 2 F 0 0 B Y T E ? ) C O N T A I ' J S A S MA'VY C CCLUPMS A S P O s s I F L f l N T H E F I R S T E * ( N T - l ) * l h 0 0 + 8 * 1 5 0 0 R Y T F S C n Q S F ; S P q N - C D l N G TO T E F D I M E N S I O N O F T H F ARRAYS C A Y P C?. T P E L A S T P O 0 R Y T F S C OF T H E N T RECC:PDS H O L D S TWO C P T A L O G E S ( I N T E G E R A R R A Y S ) N C A T A N D I S Z E C ( N R C A T ? I R S Z F R E S P E C T I V E L Y ) . kiE WILL CAii THE U T R E C 0 q D 5 A BLOCY, C WHEN T H E C G N T E q T OF A ?,LOCK H A S 5FFN T R A h S F E R S F D € * G * T O C, Y C ~ T T C I S Z E q WE H A V E T H F FCILLOI4Ih:G S I T U A T I Q h ' , THE C O L U M V S ARE S T O D F P I h C C FROM T H E F I R S T E L E M E Q T D l F F F R F Y T FRnE l Z E R C T C T H E D I A G f I Y A L ELf '+f 'NT- C N C A T ( 1 ) I S T P r S U E S C R I P T CF TUE D I A G O N A L FLEMEWT CIF C O L U M N 1 - 1 C V @ C I S Z E ( I ) I S T H F YUMBER OF I G U 3 P E C ( S A V F D ZEQOES I V COLUMN I , Y C A T ( 1 0 0 ) C I S T H E h U K 6 E k OF CDLUMNS STCISED I N T H E PECO?D. C N 6 L ( I ) 1s F Q U A L TO THE NUMSER OF T H F L A S T C O L U M N S T O R E 0 I N D E C 0 9 D 1-1. C ( 1 ) T O ( 3 ) ABOWE N I L L A L W A Y S PE E X F C U T E D ? B U T ( 4 ) WILL Q N L Y 9F E X € - C CUTE@ h'+% TUE L O G I C A L L B S 1s T R U E * TUE E X E C U T I D Y O F ( 1 1 , ( 2 ) F U D ( 4 ) C I S E Q U I V A L E Y T T O T H F S C L U T I O U OF THE E a U A T I U N S A*X=Y. T H E S n L U T I 7 Y S C WILL 3 E S T 3 X E D I N T H E ARRAY C I N T P E P O S I T I O N S O R I G I Y A L L Y O C C U P I E D B Y C Y AND WILL 6 E T R A N S F E R R E D T O F A I N T H 9 0 U G H T H E COMMON B L D C K . C I N C A S E A Y;UF'ERICAL S I h ' G U L A F i l T Y CCCURS I N COLUKF' &UMBER J P * T H E C O L U M N C IS D E L E T E D 8 Y C H A N G l N G T H F C A T A L O G U E I S Z E AVCl TFJE E L E P E V T S I Y RE\-+' J D C AND T H E J D ' T H t - L F M E Y T OF TUE S O L U T I O N VECTOR I S P U T E Q U A L T O Z E 4 O .

I M P L I C I T I N T E C E R ( I ? J r K ? M ? W ) R E A L * S ( A - H ? ~ - Z ) T L C G I C A L ( L ) COMM9N / N E S n L / C ( 4 7 0 0 ) ? N C A T ( 1 0 0 ) ? I S Z E ( ~ C ) O ) ? N E L ( ~ ~ O ) ? M A X B L T I D COKMOQ / C " W / C R l ( 1 h O O ) D I M E N S I O N C R ( 4 7 0 0 ) ? h 1 R C A T ( 1 0 0 ) q I R S Z F ( 1 0 0 ) F Q U I V A L t N C E ( C R ( 1 1 ? C R l ( 1) N T = 3

C N O T E v T H A T I Y C A S E Y T I S C H A N G E D T WILL I T A L S O B E Y E C E S S A P Y T n CHANGE

Page 93: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

C THE DIFSEVSIOPJ OF THE ARQAYS C At'lD CK, C

N = M".! IFR=l I L F R + B I F C = I I F C c l I F ( I F P e G T o I F C ) W R I T E ( 6 9 1 0 )

10 FORKAT( ' E R P O P IY CALL* I F R e G T . I F C 1 e C RfGUCTIT3d O F COLUMNS I F C TT) M, E L E M E N T S y WHICH A R F ALREAnY REnUCEP9 C ARE S T O k E D I N C R [EXCEPT FOR JBL=KBL)e ELEMENTS9 WHICH A q E GOING TO BF C REDUCED* A R E STERED I N C* C C FIND FIRST ACTUAL RECORD AND RDH/COLUMN.

J P r==o 200 JBF=$t iF+1

I F ( N B L ( J E F + l ) .LT.TFC) G O TO 2 C O 1 1 = t\ lDhlJEF9 J F = I F C- I L J T F = JBF*NT-NT+1 J T L = JTF 1D = J T F F I & D ( E * I D )

C KBF = 0

201 K 6 F = K E F +l I F ( N B L [ K E F + l l .LT, IFR) GO TO 201 KLO = NBL(KBF) KF = IFR-KLG KFO = KF KTF = ( K B F - l ) * N T + l

C RFAD R E C O R D JPL FROM F I L E . THE ARRAY C WILL CONTAIN AT LEAST ONE UNRE- C DUCED COLUMN.

DO 280 JBL=JBF,PAXbL R E A D ( 8 ' ID)CVNCAT, ISZE F I N D ( Fi8KTF1 NC=NCAT( 1 0 @ ) JO=NBL($BL I K 1 = KLO I D = KTF

DO 270 KBL = KBF, J B L LREC=KbL-EQoJBL READ( 6 ' I D )CF.TURCATT IRSZE NR=NYCAT( 1 0 0 ) KO=KL K L =KL + NR MR=MAXO(KO~ I I F R )

C C I N ORDER T O M I N I M I Z E T"E NUMBER O F TRAYSPORTS TO AND F R O M F I L F P T WF

Page 94: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

C DO N O T [ G F S ' E R A L L Y ) C O M P U T F P L L TFJF R E D U C F r J E L E M E N T S OF l l N E C O L ' J M Y T B U T C nwy THF F L F V T Y T S I V P O N K O + ~ TO KL. ( K C IS THE NUMBER OF T ~ E L A S T C C O L U M Y I Y T H E P R E V I O U S R E C O R D * K L T H E N U M B E R O F T H F L A S T I Y THF A C T U A L C R E C O R D . 1 C

U 0 760 J = J F t N C I S Z = I S Z E ( J )

C WE C H E C H T H A T T H F R E ARE t L E M E N T S ( U N R F D U C E D ) D I F F E R E N T F R O M Z E Q n I Y C C O L U M N J H I T P Y U S S C P I P T G R E A T M E Y T H A N OR F Q U A L T O K L m

1 F ( # L . L E . I S Z ) GO T O 260 C T H E S U B S C R I P T CIF T P E F L E M E N T I N C O L U P N J t P n W K I S N C A T ( J ) + K - I S Z F ( J ) c

C T P E D I F F E R E N C E N C A T ( J ) - I S Z E ( J ) I S S T O q E G I Q T H E V A R I A B L E I C O . C 3HF S A M E D I F F E R E N C F F O R C O L U M Y ( R O W ) K I S S T O R E D I N I R O . TUE E L F M F Y T C J U S T B F F O R F T H E F I R S T E L E M E Y T T D E€ R F D U C F D W I L L F E Y C E Y A V F 7 U 3 S C S I P T C I = I C O + M A X ( K O , I I F R T I S Z ) . K G I S T P E A B S O L U T t ROW N U M B E R -

I C O = M A T ( J ) - 1 x 2 J D = J O + J N R O = M I N O ( J D T K L I - K O I F ( % R . G E . I S Z ) K F S = <F I F ( M P * L T . I S Z ) K F S = I S Z - K O + 1

DO 250 K = K F S T NRO KD = K G + K K 1 = K D - l I = I C O + Y D

C 1 I S T H E S U B S C R I P T O F T H E C O E F F I C I E N T T O BE P E D U C E D . CSUM = O.OLO l R S Z = I E S Z € ( K ) I R O = N R C A T ( K 1 - I R S Z Q C I = C I I) K F ~ = M A X O ( I I F S ~ I S Z T I R S Z ) + ~

C I K S Z = K D I % D I C A T E S T H A T C O L U M N K D C O N T A I Y S A N U M F R I C A L S I N G U L A R I T Y . C THE E L E M E N T S O F RCW K G I S P U T E G U A L TO ZERO.

I F ( I R S Z - F Q . K D ) Q C 1 = Q S U Y C

I F ( K F l . G T m K 1 ) G O TO 2 4 5 I F ( L R E C ) GO T O 235

C R E D U C T I O N O F ORE C O E F F I C I E N T . D 0 230 M = K F l r K 1

230 Q S U V = Q S U W + C ( I C O + M ) * C R I I R O + M ) G O T O 2 4 5

235 DO 240 M = K F l T K 1 240 Q S U M = Q S U K + C ( I R O + H ) * C ( I C O + M ) 245 Q C 1 = QC I - O S U M

C I F t L R E C ) GO T O 246 C ( 1 ) = Q C l / C R ( I R O + K D ) GO TO 2 5 0

246 I F ( J D . N E . K D ) C ( I ) = Q C I / C ( I R O + K D ) 2 5 0 C O N T I N U E

Page 95: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

C I F ( .QT!T.LRFC.ORa(JD.l\lF.KD,.oREJn,EQ.Nl Lt7 T o 360

G C TEST OF tdUMERLCAL S T A G I L l T Y

Q C 1 2 = Q C I / C ( I ) * * ? I F ( Q C 1 2 ,GY, 0 , l D - 1 6 ) GO T O 2 5 1 W P I T E ( 6 p 2 0 l J D p G C 1 2

20 F O R M A T ( "UMMERlCAL S I N G U L A R I T Y I N ROW N0.'9H5? @ 9 T E S T Q U A N T I T Y ='P

* D k 7 a l O ) l S Z E ( J ) = J D

C TVE COLUMN I S D F L F T E D a GO TO 260

C 251 C ( I ) = l 7 S Q P , T ( ( P 260 K F = b 270 C O h T I N U E

C C R E D U C F D A R R A Y C B A C K T O F I L E , F I R S T C P L U M Y I N Y E X T RECORD I S NPW T P E C F I R S T STOKFD, E U T F I R S T R E D U C E D COLUPSN I S A G A I N CCDLU!43 K F O I N Q E C e J 6 F

I D = J T L W R I T E ( P 8 1 D ) C 9 N C A T p I S Z E J T L = J T L + N T J F = 1 K F = K F n

C I F ( J S L . N E c M A X R L ) GO T O 280 PW = Q C 1 l F B I N O T e L G S ) GC TO 280

C C B A C K - S D L U T I C N . N C T E T P A T TUF Y A P I A S L F l[ A T T u I S M P P E N T I S THE SUB- G S C R I P T OF T H E D i A G O Y A L E L E M E V T CIF T H F C G L U M N C O N T A I N I K G THE R I G H T- H A Y 0 C S I D E , 1 WILL S U C C E S S I V E L Y TAKE T H E V A L U E OF T H E S U B S C R I P T qE T H E E L F- C MENT If% RCJW M OF Wl[S COLUMN, AND THE S n L U T I O Y W I L L BE STOYED I N C ( I ) a

M = N K T L = ( M A X E L - L ) * N T + l I D = K T L

C DO 277 # B = l p M b X B L R E A D ( R 1 I D ) C R t N i ? C A T 9 T R S Z E K T L = K T L - K T ID = K T L I F (KTL.GT,O) F I N D ( E 0 I D ) N R = N R C A T ( 100)

C T H E COLUMN COPJTAIYIY!G T H E R I G H T - H A Y D S I D E I S S K I P P E D , I F ( K S e E Q a 1 l N R = F J R - 1 K 1 = N R + 1 I F ( N 2 , F Q . O ) GO TO 2 7 7 D O 2 7 6 K = l , N R

C WE STEP B A C K W A R D ( M ) FRCM CC'LUMbi N - 1 9 T A K I h l G P E NR C O L U M N S C R n M E A C H C RFCORO SUCCF S S I V E L Y .

Page 96: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

I = I - P I C = I M=M-P I R = N R C A T ( K l ) K l = K l - 1 I R S Z = I k S Z F ( K l I M R = M - I R S Z I F (MR.GT.0) GO T O 373

C I N C A S E A C O L U K N H A S B E E N D E L E T E D 7 THE UNKNCIWY I S P U T E Q U A L T O Z E R O * C ( I ) = OaCIDO G n TO 276

C TWE ( U N ) K N @ W N C ( I ) I S C O M P U T E D ( O N E E Q U A T I C I N W I T H ONE UNKNOWY). 273 C 1 = C ( I ) / C R ( I S )

C ( I 1 = C 1 C

I F ( M P * F O . l ) GO TO 276 D@ 274 VP=?T t tR

C 1 R I S T l i E S U G 5 C R I P T O F THE E L E M E N T S O F C O L U M N M, R U V Y I V G FnPM T H E C D I A G n Y A L - 1 U P T O TVE S U E Z C R I P l OF T U E F I R S T E L E M E N T D I F F E R E N T F P O M C ZERO. 1C I S T H E S U B S C R I P T O F T H E E L E M E Y T S O Y T H F P I G H T - H A U D S I D F I N C THE SAME POW AS C K ( I R ) .

I R = I R - l I C = I C - 1

C T P E CONTR I B U T I G N FP.OM T H E ( U R ) K N O W N C ( I 1 I S S U B T R A C T E D FROM T C F QUAN- C T I T I E S ON T H E Q I G H T - H A N D S I D E .

274 C ( I C ) = C ( I C 1 - C I * C K ( I R ) C

276 C O N T I N U E 277 C O N T I N U F

C T h E S O L U T I O Y S ARE YOW A L L S T O R E D I N C FROM C ( Y C A T ( Y ) + l ) T O C ( L t C A T ( M + l ) C - 1 ) - THEY ARE T R A N S F E R R E D T O ' M A I N ' THROUGH TWE COMMOY B L O C K N E S O L .

280 C O N T I Y U E R E T U Q N E N D

S U E S O U T I N F ITSAN(DX,DY,DZ,EPSl,EPS2~EPS3,0L,AX2,F22,RLATO, * R L O ~ G O ~ D K S I O ~ D E T A O ~ @ Z F T P O ~ L C H A N G )

C T R A N S F O R M A T I G N OF G E O D E T I C C Q U R O I N A T E S AND C O R R E S P O N D I N G D E F L E C T I O N S C OF THE V E R T I C A L AND H E I G H T ANOMALY7 WHEN T H F C O O R D I N A T E S Y S T E M I S C T R A N S L A T E 9 P Y (DX,DYIDZ 17 R O T A T E D ( E P S l , E F S 2 , E P S 3 ) ASOUYD T H E XwY 7 2 C A X E S R E S P E C T I V E L Y A N D M U L T I P L I E D L Y l + D L . C WHFN L C H A Y G 1 S TRUE, T H E k E I S F U T H E R M O E E A C H A Y G F I Y T H E A S T R n V 3 M I C A L C C O O R D I N A T E S AND I N T H F H E I G H T SYSTEM, G I V E N A S A CWAYGF O F T H F D€- C F L F C T I O Y S OF THF V E R T I C A L A N D THE H E I G H T A N P M A L Y I N A P O I N T H A V I N G C C O O R D I N A T F S R L A T O AND R L O N b O *

I M P L I C I T I N T E G E R ( I ) 1 R E A L *P(A-'-',P-Z) L f I G I C A L ( L 1 COMM3Y / O E S E R / f l R S ( 2 0 ) COMMON / E U C L / X y Y 7 Z ,XY 9 X Y 2 ,@I S T 3 t D I S T 2

Page 97: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,
Page 98: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

c C CF. P F F ( C ) P A G E ? O n 9 F O R P U L A ( 5 - 5 9 )

C O S D L O = L C O S ( ! ? L O N G p - R L O Y O O S I N O L C = G S I N ( R L 0 Y G P - R L D N G O ) GO TO ( 6 1 * 7 5 r h 2 , 6 3 r 6 2 ) p I K P

61 D Z E T A = ( - ( CC!SLAO*S IULk P-S TNLAr ) *COZ L A P * C C l S n L n ) W K S I 0 - C f l S L A P * S I K D L n * * @ E T A O ) * A Y ? / Y A D S F C + ( S I F \ I L A O * S I F Y L A P + C O S L A O * C O S L A P * C O S D L O ) * D Z E T ~ O

GO T f l 69 62 DKSI = ( C R S L A P * C D S L h O + S I N L A P * S I N L C O * C ~ I S G L O ) * n K S I O - 5 I N L A P * S I h ! D L C l *

* D E T A n - ( S I U L A n * C O S L A P - C n S L A O * S I Y L A P * C @ S S L L ) * R b D S E C * D Z F T A O / A X Z I F (IKP.NF.5) G O T O 6 9

63 D E T A = S I & L A O * S I K D L O * ~ E T A O + C O S D L O * D E T A O + C O S L A O * S I Q D L C l * R A D S F C * * D Z E T A O / A X ?

C 69 GO 10 ( 7 1 ~ 7 5 , 7 2 , 7 3 ~ 7 2 ) t I K P 71 O R S ( I T 1 = D Z E T A + D H

GO TO 7 5 7 2 O B S ( I T 1 = D K S I - D L A

I F ( I K P . N E . 5 ) G O TT, 7 5 73 O E S ( I T 1 ) = D F T A - D L O K P S L P P 7 5 R E T V 9 Y

END

S U B R O U T l N F G R A V C ( A X T F T G M ~ IT L F O T S D T U K E F ~ G A k l M A ) C THE S U k R O U T I N E C O M P U T E S F I R S T B Y TuE C A L L O F G 2 A V C T u E C P N S T A N T S T O E E C U S E D IY Tt1E F 3 E P U L A F 0 9 T P E Y D R M A L G R k V I T Y y THE F O Y M U L A F 0 4 T H E V C Q M A L C P O T E N T I A L An4D T H F CHA!.IGE I N L A T I T U D E W I T H Y F I G H T . C D Y S T A Q T S R F L A T E n T 9 C TWO D I F F E R E N T R E F E R E N C E F I E L D S M A Y B E U S E D . T H E Y A R E S T 0 7 E D T V T H E C ARRAY FG I N T H E V A R l A B L E S S U B S C R I P T F D F R C Y 1 TO 15 FnQ T Y F F I Q S T C F I E L D AND FRCM 16 T O 30 FOP THE SFCClNP ONF. T H E APP.AY F J C O W T A I X S T F E C Z O Y A L H A S M O N I C S I W 1 7 H S I G N O P P C l S I T E T r T V E U S U A L C O N V E Y T I C N S T C F C R F F ( C ) r EQ. ( 2 - 9 2 1 .

I M P L I C I T I N T E G F 9 ( I) 7 R E A L * e ( A - H t M - Z ) 9 L O G I C A L ( L 1 COMPON / D C O N / D O I D 1 y D 2 ,D3 COMMON / E U C L / X T Y T Z ~ X Y T X Y ~ , D T S T O , D I S T ~ D l M E N S I O N F G ( 3 O ) v F J ( 3 O ) t L P ( 2 ) D 4 = 4.ODfi D 5 = 5.000 OMEGA? = ( 0 . 7 2 9 2 1 1 5 1 5 0 - 4 ) * * 2 L P ( l + I / l 5 1 = .NOT.LPOTSD E 2 = F * ( D ? - F ) A X 2 = AX*AX F G ( I + 1 4 ) = A X F G ( I + 1 5 ) = GM

C I F ( L P f l T S D ) GO TO 1 5 0 1 D O 1 5 5 0 J = 1 7 1 5

1 5 5 0 F J ( J + I ) = D O

Page 99: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,
Page 100: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

C F G ( I + 8 ) C f J N T A I N S THE T H l S C l O E R I V A T I V E O F THE NORMAL G R A V I T Y . F G ( I + E ) = D 4 * F G ( I + 6 ) / ( A X * C l ? ) RETURN

C EYTRV RGRAV ( 5 I N L A P q H q I IGREF ) I F (H.GT.75.003 .AY[) . L P ( 1 + I / l S ) GO 70 1 5 0 4

C C O M P U T A T I C N f3F THE R E F E P E N C E G F b V I T Y I N U N I T S O F M G A L * C F . R E F . ( C I C PAGE 77 AND 79. H PUST PE 1N U k l T S O F MFTFKS.

S I N 2 = S I N L P P * S I N L A P GSEF = F G ( I+1 l * ( D l + F G ( 1 + 2 ) * S I U 2 + F G ( I + ~ ) J ~ S I ~ \ : ~ * Z I N Z I * +(FG( I + S ) + F G ( 1 + 5 ) * S l N 2 + ( F G ( I + 6 1 - F G ( T + Y ) * H ) * H ) * H R E T U R N

C E N T R Y C L b T ( C L A 7 I ~ H I R L A T P ) L K S I = eTFUE. I F ( H . G T . ~ ~ I D ~ .AYD. L F I ~ + I / ~ ~ ) ) GO TO 1504

C CCIMPUTATIOM OF THE CHbr\lGE I N THE n 1 R E C T l O N OF T H E G R A P I F N T W I T H H E l G H T C C F * 4 E F ( C ) EGO ( 5 - 3 4 ) .

C L A =-FG( l + l ? I * H * ( Z + X Y ) / D I S T 2 L K S I = .FPLSE. R F T U R N

C ENTRY U S E F E : 9 ( U R F F 7 I q H )

C C O M P U T A T I O k n F THE V A L U E OF THE NOSPAL P O T E N T I A L * CF. ' ? E F ( C ) t EOe C ( 6 - 1 4 ) AYD l h - 1 5 ) 0

L Z E T A = .TRUE. I F ( D h 5 S ( H ) . G T o 1 . 0 0 - 3 ) GCI TO 1503 U R E F = F C ( I + 7 ) R F T U Q N

C 1 5 0 4 L Z E T A = .FALCE.

C 1 5 0 3 T = Z / D I S T Q

U = X Y / D I S T D A X = F G ( I + 1 4 ) GM = F G ( 1 + 1 5 ) A 1 = DO A 0 = DO B 1 = C10 B 0 = DO D A l = 00 DAO = D 0 S = A X / D I S T O T S = T*S S2 = S*S K = 11 C 1 = 1 2 e O G O C O = 1 l . O n 0

C C SUMMATION OF L E G E N D R E- S E R I E S R E F R E S E I V T I W T H E NORMAL P O T E N T I A L . B 0

Page 101: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

C WILL H O L D TEE D E i 7 1 V A T I V F W I T H R E S P E C T T O T H E B I S T A N C F F R O M T H E ORIGIN C AND D A O B L 9 E C T ? I V A T I V F WITH R F S P F C T T O T H F L A T I T U D E A F T E R T H E F I N A L c E F C U ~ S I n " J qTFr. .

DO 1553 J = P p 11 FJK = F J ( K 9 1 )

c3 = I - ~ ? - D I / C O c 4 = C O * S ? / C 1 A2 = A 1 A % = kO A 0 = C 3 * T S * A l - C 4 * A 2 + F J K I F C L Z E T A ) GO T O 1 5 5 5

C DA2 = DL'1 D A l =: D A O D A n = C 3 * I S * A S + T S * @ A I 1 - C 4 W A 2 R 2 = B 1 B P = 5 0 B 0 = C ? * T S * B 1 - C 4 * B Z + F J K * C O

1 5 5 5 C 1 = CO CO = C O - D 1

1553 K = K - l C

I F I L Z E T A ) GO T O P554 C GP I S THE riFR I V A T l V E O F T H F N ( j Q M A L G S A V I T Y W I T H 9 F 5 P E C T 13 P I S T 9 C ( T H E D X S T A h C F F R O P T H E O R I G I N ) A Y D G L I S THE D E R I V A T L V E W T T H O E f P F C T C TO T H E L A T I T G C E q CF. R E F ( C ) E Q - ( h - 2 0 ' ) A \ ' ( 6 - 2 2 1 .

GL = [ G M * P P O / D I S T Z - f M E G A Z * D l S T F * T ) * U GP = - G M * S P / D I S T 2 + 0 M E G A Z * D I S T O * U * U GZ = T*GR+lJ*GL G R E F = DS€'QT( GR * G R + G L * G L ) I F [ L K S I ) C L A =-~DARSIN~-GZ/GREF~-RLATP)*206?64080600 L K S I = . F A L S E * G R E F = G R E F * I , O D 5 R E T U Q V

I554 UREF = G M * A O / @ I S T O + O M € S A Z * X Y 2 / D 2 R E T U S N END

S U B R O U T I N F I G P B T ( G M p A X q C O F F T b q r Y M A X ) @ T H E S U B R O U T I N F C Q W U T F S T H E V A L U E O F T H F G Q A Y I T A T I f l Y A L P O T F N T I A L A N D C THE T H R E E F E K S T GRDER D F R I V A T I V F S 1N A P O I N T P H A V I N G G E n O E T I C C I R G - C D i N A T E S R L A T P , R L O N G P A h l j E U C L I D I A Y C O O S D I Y A T E S X q Y t Z . T H E P l l T E U T l A L I 5 C R E P R E S E N T E D BY A S E R I E S I N Q U A S I - ' L ' O R M A L I Z E O C P U E R I C A L ' J A R P n N I C S q U A V I N G C C O E F F I C I E U T S O F H I G H E S T D E G k E F N P A X , A L L S T O R F D I N T H E A R R 4 Y C q F F . C T H E A L G O Q I T H M USFD I S G E S C R I B E D I N S F F ( D ) .

I M P L I C I T I b < T F G F R ( 1 , J y k r M y N ) L O G I C A L [ L ) r R E A L *8(A-HvO-29 CClMMON / E U C L / X , Y t Z p X Y t X Y Z y D I S T O T G l S T 2 COMMON/OBSE R B n S S ( 20 1

Page 102: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

D I M E N ' l P N F ( 5 5 ) r G ( 5 5 ) r A ( 2 5 ) ~ 6 ( 2 5 ) r C @ F F ( M ) C C T P E ARRAYS P AND '8 AKF U S E D T O K n L D THE V A L V E S OF T H E S O L I P S P H F 9 I C A L C H A R M O N I C S OF C j I F F E Q E N T DEGREES, T H E S U B C C R I P T f l F A nR B I S E O U 4 L T O C THE ORDFR-1 . C THE ARRAY C C F F C O h T A l N S T H F F U L L Y R O R M A L I Z E D C O E F F I C I E N T S OF TYC P P T - C E N T I A L L E V F L R P E D I N A S E R I E S OF N O R M A L I Z E D C O L I D 5 P H F R I C h L H A R ~ l O i d l C ~ C U P T O AND I V C L I J S I V C D E G R E r YMAX AND FOUF UUMMY C P F F F I C I F V T S F Q U A L T O C Z E R O . T I E C D E F F I C I F N T S WILL B E Q U A Z I - Y 7 Q M A L l Z E D B Y T H E T U B Q r j U T I V E , C F AND G CO: iTA 1% SSk'LikEE-ROOT T A H L t S U S E D IN THE a E C U R S I 0 Y P Q 3 -

C CEGURE. G P I S T P F PRCOUCT O F T P F G R A V I T A T I O N A L C O N S T A N T AND T H F M P S S C PF T H E E A R T H ( M E T F R S * * ~ / S ~ C , ' J * ~ ) T A X THE SFM I -MAJCIP A X l S ( M E T E R S r

C OMEGA2 THE SOUARF f l F TUE S P E E D @ F R O T A T I O N . C I N I T I A L 1 2 L Y C C O Y S T A Y T S ,

C jMEGA2=(O - 7 2 9 2 1 1 5 1 5 r ) - 4 ) * * 2 R A D S E C = ? C 1 6 7 6 4 ,bO6DO DO=O,l)fiO D l = l . 000 D 2 = 2001jO N M A X l = Y M A X + I N 3 = h M A X + 3 N 4 = 2*NtJAX+3

C C THE Z E R O URGE9 C O t F F I C I E N T I S P U T E Q U A L T O Z E R O AND TWE C P N T R I Q U T I P N C FROM T H I S TERM I S F I R S T U S F D ? WHEY T H E C D V T R I B U T T C I Y F R D M A L L O T P E q C D E G 9 E F S H A S b F E N A C C U M U L A T E b .

C C F F ! 1 ) = no C C S E T T I N G U P A SCUAKE-ROOT T A 6 L E .

F ( 1 ) = D o G ( 1 ) = PO D 0 1031 N = L T N4 DN = D F L O A T ( h f ) F ( N + l ) = D S O R T ( D Y * ( D N - 0 1 ) )

1031 G ( N + l ) = D S Q R T ( D N ) C C THE C O E F F I C I E N T S A 9 F GOOIh 'G T O BE Q U A S I- N O R M A L I Z E D .

I J = 1 D O 1033 I = IT NPAX D N = G ( 2 * ( 1 + 1 ) ) * 1 . 0 G - h NZ = 2 * I + 1 D 0 1 0 3 2 J = 1 9 V?

1 0 3 2 C O F F ( I J + J ) = C O F F ( I J + J ) * D N 1033 I J = 1 J + N 2

SQ2=G ( 3 R E T U R R

C E Y T R Y G P f l T ( R L A T D ~ C f l S L A P r R L O N G P T I K P T I P r G R F F r U R F F r C L A )

C THF S U B R O U T I V E I S H E R E U S F D T O COMPUTF HE I G H T - A Y O M A L I E S G P A V I T Y - A U D - C M A L I E S A Y D D E F L E C T I O Y S ( K S I y E T A OR ( K S I 9 F T A ) ) r C O R R E S P O Y G I N G T 9 T H F

Page 103: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

C V A L U F OF I K P = L e a a p 5 m ?HE RESULT IS S T O R F D I N O B S l I P I AYD 0 8 S ( I P + 1 0 1 C FOR I K P = 5 ,

X P % = I P % F (IKP,f0.54 I P B = I P + P O U=X/D I S T O V=Y /D I STD W=Z/D I[ S T O A D I Q S = A X / D I S l C I POT- DO D X = D O DY=G0 BZ=PO

C A l l ) ES NOW TPE V A L U E OF THE S O L I D SPHeHAqMONIC OF DFGqFF 0.s A(l l ) = @ l B ( l 1 = C O F A C T - P I A D I V ? I = D I

c DO 7 0 0 2 I = 2 9 N3 A ( l ) = C 0

7061 B ( I ) = P O e

DO XI 10 I=l V N M A X I 6 1 = D 1 A l = D O B 1 = Cic? B2 - no Db, l = D 0 D P 1 = D O 062=DO DX O=D 0 DY O=D n DZO=DO POTO=DO C = no I S = ~ I - 1 1 * ( 1 - 1 1 + 1

C 6 2 - 01 CO = S02 A 2 = A a 1 ) D A Z = C C F F ( I S 1 B P L U S J = I P P L U S I = I + l I M I N J 1 = I + L ' S S = I S + l b . R F b C = A D I V R I / F A C f

C DO 7 0 0 5 J = I p l P L U S 1 I P L U S J - I P L U S J + 1

Page 104: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

I M I Y J l ~ I M I N J l - 1 J P L U S l = J + l A L F A = F ( I P L U S J ) * C l A L F A ? = A L F A * C 2 B E T A = F ( l k I hJ1 )*CO GAMMA=(;( I P I N J l ) *G( I P L U S J )

D A O = D A l D A l = D A 3 D C 2 = C O F F ( 1 S ) D B O = D b l D E l = D B 2 D 8 2 = C O F F ( I S + l ) A L B O = A L F A W E O BEB?=E E T A * D P 2 A L A O = A L F A 2 * 0 A O B E A 2 = 3 E T A * D A 2 n X O = D X O + ( A L A O - E E A 2 ) * A J + ( A L t 3 0 - E ! E B Z ) * B J D Y O ~ Y O + ( ~ L A O + P F A ~ ) * Q J J ( A L B O + ~ E B ~ ) ~ A J DZO=DZO+GAKMA* ( D A l * A J + D E l * E ? J ) I S = l S + 2 C 1 = D l / C O C 2 = D 2- C CO = C t l

7 0 0 5 C = D 1 C

P O T = P O T + A F F A C * P t l T O F A C T = F A C T * I A R F A C = A D I V R I / F A C T

C C X T D Y T D Z I S T H F V A L U E OF T H E F I R S T D E 9 I V A T I V E S OF T H E P Q T E N T I A L W I T U

C R E S P E C T T O X y Y y Z . DX=DX-AP F A C * D X O DY=DY-AEFAC*DYO

Page 105: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

D P=DZ-AD FAC*D ZO C

7010 A D I V R I = A D I V R I * A D I V R C C C O N T R I E U T 19'4 F R O M R C I T A T I O N A L P O T E N T I A L .

R!JTX=OY E G A Z s X R O T Y = Q M F L A 2 * Y R O T F O l = O M E G A 2 /G3*XY 2 P O T = ( D 1 + P O T ) *GM/G I S T O s R S T P O T A O = G M / D I S T 2 D X = ( U - D X / D 2 ) * A n - R n T X D Y = ( V - D Y / D ? 1 * AO-SOTY DZ = ( W - D Z l * A O I F ( I K P . L F . 2 1 GP = D S G R T ( U X * D X + 0 Y * D Y + D Z * D Z )

C GP I S THE G P A V I T Y I N P. CO T!3 ( 7 V O 6 ? 7 n O 7 , ? O n 8 ,?O09e?n08), I K P

7006 O R S ( I P 1 = ( P O T - U S E F ) / G P Q E T U q N

7007 B B S ( I P 1 = G P * 1 . 0 0 5 - G K E F P E T C Q N

7008 O B S ( I P 1 = ( D A T A N Z ( D Z * D S Q R T ( D X * D X + D Y * D Y ) ) - R L A T P M A D S € C + C L b I F ( I K P e L T e 4 I R E T U R N

7009 O b S ( I D 1 = ( D A T A N 2 ( GY p G X ) - R L O N G P ) * R A D S E C * C O S L A P KFTURN END

S U B R 3 U T I N E E U C L I D ( C 3 S L A P T S I Y L A P T R L O ' \ f G * H * F 2 r k X ) C C O M P U T A T I f l N OF E U C L I D I A V C n n S O l N A T E S X,Y,Z 9 P I S T A N C F AND SQUAqE O F C D I S T A N C E FFQM Z- A X I S X Y T XY? AND D I S T A N C F A N D S C U P R E O F D I S T A Y C F FROM C THE O R I G I X D l S T D AND D I S T 2 FP.CM G R C P E T I C C O C K D I N A T F S R E F E R R l Y G TO A N C E L L I P S O I D P A V I N G S E M I - M A J P R A X I S E Q U A L 10 A X AND SECOND E X C F N T 2 I C I T Y C EZ.

I M P L I C I T I N T E G E R ( I I J I K ~ K I N ) T PEAL *8(A-H,O-Z 1 COMMON / F U C L / X ~ Y , Z ? X Y v X Y 2 , D l S T O , D I S T 2 DN = A X / D S Q R T ( 1 . f )DO-E?*S INLAP* *2 I Z = ((leODO-E2I*DN+H)*SINLAP X Y = ( D N + H I * C O S L A P X Y 2 = X Y * X Y D I S T 2 = X Y 2 + Z e Z D l S T O = D S Q R T ( D I S T 2 1 X = X Y * D C @ S ( R L O N G ) Y = X Y * D S I Y ( P L O N G ) R E T U R Y E N D

Page 106: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

S U P R O V T I N F R A D I I D f G T M I N T S E C T R A p I A N C ) C T C ' E S U E P D U T I N E C D M V t R . T S F O R I A N G = l T Z T 3 r 4 A N G L F S I N (1) D E G S F F S T M I - C N U T E S T S E C O Y D S T ( 2 ) G E G R E E S ? M I N U T E S T ( 3 ) D E C R E E S AND ( 4 ) 4 0 0 - D F G R F F S C T O R A D I A N S .

I M P L I C 1 T I N T F G E R ( I J,K,M,N) ,RE'AL * R I A - H T n - Z ) 1 = 1 I F ( I D F G , L T * 0 * A V E . l A N G . L T * 5 ) 1 = -1 GO TO ( l r 2 ~ 3 ~ 4 ) 1 I A N G

1 S F =I>* I D E G * 3 A 0 O + M I N * 6 O + S E C GO TO 5

2 S F = l * I D E G * 3 6 0 0 + S F C * 6 0 GO TO 5

3 S E = S E C * 3 6 0 0 GO TO C;

4 S € = SEC*324n 5 R A = 1 * S E / 2 0 6 2 6 4 . t ? 0 6 D O

RF TUF? N E N D

S U E R O U T I % E H E A D ( I K P 1 L O ? 4 F C f ? ~ P ~ O ( R P ) C O U T P U T OF H E A D I M L S Aid@ I N I T I A L I Z A T I O W O F T H E FOLLOWIP?IG V A K I A r 3 L E . 5 : I A T C I R ~ I P T I T ~ I l ~ I L 1 ~ I E ~ l ~ I ~ I . ~ l T l ~ I 2 1 ~ 1 3 1 ~ I C 1 ~ I C l l ( A L L S U S S C Y I P T C @F D I F - C F E R E N T C U T P U T C U A N T I T I E S ) , K Z - K 4 ( S U E S C R I P T D 3 U X D A R l C S FnR O U T P U T C Q U A N T I T I E S ) , K 1 = U P P E 9 L l M l T FOP W A N T 1 T T C . S R E A D I V T O 0 8 s .

I M P L I C I T L O G I C A L ( L ) C O M M D U / O U T C / K Z I K ~ ~ K ~ T l U ~ K 2 1 , I U 1 9 I A Y G T L P U % C H T L ~ U T C T L Y T Q A ~ ! T L V E ~ % R

* * L K 3 0 COMMON / C H E A C I / I A ~ I B T I H , I ~ ~ I T T I A l q l 6 1 , I O l T I T l T I C l T I C l l T K l , I C i E S l q

* I C b S 2 1 L P U T i L C l , LC? L C F i E F 1 L K M L T R A N = .NOT.LNTOAN L E R N O = .%OT.LNERNO K 1 = 0 I F ( I @ P S l . h ! E . O ) K 1 = 1 G O TO ( 2 0 0 8 ~ 2 0 0 9 ~ 2 0 1 0 ~ 2 0 1 1 ~ 2 0 1 2 ) ,1Kp

2 0 0 8 W R l T E ( 6 ~ 2 0 4 ) 204 F O R M A T ( ' 0 N O L AT l T U D E L O N G l T U D E H Z E T A ( M ) ' )

G O T O 2013 2009 W R I T E ( 6 9 7 0 5 1

205 F O R M A T ( '0 N O L A T I T U D E L O N G 1 T U D E H D E L T A G ( V G A L l 8 * 1

G O TO 2 0 1 3 2010 WR I T E ( 6 , 2 0 6 I

206 F O R M A T ( ' @ NO L A T I T U D E L n N G l T U D E F, K S I ( A R C S E C ) @ B GO TO 2 0 1 3

2011 W R I T E ( 6 r 2 0 7 ) 2 0 7 F O R M A 7 ( ' 0 k D L A T I T U D E L O N G I T U D E H E T A ( A R C S F C ) ' )

GO TO 2 0 1 3 2012 W R I T E ( 6 r 2 0 R )

2 0 8 F O R M A T ( ' @ NO L A T I T U D E L O % G I T U D E U K S I / E T A ( A R C S E

Page 107: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

* C l 0 ) I F ( I 3 E S 2 ,YF. 01 K 1 = 2

2 0 1 3 I F ( I H . U E . 0 ) K 1 = K 1 + 1 W R I T F ( h q 2 6 7 ) " W G v R P

267 F D K t ' A T ( ' + \ 5 9 X 9 ' S T e V A R * = ' q F 6 * 4 9 \ RR4TIO R / R E = v 9 F 1 0 . 7 9 ' 9 ' 1 C

GO Tc? ( 2 O % P 9 2 O l 5 9 Z O Z O , Z O Z l I p I k N G 2 n l A W R T T F ( 6 r 2 f i 9 )

209 F O R K A T ( Q D M S E M S M' 1 GO TO 2 0 2 2

7019 W R I T F ( 6 9 2 1 0 1 210 F O R M A T ( n M D M M~ 1

GO TO 2 0 2 2 2 0 2 0 k Q l T F ( 6 r 2 1 1 ) 711 F O R M A T ( ' D F G F E F S D F G P F E S M ' 1

GO TO 3 0 2 2 7071 W R I T F ( h * 7 1 2 )

212 F O k M A T ( g G R A G E S G kA@F S M ' 1 C

2022 I F ( L K M ) W R I T E ( h , 2 1 3 ) 213 F O R M A T ( Q + 93779 'I:' 1

C C WF NOW C O Y P U T E THE S U P S C R I P T CF T H E D I F F F Q F Y T 6 U h k T I T I E S q W H I C H W I L L C F E S T O h E D F O P L A T E R O U T P U T 1R T F F A E k A Y OF!. T H F D I F F F R E N C E B E T N F F N C TUE 0BCEF;VLTTl 'Pt G I V F V I N T V € P R I G l N A L At ID T V E NEI.1 R E F , S Y S T F P l IV C O B S ( 1 T l c T H E C O Y T R I L U T I P Y T O T H F R F F . P O T . F F D M T H E HASM!l'IIC F X P A V S I O N C I N O B S ( I P 1 9 T H E C U Y T R I B V T I E I Y FKOM C O L L . 1 I U DBS( I C 1 ) A Y @ F K 3 Y C O L L t l I C 1N GRS(IC2).

I C 1 = 11 I F ( L T R A V ) GO T O 2 1 0 5 I F ( L P O T 1 GO T O 2102 I F ( L C 1 1 GO T O 2201 r B = 4 G O TO 2 1 0 4

1 2 0 1 I C 1 = 5 I F ( L C 2 1 GO TC 2 1 0 1 1e=5 W R I T E ( h 9 2 5 O )

2 5 0 F n R M A T ( ' + \ b 4 X 9 ' P R E D ' I GO TT) 2 1 0 4

C 2101 I B = 7

1 C 2=6 W R I T E ( 6 , 2 9 1

251 F O R M A T ( ' + "63x9 ' C O L L I C O L L 2 P R E D 8 1 GO TO 2104

C 2102 I P = 5

1 F ( L C % l CC' T O 2202 l iB = 5

Page 108: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

W R I T F ( h q 2 4 5 ) 245 FORMAT( '+ 'T64XT ' POT ' 1

GO TD 2 1 0 4 C 2703 I C 1 = 6

I F ( L C 2 ) G @ TO 2 1 0 3 I E=? WRlTE(A ,252)

252 FORMAT( ' + ' ?64X1 ' POT COLL PREDt ) GO TO 3 1 0 4

C 2 1 0 3 I C 2 = 7

IB=R 3RITF ( 4 ~ 2 " )

253 F3RMAT( ' + ' ? 0 4 X ? ' POT C O L L l CULL2 P S F D ' ) 2104 K3 = I?-4

1 u = It: GO TO 2 1 1 0

C 2 1 0 5 I T = 5

I F ( L P 3 T ) C 3 70 2107 I F ( L C l ) CO To 2 2 0 5 I R = 3 WP 1TE ( 6 , 2 4 6

2 4 6 F C ? R M & T ( ' + ' T ~ L X T ' TRP ' 1 GO TO 2 1 0 3

C 2205 I L 1 = 6

IF ( L C 2 ) GO TO 2 1 0 6 1B=7 W R l T E ( 6 ~ 2 5 4 )

2 5 4 F ~ R ~ ~ T ( ' + ' T ~ ~ X T ' TRA PRED PRED-TRP' GQ TO 2109

C 2 1 0 6 I C 2 = 7

I R=€? W R I T E ( 6 t 2 5 5 )

255 FORMAT( ' + ' ~ 6 3 X , ' TRA C R L L l COLL2 PRED PRED-TQb ' 1 GQ TO 2 1 0 9

C 2 1 0 7 I P = 6

I F ( L C 1 ) GO TO 2 2 0 8 I R = 6 WRITE ( 6 9 2 4 7 )

2 4 7 FORMAT( ' + ' ~ 6 3 X ? ' TPA POT PET-TRA') GO TO 2 1 0 9

C 230P I C 1 = 7

I F ( L C 2 ) GO TC 2 1 0 8 l B =8

Page 109: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

WP I T € ( 6 9 2 5 6 1 2% F F P / ( A T ( ' a ' r63Xe ' T R A Pc',? COkk PRFD PRED-?RA 1

G O T 7 310" C

2108 I C 2 = R 16=9 W R I T E ( 6 9 2 3 )

257 F C R M A T [ ' + ' F ~ ~ X , ' TSA P O T COLLl COLL2 PRED P R E D - T S A E 9 2109 K3=19-3

IiU = 1 5 9 1 C

2110 I F (LC21 1 A = 1C2 I F (,SOT,LCPFF) 1 A = 1C1

C I F [LDUTC) GO T O 2125 IF(LEF'4r-l) Gn 10 2112 K?=1 GO TO 3135

C 2112 Y ? = l

W!? I T ' ( 6 , 2 6 0 1 260 F O R P A T ( b + * r 4 3 X ~ U F R R m )

G9 TO 2135 2125 IF(K3.GT.O) GP T 3 3127

K 2 =2 WRITE (6 ,361)

2 6 ! FqD,h'AT! + Q r4?Xr 8 ces 1 GO T r l 2135

C 2127 I F (LFSPIO) GO T D 7128

K2=3 WKITE(bp262)

262 F O R M A T ( ' + ' ~ 4 3 x 9 ' O B S D I F e 1 GO TO 2135

e 2128 K ? = 4

M R I T E ( 6 9 3 6 3 1 263 F O K M A T ( ' + ' , 4 3 X , ' 06s D I F ERR 1

C 2135 K 4 = K ?

L K 3 0 = K3,GT.O IF ( L o w c m C.O TO 2 1 1 1 I P 1 = IG+ lO I U 1 = I U + l O IAI = 1A+1n 1 7 1 = I T + l o I D 1 = I P + l O I C l l = IC1+10 K 4 = ?*KZ- 1 K31 = K2+ln

Page 110: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

C 2111 R E T U Q Y

E NI3

SUHROUTINE n e T ( m, IDLAT ,fJILATT S L A T , InLor\ l ,MLar?!,s~c~,Lnuc) C THE 5 l ;BQnUT INF NF I T F S ON U N I T 6 ( 3 . ) S T A T I O N NUMPER, ( 2 ) C R n ? D I N A T F S y c ( 2 ) D E S E RV E D V AL U E ( I N C~QI(;.REF.SYSTEM), ( 4 ) CIFFERENCE S E T W F F Y n Y s E e . - C VED AND P 9 E C I C T F D V A L U E , ( 5 ) EKSOR O F P R E P I C T I O ! J r ( 6 ) T G A U S F 3 R W T I ! 7 V C V A L U E , (7) S P E E R I C A L H A R M O N I C S E P I E S C O S T ~ I 5 U T I @ U , ( F ) Q F Y U L T O F C U L L C I AND ( Q ) C O L L . 1 1 , ( 1 0 ) Sub4 R F Q U A N T I T I E S ( 7 ) - ( 9 ) AXD ( 1 1 ) S?rK DC (6)- C (9) - A L L I F MEP.N INGFULL . I?\! L A Z E WE A k E D E 4 L I Y G W I T P A P 4 I R P F D E- C F L E C T I O N S , ( L C N C = F A L S E ) 9 T P E C E F . R E S ? O N D I N G QUA? ;T ITEY FOR E T A A R E C W R I T T E N A L I V E fiLLOW, C WHEN L P U N C H IS TRUE, T H E F O L L O W I X G O F TWE A R G V E "4fWTITJUF;r) Q U A V T I T I E S C ARE W R I T T E N ON U N I T 7: ( 1 ) AND (21 , AQr f WHFN L O U T € I S TRUE: ( 3 ) - ( E ) C AND E L S E ( 1 1 1 , ( 1 0 ) A W D ( 5 )

I M P L I C I T I b !TEGER( l J 9 K 9 M T N ) + L O G I C A L ( L ) 9 R E A L * 8 ( A - H , O - Z C O M f X l N / D U T C / I 7 1 1 7 I 2 7 I 4 7 1219 1 3 1 , I A N G ~ L P U N C ~ , L E E T C ~ L N T K A V , L h E Q V P

* 9 LK.30 COMMClN/DB SE ?/Of3 S ( 2 0 nlK E N S I n N O b N ( 1 0 ) I F ( D A P ( S ( S L A T ) .LT, 0 . 1 G - h ) S L A T = O.ODO I F ( O P B S ( S L D N ) .LT, 0 - 1 s - 6 ) S L O Y = 0.090

C T H I S IS DONE I V O R D E R T O A V O I D P K I N T I X L OF S l G Y . WuEV T V E A R C - S F C V N D C P A R T I S N E A R TO Z E R 3 r ( O R Z E Z O I S R E P R E S E N T E D A Y A S M A L L Y E G A T I \ I E NUM- C B E R ) .

I F ( O K S ( l ) . G € , 1 . 0 0 4 ) O L S ( 1 ) = 9949,900 I F ( O R S ( l ) e L F e - l e O D 3 ) n P ~ S ( l ) = - 9 9 9 - 9 9 D 0 I F ( * N R T e L P U N C U ) GO TCl E 0 1 0 I F ( L D U T C ) GO T D 8007 O B N ( 1 ) = O B S ( 1 ) 10 = 2 O E N ( 2 ) = G E S ( 1 4 ) I F ( L N T R A N ) Gn T D 8 0 3 1 OBN(3 1 = D E S ( 14-1 I Q = I 0 + 1

8031 I F ( L Y E R N D ) G O T O 8032 10 = 1 0 4 - 1 O B N ( 1 0 ) = O E S ( I )

8 0 3 2 I F ( L C N C ) GO TO 8 0 3 4 . I 0 = I 0 + 1 O E N ( I o 1 = 0 6 S I I 3 1 ) I F ( L N T R A N ) GC 7 0 P033 I 0 = I041 n B N ( I 0 ) = C h S ( 1 4 + Q )

8033 I F ( L N E R N O ) GP T O 8034 I 0 = I O + l O B N ( I 0 ) = O B S ( I 2 1 )

Page 111: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,
Page 112: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,
Page 113: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,
Page 114: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,
Page 115: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,
Page 116: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,
Page 117: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,
Page 118: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,
Page 119: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,
Page 120: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

R L 2 = RL2-DP/IK-S*T/IKl-(O3*T*T-D1I*S2/(n2*IY2I I F ( L N D ) GO TO 905 D R L 2 = DRL2/S-Dl/LKl-D3*S*T/IK2 I F ( L N D D I GC TO 905 DDRL2 = D O R L Z / S 2 - D 3 / I K 2

905 R E T U R N END

Page 121: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

Appendix B.

An iuput example.

The digital numbers written to the left of the input data correspond to the numbers identifying the input specification given in Section G.

The input example will produce the output shown in Appendix C. It corresponds to the situation described in Section 4, i. e. where three datasets of observations X,, X, , and X, a r e used for the determination of ?.

Page 122: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

Z C C O O O C C C rzl I I I I

c3 G G O O C C 0 0

2 I I I I I

Page 123: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

G I-- a?

C B I

c N m N Ccl

O r l a - N r id d

Page 124: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

F T T f -00 0.10

b 1 5 ~ 2 0 X , I 3 ~ 1 3 , F h ~ 2 ~ I 5 p I 3 p F 6 o ? , ? F ? e 2 p L l ) 1 2 3 1 0 4 5 5 1 . 0 F F F F F

40216 E J E R SAVNEHQEJ 5 5 5 8 34.68 9 44 5 4 e 9 C J -5e13 3 - 6 1 40606 V l G E R L O E S E 54 42 54-22 11 F F T T ( I h , 2 ( I3 ,F6-2) 12F7.2rL2)

1 2 3 2 4 5 0 2 1 0 0 F F F 1 - 0 0 981000-00 T

4413 5 4 51.49 9 59-55 6 - 9 4 517.5P 3163 54 50-23 12 00.01 17-63 510.18T

F T T F

54 30eOO 9 00.00 F T T F

5 4 30.00 9 00.00 F T T F

5 4 30.00 9 00.00 F T T F

5 4 30.00 9 00.00 T

Page 125: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

Appendix C.

An output example.

The output has been produced by the FORTRAN program using the input given in Appendix B.

Page 126: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

GFODETPC C O L L O C A T I O N I V E R S I O N 20 APR 1974-

MOTE T H A T THE F U N C T I O N A L S ARE I N S P H E R I C A L A P P R O X I M A T I O N M E A N R A D I U S = R E = 6 3 7 1 K M AND MEAN G R A V I T Y 9 8 1 K G A L USED.

LFGEND OF T A S L F S OF D B S F R V A T l n Y S AND D Q E n l C T I O N S : OLS = O t . S F R V F D V A L U E (WHEN POTH C O M P n N f N V S n F D F F L E C T l O N S A R E OPSFKVEC E T h P F L O H K S I ) , G I F =THE L I F F E R E N C E EETWEEN O U S E R V E D b Y D PP.EO 1 C i E D VALUE V W E N P R E D I C T I O N S ART CTtMPUlED A N 0 € L S E TPC P E 5 I C I J A L n E 7 F D V A T I O Y . E R 9 = F S T I M A T F D F R 4 0 Q O F P 3 E O I C T I O N 1Q.A = CO';TP.IYUT19Y F90'4 OCTUN TRAYSFOPMATIO" , PflT = C 3 N T R I - P U T I O N F o P M P O T E N T I A L C n F F F I C l F N T S . C D L L = C n Y T 9 1 B U T I O N FROM C O L L O C A T l P k D F T F R M I I I E D PART O F E S T I H A T E r WHEN THERE O N L Y H A S B E E N U S E D OYE S E T O F O B S F R V A T l f l N S ( D I F F E R E N T F R n M PDT.COEFF.1 C O L L l = C C N T R l e U T l O N FROM E S T I M A T E OF ANOMALOUS POT. O E T E R - M I N E D F P D M F I R S T SET OF O B S F P . V A T l n N S , CCtLL2 = C O U T R I 3 U T I O N F 9 0 9 F S T I Y A T F O R T P I N E I ? FROM SFCONP SET OF O B S E R V A T I W 4 S I P R E D = P R E D I C T F D VALUF- I N N F U P E F E a E N C E SYSTEM, MHEN P k f D l C . T I O N S ARE COYPUTEO A k I l E L S F T H E SUM n F THE C O N T P l t U T l O N S FROM T t I F POT. C O E F F I C I E N T S A N 0 F I R S T E S T l M A T E O F AYOMALDUS P O T E N T I A L I AND PRED-TRA = P R E D l C T I n N n R SUM @F C O N T R I B U T I O N S I N TWE O L D RE- FERENCE SYSTEM.

R E F F R E Y C E SYSTEM: EUROPEAN DATUM. 1 0 5 0 .

A = 6 3 7 8 3 8 8 . 0 M 1 / F 2 9 7 . 0 0 0 4 0 s E F . G R d V I T Y A T EQUATOR = 9 7 8 0 4 9 . 0 0 M G A L P O T F U T l A L AT R E F .ELL. = 6 2 6 3 9 7 8 7 . 0 0 M * * 2 / S E C + * Z GWAVI TY FORMULA: I N T E R N A T I OKAL G R A V l TV FORMULA* P O T S D A M SYSTEM.

NEW A NEW G# NEW 1 / F 6 3 7 8 1 4 3 . 0 0 . 3 9 0 6 0 1 Z O + l 5 2 9 8 . 2 5 0 0 0

E P S l € P S 2 E P S 3 1.57 0.19 1 .05

N E U REF. G F A V I T Y A T EQUATOR= 9 7 R 0 3 2 . 6 7 MGAL NEW P O T E N T 1 A L AT E L L I P S O I D = 6 2 6 3 6 9 1 6 . 8 4 M * * Z / S E C * * 2

D E F L E C T I O N S AND H F I G H T A N O M A L I E S CHANGED I N L A T I TUOE L O N G I T U D E B Y D K S I D E T A D Z E T A

55 3 0 0.0 10 0 0.0 -1.00 1-00 0.0

SOURCE OF TPE P P T E V T I A L C O E F F I C I E N T S USED: R.H.QAPP, THE G E O P O T E N T I A L TO ( 1 4 r 1 4 ) E T C - r IUGG. LUCERNEI 1967-

G M A C O F F ( 5 ) MAX .DEGREE 0 . 3 9 8 6 0 1 2 2 D + 1 5 6 3 7 8 1 4 3 . 0 - 4 8 4 . 1 8 0 3 8

Page 127: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

START OF C O L L O C A T I O N I:

WE MODEL ANOMALY DEGREE-VAWIANCFS ARE EQUAL TO A - l - 2 + 2411.

P A T I O R / R E L 0.999800 V A R I A U C E OF P O I N T G R A V I T Y ANOMALIES = 1 6 ~ 1 . 0 0 MGAL**Z 1 H E FACTOR A P 412.08 MGAL**2 12 E H P I P I C A L ANOMALY DEGREF-VARIANCES FOR DEGREE > l * ( I N U N I T S OF WGAL**2): 0.0 0.0 0.0 0.0 0.0 0.0 0.0 15.1 17.7 13.7 8.4

OBSERVATIONS:

THE FOLLOWING Q U A N T I T I E S ARE MEAN-VALUES, AND ARE REPRESENTED AS P O I Y T V A L U E S I N A HEl6Wf R.

L I T 1 TUOE D M

56 30.00 56 30.00 56 30.00 55 30.00 5 5 30.00 5 5 30.00 54 30.00 5 4 30.00 54 30.00

H D E L T A G (HGPL1 M OBS D I F

0.0 1P.00 -5.26 0.0 10.00 -13.19 0.0 27.00 3.93 0.0 26.00 3.50 0.0 12.00 -10.43 0.0 6.00 -16.32 0.0 5.00 -16.67 0.0 10.00 -11.61 0.0 2.00 -19.51

ST-VAR. 2 7 - 9 8 . R A T I O R I R E 1.0015554s TRA P O T POT- TRA -6.69 1 6 - 5 7 23.26 -6.69 16.50 73.19 -6.69 1 6 . 3 7 23 .m -6.47 16.02 22.50 -6.48 15.96 22-43 ---5.48 15.84 22.32 -6.25 15.42 21.67 -6.25 15.36 21.61 -6.25 15.25 21.51

S1At;DAtlD D E V I A T I O ? 4 S OF THE O B S E R V A T I O N S I N THE SAME SEQUENCE AND I N THE SAME U N I T S AS THE OBSERVATIONS:

4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00

S O L U T I O N S TO NORMAL EQUATIONS:

1PE S O L U T I O N S HAVE B E E N COMPUTED I N A P R E V I O U S RUN.

NUMEER O F E Q U A T I O N = 9 N O R H A L I ZED SOUARE-SUM O F OBSERVATIONS E 0.178534D+Ol NORRALI Z E D D I F F E R E N C E BETWEEN SQUARE- SUM OF O B S E R V A T I O N S AND NORM OF A P P R O X I M A T I O N P 0.2196870+00

Page 128: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

START OF COLLOCITPOM 1 X r

RATIO R f R E V A R ~ A R C E 0~ POlNT GRAVITY ANOMALIES THE FACTOR A

9 0 OECREE-VARIANCE% EQUAL 80 ZERO

DBSERVAT IONS:

LAT l TUDE D 1 4 5

5 5 5 8 3 9 - 6 5

LAT ITUOE O M S

55 52 38.51

LATITUDE D *

5 6 4.90 5 6 7.10 5 4 51.49 5 4 50.23

LONG1 TUOE O H S

9 49 54.90

LONG1 TUDE o n s

1 2 50 3 8 - 9 3

LONG1 TUOE 0 H

10 0.34 11 57.00

Q 59.55 1 2 0.01

H #SI /ETA (ARCSEC) STaVAR, 1.95, R A T I O RfRE = 1 . 0 0 0 0 0 0 0 ~ TRA POT COLL PRED PREO-YRA

H E E T A I M ) H OUS D I F

0.0 20.40 -0.07

H DELTA G (HGALI H 0 0 5 D I F 70.60 37.49 21.61

0.0 -5.70 -19.90 6.94 17.20 5.69

17.63 14.89 8 - 6 8

ST.VAR. = 0.37, RATI O R / R E = 1.onoonno. TRA DOT COLL PQED PRED-TRA 22.55 46.20 -3.18 43.02 20.47

ST.VAQ. = 1 3 - 0 4 . RATIO R/RE = l - 0 0 0 0 0 0 0 * TRA POT COLL PRED PRED-TRA -6.60 16.32 -7.04 9.28 1 5 - 8 8 4 - 6 1 16.25 -8.66 7 .59 14.20 -6.33 15.61 -10.44 5.18 11.51 -6.33 15.52 -15.64 4 . 1 2 6.21

STANDARD DEV1ATION5 OF THE DRSERVATIONS I N THE SAME SECUFNCE AND I N THE SAME UNITS A S THF OBSERVATIONS:

0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.0 0 - 2 0 0.20 0.20 0.20

COEFFIC IEVTS OF NDRMAL-EPUATIOYSI BLOCK 1

SOLUTIONS TO NORMAL EQUATIONS:

KUMEER t3F FCUATIONS = 1 3 NORMAL1 ZED SOUARE-SUM OF QBSERVATlONS P 0.1991610+02 NORMAL1 ZED DIFFERENCE BETWEEN SQUARE-SUM OF OBSERVATIONS AND NORM OF APPROXIMATHO% ~ - 0 . 4 2 4 4 6 7 9 + 0 1

Page 129: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,
Page 130: A FORTRAN IV PROGRAM FOR THE DETERMINATION OF THE … · 2019. 12. 31. · FORTRAN IV program is described in section 4. The most important details are given in the following section,

OP - H

or- b-

0 P- V) V UI

o s 5 U O Q - U W.

W O *

< goin -J V 2 V)

LLOM < U 5 U

O L c m V m n G + C

U O O 0 0 OIP

U . 0 EI u o . P U d C

U1 LU

z Z O Q o m W z o o c m > m o o a m

0 W a

0 C

> W I I 0 L1: d

W W a 0

C4 .U . O N U1 W 0-4

k- U. P( I U. .OR1 I W

Q C L 0 O N 4 U c- U. U.

0

> C-( 0 P(

LL & a L

0 fud

bLI M M 0 B

V) m q a , - M O V1 5l z o a - W 0 . t C M 0 z w..a C O O

Q Z Z N r -

C l 0 z c ZNM - 0 C O P 2 - 0 0 . L

- a m 200-4 - - 9 2 l- - N m 3 0 4 Q z I-.-

U !-- ! - l U U

I U t- U. U B a

C) W W O N V1 W U U. U LU LY U I U z U z c m tu OL z c m si a U Q h U 1 0 P U I a

Z Q m

m W M U. 4JJ i

C 8: U

V ) * Q ) UQ.? U - m m & C 4 0 W C - W O * Z O 9 L L I 0 Zh" U. l

D

U d Z 4 Q L a - >

2 U 0 9 Z > 0 1 0 a:

U 0 9 0 > O l b CL U0.6 ( L e UI P W W II o r W

O N a z c r E v) c I O N m Z O + o I U N E % m

L 0 P

Z Z G U 0 - 0 W I

0 -a W

M l - o m

U 3 l U C O W LIJ

w 3 1 n boa, U m 0 .S U m

W 3 8 Z C 2 z - w e 3 a 3 ., z - 0 0 . + C L U m U - W U W I b W

2 .-OQ. a > m Z - C

a a I - L - m z- ,- 4 O L 1

o m 2- !-- eOL W O O Z T

U U Z X > D I d Z X > 0 I 2.7 X > 0 8