← Previous → Next Contents

Girl feeding gulls

Customizing XTide

XTide is customized by changing its settings.  The most convenient way to do this is generally through the control panel that is documented in a previous section.  However, you can also change these settings in config.hh, in your X resources database, or on the command line.  The order of precedence, from least significant to most significant, is:

  1. config.hh
  2. Xdefaults (X resources)
  3. ~/.xtide.xml (control panel)
  4. command line

Note that only xtide (not xttpd or tide) reads Xdefaults.

Canonically, all command line settings take the form –xx value, with a space between the switch and the supplied value.  The yes-or-no settings get a value of "y" or "n".  However, starting with version 2.6, XTide understands the following syntactic shortcuts:

Some shorthand forms are ambiguous.  For example, –lw5 could mean "set the line width to 5" (–lw 5) or it could mean "load the location named w5" (–l w5).  If this happens, you will get an error and will need to spell out what you meant.

XTide*antialias
Anti-alias tide graphs on true color displays? (y/n)
Default: y
Command line: –aa
config.hh: antialias
.xtide.xml: <xtideoptions aa="y"/>
XTide*background
Background color for text windows and location chooser.
Default: white
Command line: –bg
config.hh: bgdefcolor
.xtide.xml: <xtideoptions bg="white"/>
XTide*buttoncolor
Background color of buttons.
Default: gray80
Command line: –bc
config.hh: buttondefcolor
.xtide.xml: <xtideoptions bc="gray80"/>
XTide*cbuttons
Create tide clocks with buttons? (y/n)
Default: n
Command line: –cb
config.hh: cbuttons
.xtide.xml: <xtideoptions cb="n"/>
XTide*cwidth
Initial width for tide clocks.  Note:  Initial clock height is the same as initial graph height (XTide*gheight).
Default: 84
Command line: –cw
config.hh: defcwidth
.xtide.xml: <xtideoptions cw="84"/>
XTide*datefmt
Strftime style format string for printing dates.
Default: %Y-%m-%d
Command line: –df
config.hh: datefmt
.xtide.xml: <xtideoptions df="%Y-%m-%d"/>
XTide*datumcolor
Color of datum line in tide graphs. [*]
Default: white
Command line: –Dc
config.hh: datumdefcolor
.xtide.xml: <xtideoptions Dc="white"/>
XTide*daycolor
Daytime background color in tide graphs.
Default: SkyBlue
Command line: –dc
config.hh: daydefcolor
.xtide.xml: <xtideoptions dc="SkyBlue"/>
XTide*ebbcolor
Foreground in tide graphs during outgoing tide.
Default: SeaGreen
Command line: –ec
config.hh: ebbdefcolor
.xtide.xml: <xtideoptions ec="SeaGreen"/>
XTide*eventmask
Events to suppress (p = phase of moon, S = sunrise, s = sunset, M = moonrise, m = moonset), or x to suppress none.  E.g, to suppress all sun and moon events, set eventmask to the value pSsMm.
Default: x
Command line: –em
config.hh: eventmask
.xtide.xml: <xtideoptions em="x"/>
XTide*extralines
Draw datum and middle-level lines in tide graphs? (y/n) [*]
Default: n
Command line: –el
config.hh: extralines
.xtide.xml: <xtideoptions el="n"/>
XTide*flatearth
Prefer flat map to round globe location chooser? (y/n)
Default: n
Command line: –fe
config.hh: flatearth
.xtide.xml: <xtideoptions fe="n"/>
XTide*floodcolor
Foreground in tide graphs during incoming tide.
Default: Blue
Command line: –fc
config.hh: flooddefcolor
.xtide.xml: <xtideoptions fc="Blue"/>
XTide*font
Font used for button labels and verbiage in text windows.
Default: as incoming from X11
Command line: –fn
config.hh: N/A
.xtide.xml: N/A
XTide*foreground
Color of text and other notations.
Default: black
Command line: –fg
config.hh: fgdefcolor
.xtide.xml: <xtideoptions fg="black"/>
XTide*gaspect
Initial aspect for tide graphs.
Default: 1.0
Command line: –ga
config.hh: defgaspect
.xtide.xml: <xtideoptions ga="1.0"/>
XTide*gheight
Initial height for tide graphs and clocks.
Default: 312
Command line: –gh
config.hh: defgheight
.xtide.xml: <xtideoptions gh="312"/>
XTide*globelongitude
Initial center longitude for location chooser.
Valid values: –180 –150 –120 –90 –60 –30 0 30 60 90 120 150 360
360 will pick the longitude with the most tide stations.
Default: 360
Command line: –gl
config.hh: defgl
.xtide.xml: <xtideoptions gl="360"/>
XTide*graphtenths
Label tenths of units in tide graphs? (y/n)
Default: n
Command line: –gt
config.hh: graphtenths
.xtide.xml: <xtideoptions gt="n"/>
XTide*gwidth
Initial width for tide graphs.
Default: 960
Command line: –gw
config.hh: defgwidth
.xtide.xml: <xtideoptions gw="960"/>
XTide*hourfmt
Strftime style format string for printing hour labels on time axis.
Default: %l
Command line: –hf
config.hh: hourfmt
.xtide.xml: <xtideoptions hf="%l"/>
XTide*infer
Use inferred values for some constituents.  For expert use only.
Default: n
Command line: –in
config.hh: infer
.xtide.xml: <xtideoptions in="n"/>
XTide*lwidth
Width for lines in tide graphs with nofill.
Default: 2.5
Command line: –lw
config.hh: deflwidth
.xtide.xml: <xtideoptions lw="2.5"/>
XTide*markcolor
Color of mark line in graphs and of location dots on the spinning globe.
Default: red
Command line: –mc
config.hh: markdefcolor
.xtide.xml: <xtideoptions mc="red"/>
XTide*mslcolor
Color of middle-level line in tide graphs. [*]
Default: yellow
Command line: –Mc
config.hh: msldefcolor
.xtide.xml: <xtideoptions Mc="yellow"/>
XTide*nightcolor
Nighttime background color in tide graphs.
Default: DeepSkyBlue
Command line: –nc
config.hh: nightdefcolor
.xtide.xml: <xtideoptions nc="DeepSkyBlue"/>
XTide*nofill
Draw tide graphs as line graphs? (y/n)
Default: n
Command line: –nf
config.hh: nofill
.xtide.xml: <xtideoptions nf="n"/>
XTide*nosunmoon
Deprecated.  Use eventmask instead.
Default: n
Command line: –ns
config.hh: N/A (use eventmask)
.xtide.xml: <xtideoptions ns="n"/>
XTide*pageheight
Nominal length of paper in LaTeX output (mm). This need not match your actual paper; use "Shrink oversized pages" in print options.
Default: 420
Command line: –ph
config.hh: defpageheight
.xtide.xml: <xtideoptions ph="420"/>
XTide*pagemargin
Nominal width of top, bottom, left and right margins in LaTeX output (mm). Actual width will depend on print scaling.
Default: 10
Command line: –pm
config.hh: defpagemargin
.xtide.xml: <xtideoptions pm="10"/>
XTide*pagewidth
Nominal width of paper in LaTeX output (mm). This need not match your actual paper; use "Shrink oversized pages" in print options.
Default: 297
Command line: –pw
config.hh: defpagewidth
.xtide.xml: <xtideoptions pw="297"/>
XTide*timefmt
Strftime style format string for printing times.
Default: %l:%M %p %Z
Command line: –tf
config.hh: timefmt
.xtide.xml: <xtideoptions tf="%l:%M %p %Z"/>
XTide*toplines
Draw depth lines on top of tide graph? (y/n)
Default: n
Command line: –tl
config.hh: toplines
.xtide.xml: <xtideoptions tl="n"/>
XTide*ttyheight
Height of ASCII graphs and clocks (characters).
Default: 24
Command line: –th
config.hh: defttyheight
.xtide.xml: <xtideoptions th="24"/>
XTide*ttywidth
Width of ASCII graphs, clocks, banners, and calendars (characters).
Default: 79
Command line: –tw
config.hh: defttywidth
.xtide.xml: <xtideoptions tw="79"/>
XTide*units
Preferred units of length: ft, m, or x (no preference).
Default: x
Command line: –u
config.hh: prefunits
.xtide.xml: <xtideoptions u="x"/>
XTide*zulu
Coerce all time zones to UTC? (y/n)
Default: n
Command line: –z
config.hh: forceZuluTime (XTide 2.9+) or zulu (previously)
.xtide.xml: <xtideoptions z="n"/>

[*] The National Ocean Service (NOS) defines both Mean Sea Level (MSL) and Mean Tide Level (MTL) in terms of averages taken over observations.  The middle-level line is drawn at the midpoint of the theoretical tidal range, which usually corresponds to the mathematical mean level of the predictions.  This approximates both MSL and MTL, but, strictly speaking, is equivalent to neither.  Moreover, subordinate station offsets may shift the actual mean so that it no longer falls at the midpoint of the tidal range.  The datum line is drawn at the zero level of the predictions, which usually corresponds to the station's benchmark, but this too can be rendered inaccurate by subordinate station offsets.

Format of ~/.xtide.xml

If you have compiled the interactive client (xtide), then you do not need to worry about ~/.xtide.xml at all, because the control panel will configure it for you automatically.

In the event that you cannot use xtide but still need to make some settings for the command line client, use the example below as the starting point for your ~/.xtide.xml file.  This example just sets the TTY geometry.  You can add more settings by adding more attributes (like the tw and th attributes shown here) to the xtideoptions entity.  The attributes that are recognized for each setting are documented above.

<?xml version="1.0"?>
<xtideoptions tw="79" th="24"/>

← Previous → Next Contents