urtipgt - predicting tides from an urtap solution

run_urtip - a wrapper script (csh)

urtipgt.f  is a Fortran program. It is controlled with an instruction file, urtip.ins, and it needs a file containing a response spectrum.
The most straight-forward response file is found in the output of urtapt, file unit 13, typically named urtap.trs
It is also possible to compose a trs-file from a table of delta factors and station-specific data.

Two modes are distinguished concerning the output. With a regular sampling interval or using a time-tie file as input.

If you want a theoretical tide series, use urtapt's
.pt.ts file.

urtipgt.f is found in ~/tap/t/m with subroutines in ~/tap/t/p

run_urtip is found in ~/TD; it has help-text (switch -h).

USAGE:
   with a template time series file:

         run_urtip [options] ts-file

 
produces a series of predicted tides equivalent in date range and sampling interval
 to the ts-file. It must be a bin-ts file (is there a label option?)

 OPTIONS:
  -e          - test run, the instruction input to urtip is shown.
 
  -l logfile  - log the conversion (with editing) ASC to BIN
 
  -C prog     - the program name for predicting          [urtipgt]
 
  -E src      - If no ts-file is specified, source src file to
                set the runtime parameters.          [./urtip.env]
 
  -t table    - the table file                       [t/urtap.trs]
 
  -o output   - the output file (ASCII)                 [o/pt.tsf]
                 "    "      "  (BIN) accordingly:
                                      extension .ts      [o/pt.ts]
 
  -PM         - add polar motion                           [don't]
  -LL lon,lat - longitude,latitude for PM calculation  [11.9,57.6]
 
  -b          - produce ASCII and BIN file            [ASCII only]
  -B          - Retain only BIN file
  -bm         - like -b, produce GRAV|PRED column
                in MC-file, however
  -BM         - like -bm, retain only BIN file, however
  -rmc        - remove MC-file first                       [don't]
 
  -s scale    - rescale the output                         [1.0d0]
  -s u        - unscale the output (1/calfactor)
  -u          - unscale the output (1/calfactor)
 
  -prf fs,dt[s],trg
              - remove the distortion of the decimation filter,
                file name fs, dt the sampling interval BEFORE the
                last stage (append s for seconds, default is hours),
                and trg the target string to locate the
                filter coefficients (use flist -s'*' filename
                to get a list in an fs-file with many filters).
                                                           [don't]
 
  -besselprf n,f
              - remove the distortion of the GGP filter
                n is the filter order (usually 8) and
                f the corner frequency in Hz (usually 0.0174)
                                                           [don't]
 
  -dudt       - compute the time-derivative of the effect
 
  -fjd        - print the Julian date proper in output       [MJD]
 

The ins-file

Produce an ins-file using run_urtip -e ...

Urtap wavegroup example:
 
U>
13 R t/urtap.trs
31 B o/pt.tsf
   Q
 &param
 date=2014,11,09, hms=00,00,00
 dt=1.0000000E+00, tscale=3600.
 iun=31
 qdudt=.false.
 nout=50700
 &end

Delta-parameters example
D>
13 R t/delta.trs
31 B o/pt.tsf
   Q
 &param
 date=2009,7,1, hms=00,00,00,00
 dt=1.0000000E+00, tscale=1.
 iun=31
 qdudt=.false.
 nout=47000
 locstr='Delta'
 msglevel=0
 &end

Time tie with Julian dates:
13 R ~/Ttide/SCG/tt/g090615-OPNEND-1h-wspl-ochy.trs
38 R tmp/${CAMPAIGN}.ttie
31 B o/${CAMPAIGN}.pt.tsf
   Q
 &param
 date=0,0,0, hms=0,0,0
 iutt=38
 qymdhms_tt=.false.
 dt=1.0d0, tscale=1.d0
 
qdudt=.false.
 
iun=31
 
nout=-1
 &end


The trs-file:

 Note that the coefficients are with respect to the tide-generating
 potential (NDR spectrum can be applied for a number of Love-number
 schemes); however, a gravimetric delta factor option is not available.
 The coefficients may be rescaled; the CALFACTOR in the trs-file, however,
 is ignored (it's only a comment from urtap's side).

 An alternative is to specify delta factors in the same way as tabled
 in Absolute Gravity g-soft project files. 


 There are two examples in ~/tap/t/t
    tap/t/t/urtap.trs   - Wavegroups as urtapt produces them

    tap/t/t/delta.trs   - Delta factors from an Absolute gravity project file.

 Including the M0S0 tide:
 In the namelist &param, include
    qm0s0=.true.
 which is effectuated with command line option -M0S0
 
The trs-file must contain
 (2,0,0,0,0,0,*)                  =     M0S0    1 ; -3077.55 0.0
 Here,
the amplitude value is for gravity; it corresponds to delta=0.0
 (astronomical effect only).

Other important features:

 The DUT leap seconds are processed. If you convert the ASCII output
 with tslist, use the -TLS option  or  setenv TSLIST_LEAPS YES

 Pre-filter (*_prf) parameters can be used if a prediction is to match a downsampled
 or filtered
series of observations. 
 

 
Namelist parameters:

    character parameters are indicated with `- char*n -ยด
    logical parameters start with q
    complex*16 parameters start with z
    integer parameters start with a character in [i-n]
    else: real*8 unless expressly declared.

 nc          - not used
 qspec,wadd  - stubs or experiments; don't use in regular jobs!
 wadd        - wadd>0 AND open file on unit 22:
               See ~/TD/run_urtip how to control tide synth using a
               template ts-file.
              
Issue run_urtip -h

 trgw,fmtw,w_mrs,khmsw,dtw,tw,itzw
             - parameters to open a file on unit 22 and process it
               with read_fuf
               Defaults: 'BIN','U',-9999.9d0,1,0.0d0,0.0d0,0
 

 cause       - char*3 - TGP or SRT
 qdudt       - logical - if .true., compute the time derivative

 iun         - output file unit (ASCII, YYYY MM DD hh mm ss and format

               is still fixed - we might need an update for dt < 1s

 qm0s0       - if .true. includes the M0S0 tide. Default = .false.

 usecal      - output calibration factor, default=1.0. See q_volt!

 thd_file    - harmonic tide potential (Tamura). Default='/home/hgs/tap/d/etcpot.dat'
 utc_file    - leap seconds. Default='
/home/hgs/tap/d/ttutcf.dat'
               To keep it up-to-date this file must be maintained manually!

 date(3),hms(4),t0  
             - start time = date + t0[h] or date+hms if hms(1) > -1

               date(3) - integer - yyyy,mm,dd
               hms(4)  - integer - hh,mm,ss,fff
 nout,dt     - length and rate [h] of output.
 
qmodelf     - if .true., use file opened on unit 22 to obtain the
               parameters above.
               Parameters that must have been set to special values
               in the namelist block:
               (hms(1) < 1 and date(1) < 1) or t0 > 9999.9
             
 tscale      - rate = dt/tscale [1.0d0 = 1 hour]
 
 qleapsecs   - if .true., take account of leap seconds, which is the default.
               OBS! If tslist is going to convert o/pt.tsf and leap seconds
               are ignored there, gaps will appear - unless there's a bug.

 
 iutt        - as an alternative to timing above, read a time tie
               from file unit iutt
               List-directed format, YY MM DD [hh mm ss ff] or
               Julian dates if ...
 qymdhms_tt  - logical - is not .true.

 iujtt       - time-tie is taken from am MC-BIN-file with Julian dates
               in the first column; it ought to be labeled.
               Program will add an MC-column to this file,
               labeled 'GRAV________PRED' (needs an option to make
               label user-controlled).

 zfacl2      - effective factor on Love no. l in NDR-combination for
               strain, default (6.0,0.0).


 qua_ndr,fre_ndr
             - NDR parameters, quality factor and resonance frequency
               [2760.d0,435.d0]

 cfc         - char*9 - core model, see ~/tap/p/ndrfs.f for applicable strings.

 q_abs       - the trs-file contains absolute in-phase,cross-phase
               coefficients. Standard is factors w.r.t. tide potential.

 q_volt      - .true.: If trs-file contains a CALFACTOR record,
                   divide the output by the calfactor. The function
                   of this option is, if the tide analysis has been
                   done on a time series in units of nm/s^2
                   then this procedure will generate the corresponding
                   predictions in the original "Volt" units.
                   The factor for the output is usecal/calfactor

 q_ocean     - (under q_abs=.true.) ... oceanographer's phase convention
               (c.conjugation is applied to the input.
               See *) below.)

 iun_trs     - file unit for trs-file
 locstr      - char*64 - location string, needed if iun_trs is 4 = ins-file, since
               the trs-file is rewound before reading.
 
               locstr='WAVE GROUPS' scans for such a line heading the
                      wave groups segment. An empty locstr will skip the
                      search of a wave group header line.

          
              
locstr='Delta' signals that a file section with delta factors
                      is to be read. 
 

 iun_prf, trg_prf, dt_prf, o_prf, thresh_prf
               - Pre-filter declaration.
                 Subroutine GETFS is found in ~/sas/p/filterios.f
                 In effect only if iun_prf > 0
    thresh_prf - An amplitude threshold to restrict printing to the greatest
                 tide constituents.
       trg_prf - char*64 - location target in the filter file. Can be ' ' if
                 there is only one set of filter coefficients.
         o_prg - char*8 - option string to GETFS.
        dt_prf - The sampling interval of the series on which the filter
                 was originally applied.

 f9003       - output format, default '(i4,5i3.2,i4.3,1x,f12.6,1p,e18.10)'  
 qfjd        - if .true., write out the full Julian date. Default is MJD,
               always in double precision floating point. A f12.6 in f9003
               is automatically replaced with f15.6.
 khms        - the width of hms (hours,minutes,seconds,milliseconds),
               default is 4. If changed, f9003 must be changed.
               (One day we'll make this automatic, but there's little need,
               and the program's speed would suffer. )    


 msglevel    - In the time-series part, diagnostic printing is in effect
               with a low level number.
               0 - most excessive printing
               3 - no printing
               You can set this parameter in the runtime environment:
              
setenv URTIP_MSGLEVEL msglevel 

 maxmiss     - print missing tides, those that escape the trs-wavegroup setup.
               Default is all [1200].
               You can set this parameter in the runtime environment:
              
setenv SYNTHB_MAXMISS maxmiss
 
 modprt      - Monitor the tide synthesis at every time step i for which
               MOD(i,modprt)=0  [1000]

               You can set this parameter in the runtime environment:
              
setenv URTIP_MODPRT modprt  
 

 *)
 You have cos and sin components from a tide gauge and want to compute
 a time series of ocean tide height.
 You need the wavegroup setup corresponding to the analysis' tide band setup
 e.g.
 (2,2,-2,*)                       =     2N2   452 ; #cos #sin
 (2,2,-2,0,2,*)                   =     2N2   452 ; #cos #sin
 (first line for a minimum resolution, second for a high resolution)
 etc etc
 Use core model (cfc) 'OT_EFFEC'