Program oltidem - orthotides ocean loading

The tar file is avaibale from ftp://gere.oso.chalmers.se/oload/Oltidem-002.tar.Z
(002 is the current version of March 2000)

This document in the most current version is available at http://holt.oso.chalmers.se/hgs/Oltidem_readme.html

The oltidem program generates ocean loading time-series from ocean loading coefficients files (*.blq) by orthotide admittance interpolation. A blq file can either be one with the conventional partial tides (M2 S2 ...) or one with orthoweights (A2 B2 C2 A1 B1 C1 ). The latter would normally include the long-period tides by conventional partial waves (Mf Mm Ssa).

Under the main program is a call to the central routine, subroutine Ocean_Load_Displacement. This is the only call needed to compute a time-series. The units are [mm] by default. You may be interested to call the routine from within your favourite program, rather than doing the work stand-alone.  The subroutine has an extensive comment part (p/olotidets.f)

The Ocean_Load_Displacement subroutine has two alternate modes,
(1) using the original set of 30 tides used by Richard Eanes ("short potential")
(2) using the degree-2 tides of the Tamura (1987) tide potential ("long potential")

An entry Ocean_Load_Displacement_Rate is provided for computation of displacement velocities. The call is otherwise indentical. The units are [mm/s] by default.
 

Install:

$ mkdir ~/tt
# put Oltidem-002.tar here and  ...
$ tar xfv Oltidem-002.tar
$ cd p
$ foreach file ( *.f )
foreach> fcs $file ttide
foreach> end
$ cd m
$ fcmd oltidem

This would install the executable in ~/tt/bin/oltidem
You might need to update fcmd in order to suit your system.
 

How to use the main procedure:
$ cd ~/tt
$ oltidem  -h

For online help the text is contained in file  ~/tt/oltidem.hlp

The main program contains two file path definitions. You might wish to update the procedure and hard-wire the file names. Check the statements marked  "! FILE".  For the original setup the following environment is required:

$ setenv TTIDE_HOME ~/tt

Locate site by name (full name must be given)
$ oltidem -F $MYFTP/oload/olcs37.blq -SS ONSALA -D 1998-01-01 -T 0.,1.,24 -X

Locate site by location
$ oltidem -F $MYFTP/oload/olcs37.blq -L 11.9,57.4 -D 1998-01-01 -T 0.,1.,24 -X

Output a long time-series to a file
$ oltidem -F $MYFTP/oload/olcs37.blq -L 11.9,57.4 -D 1998-01-01 -T 0.,1.,2400 -X -O file.tsf
 

How to use the subroutine:
Please read the comments in p/m/oltidem.f (main program) and in p/oltidtes.f (subroutine)
 

How to learn from the procedure to call the subroutine:
A prominent question may be how to call the subroutine Ocean_Load_Displacement

The critical, nonobvious parameters are the option strings
(1) to locate the station in the blq file
(2) to instruct the admittance subroutines

The actually used options are printed to the stdout-protocol ( <OcLoDi>>> ) if you run oltidem with the print option. The Main program will comment all calls to parameter setting subroutines on the protocol ( <Main-->>> Calling nn).

$ oltidem -F $MYFTP/oload/olcs37.blq -L 11.9,57.4 -D 1998-01-01 -T 0.,1.,24 -X -PP
 
 

Test output:
test.prt
There are two test sections included in this file. The first section has been generated with the first example that is given by

$ oltidem -h
$ oltidem -F $MYFTP/oload/olcs37.blq -L 11.9,57.4 -D 1998-01-01 -T 0.,1.,24 -XA+S 0.0001

i.e. using a reduced tide spectrum (amplitude criterion 0.0001). The second section is produced using the full spectrum

$ oltidem -F $MYFTP/oload/olcs37.blq -L 11.9,57.4 -D 1998-01-01 -T 0.,1.,24 -X

Directory
test/
contains a couple of results (protocols and short time series). The command that generated the data is shown in the first line of each file.

The test result of test/ONSALA_X.prt can be compared to the result of ttifm.out:

$ ttifm.out '>TEST>'
 > *.ins file (ttifm.ins)> $

using the following ttifm.ins section:

TEST>
   C can be compared to first example  oltidem -h
11 O /home/ftp/pub/hgs/oload/olcs37.blq
   Q
0.  '+O'     AMPMIN and THD_OPT
1998 01 01
1. 24
.337065868648251E+07  .711877028822924E+06 .534978686550997E+07 ONSA
' '              OL_OPT
'(f10.1,3p,3f10.2)'  FMTOUT
1998 01 01
-1 0 0
 

More examples:

Generate one partial tide only from the orthoweight loading coefficients, units in millimetres

# O1
$ oltidem -F $MYFTP/oload/orthocsr3.0.blq -a 0.1 -SS FORTA -D 1998-01-01 -T 0.,1.,24 -f'(f10.1,3f10.2)' -PP -N'[mm]'-I O1

# small semidiurnal tide eps2 is found only in the long potential
# (evidence: look at p/argofsy.f)
$ oltidem -F $MYFTP/oload/orthocsr3.0.blq -a 0.1 -SS FORTA -D 1998-01-01 -T 0.,1.,24 -f'(f10.1,3f10.2)' -PP -X'[mm]' -I eps2
#
# in the short potential its called "227"
# (evidence: look at p/csr_admit_bd.f)
$ oltidem -F $MYFTP/oload/orthocsr3.0.blq -a 0.1 -SS FORTA -D 1998-01-01 -T 0.,1.,24 -f'(f10.1,3f10.2)' -PP -N'[mm]' -I 227

# Mf
$ oltidem -F $MYFTP/oload/orthocsr3.0.blq -a 0.1 -SS FORTA -D 1998-01-01 -T 0.,1.,24 -f'(f10.1,3f10.2)' -PP -N'[mm]'-I Mf

# Msqm (works only with the long potential
$ bin/oltidem -F $MYFTP/oload/orthocsr3.0.blq -a 0.1 -SS FORTA -D 1998-01-01 -T 0.,1.,24 -f'(f10.1,3f10.2)' -PP -X'[mm]'-I Msqm


The oltidem help text, slightly honed:

 COMPUTE OCEAN LOAD DISPLACEMENTS FROM BLQ-TABLE

 Command line options:                                                     [default]
 -----------------------------------------------------------------------------------

 -F filename        - input file, OL coefficients, blq-style.
                                                           [$MYFTP/oload/olls27.blq]

 -O filename        - print time-series results to this file                [stdout]

 -f 'format'        - format for output.
                      You will need to quote the string in order to protect
                      the parenthesis from the shell                    ['(4f12.4)']

 -X'options'        - use Tamura's THD. Options are sent to Admitp_Opt   ['[mm]T:*']
                      See csr_admit_p.f for use.
                      Example: '-X+S+P > 0.001' for sparse mode, print,
                               select by strongest body tide amplitudes.
                      Alternative:
 -XA'options' value - set selection amplitude criterion to real value

 -N'options'        - send options to admit-proc. (short pot.)           ['[mm]T:*']

 -I symbol          - requests single-tide computation. Check for symbols
                      in p/argofsy.f if you use the long potential (-X)
                      or p/csr_admit_bd.f otherwise.

 Location of a site is either by -S or -L:
 -L[opt] x,y        - find closest site with respect to
                   x,y = longitude,latitutde (degrees)                     [none]
                      Use opt = :+P for diagnostic print. See getolrec.f
                      for more explanations.
 -a accuracy        - Location accuracy (degrees)                             [0.01]
                      [The default is set inside oltidets.f]

 -S[method][opt] name [monu]
                    - find by site name and monument code                 [method S]
                      Methods S M T U V  c.f. getolrec.f, "OPT"

                      Case -L (find closest): Option string 'C'//opt is passed
                      to Get_Ol_Rec (i.e. 'C' is issued already by the system
                      since this *is* how Get_Ol_Rec is set into this mode.

                      Case -S (site name):
                      Specify  -SM  to test only on monument code.
                      Add opt :+P  for extended protocol printing.

 -D date            - date in the form YYYY-MM-DD (i.e. no blanks)            [none]
 -T t0,dt,nt        - start time [h], interval [h], number of samples.
                      Specify without blanks                            [0.0,1.0,24]
                      Time is in hours from UTC 00:00:00 on given date.

 -P  -PP            - talkative ocean_load subr. / orthotide subr.
                      If -X is used, code -P after -X.

 -W {filename | - } - dump-file for ortho_tide_c_p subroutine
                      Specify a minus sign to use the default        [orthotide.dat]

 Example:
 oltidem.out -F $MYFTP/oload/olcs37.blq -L 11.9,57.4 -D 1998-01-01 -T 0.,1.,24 -XA+S 0.0001

 for 24 hourly samples, sparse method (0.0001 yields 388 waves) longitude 11.9,
 latitude 57.4 degrees

 oltidem.out -F $MYFTP/oload/olcs37.blq -S:+P WETTZELL -D 1998-01-01 -T 0.,1.,24 -X

 for site retrieval by name (with print option)

 Default unit is millimetre; use -N'[m]' or -X'[m]' to obtain metre.
 

.bye