urtipgt - predicting tides

run_urtip - a wrapper shell

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

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

run_urtip is found in ~/TD; it has help-text


The ins-file

Urtap wavegroup example:

cd ~/tap/t
 
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


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.


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
 cause       - char*3 - TGP or SRT
 iun         - output file unit (ASCII, YYYY MM DD hh mm ss and format
               is still fixed - we might need an update for dt < 1s

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

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

               date(3) - integer - yyyy,mm,dd
               hms(4)  - integer - hh,mm,ss,fff


 nout,dt     - length and rate[1/h] of output.
             
 tscale      - rate = dt/tscale [1.0d0 = 1 hour]
 
 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]

 zfacl2      - effective factor on Love no. l in NDR-combination [(6,0)]

 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. 
 
 wadd        - wadd>0 AND open file on unit 22 - a stub
               See ~/TD/run_urtip how to control tide synth using a
               template ts-file.
 ... even the mode d'employ is a stub, sorry

 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. 

 msglevel    - In the time-series part, diagnostic printing is in effect
               with a low level number.
               0 - most excessive printing
               3 - no printing


 *)
 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'
 

The wrapper script run_urtip

USAGE:
          run_urtip [options] [ts-file]
 
PURPOSE:
 
          OBS!!!   Presently this script runs urtipgt
 
          Compute tide predictions from a table
          in the time-series form exactly equivalent
          to the specified ts-file (t0, dt, epoch, length)
          The ts-file will be mentioned as the model file
          or template file.
 
          The table is prepared by urtap (.trs, unit 13),
          default file name t/urtap.trs
 
          The output is found in t/pt.tsf by default.
          ASCII -> BIN:
          tslist o/pt.tsf -gi4,5i3,t33,d18.0 -k3 -r#rate
          (the -r#rate option might be needed if the
          auto-detect rate is not precise).

          If no ts-file is given, use the -E option.
          A sequence of set-commands typically comprises
          set date=2012,10,25 
          set hms=0,0,0  
          set dt=1.     
          set tscale=60.
          set nout=1440
          in order to define the runtime parameters.

OPTIONS:
There are more options set up in the script than those described here (namely -a -c )

  -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]
  -OL label   - First substring of label for mc-output.     [GRAV]

  -GR [label] - Compute residual w.r.t. model ts-file
               
If mc-output is in effect, supply a label   [GRAV]
                (the second substring of the labels will
                be VAL and RESID, respectively).
 
  -PM         - add polar motion                           [don't]
  -LL         - 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.
 
  -s scale    - rescale the output                         [1.0d0]
  -s u        - unscale the output (1/calfactor)
  -u          - unscale the output (1/calfactor)
 
  -dudt       - compute the time-derivative of the effect
 
EXAMPLES:
Simply add a column of predictions to an mc-file with gravity observations
   run_urtip -t t/nodal-only.trs -BM d/gnt${begd}-OPNEND-1h.ts d/g${begd}-OPNEND-1h.mc

  run_urtip -C $cmd -l daily-resid.pt.ts.log $pm -BM $odir/${ft}_${theme}_${fd}-1s.mc $odir/${ft}_${theme}_${fd}-1s.mc

.bye