2004.10.25 By K. Matsumoto @ National Astronomical Observatory

1. GOTIC2 

GOTIC2 is a improved version of GOTIC (Sato and Hanada, 1984).
GOTIC2 calculates solid Earth tide and ocean tidal loading
effects on land. The ocean tidal effects (tidal loading) are
calculated using Farrell's (1972) convolution method. GOTIC2
is written in FORTRAN and works well at least on Linux, AIX4.3,
HP-UX, and WINDOWS XP. 
Main changes on GOTIC are;
(1) It is incorporated with a new ocean tide model based on
    TOPEX/POSEIDON altimeter data (NAO.99b & NAO.99Jb models).
(2) 10 additional constituents can be calculated (totally 21
    constituents).
(3) Format of control file is changed.
(4) Time series prediction function is added.

The latest version is 2004.10.25. Version history will be
found at the bottom of this file.

The appropriate reference to GOTIC2 is;
Matsumoto, K., T. Sato, T. Takanezawa, and M. Ooe,
GOTIC2: A Program for Computation of Oceanic Tidal Loading Effect, 
J. Geod. Soc. Japan, 47, 243-248, 2001.


2. Ocean tide model

* Short-period ocean tide model (NAO.99b & NAO.99Jb models)
  A global model and a regional model around Japan are
  prepared for 16 major constituents (M2, S2, K1, O1, N2,
  P1, K2, Q1, M1, J1, OO1, 2N2, Mu2, Nu2, L2, and T2). The
  model region and the model resolution are as follows;

                              model region       resolution
  Global model  (NAO.99b)   0E-360E, 90S-90N      0.5deg
  Regional model(NAO.99Jb) 110E-165E, 20N-65N    1/12deg (5min)

  The global model is developed by assimilating tidal
  solutions from about 5 years of TOPEX/POSEIDON altimeter
  data (Cycle 9-198) into hydrodynamical model. Coastal
  tide gauge data are additionally assimilated for the
  regional model around Japan.

  Please refer to the following paper for detailed
  description of the models;
  Matsumoto, K., T. Takanezawa, and M. Ooe,
  Ocean Tide Models Developed by Assimilating TOPEX/POSEIDON
  Altimeter Data into Hydrodynamical Model: A Global Model
  and a Regional Model around Japan,
  Journal of Oceanography, 56, 567-581, 2000.

* Long-period ocean tide model (NAO.99L model)
  Global models for 5 constituents (Mtm, Mf, Mm, Ssa, Sa)
  are prepared. These are purely hydrodynamical models
  (TOPEX/POSEIDON data not assimilated). The model region
  and the model resolution are as follows; 

                      model region       resolution
  Mtm, Mf, Mm, Ssa   0E-360E, 90S-90N      0.5deg
  Sa                 0E-360E, 90S-90N      1.0deg

  Although the original resolution of Sa model is
  1.0 degree, 0.5deg-resampled map is distributed.
  NAO.99L includes MSf and MSm constituents, but 
  currently GOTIC2 does not support these constituents.

  Please refer to the following paper for detailed
  description of the long-period models;
  Takanezawa, T., K. Matsumoto, M. Ooe, and I. Naito,
  Effects of the Long-period Ocean Tide on Earth Rotation,
  Gravity and Crustal Deformation Predicted by Global
  Barotropic Model -periods from Mtm to Sa-,
  J. Geod. Soc. Japan, 47, 545-550, 2001.


3. Computational mesh

GOTIC2 uses four different-sized meshes describing
ocean-land distribution to compute ocean loading effect.
Each mesh size is as follows;
                       Mesh size
First-order  mesh   0.5 deg X 0.5 deg (1800 sec X 1800 sec)
Second-order mesh   7.5 min X 5   min ( 450 sec X  300 sec) inside  Japan
                    5   min X 5   min ( 300 sec X  300 sec) outside Japan
Third-order  mesh   45  sec X 30  sec 
Fourth-order mesh   2.25sec X 1.5 sec (approx. 50m by 50m inside Japan)

Finer meshed are used for nearer region to the estimation
point (referred to as EP) of the ocean tidal loading
effect. 3rd- and 4th-order mesh files are prepared only for
Japan. 

* In the case of EP inside Japan
    The third-order meshes are automatically read from 
    the mesh files. If you need to use 4th-order mesh, add
    MESH4 ON to the control file.

* In the case of EP outside Japan

    The second-order meshes are automatically read from the
    mesh files. If you want to use the 3rd- or 4th-order
    meshes, you have to prepare corresponding mesh files
   (see Section 7).


4. Green's function

As well as GOTIC, one can select the Green's function based on
G-B Earth model by Farrell (1972) or one based on 1066A
Earth model by Endo and Okubo (1983).


5. Tidal component

GOTIC2 can compute the amplitude and the phase of the
following six tidal components;
(1) Vertical displacement
(2) Horizontal displacement
(3) Gravity
(4) Tilt
(5) Strain
(6) Deflection of the vertical

 
6. Control file

GOTIC2 reads the control file from standard input. The
control file consists of the control word called "CARD"
followed by the parameters. There are two kinds of CARDs,
one is mandatory CARD which specifies EP position,
constituents, and components, and the other is option CARD
which specifies the detailed configurations. Please note
that a column length of the control file should not exceed
100 characters. 
 
6-1. Mandatory CARDs

* STAPOSD CARD
  Specifies the position of EP.
  Format : STAPOSD name of EP, longitude (degrees), latitude (degrees),
            height (m), azimuth (degrees)
  Example: STAPOSD ESASHI  , 141.3352777, 39.14805555555555, 393.0, 390.0
  Note   : The name of EP should not exceed 10 characters.
           Please fill up all the fields. For example
           gravity has no relation to azimuth, but one has to fill
           azimuth field as 0.0 or so. The azimuth is
           measured clockwise from North.

* STAPOS CARD
  Specifies the position of EP.
  Format : STAPOS name of EP, longitude (degrees), longitude (minutes),
                  longitude (seconds), latitude (degrees),
                  latitude (minutes), latitude (seconds),
                  height (m), azimuth (degrees)
  Example: STAPOS  MATSUSHIRO, 138, 12, 25.25, 36, 32, 33.63, 405.9 , 390.0
  Note   : The name of EP should not exceed 10 characters.
           Please fill up all the fields. For example
           gravity has no relation to azimuth, but one has to fill
           azimuth field as 0.0 or so. The azimuth is
           measured clockwise from North.

* KIND CARD
  Specifies the tidal components to compute.
  Format : KIND tidal component 1, tidal component 2, .....
  Example: KIND RD, HD, GV, TL, ST, DV
  Note   : Capital characters should be used.
           The parameter field must contain at least one
           component among the followings;
　　　　   RD (Radial Displacement)
           HD (Horizontal Displacement)
           GV (GraVity)
           TL (TiLt)
           ST (STrain)
           DV (Deflection of the Vertical)

* WAVE CARD
  Specifies the tidal constituents to compute.
  Format : WAVE constituent 1, constituent 2, .....
  Example: WAVE M2, S2, K1, O1, N2, P1, K2, Q1
  Note   : The parameter field must contain at least one
           constituent among M2, S2, K1, O1, N2, P1, K2, Q1,
           M1, J1, OO1, 2N2, Mu2, Nu2, L2, T2, Mtm, Mf, Mm,
           Ssa, Sa. The parameters are case sensitive. The
           comma ',' can be omitted.

           One can write more than one line of WAVE CARD.
           WAVE M2, S2, K1, O1, N2, P1, K2, Q1
           is equivalent to
           WAVE M2 S2 K1 O1
           WAVE N2,P1,K2,Q1

　　　　   The following alias names of the constituents can
           be used;
           WAVE MAJOR8         (major 8 constituents)
           WAVE SHORTP         (short-period 16 constituents)
           WAVE LONGP          (long-period 5 constituents)
           WAVE ALL            (short-period 16 constituents +
                                long-period 5 constituents)
           For example,
           WAVE MAJOR8 LONGP
           is equivalent to
           WAVE M2,S2,K1,O1,N2,P1,K2,Q1, Mtm,Mf,Mm,Ssa,Sa

Please choose your preferable one from STAPOSD and STAPOS
CARDs. In order to compute more than 1 EP, write 2 lines
(and less than 11 lines) of STAPOSD or STAPOS CARD. GOTIC2
will normally return results if the mandatory CARDs are
input. In this case default values are set for the other
parameters (see description of the option CARDs).

The following example will give you gravity tide for M2 and
K1 constituents at ESASHI and MATSUSHIRO stations;
STAPOSD ESASHI  , 141.3352777, 39.14805555555555, 393.0, 390.0
STAPOS  MATSUSHIRO, 138, 12, 25.25, 36, 32, 33.63, 405.9 , 390.0
KIND    GV
WAVE    M2 K1

6-2. Option CARDs

* INTEGA CARD
  Defines the integration area which is specified
  by two concentric circles of which center corresponds to
  EP. 
  Format : INTEGA inner angular distance (degree),
                  outer angular distance (degree)
  Example: INTEGA 0.0, 180.0
  Default value : inner angular distance = 0.0 degree,
                  outer angular distance = 180.0 degrees
                  (It means global integration)

* BOUND12 CARD
  Defines the first-order mesh areas by the
  angular distance from EP.
  Format : BOUND12 angular distance (degree)
  Example: BOUND12 10.0
  Default value : 10.0
  Note   : The first-order meshes are used for the area
           farer than the angular distance. Maximum value is
           60.0.

* BOUND23 CARD
  Defines the second-order mesh areas by the
  angular distance from EP.
  Format : BOUND23 angular distance (degree)
  Example   : BOUND23 5.0
  Default value : 5.0
  Note   : The second-order meshes are used for the area
           nearer than the angular distance defined by the
           BOUND12 CARD and farer than the angular distance
           defined by the BOUND23 CARD. Maximum value is
           30.0.

* BOUND34 CARD
  Defines the third-order mesh areas by the
  angular distance from EP.
  Format : BOUND34 angular distance (degree)
  Example   : BOUND34 0.2
  Default value : 0.2
  Note   : The third-order meshes are used for the area
           nearer than the angular distance defined by the
           BOUND23 CARD and farer than the angular distance
           defined by the BOUND34 CARD. Maximum value is
           30.0.

* MESH3 CARD
  Requests to use third-order mesh files which is prepared by
  a user. The third-order mesh files inside Japan are
  already prepared.
  Format : MESH3 ON or OFF 
  Example: MESH3 ON
  Default value : ON  (inside Japan)
                : OFF (outside Japan)

* MESH4 CARD
  Requests to use fourth-order mesh file which is prepared
  by a user. The fourth-order mesh files inside Japan are
  already prepared.
  Format : MESH4 ON or OFF 
  Example: MESH4 ON
  Default value : OFF

* MAPOUT CARD
  Requests mesh information output for GMT.
  Format : MAPOUT index (1: print out 100% land meshes,
                         2: print out 100% ocean or mixed meshes),
                  east longitude of the western boundary,
                  east longitude of the eastern boundary,
                  north latitude of the southern boundary,
                  north latitude of the northern boundary
  Example: MAPOUT  1, 140.0, 142.0, 38.0, 40.0
  Note   : If this CARD exists, mesh information within the
           specified area will be output to the file
           "mapout.xy". You can make PS file depicting the
           mesh boundary by using  the psxy command of GMT.

           Negative latitude must be used for southern
           hemisphere region.
 
           This option is valid only for the first station
           of the STAPOS(D) CARD, the first component of the
           KIND CARD, and the first constituent of the WAVE CARD.

* GREENF CARD
  Selects Green's function.
  Format : GREENF Green's function number
          (1 = G-B model, 2 = 1066A model)
  Example: GREENF 2
  Default value : 2

* POINTL CARD
  Switch for point load approximation.
  Format : POINTL ON or OFF
  Example: POINTL OFF
  Default value : OFF
  Note   : Meshes farer than angular distance of 30 degrees
           are regarded as point load by default. GOTIC2,
           however, integrates the Green's function within
           the meshes nearer than 30 degrees from EP for the
           sake of the precise load computation. If this
           option is ON then the point load approximation is
           applied to the whole area, which results in worth
           accuracy but fast computation.

* MASSCON CARD
  Switch for mass conservation of the ocean tide model.
  Format : MASSCON ON or OFF
  Example: MASSCON ON
  Default value : ON

* PATAN2 CARD
  Specifies phase output format.
  Format : PATAN2 ON or OFF
  Example: PATAN2 OFF
  Default value : OFF
  Note   : If ON phases are output between -180 degrees and
           180 degrees, otherwise between 0 degree and 360
           degrees. 

* VERBOUS CARD
  Requests detailed information.
  Format : VERBOUS ON or OFF
  Example: VERBOUS OFF
  Default value : ON

* DELTAF CARD
  Selects the delta factor for gravity Earth tide calculation.
  Format : DELTAF delta factor number
         (1 = Wahr, 2 = Dehant and Ducarme)
  Example: DELTAF 2
  Default value : 2
  Note   : Valid only for gravity estimation.

* GTIME CARD
  Requests to include the small time-dependent term in
  Tamura's potential when calculating the amplitude of
  gravity solid Earth tide. This potion is for the
  comparison with gravity tide observation. The central time
  of the observation period be specified.
  Format : GTIME Year, Month, Day
  Example: GTIME 1996, 1, 1
  Note   : The year should be between 1900 and 2100.
           Valid only for gravity estimation.

* DATADIR CARD
  Selects the data directory. GOTIC2 in the current
  directory reads, by default, Green's function model from
  ./data, ocean tide models from ./data/omap, and mesh files
  from ./data/mesh directory. 
  You can change the directory name of ./data by using this
  CARD.
  Format : DATADIR directory name
  Example: DATADIR /home/uname/any/dir/you/like/
  Default value : ./data/
  Note   : The directory name should not exceed 80 characters.

* FULLMESH CARD
  The mesh files do not contain information about 100% ocean
  or 100% land meshes, but contain information about "mixed"
  ocean-land grids only (except for 4-th order mesh). Even
  in the case that a ocean mesh size is somewhat large,
  GOTIC2 approximates Green's function by a quadratic curve
  and integrate it within the mesh so that we can save
  computational time. It is safer, however, to divide a 100% 
  ocean mesh into finer-scale sub-meshes in the area that 
  variation of Green's function is large in terms of angular
  distance (e.g., for a Green's function at a position of a
  sensor in a borehole). This card forces GOTIC2 to use
  divided sub-meshes, but computational time will increase.    
  Format : FULLMESH ON or OFF
  Example: FULLMESH ON
  Default value : OFF

* OMODEL CARD
  Requests computation based on other ocean tide models than
  NAO.99b.
  Format : OMODEL suffix
  Example: OMODEL got
  Default value : nao
  Note   : M2 ocean tide model, for example, is specified by
           file name as m2.nao, but you can change the
           suffix to use other ocean tide models. Currently
           GOT99.2b and CSR4.0 models are available.
           If you want to use GOT99.2b then put
           OMODEL got
           to the control file. 
           If you want to use CSR4.0 then write
           OMODEL csr

* UNIT6 CARD
  Specifies output file name.
  Format : UNIT6 output file name
  Example: UNIT6 result.out
  Note   : GOTIC2 reads control file from standard input and
           returns the results to standard output. Then the
           usage will be like this;
           % gotic2 < control_file > result.out 
           You can specify the output file name in the
           control file as well by using the UNIT6 CARD.
           In this case the usage will be as follows,
           % gotic2 < controle_file
  
           The output file name should not exceed 80
           characters. 

* UNIT20 CARD
  Specifies tidal prediction output file name.
  Format : UNIT20 output file name
  Example: UNIT20 predict.out
  Note   : GOTIC2 writes predicted time series of tides to
           unit 20. Use this card to give a name to the unit
           20 file.

           The output file name should not exceed 80
           characters. 


* PREDICT CARD
  Requests to be tidal prediction mode.
  Format : PREDICT index (1:solid Earth tide + ocean
                   loading tide, 2:solid Earth tide,
                   3:ocean loading tide), start time (UTC),
                   end time (UTC), time step (minute)
  Example: PREDICT 1, 199906081200, 199907011300, 60
  Note   : Predicts tides for the first station of STAPOS(D)
           CARD and first component of KIND CARD by summing
           up the constituents specified by WAVE CARD. The
           prediction results are output to unit 20.

           The start and end time is 12 digits integer. In
           the above example, the start time is June 8 1999
           12:00 UTC, the end time is July 1 1999 13:00 UTC,
           and the time step is 60 minutes.    

           The start and end time should be between Mar. 1
           1900 and Feb. 28 2100.

           !!! 21 constituents are not sufficient for
           accurate solid Earth tide prediction. We will
           fix this issue in the future by including much
           more constituents taken from Tamura's potential. 

* PREXFL CARD
  Requests to read the amplitude and the phase file
  generated by GOTIC2 itself when predicting tides.
  Format : PREXFL external file name to be read
  Example: PREXFL result.out
  Note   : In order to predict tides the amplitude and the
           phase of each constituent to be considered are 
           necessary. It is economical to save tidal
           constants, which are calculated a priori, if you
           are going to predict tides at a station many
           times for different periods. The PREXFL CARD
           specifies the GOTIC2 output file which contains
           tidal constants calculated before the prediction.  

           The PREXFL CARD must be accompanied with the
           PREDICT CARD. The external file name should not
           exceed 80 characters. Be sure that the parameters
           of the STAPOS(D), KIND, WAVE CARDs, which were
           used for calculating the tidal constants, are the
           same as those used for the prediction mode.  

           The prediction procedure will be done after
           calculating tidal constants if the PREDICT CARD
           exists and the PREXFL CARD does not exist. If
           both the CARDs exist, GOTIC2 only predicts time
           series (convolution will not be done). 

* PREFMT CARD
  Specifies format of time series of tidal prediction.
  Format : PREFMT time format index (1-5), sign and unit
                  index (1-4)
  Example: PREFMT 5, 1
  Default value : 5, 1
  Note   : This card must be accompanied with the PREDICT CARD.

         Time index number             Time
                 1              Elapsed day since the start time
                 2              Elapsed hour since the start time
                 3              Elapsed minute since the start time
                 4              Elapsed second since the start time
                 5              Year/Month/Day HH:MM:SS
         
         Sign and unit index
                 1       RD : upward positive (m)
                         HD : northward, eastward positive (m)
                         GV : upward positive (m/s/s)
                         TL : upward-N, upward-E,
                              upward-Azimuth positive (rad)
                         ST : extension positive (non dimensional)
                         VD : upward-N, upward-E positive (rad)
                 2       The same sign as index 1. Unit RD (mm),
                         HD (mm), GV (microGal), TL (nanorad),
                         ST*10^9 (non dimensional), DV (nanorad)
                 3       Opposite sign to index 1, the same
                         unit as index 1.
                 4       Opposite sign to index 1, the same
                         unit as index 2.

* PRE186 CARD
  Requests 18.6-year sideband be taken into account in tidal
  prediction mode.
  Format : PRE186 ON or OFF
  Example: PRE186 ON
  Default value : ON

* PREOUT CARD
  Same as UNIT20 CARD.

* END CARD
  Indicates the end of the input CARDs.
  Format : END
  Example: END
  Note   : Not mandatory but useful when one wants to write
           comments after this END CARD.

6-3. Comment out

A CARD is recognized only if the CARD begins at the first
column of the line. By using this property one can make
GOTIC2 interpret that the line beginning with # or some
other characters is commented out. In the following example
#KIND    RD, HD, GV, TL, ST, DV
KIND    GV
the first KIND CARD is ignored and the second KIND CARD only
is valid. 

If option CARDs are duplicated the former CARDs will be
overwritten by the latter CARD.


7. How to write mesh files

The first-order mesh consists of 720x360 meshes with the
global Earth divided by 0.5 degrees meshes. The first-order
mesh information is written in data/mesh/1stmesh.data.
The coordinates of the mesh center (x1 degree, y1 degree) at
mesh position index of (m1,n1) are 
x1 =  0.0 + (m1-0.5)*0.5
y1 = 90.0 - (n1-0.5)*0.5
One of the following 11 mesh information is assigned to a
mesh. 
123456789#.
where "." means a 100% ocean mesh, "#" means a 100% land
mesh, and numbers indicate land rate within a mesh. For
example, if 0 .gt. land rate .le. 0.1111111 then land rate
information become 1. Existence of integer number other than
'.' or '#' as mesh information means that higher-order mesh
information describing the "mixed" mesh should follow on. 
GOTIC2 uses mean "ocean rate" for convolution which is
calculated from land rate iar1 as
ar0 = (9.5d0-dfloat(iar1))/9.0d0

Higher-order mesh information for first-order meshes are 
described in separate files. For example, the mesh
(m1,n1)=(260,113) with mesh center coordinates of
(129.75deg, 33.75deg) has its sub-mesh information in the
file data/mesh/260113.mesh. 

Written in the first line in the format (3i6) are how a
parent mesh (the parent mesh of second-order mesh is 
first-order mesh, the parent mesh of third-order mesh is
second-order mesh) is divided by child mesh. For example,

  4  6 10 10 20 20

means that the first-order mesh is divided into 4 pieces in 
x-direction and 6 pieces in y-direction by the second-order
meshes, the second-order mesh is divided into 10X10 pieces
by the third-order meshes, and the third-order mesh is
divided into 20X20 pieces by the fourth-order meshes. 
Meshes are divided in this manner for Japan region based on
50m-mesh digital elevation map published by the Geographical
Survey Institute, Japan. For outside region of Japan, a
first-order mesh is divided into 6x6 pieces.

Written in the second line in the format (i1,2i3,24a1) are
second-order mesh information as,
iar1,m1,n1,(cmesh2(m2,n2),m2=1,4),n2=1,6)
For example,

2260113.....21..62..3111.111124

means that land rate index of the first-order mesh
(m1,n1)=(260,113) is 2, and the mesh is divided by the
second-order meshes as

....
.21.
.62.
.311
1.11
1124

You can describe third- or fourth-order mesh in the similar
way. The third-order mesh information is written in the
format (i1,2i3,2i1,100a1) as
iar2,m1,n1,m2,n2,(cmesh3(m3,n3),m3=1,10),n3=1,10)
For example, sub-mesh information for the second-order mesh
(m2,n2)=(2,2) in the above example would be

226011322......................................................11........544........373......29##64...18#####

This means that land rate index of the second-order mesh
(m1,n1,m2,n2)=(260,113,2,2) is 2, and the mesh is
divided by the third-order meshes as

..........
..........
..........
..........
..........
....11....
....544...
.....373..
....29##64
...18#####

The fourth-order mesh information is written in the format
(i1,2i3,2i1,2i2,400a1) as 
iar3,m1,n1,m2,n2,m3,n3,(cmesh4(m4,n4),m4=1,20),n4=1,20)
For example, sub-mesh information for the third-order mesh
(m3,n3)=(5,6) in the above example would be

126011322 5 6..................................................................................................................................................................................................................................................................................##..................##.........................................................................#####..####.......#######..####

This means that land rate index of the third-order mesh
(m1,n1,m2,n2,m3,n3)=(260,113,2,2,5,6) is 1, and and the mesh
is divided by the fourth-order meshes as

....................
....................
....................
....................
....................
....................
....................
....................
....................
....................
....................
....................
....................
..............##....
..............##....
....................
....................
....................
.........#####..####
.......#######..####

Because we currently do not have fifth-order mesh, all the
fourth-order meshes are described by "." or "#".

GOTIC2 sequentially search for the meshes whose size is
gradually decreasing. So be careful about the listing order
which should be as follows,

Mesh dividing info.
2nd-order mesh info.
3rd-order mesh info. ---------------------+
4th-order mesh info. -+ (As many as number|-----+
4th-order mesh info.  | of mixed 3rd-order|     |
4th-order mesh info. -+ mesh)-------------+     |
3rd-order mesh info. ---------------------+ (As many as number
4th-order mesh info. -+ (As many as number| of mixed 2nd-order
4th-order mesh info.  | of mixed 3rd-order| mesh)
4th-order mesh info. -+ mesh)-------------+     |
3rd-order mesh info. ---------------------+     |
4th-order mesh info. -+ (As many as number|     |
4th-order mesh info.  | of mixed 3rd-order|-----+
4th-order mesh info. -+ mesh)-------------+

If the mesh list is in wrong order, GOTIC2 will fail to
search for necessary mesh information and stop after
detecting end of file.


8. Install

The following files are necessary for installation;
gotic2_041025.tar.gz
nao99b.tar.gz
nao99Jb.tar.gz
nao99L.tar.gz
(got992b.tar.gz if you want to use GOT99.2b model)
(csr4.tar.gz    if you want to use CSR4.0 model)

I assume that you are working on UNIX system.

Make nao99 directory.
(~): mkdir nao99b
(~): cd nao99b/

Make omap directory.
(~/nao99b): mkdir omap
(~/nao99b): cd omap

Extract files from nao99b.tar.gz, nao99Jb.tar.gz,
and nao99L.tar.gz in the omap directory.
(~/nao99b/omap): gunzip nao99b.tar.gz
(~/nao99b/omap): tar xvf nao99b.tar
(~/nao99b/omap): gunzip nao99Jb.tar.gz
(~/nao99b/omap): tar xvf nao99Jb.tar
(~/nao99b/omap): gunzip nao99L.tar.gz
(~/nao99b/omap): tar xvf nao99L.tar

If necessary,
(~/nao99b/omap): gunzip got992b.tar.gz
(~/nao99b/omap): tar xvf got992b.tar
(~/nao99b/omap): gunzip csr4.tar.gz
(~/nao99b/omap): tar xvf csr4.tar

Extract files from gotic2_041025.tar.gz in the nao99b directory.
(~/nao99b/omap): cd ..
(~/nao99b): gunzip gotic2_041025.tar.gz
(~/nao99b): tar xvf gotic2_041025.tar

You will find source codes and Makefile in source directory.
Before compiling the program, modify the following lines in the
Makefile so that they are suitable to your computer platform;
FC       = f77
FFLAGS   = 

(~/nao99b): cd gotic2/source
(~/nao99b/gotic2/source): make

Install and clean up after normal compilation.
(~/nao99b/gotic2/source): make clean

Move to data directory and make links to ocean tide model
directory. 
(~/nao99b/gotic2/source): cd ../data
(~/nao99b/gotic2/data): ln -s ../../omap .


9. Testing program

GOTIC2 reads control file from standard input and returns
the results to standard output. Then the usage will be like
this;

(~/nao99b/gotic2): gotic2 < ftn05.exam1 > result.test1

Compare the output file "result.test1" with "result.exam1"
for validation. The file "result.exam1" is the output file
computed on AIX4.3 system. This is the example for
calculation of M2 gravity tide at Esashi station.


10. Examples

* ftn05.exam2 is the control file for calculation of M2
gravity tide at Miyakejima station.

*********************[ Mandatory Cards ]**********************
STAPOS   MIYAKE  , 139, 31, 30.0, 34, 7, 13.0, 42.0, 0.0
WAVE     M2
KIND     GV
**********************[ Option Cards ]************************
MESH4    ON
MAPOUT   1, 139.4, 139.6, 34.0, 34.2
END

Since the station is very close to the ocean, fourth-order
meshes are required. Thus MESH4 ON is necessary.

Run GOTIC2.
(~/nao99b/gotic2): gotic2 < ftn05.exam2 > result.test2

By adding MAPOUT CARD you gets mesh coordinate file
"mapout.xy" which is to be processed by psxy GMT command.
If you have GMT installed try mcheck.gmt to depict land
meshes around the station which is indicated by red circle.


* ftn05.exam3 is the control file for calculation of gravity
tide of 21 constituents at Esashi station. 

*********************[ Mandatory Cards ]**********************
STAPOSD ESASHI  , 141.3352777, 39.14805555555555, 393.0, 225.0
WAVE    ALL
KIND    GV
**********************[ Option Cards ]************************
#PREDICT 3, 199801010000, 199802010000, 60.0
#PREXFL  result.test3
#PREFMT  5, 4
#PREOUT  predict.test4
END

WAVE ALL requests to calculate all 21 constituents which
GOTIC2 can handle with. Although all option cards are
disabled, these are used in next example. 

Run GOTIC2.
(~/nao99b/gotic2): gotic2 < ftn05.exam3 > result.test3
It will take some times. Please wait and see with a cup of
coffee.


* ftn05.exam4 is the control file for prediction of gravity
tide at Esashi station. 

*********************[ Mandatory Cards ]**********************
STAPOSD ESASHI  , 141.3352777, 39.14805555555555, 393.0, 225.0
WAVE    ALL
KIND    GV
**********************[ Option Cards ]************************
PREDICT 3, 199801010000, 199802010000, 60.0
PREXFL  result.test3
PREFMT  5, 4
PREOUT  predict.test4
END

GOTIC2 first reads tidal constants calculated in the previous
run from the file "result.test3", and sums up 21
constituents to make time series. 18.6-year sidebands are
taken into account by default.

PREDICT 1, 199801010000, 199802010000, 60.0
requests calculation of ocean loading tide from Jan. 1 1998
00:00 UTC to Feb. 2 1998 00:00 UTC with time step of 60
minutes.

PREXFL  result.test3
requests that tidal constants are to be read from result.test3.

PREFMT  5, 4
requests that time is in the format of Year/Month/Day
HH:MM:SS and that upward positive gravity value is output
in micro Gal.

PREOUT  predict.test4
requests that the result is output to the file "predict.test4".

The usage is
(~/nao99b/gotic2): gotic2 < ftn05.exam4 > result.test4


11. Acknowledgments
We are grateful to 
Dr. O. Kamigaichi, 
Dr. S. Okubo,
Dr. H. Iwasaki, 
Dr. M. Furuya,
Dr. T. Otsubo,
Miss S. Iwano
for their comments which are very useful to develop GOTIC2.

12. E-mail contact

   Koji MATSUMOTO
   Misusawa Astrogeodynamic Observatory, National Astronomical Observatory
   matumoto@miz.nao.ac.jp

   Questions about long-period ocean tide model should be sent to
   Takashi TAKANEZAWA
   Misubishi Electric Corporation
   takaneza@cew.melco.co.jp

13. Version history
2004.10.15
(1) Bug fix for load estimation using Schwiderski model.
(2) Bug fix for reading NAO.99Jb model for OO1, 2N2, Mu2, and Nu2
    constituents.
(3) Including fine mesh around Syowa station, Antarctica (Kobayashi
    et al., 2004)
(4) Some of common statements were modified.

2001.05.16
(1) Bug fix for azimuthal computation (azmth.f). Any former
    version of GOTIC2 had serious bug in azmth.f which
    resulted in erroneous loading estimation for E-W
    horizontal displacement, E-W tilt, shear stress, E-W
    deflection of the vertical. The situation is in
    particular bad when the longitude of an estimation point
    is near Greenwich meridian.
(2) Bug fix for incorporating ocean tide model of resolution 
    other than 0.5 degrees.

2000.12.01
(1) Deleted inappropriate "," in main.f calling convol1, 
    which made compilation failure with some compiler.
(2) Add definition of datdir in convl1.f

2000.09.09
(1) Description of mesh file is changed. The mesh files
    themselves are also renewed. The mesh files for Japan
    have been generated from high-resolution 50m digital
    elevation map data which is published by the
    Geographical Survey Institute, Japan.
(2) FULLMESH, OMODEL cards are added. The format of MAPOUT
    card is changed.
(3) Bug fix for tidal prediction code.

1999.06.09
First release to the public.

EOF
