               XTide:  Harmonic tide clock and tide predictor

                             San Francisco graph

Preface

   Welcome to the verbose documentation for XTide 2.  If you are reading
   this as a text file, please be aware that the text was extracted from
   the illustrated HTML version of the documentation that resides at
   [1]https://flaterco.com/xtide/.  The web version may also be more
   up-to-date than what you are reading.
     __________________________________________________________________

    THE XTIDE SOFTWARE DISTRIBUTION IS AVAILABLE FROM:
    [2]https://flaterco.com/xtide/files.html
     __________________________________________________________________

   [3]Buoy in the mist

Contents

     * [4]License and disclaimer ("NOT FOR NAVIGATION," "ABSOLUTELY NO
       WARRANTY")
     * Verbose documentation
          + [5]Introduction
          + [6]System requirements
          + [7]Installation instructions for supported platforms
          + [8]Available ports for unsupported platforms
          + [9]Modes and formats
          + [10]Using the interactive interface
          + [11]Advanced usage
          + [12]Using the command line interface
          + [13]Running the web server
          + [14]Customizing XTide
          + [15]What to do if your location isn't listed
          + [16]Quirks, limitations, and bugs
          + [17]FAQ
          + [18]Design notes
          + [19]Credits
          + [20]Bibliography
          + [21]Appendix A -- Historical predictions and Y2038 compliance
          + [22]Appendix B -- Application of offsets for Min Flood and Min
            Ebb events
          + [23]Appendix C -- Making calendars fit onto a single page
     * Short attention span documentation for experienced XTide users
          + [24]Differences from XTide 1
          + [25]Quick install instructions
          + [26]Change log
          + [27]News (current XTide developments)

   The XTide software distribution resides at
   [28]https://flaterco.com/xtide/files.html.

   Hint:  If you have no idea what all this is about, try reading the
   [29]FAQ first.

   -- David Flater (dave@flaterco.com)

References

   1. https://flaterco.com/xtide/
   2. https://flaterco.com/xtide/files.html
   3. https://flaterco.com/
   4. https://flaterco.com/xtide/disclaimer.html
   5. https://flaterco.com/xtide/introduction.html
   6. https://flaterco.com/xtide/sysreq.html
   7. https://flaterco.com/xtide/installation.html
   8. https://flaterco.com/xtide/ports.html
   9. https://flaterco.com/xtide/modes.html
  10. https://flaterco.com/xtide/interactive.html
  11. https://flaterco.com/xtide/advanced.html
  12. https://flaterco.com/xtide/tty.html
  13. https://flaterco.com/xtide/xttpd.html
  14. https://flaterco.com/xtide/settings.html
  15. https://flaterco.com/xtide/harmonics.html
  16. https://flaterco.com/xtide/bugs.html
  17. https://flaterco.com/xtide/faq.html
  18. https://flaterco.com/xtide/design.html
  19. https://flaterco.com/xtide/credits.html
  20. https://flaterco.com/xtide/bibliography.html
  21. https://flaterco.com/xtide/time_t.html
  22. https://flaterco.com/xtide/mincurrents.html
  23. https://flaterco.com/xtide/pound_to_fit.html
  24. https://flaterco.com/xtide/xtide1diff.html
  25. https://flaterco.com/xtide/quickinst.html
  26. https://flaterco.com/xtide/changelog.html
  27. https://flaterco.com/xtide/news.html
  28. https://flaterco.com/xtide/files.html
  29. https://flaterco.com/xtide/faq.html

################################################################

   [1]-> Next [2]Contents

Icon License and disclaimer

   NOTE.  The license and disclaimer appearing below applies to the XTide
   program itself.  For information about permissions on the harmonic
   constants, see [3]https://flaterco.com/xtide/harmonics_boilerplate.txt.

                    XTide 2 Copyright  1998 David Flater

   This software is provided under the terms of the GNU General Public
   License, either version 3 of the License, or (at your option) any later
   version.

   Although the package as a whole is GPL, some individual source files
   are public domain.  Consult their header comments for details.

                             NOT FOR NAVIGATION

   This program is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  The author
   assumes no liability for damages arising from use of this program OR of
   any 'harmonics data' that might be distributed with it.  For details,
   see the appended GNU General Public License.

   (Accurate tide predictions can only be made if the 'harmonics data' for
   the relevant location are good.  Unfortunately, the only way the
   maintainer of those data has of knowing when they are bad is when
   someone with access to authoritative tide predictions or observations
   reports a problem.  You should not use this program or any data files
   that might be distributed with it if anyone or anything could come to
   harm as a result of an incorrect tide prediction.  NOAA and similar
   agencies in other countries can provide you with certified tide
   predictions if that is what you need.)

   XTide's predictions do not incorporate the effects of tropical storms,
   El Nio, seismic events, subsidence, uplift, or changes in global sea
   level.
     __________________________________________________________________

   The tide prediction algorithm used in this program was developed with
   United States Government funding, so no proprietary rights can be
   attached to it.  For more information, refer to the following
   publications:

     Manual of Harmonic Analysis and Prediction of Tides.  Special
     Publication No. 98, Revised (1940) Edition (reprinted 1958 with
     corrections; reprinted again 1994).  United States Government
     Printing Office, 1994.

     Computer Applications to Tides in the National Ocean Survey.
     Supplement to Manual of Harmonic Analysis and Prediction of Tides
     (Special Publication No. 98).  National Ocean Service, National
     Oceanic and Atmospheric Administration, U.S. Department of Commerce,
     January 1982.
     __________________________________________________________________

  GNU GENERAL PUBLIC LICENSE

   Version 3, 29 June 2007

   Copyright (C) 2007 Free Software Foundation, Inc. <[4]http://fsf.org/>

   Everyone is permitted to copy and distribute verbatim copies of this
   license document, but changing it is not allowed.

  Preamble

   The GNU General Public License is a free, copyleft license for software
   and other kinds of works.

   The licenses for most software and other practical works are designed
   to take away your freedom to share and change the works.  By contrast,
   the GNU General Public License is intended to guarantee your freedom to
   share and change all versions of a program--to make sure it remains
   free software for all its users.  We, the Free Software Foundation, use
   the GNU General Public License for most of our software; it applies
   also to any other work released this way by its authors.  You can apply
   it to your programs, too.

   When we speak of free software, we are referring to freedom, not
   price.  Our General Public Licenses are designed to make sure that you
   have the freedom to distribute copies of free software (and charge for
   them if you wish), that you receive source code or can get it if you
   want it, that you can change the software or use pieces of it in new
   free programs, and that you know you can do these things.

   To protect your rights, we need to prevent others from denying you
   these rights or asking you to surrender the rights.  Therefore, you
   have certain responsibilities if you distribute copies of the software,
   or if you modify it:  responsibilities to respect the freedom of
   others.

   For example, if you distribute copies of such a program, whether gratis
   or for a fee, you must pass on to the recipients the same freedoms that
   you received.  You must make sure that they, too, receive or can get
   the source code.  And you must show them these terms so they know their
   rights.

   Developers that use the GNU GPL protect your rights with two steps:
   (1) assert copyright on the software, and (2) offer you this License
   giving you legal permission to copy, distribute and/or modify it.

   For the developers' and authors' protection, the GPL clearly explains
   that there is no warranty for this free software.  For both users' and
   authors' sake, the GPL requires that modified versions be marked as
   changed, so that their problems will not be attributed erroneously to
   authors of previous versions.

   Some devices are designed to deny users access to install or run
   modified versions of the software inside them, although the
   manufacturer can do so.  This is fundamentally incompatible with the
   aim of protecting users' freedom to change the software.  The
   systematic pattern of such abuse occurs in the area of products for
   individuals to use, which is precisely where it is most unacceptable.
   Therefore, we have designed this version of the GPL to prohibit the
   practice for those products.  If such problems arise substantially in
   other domains, we stand ready to extend this provision to those domains
   in future versions of the GPL, as needed to protect the freedom of
   users.

   Finally, every program is threatened constantly by software patents.
   States should not allow patents to restrict development and use of
   software on general-purpose computers, but in those that do, we wish to
   avoid the special danger that patents applied to a free program could
   make it effectively proprietary.  To prevent this, the GPL assures that
   patents cannot be used to render the program non-free.

   The precise terms and conditions for copying, distribution and
   modification follow.

  TERMS AND CONDITIONS

    0. Definitions.

   "This License" refers to version 3 of the GNU General Public License.

   "Copyright" also means copyright-like laws that apply to other kinds of
   works, such as semiconductor masks.

   "The Program" refers to any copyrightable work licensed under this
   License.  Each licensee is addressed as "you".  "Licensees" and
   "recipients" may be individuals or organizations.

   To "modify" a work means to copy from or adapt all or part of the work
   in a fashion requiring copyright permission, other than the making of
   an exact copy.  The resulting work is called a "modified version" of
   the earlier work or a work "based on" the earlier work.

   A "covered work" means either the unmodified Program or a work based on
   the Program.

   To "propagate" a work means to do anything with it that, without
   permission, would make you directly or secondarily liable for
   infringement under applicable copyright law, except executing it on a
   computer or modifying a private copy.  Propagation includes copying,
   distribution (with or without modification), making available to the
   public, and in some countries other activities as well.

   To "convey" a work means any kind of propagation that enables other
   parties to make or receive copies.  Mere interaction with a user
   through a computer network, with no transfer of a copy, is not
   conveying.

   An interactive user interface displays "Appropriate Legal Notices" to
   the extent that it includes a convenient and prominently visible
   feature that (1) displays an appropriate copyright notice, and (2)
   tells the user that there is no warranty for the work (except to the
   extent that warranties are provided), that licensees may convey the
   work under this License, and how to view a copy of this License.  If
   the interface presents a list of user commands or options, such as a
   menu, a prominent item in the list meets this criterion.

    1. Source Code.

   The "source code" for a work means the preferred form of the work for
   making modifications to it.  "Object code" means any non-source form of
   a work.

   A "Standard Interface" means an interface that either is an official
   standard defined by a recognized standards body, or, in the case of
   interfaces specified for a particular programming language, one that is
   widely used among developers working in that language.

   The "System Libraries" of an executable work include anything, other
   than the work as a whole, that (a) is included in the normal form of
   packaging a Major Component, but which is not part of that Major
   Component, and (b) serves only to enable use of the work with that
   Major Component, or to implement a Standard Interface for which an
   implementation is available to the public in source code form.  A
   "Major Component", in this context, means a major essential component
   (kernel, window system, and so on) of the specific operating system (if
   any) on which the executable work runs, or a compiler used to produce
   the work, or an object code interpreter used to run it.

   The "Corresponding Source" for a work in object code form means all the
   source code needed to generate, install, and (for an executable work)
   run the object code and to modify the work, including scripts to
   control those activities.  However, it does not include the work's
   System Libraries, or general-purpose tools or generally available free
   programs which are used unmodified in performing those activities but
   which are not part of the work.  For example, Corresponding Source
   includes interface definition files associated with source files for
   the work, and the source code for shared libraries and dynamically
   linked subprograms that the work is specifically designed to require,
   such as by intimate data communication or control flow between those
   subprograms and other parts of the work.

   The Corresponding Source need not include anything that users can
   regenerate automatically from other parts of the Corresponding Source.

   The Corresponding Source for a work in source code form is that same
   work.

    2. Basic Permissions.

   All rights granted under this License are granted for the term of
   copyright on the Program, and are irrevocable provided the stated
   conditions are met.  This License explicitly affirms your unlimited
   permission to run the unmodified Program.  The output from running a
   covered work is covered by this License only if the output, given its
   content, constitutes a covered work.  This License acknowledges your
   rights of fair use or other equivalent, as provided by copyright law.

   You may make, run and propagate covered works that you do not convey,
   without conditions so long as your license otherwise remains in force.
   You may convey covered works to others for the sole purpose of having
   them make modifications exclusively for you, or provide you with
   facilities for running those works, provided that you comply with the
   terms of this License in conveying all material for which you do not
   control copyright.  Those thus making or running the covered works for
   you must do so exclusively on your behalf, under your direction and
   control, on terms that prohibit them from making any copies of your
   copyrighted material outside their relationship with you.

   Conveying under any other circumstances is permitted solely under the
   conditions stated below.  Sublicensing is not allowed; section 10 makes
   it unnecessary.

    3. Protecting Users' Legal Rights From Anti-Circumvention Law.

   No covered work shall be deemed part of an effective technological
   measure under any applicable law fulfilling obligations under article
   11 of the WIPO copyright treaty adopted on 20 December 1996, or similar
   laws prohibiting or restricting circumvention of such measures.

   When you convey a covered work, you waive any legal power to forbid
   circumvention of technological measures to the extent such
   circumvention is effected by exercising rights under this License with
   respect to the covered work, and you disclaim any intention to limit
   operation or modification of the work as a means of enforcing, against
   the work's users, your or third parties' legal rights to forbid
   circumvention of technological measures.

    4. Conveying Verbatim Copies.

   You may convey verbatim copies of the Program's source code as you
   receive it, in any medium, provided that you conspicuously and
   appropriately publish on each copy an appropriate copyright notice;
   keep intact all notices stating that this License and any
   non-permissive terms added in accord with section 7 apply to the code;
   keep intact all notices of the absence of any warranty; and give all
   recipients a copy of this License along with the Program.

   You may charge any price or no price for each copy that you convey, and
   you may offer support or warranty protection for a fee.

    5. Conveying Modified Source Versions.

   You may convey a work based on the Program, or the modifications to
   produce it from the Program, in the form of source code under the terms
   of section 4, provided that you also meet all of these conditions:
     * a)  The work must carry prominent notices stating that you modified
       it, and giving a relevant date.
     * b)  The work must carry prominent notices stating that it is
       released under this License and any conditions added under section
       7.  This requirement modifies the requirement in section 4 to "keep
       intact all notices".
     * c)  You must license the entire work, as a whole, under this
       License to anyone who comes into possession of a copy.  This
       License will therefore apply, along with any applicable section 7
       additional terms, to the whole of the work, and all its parts,
       regardless of how they are packaged.  This License gives no
       permission to license the work in any other way, but it does not
       invalidate such permission if you have separately received it.
     * d)  If the work has interactive user interfaces, each must display
       Appropriate Legal Notices; however, if the Program has interactive
       interfaces that do not display Appropriate Legal Notices, your work
       need not make them do so.

   A compilation of a covered work with other separate and independent
   works, which are not by their nature extensions of the covered work,
   and which are not combined with it such as to form a larger program, in
   or on a volume of a storage or distribution medium, is called an
   "aggregate" if the compilation and its resulting copyright are not used
   to limit the access or legal rights of the compilation's users beyond
   what the individual works permit.  Inclusion of a covered work in an
   aggregate does not cause this License to apply to the other parts of
   the aggregate.

    6. Conveying Non-Source Forms.

   You may convey a covered work in object code form under the terms of
   sections 4 and 5, provided that you also convey the machine-readable
   Corresponding Source under the terms of this License, in one of these
   ways:
     * a)  Convey the object code in, or embodied in, a physical product
       (including a physical distribution medium), accompanied by the
       Corresponding Source fixed on a durable physical medium customarily
       used for software interchange.
     * b)  Convey the object code in, or embodied in, a physical product
       (including a physical distribution medium), accompanied by a
       written offer, valid for at least three years and valid for as long
       as you offer spare parts or customer support for that product
       model, to give anyone who possesses the object code either (1) a
       copy of the Corresponding Source for all the software in the
       product that is covered by this License, on a durable physical
       medium customarily used for software interchange, for a price no
       more than your reasonable cost of physically performing this
       conveying of source, or (2) access to copy the Corresponding Source
       from a network server at no charge.
     * c)  Convey individual copies of the object code with a copy of the
       written offer to provide the Corresponding Source.  This
       alternative is allowed only occasionally and noncommercially, and
       only if you received the object code with such an offer, in accord
       with subsection 6b.
     * d)  Convey the object code by offering access from a designated
       place (gratis or for a charge), and offer equivalent access to the
       Corresponding Source in the same way through the same place at no
       further charge.  You need not require recipients to copy the
       Corresponding Source along with the object code.  If the place to
       copy the object code is a network server, the Corresponding Source
       may be on a different server (operated by you or a third party)
       that supports equivalent copying facilities, provided you maintain
       clear directions next to the object code saying where to find the
       Corresponding Source.  Regardless of what server hosts the
       Corresponding Source, you remain obligated to ensure that it is
       available for as long as needed to satisfy these requirements.
     * e)  Convey the object code using peer-to-peer transmission,
       provided you inform other peers where the object code and
       Corresponding Source of the work are being offered to the general
       public at no charge under subsection 6d.

   A separable portion of the object code, whose source code is excluded
   from the Corresponding Source as a System Library, need not be included
   in conveying the object code work.

   A "User Product" is either (1) a "consumer product", which means any
   tangible personal property which is normally used for personal, family,
   or household purposes, or (2) anything designed or sold for
   incorporation into a dwelling.  In determining whether a product is a
   consumer product, doubtful cases shall be resolved in favor of
   coverage.  For a particular product received by a particular user,
   "normally used" refers to a typical or common use of that class of
   product, regardless of the status of the particular user or of the way
   in which the particular user actually uses, or expects or is expected
   to use, the product.  A product is a consumer product regardless of
   whether the product has substantial commercial, industrial or
   non-consumer uses, unless such uses represent the only significant mode
   of use of the product.

   "Installation Information" for a User Product means any methods,
   procedures, authorization keys, or other information required to
   install and execute modified versions of a covered work in that User
   Product from a modified version of its Corresponding Source.  The
   information must suffice to ensure that the continued functioning of
   the modified object code is in no case prevented or interfered with
   solely because modification has been made.

   If you convey an object code work under this section in, or with, or
   specifically for use in, a User Product, and the conveying occurs as
   part of a transaction in which the right of possession and use of the
   User Product is transferred to the recipient in perpetuity or for a
   fixed term (regardless of how the transaction is characterized), the
   Corresponding Source conveyed under this section must be accompanied by
   the Installation Information.  But this requirement does not apply if
   neither you nor any third party retains the ability to install modified
   object code on the User Product (for example, the work has been
   installed in ROM).

   The requirement to provide Installation Information does not include a
   requirement to continue to provide support service, warranty, or
   updates for a work that has been modified or installed by the
   recipient, or for the User Product in which it has been modified or
   installed.  Access to a network may be denied when the modification
   itself materially and adversely affects the operation of the network or
   violates the rules and protocols for communication across the network.

   Corresponding Source conveyed, and Installation Information provided,
   in accord with this section must be in a format that is publicly
   documented (and with an implementation available to the public in
   source code form), and must require no special password or key for
   unpacking, reading or copying.

    7. Additional Terms.

   "Additional permissions" are terms that supplement the terms of this
   License by making exceptions from one or more of its conditions.
   Additional permissions that are applicable to the entire Program shall
   be treated as though they were included in this License, to the extent
   that they are valid under applicable law.  If additional permissions
   apply only to part of the Program, that part may be used separately
   under those permissions, but the entire Program remains governed by
   this License without regard to the additional permissions.

   When you convey a copy of a covered work, you may at your option remove
   any additional permissions from that copy, or from any part of it.
   (Additional permissions may be written to require their own removal in
   certain cases when you modify the work.)  You may place additional
   permissions on material, added by you to a covered work, for which you
   have or can give appropriate copyright permission.

   Notwithstanding any other provision of this License, for material you
   add to a covered work, you may (if authorized by the copyright holders
   of that material) supplement the terms of this License with terms:
     * a)  Disclaiming warranty or limiting liability differently from the
       terms of sections 15 and 16 of this License; or
     * b)  Requiring preservation of specified reasonable legal notices or
       author attributions in that material or in the Appropriate Legal
       Notices displayed by works containing it; or
     * c)  Prohibiting misrepresentation of the origin of that material,
       or requiring that modified versions of such material be marked in
       reasonable ways as different from the original version; or
     * d)  Limiting the use for publicity purposes of names of licensors
       or authors of the material; or
     * e)  Declining to grant rights under trademark law for use of some
       trade names, trademarks, or service marks; or
     * f)  Requiring indemnification of licensors and authors of that
       material by anyone who conveys the material (or modified versions
       of it) with contractual assumptions of liability to the recipient,
       for any liability that these contractual assumptions directly
       impose on those licensors and authors.

   All other non-permissive additional terms are considered "further
   restrictions" within the meaning of section 10.  If the Program as you
   received it, or any part of it, contains a notice stating that it is
   governed by this License along with a term that is a further
   restriction, you may remove that term.  If a license document contains
   a further restriction but permits relicensing or conveying under this
   License, you may add to a covered work material governed by the terms
   of that license document, provided that the further restriction does
   not survive such relicensing or conveying.

   If you add terms to a covered work in accord with this section, you
   must place, in the relevant source files, a statement of the additional
   terms that apply to those files, or a notice indicating where to find
   the applicable terms.

   Additional terms, permissive or non-permissive, may be stated in the
   form of a separately written license, or stated as exceptions; the
   above requirements apply either way.

    8. Termination.

   You may not propagate or modify a covered work except as expressly
   provided under this License.  Any attempt otherwise to propagate or
   modify it is void, and will automatically terminate your rights under
   this License (including any patent licenses granted under the third
   paragraph of section 11).

   However, if you cease all violation of this License, then your license
   from a particular copyright holder is reinstated (a) provisionally,
   unless and until the copyright holder explicitly and finally terminates
   your license, and (b) permanently, if the copyright holder fails to
   notify you of the violation by some reasonable means prior to 60 days
   after the cessation.

   Moreover, your license from a particular copyright holder is reinstated
   permanently if the copyright holder notifies you of the violation by
   some reasonable means, this is the first time you have received notice
   of violation of this License (for any work) from that copyright holder,
   and you cure the violation prior to 30 days after your receipt of the
   notice.

   Termination of your rights under this section does not terminate the
   licenses of parties who have received copies or rights from you under
   this License.  If your rights have been terminated and not permanently
   reinstated, you do not qualify to receive new licenses for the same
   material under section 10.

    9. Acceptance Not Required for Having Copies.

   You are not required to accept this License in order to receive or run
   a copy of the Program.  Ancillary propagation of a covered work
   occurring solely as a consequence of using peer-to-peer transmission to
   receive a copy likewise does not require acceptance.  However, nothing
   other than this License grants you permission to propagate or modify
   any covered work.  These actions infringe copyright if you do not
   accept this License.  Therefore, by modifying or propagating a covered
   work, you indicate your acceptance of this License to do so.

    10. Automatic Licensing of Downstream Recipients.

   Each time you convey a covered work, the recipient automatically
   receives a license from the original licensors, to run, modify and
   propagate that work, subject to this License.  You are not responsible
   for enforcing compliance by third parties with this License.

   An "entity transaction" is a transaction transferring control of an
   organization, or substantially all assets of one, or subdividing an
   organization, or merging organizations.  If propagation of a covered
   work results from an entity transaction, each party to that transaction
   who receives a copy of the work also receives whatever licenses to the
   work the party's predecessor in interest had or could give under the
   previous paragraph, plus a right to possession of the Corresponding
   Source of the work from the predecessor in interest, if the predecessor
   has it or can get it with reasonable efforts.

   You may not impose any further restrictions on the exercise of the
   rights granted or affirmed under this License.  For example, you may
   not impose a license fee, royalty, or other charge for exercise of
   rights granted under this License, and you may not initiate litigation
   (including a cross-claim or counterclaim in a lawsuit) alleging that
   any patent claim is infringed by making, using, selling, offering for
   sale, or importing the Program or any portion of it.

    11. Patents.

   A "contributor" is a copyright holder who authorizes use under this
   License of the Program or a work on which the Program is based.  The
   work thus licensed is called the contributor's "contributor version".

   A contributor's "essential patent claims" are all patent claims owned
   or controlled by the contributor, whether already acquired or hereafter
   acquired, that would be infringed by some manner, permitted by this
   License, of making, using, or selling its contributor version, but do
   not include claims that would be infringed only as a consequence of
   further modification of the contributor version.  For purposes of this
   definition, "control" includes the right to grant patent sublicenses in
   a manner consistent with the requirements of this License.

   Each contributor grants you a non-exclusive, worldwide, royalty-free
   patent license under the contributor's essential patent claims, to
   make, use, sell, offer for sale, import and otherwise run, modify and
   propagate the contents of its contributor version.

   In the following three paragraphs, a "patent license" is any express
   agreement or commitment, however denominated, not to enforce a patent
   (such as an express permission to practice a patent or covenant not to
   sue for patent infringement).  To "grant" such a patent license to a
   party means to make such an agreement or commitment not to enforce a
   patent against the party.

   If you convey a covered work, knowingly relying on a patent license,
   and the Corresponding Source of the work is not available for anyone to
   copy, free of charge and under the terms of this License, through a
   publicly available network server or other readily accessible means,
   then you must either (1) cause the Corresponding Source to be so
   available, or (2) arrange to deprive yourself of the benefit of the
   patent license for this particular work, or (3) arrange, in a manner
   consistent with the requirements of this License, to extend the patent
   license to downstream recipients.  "Knowingly relying" means you have
   actual knowledge that, but for the patent license, your conveying the
   covered work in a country, or your recipient's use of the covered work
   in a country, would infringe one or more identifiable patents in that
   country that you have reason to believe are valid.

   If, pursuant to or in connection with a single transaction or
   arrangement, you convey, or propagate by procuring conveyance of, a
   covered work, and grant a patent license to some of the parties
   receiving the covered work authorizing them to use, propagate, modify
   or convey a specific copy of the covered work, then the patent license
   you grant is automatically extended to all recipients of the covered
   work and works based on it.

   A patent license is "discriminatory" if it does not include within the
   scope of its coverage, prohibits the exercise of, or is conditioned on
   the non-exercise of one or more of the rights that are specifically
   granted under this License.  You may not convey a covered work if you
   are a party to an arrangement with a third party that is in the
   business of distributing software, under which you make payment to the
   third party based on the extent of your activity of conveying the work,
   and under which the third party grants, to any of the parties who would
   receive the covered work from you, a discriminatory patent license (a)
   in connection with copies of the covered work conveyed by you (or
   copies made from those copies), or (b) primarily for and in connection
   with specific products or compilations that contain the covered work,
   unless you entered into that arrangement, or that patent license was
   granted, prior to 28 March 2007.

   Nothing in this License shall be construed as excluding or limiting any
   implied license or other defenses to infringement that may otherwise be
   available to you under applicable patent law.

    12. No Surrender of Others' Freedom.

   If conditions are imposed on you (whether by court order, agreement or
   otherwise) that contradict the conditions of this License, they do not
   excuse you from the conditions of this License.  If you cannot convey a
   covered work so as to satisfy simultaneously your obligations under
   this License and any other pertinent obligations, then as a consequence
   you may not convey it at all.  For example, if you agree to terms that
   obligate you to collect a royalty for further conveying from those to
   whom you convey the Program, the only way you could satisfy both those
   terms and this License would be to refrain entirely from conveying the
   Program.

    13. Use with the GNU Affero General Public License.

   Notwithstanding any other provision of this License, you have
   permission to link or combine any covered work with a work licensed
   under version 3 of the GNU Affero General Public License into a single
   combined work, and to convey the resulting work.  The terms of this
   License will continue to apply to the part which is the covered work,
   but the special requirements of the GNU Affero General Public License,
   section 13, concerning interaction through a network will apply to the
   combination as such.

    14. Revised Versions of this License.

   The Free Software Foundation may publish revised and/or new versions of
   the GNU General Public License from time to time.  Such new versions
   will be similar in spirit to the present version, but may differ in
   detail to address new problems or concerns.

   Each version is given a distinguishing version number.  If the Program
   specifies that a certain numbered version of the GNU General Public
   License "or any later version" applies to it, you have the option of
   following the terms and conditions either of that numbered version or
   of any later version published by the Free Software Foundation.  If the
   Program does not specify a version number of the GNU General Public
   License, you may choose any version ever published by the Free Software
   Foundation.

   If the Program specifies that a proxy can decide which future versions
   of the GNU General Public License can be used, that proxy's public
   statement of acceptance of a version permanently authorizes you to
   choose that version for the Program.

   Later license versions may give you additional or different
   permissions.  However, no additional obligations are imposed on any
   author or copyright holder as a result of your choosing to follow a
   later version.

    15. Disclaimer of Warranty.

   THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
   APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
   HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
   WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
   PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE
   OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU
   ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

    16. Limitation of Liability.

   IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
   WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
   CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
   INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
   ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
   NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES
   SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO
   OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY
   HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

    17. Interpretation of Sections 15 and 16.

   If the disclaimer of warranty and limitation of liability provided
   above cannot be given local legal effect according to their terms,
   reviewing courts shall apply local law that most closely approximates
   an absolute waiver of all civil liability in connection with the
   Program, unless a warranty or assumption of liability accompanies a
   copy of the Program in return for a fee.

   END OF TERMS AND CONDITIONS

  How to Apply These Terms to Your New Programs

   If you develop a new program, and you want it to be of the greatest
   possible use to the public, the best way to achieve this is to make it
   free software which everyone can redistribute and change under these
   terms.

   To do so, attach the following notices to the program.  It is safest to
   attach them to the start of each source file to most effectively state
   the exclusion of warranty; and each file should have at least the
   "copyright" line and a pointer to where the full notice is found.
    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

   Also add information on how to contact you by electronic and paper
   mail.

   If the program does terminal interaction, make it output a short notice
   like this when it starts in an interactive mode:
    <program>  Copyright (C) <year>  <name of author>
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

   The hypothetical commands `show w' and `show c' should show the
   appropriate parts of the General Public License.  Of course, your
   program's commands might be different; for a GUI interface, you would
   use an "about box".

   You should also get your employer (if you work as a programmer) or
   school, if any, to sign a "copyright disclaimer" for the program, if
   necessary.  For more information on this, and how to apply and follow
   the GNU GPL, see <[5]http://www.gnu.org/licenses/>.

   The GNU General Public License does not permit incorporating your
   program into proprietary programs.  If your program is a subroutine
   library, you may consider it more useful to permit linking proprietary
   applications with the library.  If this is what you want to do, use the
   GNU Lesser General Public License instead of this License.  But first,
   please read <[6]http://www.gnu.org/philosophy/why-not-lgpl.html>.
     __________________________________________________________________

   [7]-> Next [8]Contents

References

   1. https://flaterco.com/xtide/introduction.html
   2. https://flaterco.com/xtide/xtide.html#contents
   3. https://flaterco.com/xtide/harmonics_boilerplate.txt
   4. http://fsf.org/
   5. http://www.gnu.org/licenses/
   6. http://www.gnu.org/philosophy/why-not-lgpl.html
   7. https://flaterco.com/xtide/introduction.html
   8. https://flaterco.com/xtide/xtide.html#contents

################################################################

   [1]<- Previous [2]-> Next [3]Contents

   [4]Bald Head Cliff, Ogunquit, Maine, 1998-06-15

Introduction

   XTide is a package that provides tide and current predictions in a wide
   variety of formats.  Graphs, text listings, and calendars can be
   generated, or a tide clock can be provided on your desktop.

   XTide can work with X-windows, plain text terminals, or the web.  This
   is accomplished with three separate programs:  the interactive
   interface (xtide), the non-interactive or command-line interface
   (tide), and the web interface (xttpd).

   The algorithm that XTide uses to predict tides is the one used by the
   [5]National Ocean Service in the U.S.  It is significantly more
   accurate than the simple tide clocks that can be bought in novelty
   stores.  However, it takes more to predict tides accurately than just a
   spiffy algorithm--you also need some special data for each and every
   location for which you want to predict tides.  XTide reads these data
   from harmonics files.

   Ultimately, XTide's predictions can only be as good as the available
   harmonics data.  It is up to you to verify that the predictions for
   your locale match up acceptably well with the officially sanctioned
   ones.
     * Deviations of 1 minute from official predictions are typical for
       locations having the latest data.
     * Deviations of 20 minutes are typical for locations that are using
       obsolete data.
     * Much longer deviations indicate a problem.

   The XTide software distribution resides at
   [6]https://flaterco.com/xtide/files.html.

   XTide and its documentation are maintained by David Flater
   (dave@flaterco.com).
     __________________________________________________________________

   [7]<- Previous [8]-> Next [9]Contents

References

   1. https://flaterco.com/xtide/disclaimer.html
   2. https://flaterco.com/xtide/sysreq.html
   3. https://flaterco.com/xtide/xtide.html#contents
   4. https://flaterco.com/
   5. http://oceanservice.noaa.gov/
   6. https://flaterco.com/xtide/files.html
   7. https://flaterco.com/xtide/disclaimer.html
   8. https://flaterco.com/xtide/sysreq.html
   9. https://flaterco.com/xtide/xtide.html#contents

################################################################

   [1]<- Previous [2]-> Next [3]Contents

   [4]Cutler in the fog

System requirements

  Hardware

   XTide uses less than 15 MB of memory for a typical interactive
   session.  The base configuration for which XTide 2 was written was a
   166 MHz Pentium PC with 32 MiB of RAM (circa 1997).  XTide continues to
   be runnable on such a PC and on comparable non-PC hardware such as a
   Sun Sparcstation.  Unfortunately, to build XTide comfortably with GCC
   now requires a minimum of 128 MB of memory.

  Operating system

   XTide is Unix software.  It is intended to compile and run correctly on
   any reasonably modern version of Unix.  However, I no longer have
   direct access to any flavor of Unix other than Linux, so I can only
   make portability fixes if and when issues are reported.

   In order for tide predictions to have the correct Daylight Savings Time
   (Summer Time) adjustments, your platform must provide a sufficiently
   up-to-date version of the tz database.  If your time zone database is
   obsolete, you may be able to upgrade it using the latest version from
   [5]http://www.iana.org/time-zones or by installing an operating system
   patch.

   Some non-Unix platforms have limited support:

     * All parts of XTide can be run under Windows using [6]Cygwin.
     * The command-line client tide can be built and run natively on
       Android, Windows, and DOS.  Android can furthermore run xttpd.
     * libxtide, a C++ library that provides all of the back-end
       functionality of XTide but not the user interface, can be built on
       Android, Windows, and DOS and used to develop new apps.
     * XTide has been ported to a variety of other operating systems with
       differing levels of success as detailed in the [7]ports section.

  Software

   XTide is written in C++.  GCC version 4.4 or newer should work.

   You need [8]bzip2, [9]7-Zip or some other archiver that supports the
   bzip2 format to uncompress the files.  A list of libraries on which
   XTide is dependent is provided in the [10]next section.

   The interactive client requires that the Schumacher fonts be installed
   with X11.  These fonts are always included with the X11 distribution,
   but their installation is frequently optional.
     __________________________________________________________________

   [11]<- Previous [12]-> Next [13]Contents

References

   1. https://flaterco.com/xtide/introduction.html
   2. https://flaterco.com/xtide/installation.html
   3. https://flaterco.com/xtide/xtide.html#contents
   4. https://flaterco.com/
   5. http://www.iana.org/time-zones
   6. https://flaterco.com/xtide/installation.html#cygwin
   7. https://flaterco.com/xtide/ports.html
   8. http://www.bzip.org/
   9. http://www.7-zip.org/
  10. https://flaterco.com/xtide/installation.html
  11. https://flaterco.com/xtide/introduction.html
  12. https://flaterco.com/xtide/installation.html
  13. https://flaterco.com/xtide/xtide.html#contents

################################################################

   [1]<- Previous [2]-> Next [3]Contents

   [4]Prospect Harbor Pt. Light, Prospect Harbor, Maine, 1998-06-14

Installation instructions for supported platforms

  Assumptions

   These installation instructions assume basic familiarity with the Unix
   command line and that you are building from sources obtained from
   [5]https://flaterco.com/xtide/files.html.  If this is a big ask, there
   are other options:
     * Binary packages for some platforms are available under [6]contrib
       files.  (Thanks to the relevant package maintainers.)  However, you
       need to be careful about out-of-date packages.
     * Kelly Bellis wrote detailed, step-by-step instructions from the
       perspective of a Windows user running Ubuntu in a virtual machine.
       The merged documentation (this online documentation plus Mr.
       Bellis' value added) is provided in a [7].chm file (Microsoft
       Compiled HTML Help).  Last rev 20170105 for XTide 2.15.1.

  Mandatory library dependencies

   The "tested" versions of libraries cited below are merely the versions
   that were demonstrated to work at the time of the last XTide release,
   for information in case a compatibility issue arises.

   In addition to the minimal set of X11 libraries that pretty much
   everyone has, you need the following libraries:

     * [8]libXpm (tested ver. 3.5.11)
     * [9]zlib (a.k.a. libz), prerequisite of libpng (tested ver. 1.2.8)
     * [10]libpng (tested ver. 1.6.21)
     * [11]libtcd (tested ver. 2.2.7-r2)

   Debian/Ubuntu users can install the dependencies by doing this:
   sudo apt-get install xorg-dev libxaw3dxft8-dev libpng-dev
   and then building libtcd from source (configure; make; sudo make
   install).

   The interactive client requires that the Schumacher fonts be installed
   with X11.  These fonts are always included with the X11 distribution,
   but their installation is frequently optional.

   tide and xttpd can be compiled in the absence of X11 libraries and
   libXpm.  However, you still need the other stuff.

  Optional libraries

   The configure script will look for Xaw3dXft, Xaw3d, or Xaw, in that
   order.

   [Xaw-sample.png]   Plain Athena Widgets (Xaw) (tested ver. 1.0.12 /
   X11R7.7) can be forced using --disable-3d.
   [Xaw3d-sample.png]   Xaw3d (tested ver. 1.6.2) is a fork from an old
   version of Athena Widgets that offers improved scrollbars and a
   different look for buttons.  Versions 1.6 through 1.6.2 appeared in Q1
   2012; prior to that, version 1.5E had been frozen since 2003.  Some
   issues that were subsequently fixed in Athena Widgets, such as long
   menus running off the screen, were fixed differently in Xaw3d.  (This
   affects the Set Time dialog, where the list of years to choose from can
   be quite long.)
   [Xaw3dXft-sample.png]

   Xaw3dXft is a fork from Xaw3d 1.5E that uses FreeType fonts.  The
   primary site is
   [12]http://sourceforge.net/projects/sf-xpaint/files/libxaw3dxft/.  If
   font quality is important, Xaw3dXft is the best choice.  It also fixes
   the problem with long menus in the Set Time dialog.

   Xaw3dXft ver. 1.6.2d made breaking changes to the API.  XTide 2.15 will
   work with 1.6.2d but no earlier version.  XTide 2.14 works with several
   earlier versions but fails to build with 1.6.2d.

   I recommend configuring Xaw3dXft with the following options:
   --enable-internationalization --enable-multiplane-bitmaps
   --enable-gray-stipples --enable-arrow-scrollbars

   XTide will link with [13]libgps if a compatible version is found on the
   system (tested ver. 3.16).  If a GPS is present and working, XTide will
   zoom in on your current location automatically.

   XTide will link with [14]libdstr if a compatible version is found on
   the system (tested ver. 1.0).  If no compatible libdstr is present, a
   local copy of Dstr 1.0 will be rolled into libxtide.

  Downloading

   Mandatory:  You need the XTide source code distribution, available in
   bzipped tar format at [15]https://flaterco.com/xtide/files.html#xtide.

   Mandatory:  You need at least one harmonics file.  Harmonics files
   contain the data that are required for XTide to predict tides for
   different locations.  Harmonics files are available at
   [16]https://flaterco.com/xtide/files.html#harmonicsfiles.

   Optional:  If you want to enable XTide to draw coastlines on the map,
   you will also have to download the World Vector Shoreline (WVS) files,
   which are available in bzipped tar format at
   [17]https://flaterco.com/xtide/files.html#WVS.

  Installing a harmonics file

   You will download a file with a name similar to
   harmonics-dwf-YYYYMMDD-free.tar.bz2.  With GNU tar, you can unpack it
   as follows:

tar xvf harmonics-dwf-YYYYMMDD-free.tar.bz2

   With another tar that does not include builtin support for bzip2, you
   need to do this instead:

bzip2 -dc harmonics-dwf-YYYYMMDD-free.tar.bz2 | tar xvf -

   Unpack the archive in a temporary directory, then move the TCD file to
   a permanent location, e.g., /usr/local/share/xtide, and make it world
   readable:

mkdir /usr/local/share/xtide
chmod 755 /usr/local/share/xtide
chmod 644 harmonics-dwf-YYYYMMDD-free.tcd
mv harmonics-dwf-YYYYMMDD-free.tcd /usr/local/share/xtide

   The tar file also includes a change log and the disclaimers and terms
   applying to the data.

  Installing the World Vector Shoreline files (optional)

    1. Create a directory to contain the WVS files.
    2. Change your current working directory to that directory.
    3. Unpack the tar file in that directory.

   Under Linux and any other system with GNU tar:

tar xvf wvs.tar.bz2

   Elsewhere:

bzip2 -dc wvs.tar.bz2 | tar xvf -

  Unpacking the sources

   Under Linux and any other system with GNU tar:

tar xvf xtide-2.xyz.tar.bz2

   Elsewhere:

bzip2 -dc xtide-2.xyz.tar.bz2 | tar xvf -

  Configuring

    I.  Specify the location of the harmonics file(s)

   There are two ways to do this.

    1. The first way is by setting the environment variable HFILE_PATH.

export HFILE_PATH=/usr/local/share/xtide/harmonics.tcd

       In the event that you have more than one harmonics file that you
       wish to use simultaneously, list them separated by colons.

export HFILE_PATH=/usr/local/share/xtide/harmonics-free.tcd:/usr/local/share/xti
de/harmonics-nonfree.tcd

       Alternately, make sure that they are by themselves in a special
       directory and specify that directory as the value of HFILE_PATH.
       If an element of HFILE_PATH is a directory, XTide will attempt to
       load every file in that directory (so be sure that they are all
       harmonics files!)
       If you are installing as root, then it is recommended that you add
       this definition to a system-wide script such as /etc/profile if you
       have one.  In Debian/Ubuntu, system-wide environment variables can
       be added to /etc/environment.
    2. The other way is by creating the file /etc/xtide.conf.  The
       environment variable, if set, takes precedence over the config
       file.
       If a configuration file is used, the first line should consist of
       the value that would be assigned to HFILE_PATH:
/usr/local/share/xtide/harmonics-free.tcd:/usr/local/share/xtide/harmonics-nonfr
ee.tcd

    II.  Specify the location of the World Vector Shoreline files (optional)

   Either set the environment variable WVS_DIR to the name of that
   directory or supply the directory name as the second line of the
   configuration file /etc/xtide.conf.

    III.  Run the configure script

bash-3.1$ ./configure

   XTide is packaged with the popular and portable [18]GNU automake, so
   all usual GNU tricks should work.  Help on configuration options can be
   found in the CONFIGURE-HELP file or obtained by entering ./configure
   --help.

   The web server xttpd is not necessary to use tide or xtide, so most
   users needn't worry about it.  However, if you plan to run it, there is
   additional configuration at this point.

   (New in XTide 2.15)  If your system uses [19]systemd instead of init,
   you must configure with --enable-systemd to be able to run xttpd as a
   systemd service.

   To change the user and/or group under which xttpd tries to run (the
   defaults are nobody/nobody), provide the options --with-xttpd-user=user
   and/or --with-xttpd-group=group to configure.  If you want to run xttpd
   but you don't have root, you will have to set these to your own
   username and the name of some group to which you belong.

bash-3.1$ ./configure --with-xttpd-user=xttpd --with-xttpd-group==xttpd

   You can also set the webmaster address for xttpd this way.

bash-3.1$ ./configure --with-webmaster="somebody@somewhere.else"

    IV.  Other optional and alternative configurables

   --enable-time-workaround Work around Y2038 problem; disable time
   zones.  See [20]Appendix A -- Historical predictions and Y2038
   compliance.
   --enable-gnu-attributes Use with g++ -Wall -Wextra to make warnings
   smarter.
   --enable-semicolon-pathsep Use ; instead of : to separate names in
   HFILE_PATH (good idea if they begin with C:\).
   --enable-local-files Locate xtide.conf, .xtide.xml, and
   .disableXTidedisclaimer files in current working directory.
   --disable-3d Use only genuine Athena Widgets.
   --enable-lm_hard Link with libm_hard instead of libm (for ARM Android).
   --enable-moon-age (Experimental) Replace calendar mode moon phase
   column with moon age.

   You can change the compile-time defaults (colors, etc.) set in
   libxtide/config.hh if you so choose.  However, the easiest way to set
   all of those things is with the [21]control panel in the interactive
   XTide program.

   The e-mail address for feedback in xttpd can also be changed by setting
   the environment variable XTTPD_FEEDBACK, in lieu of the configure
   option mentioned above.

  Compiling and installing binaries

   On Slackware:
$ make
$ su
# make install

   On Debian/Ubuntu:
$ make
$ sudo make install

   (With GNU make you can say make -j 8 to run 8 compiles in parallel if
   you want to speed it up.)

Systemd integration (XTide 2.15)

   If xttpd was built with --enable-systemd, additional steps are needed
   to complete the installation.
     * make install-systemd will install xttpd.socket and xttpd.service
       into /lib/systemd/system.
     * If a port or address other than the default port 80 is to be used,
       edit /lib/systemd/system/xttpd.socket per [22]systemd
       documentation.
     * If you want to provide the environment variables HFILE_PATH or
       XTTPD_FEEDBACK to xttpd, create the environment file
       /etc/sysconfig/xttpd per [23]systemd documentation.  If necessary,
       the path /etc/sysconfig/xttpd can be changed by editing
       xttpd.service, or the environment variables can be specified
       directly therein using Environment= instead of EnvironmentFile=.
     * make enable-systemd does the following final steps:
          + systemctl enable xttpd.socket xttpd.service
          + systemctl start xttpd.socket xttpd.service
     * If something goes wrong, make barf-systemd will dump the log for
       inspection (journalctl -b -p debug --no-pager).
     __________________________________________________________________

Special cases

  Don't have X11

   If you don't have any version of X11 installed and just want to compile
   xttpd or tide, generate a Makefile using ./configure --without-x.

  Mac OS X

  2016-01:  New maintainer David Strubbe reports that working, up-to-date build
  scripts are available from [24]MacPorts.
  Android

  2018-10:  Paul Poffenberger reported that XTide built "almost" out of the box
  using the tools available from [25]Termux.  Linux software is expected to need
  patching when it is built for Termux.

  The XTide distribution does not provide a complete native Android app, but the
  basis for such an app, libxtide, can be built using the [26]NDK.  An example
  script for cross-compiling libpng, libtcd, libxtide, tide, and xttpd for
  Android on x86 or x86_64 Linux is in the XTide distribution as
  scripts/Android/build.sh.  App developers can follow the example of [27]MX
  Tides to add a JNI layer and GUI.

  The tide and xttpd binaries produced by build.sh can be run from a shell
  prompt on a rooted device.  Pointing a web browser at xttpd on the loopback
  address (http://127.0.0.1/) is a quick and dirty way to get a GUI.  (Change
  for XTide 2.15:  Android's xttpd now runs in the terminal instead of forking
  into the background, but otherwise works normally.)
  Cygwin

  XTide can be compiled and run using [28]Cygwin, which is an emulated Unix
  environment for Windows that is free for typical non-commercial users.  The
  Cygwin distribution and its full license terms are available from
  [29]http://www.cygwin.com/.

  Cygwin packages are all versioned separately, so there is no baseline "Cygwin
  version" against which to test XTide.  Testing was most recently performed
  with XTide 2.15 using the collection of packages that was current as of
  2016-01-23.  As of then, the quirks apparent after brief testing were as
  follows:

    1. Had to specify LDFLAGS="-L/usr/local/lib" explicitly.
    2. If only building certain of the programs, you must type (e.g.)
       'make tide.exe' instead of 'make tide'.  'make tide' causes the
       automake-generated makefile to do something silly.

  DOS + DJGPP

  [A prebuilt DOS binary for the command-line client is available in
  [30]https://flaterco.com/xtide/files.html#contrib.  It is usable in a DOS box
  under any 32-bit version of Windows and in [31]DOSBox under 64-bit Windows.]

  Don't laugh:  the DOS binary works better under Windows than the native
  Windows one does.

  A DOS binary for the command-line client tide can be built using [32]DJGPP.
  The following instructions were last validated on 2016-01-25 with XTide 2.15
  and DJGPP 2.05.

    First things first

  If using hard-core DOS, both a Long File Name (LFN) driver and a DPMI provider
  must be installed.  Recommended:
     * doslfn from [33]http://www.freedos.org/software/?prog=doslfn:  LH
       DOSLFNMS.COM in AUTOEXEC.BAT.
     * The csdpmi7b.zip binaries from DJGPP's current/v2misc:  add to
       PATH.

  If using a DOS box (CMD.EXE) in a 32-bit version of Windows, LFN and DPMI
  should just work.

    Unzipping

  When unpacking zip files, use the [34]unzip32.exe that is distributed with
  DJGPP to prevent file names from getting broken.

  File names on NTFS must be created in the DOS namespace.  Linux ntfs-3g
  doesn't do that.  Similarly, the LFN implementation in Linux vfat is not
  entirely compatible with doslfn.  It only works reliably if you mount the vfat
  partition with the option shortname=winnt.

    Environment

  For the validation build, the following DJGPP files were installed (unzipped
  in C:\DJGPP):

-rw-r--r--  1 dave users  8842737 Jan 22 17:34 bnu2251br3.zip
-rw-r--r--  1 dave users    71339 Jan 22 17:36 csdpmi7b.zip
-rw-r--r--  1 dave users  2509574 Jan 22 17:32 djdev205.zip
-rw-r--r--  1 dave users   603760 Jan 22 17:32 djtzn205.zip
-rw-r--r--  1 dave users 28597989 Jan 22 17:39 gcc530b.zip
-rw-r--r--  1 dave users 13008311 Jan 22 17:38 gpp530b.zip
-rw-r--r--  1 dave users  8391218 Jan 22 17:37 gtxt192b.zip
-rw-r--r--  1 dave users   405500 Jan 22 17:35 mak41br2.zip
-rw-r--r--  1 dave users  1293982 Jan 22 17:37 png1610b.zip
-rw-r--r--  1 dave users   194774 Jan 22 17:37 zlib128br2.zip

   Environment variables:
SET PATH=C:\DJGPP\BIN;%PATH%
SET DJGPP=C:\DJGPP\DJGPP.ENV
SET TZ=:America/New_York

   The environment variable TZ should be set to the zoneinfo identifier
   that is appropriate for your system clock.  For example,
      SET TZ=:America/New_York
  or  SET TZ=:America/Los_Angeles
  or  SET TZ=:UTC

   If this is not done, predictions will still be technically correct, but
   XTide will have the wrong idea of the current time when deciding what
   range of predictions to generate.

    Dependencies

     * Prebuilt libraries for libpng and zlib both are available in the
       current/v2tk collection of the DJGPP archive (png*b*.zip and
       zlib*b*.zip).
     * Follow the instructions to build [35]libtcd for DOS.

    Building tide

    1. Ensure that scripts/DOS/Makefile.dj2 contains the correct path to
       the libtcd build directory.
    2. Do make -f scripts\DOS\Makefile.dj2.

   The following behaviors will differ from the default Unix behaviors:

     * File names in the environment variable HFILE_PATH or the
       configuration file xtide.conf should be separated by semicolons
       instead of colons.
     * The optional xtide.conf, .xtide.xml, and .disableXTidedisclaimer
       configuration files should go in the current working directory.
       Not in PATH folders, not in the directory where the tide.exe
       executable is.
     * Text output is rendered in the DOS/Windows default codeset (CP437).
     * If output is redirected with >, LF to CR/LF translation is done.
       If output is redirected with -o, it is not.  So to save output to a
       file, you have to use > for text formats, -o for PNG format.  (Also
       be aware that -o will append to an existing file, rather than
       overwrite it.)

  Windows + Visual Studio

  [A prebuilt Windows binary for the command-line client is available in
  [36]https://flaterco.com/xtide/files.html#contrib.  It still runs in a DOS
  box, but is compatible with 64-bit Windows.]

  When built with Visual Studio, XTide has to use an undesirable workaround for
  the absence of the [37]Time Zone Database, and the resulting binary might not
  run on a different version of Windows.  On 32-bit Windows, the [38]DOS+DJGPP
  build is simply better.  On 32- or 64-bit Windows, best results are obtained
  using [39]Cygwin or a Linux VM.

  The following instructions were last validated on 2016-01-25 with XTide 2.15
  and Visual Studio Community 2015 with Update 1 under Windows 10 64-bit.

  For Windows and Visual Studio, a script that builds zlib, libpng, libtcd,
  libxtide, and finally tide is available in the XTide distribution as
  scripts\VS\build.bat.

    1. Do [Windows Logo Thingy Formerly Known as Start Menu] -> All Apps
       -> Visual Studio 2015 (folder) -> VS2015 x64 Native Tools Command
       Prompt.  To prevent inexplicable file system permissions problems,
       right click it and run as Administrator.  (Ha ha... That was a
       little Windows in-joke.  Now that we have UAC, the only way to
       prevent inexplicable file system permissions problems is to use a
       FAT32 file system.)
    2. Unpack the zlib, libpng, libtcd, and XTide distributions under the
       current working directory.
    3. Copy xtide...\scripts\VS\build.bat to the working directory and
       edit it so that the version numbers specified at the top agree with
       what you have.
    4. build

   As configured, the following behaviors will differ from the default
   Unix behaviors:

     * File names in the environment variable HFILE_PATH or the
       configuration file xtide.conf should be separated by semicolons
       instead of colons.
     * The optional xtide.conf, .xtide.xml, and .disableXTidedisclaimer
       configuration files should go in the current working directory.
       Not in PATH folders, not in the directory where the tide.exe
       executable is.
     * Because the Microsoft Visual Studio runtime doesn't support the
       zoneinfo database natively, you will get the message "XTide
       Warning:  Using obsolete time zone database.  Summer Time (Daylight
       Savings Time) adjustments will not be done for some locations."
     * Although the program successfully changes the codeset from CP437 to
       ISO-8859-1 when it runs, the DOS box reverts to CP437 as soon as
       the program exits, so text output that is saved to a file and then
       TYPEd at the command prompt will display incorrectly.  The saved
       output is in the character set ISO-8859-1 and will display
       correctly in a web browser or editor.
     * If output is redirected with >, LF to CR/LF translation is done.
       If output is redirected with -o, it is not.  So to save output to a
       file, you have to use > for text formats, -o for PNG format.  (Also
       be aware that -o will append to an existing file, rather than
       overwrite it.)

   For example, you could put the following in an xtide.conf file in the
   current working directory:

C:\Documents and Settings\Mumble\Foo\harmonics-free.tcd;C:\Documents and Setting
s\Mumble\Foo\harmonics-nonfree.tcd

  CPU-constrained platforms

   There are some CPU bottlenecks that are observable only on very old
   hardware.  Real time estimates in the following are from a 166 MHz
   Pentium PC:
     * Updating the map in the location chooser takes between 0 and 20
       seconds depending on how much of the world has to be redrawn.  To
       avoid the lag when zoomed out, don't install the optional [40]World
       Vector Shoreline database.
     * On the first run, libXaw3dXft bogs down for minutes trying to
       process exposure events on the long text of the disclaimer window.
       Since the disclaimer is normally read once and then disabled for
       future runs, one can either put up with it that one time or avoid
       the problem by building with libXaw3d or libXaw instead of
       libXaw3dXft.
     * Redrawing a default-sized tide graph takes about 1 second, which
       seems slow when one is scrolling forward or backward.  Graph
       drawing is faster if an 8-bit display mode (PseudoColor visual) is
       used, but anti-aliasing and transparency are available only in true
       color modes.

   The -aa setting that formerly could be used to speed up drawing on true
   color displays by disabling anti-aliasing was retired in XTide version
   2.12.

Troubleshooting

Q: XTide compiles, but when I try to run it I get an error like the following
about libtcd, libdstr, or libxtide:

error while loading shared libraries: libtcd.so.0: cannot open shared object fil
e: No such file or directory

   A: This happens when g++ found the shared library but your dynamic
   linker didn't.  There are several possible fixes.

   First, try running ldconfig as root (sudo ldconfig on Debian-like
   distros).  This will fix the problem if the dynamic linker has a stale
   cache of the directory to which the libraries were installed.  But if
   the libraries were installed to a directory that is not in the dynamic
   linker's search path, it won't make any difference.

   If the libraries were installed to a nonstandard directory, the least
   invasive fix is to add that directory to the environment variable
   LD_LIBRARY_PATH.  For example, if you find the library in
   /usr/local/lib, you would add this to your .bashrc (if using bash):
export LD_LIBRARY_PATH=/usr/local/lib

   Or you would add this to your .cshrc (if using csh or tcsh):
setenv LD_LIBRARY_PATH /usr/local/lib

   An alternative is to hard-code the directory into the executable using
   magic GNU linker switches:  configure with
   LDFLAGS="-Wl,-rpath,/usr/local/lib" and rebuild XTide.

   Another alternative is to edit the system configuration to add the
   nonstandard directory to the dynamic linker's search path.  On
   Slackware, you just add the directory to /etc/ld.so.conf.
   Debian/Ubuntu prefer to add files in the subdirectory
   /etc/ld.so.conf.d.  After making the change, run ldconfig again to
   update the cache.

   Finally, if all else fails, you could link statically with the missing
   libraries.

   Q: When compiling XTide, I get thousands of warnings of the form
   "warning: 'auto_ptr' is deprecated".

   A: To suppress these nuisance warnings in GCC, use
   CPPFLAGS="-Wno-deprecated-declarations" or upgrade to GCC 4.6 or newer.

   Q: When compiling XTide, I get an error involving xml-something or
   lex.xml.c.

   A: Do make xmlclean and then try again.

   Q: Using a DJGPP-built tide program in a DOS box in a 32-bit version of
   Windows, I get
harmonics.tcd: No such file or directory (ENOENT).

   But the file is THERE!

   A: When you do dir /X, you should see this:
  12/24/2012  03:15 PM         1,937,557 HARMON~1.TCD harmonics.tcd

   If it says harmonics.tcd but not also HARMON~1.TCD, then the file was
   created in the wrong namespace.  Recreate the file in a DOS box and
   confirm that HARMON~1.TCD then appears with dir /X.

   Q: Using a DJGPP-built tide program in a DOS box in a 32-bit version of
   Windows, I get "Your platform appears to have broken time zone
   support.  You need to get the DJGPP zoneinfo package and unpack it in
   C:\DJGPP."  But C:\DJGPP\zoneinfo is THERE!

   A:
     * To avoid namespace problems, unpack djtzn205.zip using DJGPP's
       [41]unzip32.exe in a DOS box.
     * Ensure that DJGPP.ENV is installed in C:\DJGPP.
     * Ensure that the environment variable DJGPP is set to
       C:\DJGPP\DJGPP.ENV.

   Q: DOS again...  I unzipped the files under Linux into a vfat (FAT)
   file system, and now I've got problems in DOS like missing header file,
   broken time zones....

   A: Yup.  There's something incompatible in the LFN implementations.
   Don't ask me why, but this only works reliably if you mount the vfat
   partition with the option shortname=winnt.
     __________________________________________________________________

   [42]<- Previous [43]-> Next [44]Contents

References

   1. https://flaterco.com/xtide/sysreq.html
   2. https://flaterco.com/xtide/ports.html
   3. https://flaterco.com/xtide/xtide.html#contents
   4. https://flaterco.com/
   5. https://flaterco.com/xtide/files.html
   6. https://flaterco.com/xtide/files.html#contrib
   7. https://flaterco.com/files/xtide/XTide%20v2.15.1%20Help%20b20170105.chm
   8. http://www.x.org/
   9. http://www.zlib.net/
  10. http://www.libpng.org/pub/png/libpng.html
  11. https://flaterco.com/xtide/files.html#libtcd
  12. http://sourceforge.net/projects/sf-xpaint/files/libxaw3dxft/
  13. http://www.catb.org/gpsd/
  14. https://flaterco.com/util/index.html
  15. https://flaterco.com/xtide/files.html#xtide
  16. https://flaterco.com/xtide/files.html#harmonicsfiles
  17. https://flaterco.com/xtide/files.html#WVS
  18. http://www.gnu.org/software/automake/automake.html
  19. http://www.freedesktop.org/wiki/Software/systemd/
  20. https://flaterco.com/xtide/time_t.html
  21. https://flaterco.com/xtide/advanced.html#cp
  22. http://www.freedesktop.org/software/systemd/man/systemd.socket.html#ListenStream=
  23. http://www.freedesktop.org/software/systemd/man/systemd.exec.html#EnvironmentFile=
  24. http://www.macports.org/ports.php?by=name&substr=xtide
  25. https://termux.com/
  26. https://developer.android.com/tools/sdk/ndk/index.html
  27. https://flaterco.com/xtide/ports.html#androidport
  28. http://www.cygwin.com/
  29. http://www.cygwin.com/
  30. https://flaterco.com/xtide/files.html#contrib
  31. http://www.dosbox.com/
  32. http://www.delorie.com/djgpp/
  33. http://www.freedos.org/software/?prog=doslfn
  34. http://www.delorie.com/pub/djgpp/current/unzip32.exe
  35. https://flaterco.com/xtide/libtcd.html#DOS
  36. https://flaterco.com/xtide/files.html#contrib
  37. http://www.iana.org/time-zones
  38. https://flaterco.com/xtide/installation.html#DOS
  39. https://flaterco.com/xtide/installation.html#cygwin
  40. https://flaterco.com/xtide/installation.html#WVS
  41. http://www.delorie.com/pub/djgpp/current/unzip32.exe
  42. https://flaterco.com/xtide/sysreq.html
  43. https://flaterco.com/xtide/ports.html
  44. https://flaterco.com/xtide/xtide.html#contents

################################################################

   [1]<- Previous [2]-> Next [3]Contents

   [4]Bridge Street

Available ports (and non-ports) for unsupported platforms

   If a program is derived from XTide source code, I call it a port, even
   if there are significant changes, code added and code deleted.  If a
   program contains no XTide source code but can use the same harmonics
   files that some version of XTide did, I call it a non-port.  These are
   only listed if there is no good port to a given platform.  This is not
   an attempt to track all tide-predicting software, only that with some
   commonality with XTide.  Better software having nothing to do with
   XTide may be available, but is not listed here.

   These programs are all maintained by different people.  They may be
   significantly different from XTide 2 as documented here.  If you have
   problems with a port or non-port, please contact the correct
   maintainer.  I cannot help with anything but the canonical Unix
   distribution.

  Android

   [5]Android screenshot

   2018-10:  Paul Poffenberger reported that XTide built "almost" out of
   the box using the tools available from [6]Termux.  Linux software is
   expected to need patching when it is built for Termux.

   2015-01:  Will Kamp produced a GPL port of XTide 2.14 to Android.  The
   [7]libxtide bit is separate from the [8]user interface, and although it
   is close to stock it was rearranged somehow to work with the Android
   NDK build system.  Source code is available at the preceding links; the
   MX Tides app is available from [9]Google Play.

  iOS / watchOS

   [10]iPhone screenshot

   2017-01:  Lee Ann Rucker did a nativized port to iOS, watchOS, and OS X
   using Cocoa and Objective-C++.  The free app for iPhone, iPad, and
   Apple Watch is available at
   [11]https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=
   1191127595 with sources at [12]https://github.com/lrucker1/XTideMac.

   [13]Apple Watch screenshot

   Older iOS ports:
     * Will Kamp, iOS version of MX Tides, port of XTide 2.?? in 2013
       ([14]free app, [15]free sources).
     * Selene Associates LLC, port of XTide 2.12.1 to iOS (phone or
       tablet), called [DEL: EyeTide :DEL] [16]Tide Watch ([17]$ app,
       [18]free sources).
     * Michael Parlee, port of XTide 2.10 to the iPhone, called
       ShralpTide2 ([19]$ app, [20]free sources).  There was an older
       ShralpTide port based on XTide 1.6.2.

  Mac

   You don't need to use a port:  See the [21]installation instructions
   for details.

   [22]Mac screenshot   2017-01:  The free Mac app for Lee Ann Rucker's
   nativized port is available at
   [23]https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=
   1170393977 with sources at [24]https://github.com/lrucker1/XTideMac.

  Microsoft Windows

   You don't need to use a port:  XTide can be compiled and run using
   [25]Cygwin, which is an emulated Unix environment for Windows that is
   free for typical non-commercial users.  The Cygwin distribution and its
   full license terms are available from [26]http://www.cygwin.com/.
   Please refer to the [27]Installation section for special instructions
   about using XTide under Cygwin.  Alternately, you could run a Linux
   virtual machine.

   Native DOS and Windows binaries for the command-line client tide are
   available under [28]contrib files and can be built as described in the
   [29]Installation section.

   The following native ports of the graphical client were done:
     * [30]WTides by Phil Thornton, was forked from XTide 2 in the GPLv2
       days.  A "nagware" binary is available for downloading.  Formerly,
       there was a fee to obtain the source code.  As of 2016-01, quoted
       from [31]here:  "To exercise this right, please email me, and I
       shall then immediately send you a link to the latest source code on
       Dropbox.  I have had to remove the source code from this website
       for lack of space." &#x1F644;
     * "WXTide32" by Mike Hopper, was based on XTide 1.6.2 but includes
       its own location chooser.  It works under Windows 95 or Windows
       NT.  It has a web page at [32]http://www.wxtide32.com/.
     * "WTide16" and "WTide32" by Paul C. Roberts, was based on XTide
       1.3.  It works under Windows 3.1 or Windows 95.  It used to be at
       ftp://ftp.demon.co.uk/pub/ibmpc/win3/apps/wtide (link broken as of
       2011-08-28).

  R

   rtide

   2016-07:  R is not an OS platform but a [33]software environment for
   statistical computing and graphics.  Joe Thorley and Luke Miller have
   produced rtide based on XTide's sources and harmonics data and made it
   available under GPL3.  It is hosted at
   [34]https://github.com/poissonconsulting/rtide.

  Maemo (GTK)

   From [35]http://maemo.org/intro/:  "Maemo is a software platform that
   is mostly based on open source code and powers mobile devices such as
   the Nokia N810 Internet Tablet.  Maemo platform has been developed by
   Nokia in collaboration with many open source projects such as the Linux
   kernel, Debian, GNOME, and many more."

   GTKTide by Mike Morrison is a fork of XTide 2.10 and libtcd with a
   GTK-based user interface, intended for use with Maemo.  As of
   2009-03-04, the last revision was in 2008-11 (source revision
   trunk-r7).  GTKTide is available from
   [36]http://maemo.org/downloads/product/OS2008/gtktide/.

   GTKTide can be compiled and run under desktop Linux, though not
   necessarily with ease.  Under Slackware 12.2, the build scripts did not
   configure dependencies correctly, and it took a long line of CPPFLAGS
   and LDFLAGS to make it go.

   The GTK interface performs well for the common use case of viewing the
   tide graph for a specified location, but the controls needed to engage
   other modes of operation and to tweak XTide settings are absent.

  Palm

   Palm

   [37]Walt Bilofsky implemented [38]Tide Tool for the Palm Pilot or any
   other compatible device running PalmOS.  Bilofsky wrote: "Tide Tool
   used to qualify as a port, and still has a modest amount of code from
   XTide 1.5.  But since Jeff Dairiki redid the algorithm to use integer
   math, I'm not sure how much of it is XTide any more.  I guess I'd call
   it the descendant of a port."

  Pocket PC / Windows CE

   PocketPC

   Dave Buchholz implemented [39]cTide for the PocketPC 2000 or PocketPC
   2002.  It's a port of a port ([40]WXTide32), but the screenshots still
   look a lot like XTide.  You can find it at
   [41]http://airtaxi.net/ctide/.

  J2ME (cell phone)

   Nokia phone with muTide

   Jrn Eichler implemented an XTide-derivative called Tide for the J2ME
   platform.  It is designed for modern smart phones like the Nokia N
   series, which have decent performance at floating-point math.  It used
   to be at http://www.tj-eichler.de/muTide/; as of 2016-01 this URL has
   been redirected to advertising.

  Timex Datalink USB

   Timex Datalink with DTide

   Paulo Marques implemented DTide for the Timex Datalink USB wristwatch.
   It uses a patched version of WXTide32 on the PC to allow the user to
   select locations and prepare simplified harmonics data to feed the
   application on the watch.  It can store more than 200 (simplified)
   locations in the watch's memory.  The application on the watch is an
   assembly language non-port using only integer math.

   To get the application, download TreeBrowser_vX.zip and Tree Browser
   Feeders/DTide.zip from the Files > WristApps archive of Yahoo Group
   [42]timexdatalinkusb.

   To get the source (TreeBrowser asm and patch against WXTide32),
   download TreeBrowser_src.zip and DTide_src.zip from the Files >
   WristApps archive of Yahoo Group [43]timexdatalinkusbdevelop.

  HP Calculator

   HP Calculator

   David MacCuish and Dennis Straley did a similar-in-spirit non-port for
   HP48G and HP49G series calculators.  As of 2011-08-28, the original
   HpTide site at http://heygus.2y.net/hptide is gone, but version 0.3.2
   (2001-11-11) is archived at
   [44]http://www.hpcalc.org/details.php?id=3943.
     __________________________________________________________________

   [45]<- Previous [46]-> Next [47]Contents

References

   1. https://flaterco.com/xtide/installation.html
   2. https://flaterco.com/xtide/modes.html
   3. https://flaterco.com/xtide/xtide.html#contents
   4. https://flaterco.com/
   5. https://flaterco.com/xtide/Android-screenshot.png
   6. https://termux.com/
   7. https://github.com/manimaul/AndXtideLib
   8. https://github.com/manimaul/MX-Tides
   9. https://play.google.com/store/apps/details?id=com.mxmariner.tides
  10. https://flaterco.com/xtide/LAR_iPhone.jpg
  11. https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=1191127595
  12. https://github.com/lrucker1/XTideMac
  13. https://flaterco.com/xtide/LAR_watch.jpg
  14. https://itunes.apple.com/us/app/mx-tides/id721359984
  15. https://github.com/manimaul/MX-Tides-iOS
  16. http://www.selene-associates.com/open-source-projects/
  17. https://itunes.apple.com/us/app/eye-tide/id581717599
  18. http://www.selene-associates.com/downloads/eye-tide/
  19. http://itunes.apple.com/us/app/shralp-tide-2/id504080766
  20. http://github.com/shralpmeister/shralptide2
  21. https://flaterco.com/xtide/installation.html#mac
  22. https://flaterco.com/xtide/LAR_Mac.jpg
  23. https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=1170393977
  24. https://github.com/lrucker1/XTideMac
  25. http://www.cygwin.com/
  26. http://www.cygwin.com/
  27. https://flaterco.com/xtide/installation.html#cygwin
  28. https://flaterco.com/xtide/files.html#contrib
  29. https://flaterco.com/xtide/installation.html#DOS
  30. http://www.wtides.com/
  31. http://www.wtides.com/payment.htm
  32. http://www.wxtide32.com/
  33. https://www.r-project.org/
  34. https://github.com/poissonconsulting/rtide
  35. http://maemo.org/intro/
  36. http://maemo.org/downloads/product/OS2008/gtktide/
  37. http://www.toolworks.com/bilofsky/
  38. http://www.toolworks.com/bilofsky/tidetool/
  39. http://airtaxi.net/ctide/
  40. http://www.wxtide32.com/
  41. http://airtaxi.net/ctide/
  42. http://tech.groups.yahoo.com/group/timexdatalinkusb/
  43. http://tech.groups.yahoo.com/group/timexdatalinkusbdevelop/
  44. http://www.hpcalc.org/details.php?id=3943
  45. https://flaterco.com/xtide/installation.html
  46. https://flaterco.com/xtide/modes.html
  47. https://flaterco.com/xtide/xtide.html#contents

################################################################

   [1]<- Previous [2]-> Next [3]Contents

   [4]Morning in OC

Modes

   This page provides an overview of the kinds of things that XTide can
   do.  How to do them will be explained in the [5]next section.

  Graph mode

   San Francisco graph

   Graph mode gives you a plot of the water level (or water velocity, in
   the case of currents) versus time.  The times of high and low tide (or
   max flood and max ebb) are printed across the top.  Sunrise and sunset
   are denoted with different background colors; moonrise, moonset, and
   moon phases are shown along the bottom.  A + mark on the graph
   indicates the conditions at the time that the graph was generated.

   For currents, the times of [6]slack water are also shown along the
   bottom.  If necessary, crowding of the bottom caption line can be
   relieved in several ways (see [7]Advanced usage).

   Default current graph

  Clock mode

   Clock mode

   Clock mode is similar to graph mode, but the captions are different and
   the window is automatically updated once a minute to show the latest
   conditions.  From top to bottom, the window shows the current time, the
   next high tide (or maximum flood), the predicted height or velocity for
   the current time (shown with a +), and the next low tide (or maximum
   ebb).  Other events like slack water and moon phases do not appear.

   Classic analog tide clock If a tide clock is iconified using an ancient
   window manager like twm, the icon will appear as a classic round tide
   clock that gives a vague idea of where you are in the tide cycle.
   Unfortunately, this feature is not accessible at all from newer windows
   environments that disregard the old icon protocol.  Even some of the
   old window managers had trouble with it; they would crash, or the icon
   would fail to update.

  Plain mode

   Plain text listing of events, no foo-foo.
San Francisco, California
37.8067 N, 122.4650 W

2003-02-13  2:17 PM PST   Moonrise
2003-02-13  3:25 PM PST  -0.32 feet  Low Tide
2003-02-13  5:46 PM PST   Sunset
2003-02-13 10:49 PM PST   4.64 feet  High Tide
2003-02-14  3:05 AM PST   3.16 feet  Low Tide
2003-02-14  5:44 AM PST   Moonset
2003-02-14  7:01 AM PST   Sunrise
2003-02-14  9:02 AM PST   6.27 feet  High Tide

  Calendar mode

   Calendar mode arranges most of the information available in text mode
   into a commonly used tabular layout.

                                January 2007

   Day High
   Low High
   Low High
   Phase Sunrise Sunset Moonrise Moonset
   Mon 01 3:48 AM EST 0.17 m 9:58 AM EST -0.14 m 5:07 PM EST 0.43 m 7:26
   AM EST 4:53 PM EST 2:49 PM EST 5:49 AM EST
   Tue 02 12:25 AM EST -0.01 m 4:46 AM EST 0.16 m 10:52 AM EST -0.14 m
   6:00 PM EST 0.42 m 7:26 AM EST 4:54 PM EST 3:48 PM EST 6:54 AM EST
   Wed 03 1:15 AM EST -0.01 m 5:40 AM EST 0.17 m 11:45 AM EST -0.14 m 6:50
   PM EST 0.41 m Full Moon 7:26 AM EST 4:55 PM EST 4:54 PM EST 7:49 AM EST
   Thu 04 2:00 AM EST -0.01 m 6:32 AM EST 0.18 m 12:37 PM EST -0.13 m 7:37
   PM EST 0.39 m 7:26 AM EST 4:56 PM EST 6:03 PM EST 8:34 AM EST
   Fri 05 2:42 AM EST -0.00 m 7:20 AM EST 0.19 m 1:28 PM EST -0.12 m 8:21
   PM EST 0.37 m 7:26 AM EST 4:57 PM EST 7:10 PM EST 9:09 AM EST
   Sat 06 3:20 AM EST -0.00 m 8:08 AM EST 0.20 m 2:16 PM EST -0.10 m 9:02
   PM EST 0.35 m 7:26 AM EST 4:58 PM EST 8:15 PM EST 9:37 AM EST
   Sun 07 3:56 AM EST -0.00 m 8:56 AM EST 0.21 m 3:04 PM EST -0.08 m 9:40
   PM EST 0.32 m 7:26 AM EST 4:59 PM EST 9:17 PM EST 10:02 AM EST

   "Alt" calendar mode arranges the information into a traditional weekly
   calendar layout.

                     Sun 07     Mon 08 Tue 09 Wed 10 Thu 11 Fri 12 Sat 13
   Low Tide -0.00 m
   3:56 AM EST
   Sunrise
   7:26 AM EST
   High Tide 0.21 m
   8:56 AM EST
   Moonset
   10:02 AM EST
   Low Tide -0.08 m
   3:04 PM EST
   Sunset
   4:59 PM EST
   Moonrise
   9:17 PM EST
   High Tide 0.32 m
   9:40 PM EST Low Tide -0.01 m
   4:28 AM EST
   Sunrise
   7:26 AM EST
   High Tide 0.22 m
   9:46 AM EST
   Moonset
   10:23 AM EST
   Low Tide -0.05 m
   3:53 PM EST
   Sunset
   5:00 PM EST
   High Tide 0.30 m
   10:16 PM EST
   Moonrise
   10:17 PM EST Low Tide -0.02 m
   4:58 AM EST
   Sunrise
   7:26 AM EST
   High Tide 0.22 m
   10:39 AM EST
   Moonset
   10:43 AM EST
   Low Tide -0.01 m
   4:46 PM EST
   Sunset
   5:00 PM EST
   High Tide 0.27 m
   10:51 PM EST
   Moonrise
   11:16 PM EST Low Tide -0.04 m
   5:28 AM EST
   Sunrise
   7:25 AM EST
   Moonset
   11:03 AM EST
   High Tide 0.24 m
   11:35 AM EST
   Sunset
   5:01 PM EST
   Low Tide 0.03 m
   5:49 PM EST
   High Tide 0.24 m
   11:27 PM EST Moonrise
   12:14 AM EST
   Low Tide -0.06 m
   6:00 AM EST
   Sunrise
   7:25 AM EST
   Last Quarter
   7:45 AM EST
   Moonset
   11:23 AM EST
   High Tide 0.25 m
   12:32 PM EST
   Sunset
   5:02 PM EST
   Low Tide 0.05 m
   7:01 PM EST High Tide 0.21 m
   12:07 AM EST
   Moonrise
   1:15 AM EST
   Low Tide -0.08 m
   6:35 AM EST
   Sunrise
   7:25 AM EST
   Moonset
   11:46 AM EST
   High Tide 0.28 m
   1:29 PM EST
   Sunset
   5:04 PM EST
   Low Tide 0.06 m
   8:18 PM EST High Tide 0.18 m
   12:52 AM EST
   Moonrise
   2:17 AM EST
   Low Tide -0.09 m
   7:15 AM EST
   Sunrise
   7:25 AM EST
   Moonset
   12:14 PM EST
   High Tide 0.30 m
   2:22 PM EST
   Sunset
   5:05 PM EST
   Low Tide 0.06 m
   9:30 PM EST

   Calendar mode is not available from the interactive client.

  Banner mode

   Banner mode is a specialization of graph mode for output on old tractor
   feed dot matrix or line printers that use continuous reams of paper.
   Also useful as a workaround if your printing application does stupid
   things with color graphs.  The graph is turned sideways and the aspect
   ratio is adjusted for Pica type.  This mode is only available in the
   command line client.
San Francisco, San Francisco Bay, California
37.8067 N, 122.4650 W

********-*****-*******************
********2*****1*****0*****1*****23456782012-02-20
-4****** ***** ***** ***** *****      4:00 AM PST
********f*****f*****f*****f*****fffffff
********t*****t*****t*****t*****t*tttttt
-5********************************
****Moonrise***********************+||||||
-***5:53 AM PST**********************||||||
-6************************************||||||
****************************************|||||
******************************************  |     |     |     |     |
-7******************************************|     |     |     |     |
**********************************************    |     |     |     |
************************************************  |     |     |     |
-8************************************************|     |     |     |
****************************************************    |     |     |
******************************************************  |     |     |
-9***************************************************** |     |     |
*********************************************************     |     |
*********************************************************     |     |2012-02-20
-10*******************************************************    |    10:08 AM PST
**********************************************************    |     |
**********************************************************    |     |
-11******************************************************     |     |
********************************************************|     |     |
******************************************************  |     |     |
-12*************************************************    |     |     |
************************************************* |     |     |     |
**********************************************    |     |     |     |
-1***************************************** |     |     |     |     |
****************************************    |     |     |     |     |
************************************  |     |     |     |     |     |
-2*******************************     |     |     |     |     |     |
******************************  |     |     |     |     |     |     |
***************************     |     |     |     |     |     |     |
-3*********************** |     |     |     |     |     |     |     |
***********************   |     |     |     |     |     |     |     |

  Stats mode

   Stats mode is mainly for finding the highest high tide and lowest low
   tide within some period of time.  However, it also provides an
   estimation of the Mean Lower Low Water datum based on the generated
   predictions.  In cases where an authoritative benchmark for a station
   is not available, this can be used to derive a reasonable
   approximation.  If the datum for the station has already been set to
   MLLW (as it should have been, for all U.S. stations) then the estimated
   value should be close to zero.

   Stats mode is only available in the command line client.
Bar Harbor, Frenchman Bay, Maine
44.3917 N, 68.2050 W

Estimated upper bound:  14.05 feet
Estimated lower bound:  -2.71 feet
Mean, assuming symmetry:   5.67 feet

Searched interval from 2007-01-01 12:00 AM EST to 2008-01-01 12:00 AM EST
Maximum was  13.44 feet at 2007-11-25 10:31 AM EST
Minimum was  -2.05 feet at 2007-04-18  5:53 AM EDT
Mean of maxima and minima was   5.67 feet
Estimated MLLW:   0.15 feet

CPU time used:  0.280000 s

  Raw mode

   Raw mode is for getting machine-readable output that can be fed into
   other Unix programs.  The first column is a Unix time_t timestamp
   (seconds since 1970-01-01 00:00Z); the second column is tide heights in
   whatever units were selected for the location.
896624777 0.180580
896628377 1.271889
896631977 3.463100
896635577 6.084148
896639177 8.402840
896642777 9.943272
896646377 10.421064
896649977 9.672793
896653577 7.856022
896657177 5.543402
896660777 3.413487
896664377 1.926805
896667977 1.371479

  Medium rare mode

   Medium rare mode is just like raw mode except that the timestamps are
   "cooked" according to the date and time format settings that are in
   effect.
2002-02-06  4:56 PM EST 2.054437
2002-02-06  5:56 PM EST 1.573781
2002-02-06  6:56 PM EST 1.086896
2002-02-06  7:56 PM EST 0.656111
2002-02-06  8:56 PM EST 0.224729
2002-02-06  9:56 PM EST -0.161049
2002-02-06 10:56 PM EST -0.265521
2002-02-06 11:56 PM EST 0.077530

  List mode

   List mode does not provide tide predictions at all.  It is simply a way
   to get the list of supported locations from the command line client.

   The 'Type' column shows Ref for reference stations and Sub for
   subordinate stations.  [8]You should care about the difference.

   Location Type Coordinates
   0.8 n.mi. above entrance, Alloway Creek, New Jersey Sub 39.4967 N,
   75.5167 W
   130th Street, Hudson River, New York Sub 40.8167 N, 73.9667 W
   2.5 miles above mouth, Little Satilla River, Georgia Sub 31.0583 N,
   81.4933 W
   2.5 n.mi. above entrance, Alloway Creek, New Jersey Sub 39.5050 N,
   75.4833 W
   3 miles above A1A highway bridge, Loxahatchee River, Florida Sub
   26.9700 N, 80.1267 W
   37th Avenue, Long Island City, East River, New York, New York Sub
   40.7617 N, 73.9467 W

  About mode

   About mode does not provide tide predictions either.  Instead, it shows
   the metadata for a station ("About this station").

   Name Bar Harbor, Frenchman Bay, Maine
   In file
   /home/dave/svnrepo/software/xtide/harmonics-dwf-20111230-free.tcd
   Station ID context NOS
   Station ID 8413320
   Date imported 2011-12-25
   Coordinates 44.3917 N, 68.2050 W
   Country U.S.A.
   Time zone :America/New_York
   Native units feet
   Source http://tidesandcurrents.noaa.gov/
   Restriction Public domain
   Comments Harmonic constants from web snapshot taken 2011-12-11
   Datum from benchmark sheet, publication date 2011-09-29
   Credit Processed by David Flater for XTide
   https://flaterco.com/xtide/
   Original name Bar Harbor, ME
   State ME
   Type Reference station, tide
   Meridian 0:00
   Datum Mean Lower Low Water
   Confidence 10

Formats

   XTide can render output in eight different formats:  X-windows, HTML,
   LaTeX, iCalendar, PNG, CSV, SVG, or text.  The X-windows format is
   implicit in the interactive client and can't be selected explicitly.
   The others can be selected in the non-interactive client and are
   invoked automatically by the interactive and web clients (e.g., when
   you save output to a file).

   The currently supported combinations of mode and format are as follows:

         Mode                 Legal forms
     about         text, HTML, X-windows
     banner        text
     calendar      text, HTML, LaTeX, iCalendar, CSV
     alt. calendar text, HTML, LaTeX
     clock         text, PNG, SVG, X-windows
     graph         text, PNG, SVG, X-windows
     list          text, HTML
     plain         text, X-windows, CSV
     raw           text, X-windows, CSV
     medium rare   text, X-windows, CSV
     stats         text

   The HTML and PNG formats are adequately demonstrated by the examples
   above in the Modes section.

  Text format

   Several of the preceding examples, like plain mode, were in text
   format.  Here is an example of graph mode using the text format:
San Francisco, San Francisco Bay, California            
-122003-02-132003-02-13                 2003-02-13     
 PST2:18 AM PST8:12 AM PST                3:25 PM PST    
                                         
                                         
                                         
                                         
2 m---------------------------------------------------------------------------
*************                               
******************                             
***************************                           
*****************************************                         
1 m***********************************************-----------------------------
****************************************************                     *
******************************************************                   ***
********************************************************                 ******
**********************************************************            *********
0 m****************************************************************************
*******************************************************************************
*******************************************************************************
********************Moonset****************************Moonrise****************
******************4:51 AM PST*************************2:17 PM PST**************
1**12***1***2***3**4***5***6***7***8***9*10**11**12***1***2***3***4**5***6***7*
|**|||**|***|***|**|***|***|***|***|***|**|***|***|***|***||**|***|**|***|***|*

   Calendar mode is kind of cramped in text format if you use all default
   settings, but it can be made to work by using a compact time format,
   setting a wider TTY width, and/or turning off sun and moon
   information.  These are [9]settings that you can change with the
   [10]control panel or [11]command-line switches.  See [12]Appendix C for
   related discussion.
Bar Harbor, Frenchman Bay, Maine
44.3917 N, 68.2050 W

                                   May 2006

Day    High   Low    High   Low    High   Phase  Sunris Sunset Moonri Moonse
Mon 01 01:42  08:10  14:23  20:23                05:23  19:36  07:38
Tue 02 02:32  09:02  15:16  21:16                05:22  19:37  08:38  00:32
Wed 03 03:25  09:56  16:10  22:12                05:20  19:39  09:44  01:17
Thu 04 04:21  10:52  17:07  23:12                05:19  19:40  10:51  01:52
Fri 05 05:20  11:49  18:05                First  05:18  19:41  11:58  02:19
Sat 06        00:13  06:20  12:45  19:01         05:16  19:42  13:03  02:40
Sun 07        01:11  07:18  13:38  19:52         05:15  19:44  14:07  02:59
Mon 08        02:06  08:12  14:26  20:39         05:14  19:45  15:10  03:15
Tue 09        02:55  09:01  15:10  21:21         05:12  19:46  16:14  03:31
Wed 10        03:39  09:46  15:51  21:59         05:11  19:47  17:19  03:47
Thu 11        04:21  10:27  16:28  22:36         05:10  19:48  18:27  04:05
Fri 12        04:59  11:06  17:05  23:11         05:09  19:49  19:38  04:26
Sat 13        05:36  11:45  17:41  23:48  Full M 05:07  19:51  20:51  04:52
Sun 14        06:15  12:24  18:19                05:06  19:52  22:02  05:26
Mon 15 00:26  06:55  13:05  18:59                05:05  19:53  23:07  06:11
Tue 16 01:08  07:38  13:49  19:44                05:04  19:54         07:08
Wed 17 01:55  08:25  14:38  20:35                05:03  19:55  00:02  08:17
Thu 18 02:46  09:18  15:32  21:32                05:02  19:56  00:45  09:34
Fri 19 03:43  10:14  16:30  22:34                05:01  19:57  01:19  10:53
Sat 20 04:45  11:13  17:30  23:40         Last Q 05:00  19:58  01:46  12:12
Sun 21 05:50  12:14  18:31                       04:59  19:59  02:08  13:30
Mon 22        00:46  06:56  13:14  19:31         04:58  20:00  02:29  14:47
Tue 23        01:50  07:59  14:12  20:27         04:57  20:01  02:49  16:05
Wed 24        02:49  08:59  15:07  21:21         04:56  20:02  03:10  17:23
Thu 25        03:45  09:56  15:59  22:12         04:56  20:03  03:34  18:43
Fri 26        04:38  10:49  16:49  23:00         04:55  20:04  04:03  20:01
Sat 27        05:28  11:39  17:38  23:48  New Mo 04:54  20:05  04:40  21:15
Sun 28        06:16  12:27  18:25                04:53  20:06  05:26  22:18
Mon 29 00:34  07:03  13:15  19:13                04:53  20:07  06:23  23:09
Tue 30 01:21  07:51  14:03  20:01                04:52  20:08  07:27  23:49
Wed 31 02:09  08:38  14:51  20:50                04:52  20:09  08:35

  SVG format

   XTide can produce output in the Scalable Vector Graphics (SVG) format
   for graph and clock modes.  Graphs in SVG format ought to look better
   in a web browser than graphs in PNG format, but unfortunately, fonts.
   Moreover, font metrics.

   If your browser supports SVG, an SVG-formatted graph might appear here:

   SVG graph

  LaTeX format

   Running LaTeX formatted output through pdflatex yields a PDF that looks
   approximately [13]like this.  See [14]Appendix C for hints on obtaining
   the best results.

  iCalendar format

   The iCalendar format yields an .ics file that can be imported by
   standards-compliant calendar tools to put tide events on your
   schedule.  It is only useful in calendar mode.

  CSV format

   CSV stands for Comma-Separated Values, a.k.a. comma-delimited.  This
   rigid format is useful for importing XTide output into database and
   spreadsheet applications with fixed columns.  Commas that are part of
   field values are replaced by the pipe character (|).
Washington| D.C.,2004-03-04,3:40 PM EST,,Moonrise
Washington| D.C.,2004-03-04,6:04 PM EST,,Sunset
Washington| D.C.,2004-03-04,6:23 PM EST,2.75 ft,High Tide
Washington| D.C.,2004-03-05,1:30 AM EST,0.21 ft,Low Tide

   In calendar mode, the columns in CSV format are:  location name, date,
   five reps of (max time, max value), five reps of (min time, min value),
   ten reps of slack time, sunrise, sunset, moonrise, moonset.  The number
   of columns allocated is controlled by the compile-time constants
   numMaxMin and numRiseSet in CalendarFormC.cc.  Events exceeding the
   number of columns available are discarded with a warning.  Moon phases
   and mark level crossings are just discarded.

   The use of compile-time constants instead of dynamically adjusted
   values is intentional, since whatever application is reading the CSV
   output needs the interpretation of columns to be predictable.  However,
   the default configuration allowing one column for rise and set events
   is not always adequate.  Yes!  You can have two sunsets in one day, and
   you don't even need Daylight Savings Time to do it:
Isla Neny, Antarctica
68.2000 S, 67.0000 W

2001-01-24 12:03 AM ARST   Sunset
2001-01-24  3:17 AM ARST   Sunrise
2001-01-24 11:57 PM ARST   Sunset
     __________________________________________________________________

   [15]<- Previous [16]-> Next [17]Contents

References

   1. https://flaterco.com/xtide/ports.html
   2. https://flaterco.com/xtide/interactive.html
   3. https://flaterco.com/xtide/xtide.html#contents
   4. https://flaterco.com/
   5. https://flaterco.com/xtide/interactive.html
   6. https://flaterco.com/xtide/faq.html#240
   7. https://flaterco.com/xtide/advanced.html#crowding
   8. https://flaterco.com/xtide/faq.html#refsub
   9. https://flaterco.com/xtide/settings.html
  10. https://flaterco.com/xtide/advanced.html#cp
  11. https://flaterco.com/xtide/settings.html
  12. https://flaterco.com/xtide/pound_to_fit.html
  13. https://flaterco.com/xtide/BarHarbor.pdf
  14. https://flaterco.com/xtide/pound_to_fit.html#latex
  15. https://flaterco.com/xtide/ports.html
  16. https://flaterco.com/xtide/interactive.html
  17. https://flaterco.com/xtide/xtide.html#contents

################################################################

   [1]<- Previous [2]-> Next [3]Contents

   [4]Pemaquid bell

Using the interactive interface

   The first time you run xtide, you will get a license and disclaimer
   window.  Read it, then click "Don't show this again" and dismiss it.

   When XTide is finished indexing the harmonics files, you get a location
   chooser consisting of a map window and a location list window.  If
   XTide was built with [5]GPS support and your GPS is present and
   working, the map zooms in on your current location automatically.
   Otherwise, the map initially shows an entire hemisphere of the globe.

   The location list enumerates every tide station that is plotted on the
   map.  Buttons with labels such as "A-S" and "S-Z" appear on the
   location list window if the list is too long to display all at once;
   use these buttons to switch between the different pieces of the list.

   (If you do not get outlines of coastlines, please refer to the
   [6]installation section regarding World Vector Shoreline files.)

   Globe window Location list window

   You can change to a flat map projection that shows the entire world at
   once by clicking on Flat.  You can make this your default location
   chooser if desired using the [7]control panel described in the [8]next
   section.

   You can zoom in on an area by clicking on the map with the left mouse
   button; zooming out is accomplished with the button at the bottom of
   the map window.  Your view can be shifted left, right, up, or down
   using the arrow keys on the keyboard.  The location list updates to
   contain only those tide stations that are visible.  You can cause the
   location list to include all available locations at once by clicking on
   List All.  This will also bring up any locations whose coordinates are
   unknown.

   Instead of zooming, you can narrow the list to a small area by clicking
   on that area with the right mouse button.  A circle will be drawn on
   the map indicating the area selected:

   Location chooser window with circle

   When you are ready to choose a location, you can either click on it in
   the location list or zoom down to it on the map and click on the
   appropriate red or green dot with the middle mouse button.  (Red dots
   indicate tide stations; green dots indicate currents.)  A tide or
   current graph for the selected location will then pop up.

   Graph window

   The Backward and Forward buttons allow you to move forward or backward
   in time by a small amount.  Pull down the Options menu to gain access
   to the Set Time option, which allows arbitrarily large adjustments.
   The Options menu also provides these other options:

   Option Function
   Save Export the contents of the window to a PNG, SVG, or text file, as
   appropriate.  (In raw and medium rare modes, you are given the
   opportunity to adjust the start and end times for the output.)
   Set Mark See [9]next section.
   Convert ft<->m Convert units to the preferred system.
   Set Aspect See [10]next section.
   Set Step See [11]next section.
   New Graph Window Pop up a graph mode window for the location.
   New Plain Mode Window Pop up a plain mode window for the location.
   New Raw Mode Window Pop up a raw mode window for the location.
   New Medium Rare Mode Window Pop up a medium rare mode window for the
   location.
   New Clock Window Pop up a clock mode window for the location.
   About This Station Show station metadata.
   About XTide Show XTide version and GPL.
   New Location Chooser Pop up a new location chooser.
   Control Panel See [12]next section.

   Without getting into the complicated options, you can navigate from the
   location chooser to a graph window to other modes for the same location
   as you see fit.  Use the Dismiss buttons to get rid of windows that you
   are through with.

   Text window

   In text windows, you can use the Forward and Backward buttons to scroll
   forward and backward in time, or you can use the mouse wheel.  Text
   windows provide the same Options menu that is available on graph
   windows.

   Clock window   Clock window with buttons

   By default, clock windows first appear with no buttons whatsoever,
   which is how you want them if you are going to leave them running on
   your desktop.  However, you can make the buttons appear and disappear
   by clicking anywhere on the graph inside of the clock window.

   The Options menu is again the same.  Forward and Backward buttons are
   not provided for the obvious reason.
     __________________________________________________________________

   [13]<- Previous [14]-> Next [15]Contents

References

   1. https://flaterco.com/xtide/modes.html
   2. https://flaterco.com/xtide/advanced.html
   3. https://flaterco.com/xtide/xtide.html#contents
   4. https://flaterco.com/
   5. https://flaterco.com/xtide/installation.html#GPS
   6. https://flaterco.com/xtide/installation.html#WVS
   7. https://flaterco.com/xtide/advanced.html#cp
   8. https://flaterco.com/xtide/advanced.html
   9. https://flaterco.com/xtide/advanced.html
  10. https://flaterco.com/xtide/advanced.html
  11. https://flaterco.com/xtide/advanced.html
  12. https://flaterco.com/xtide/advanced.html
  13. https://flaterco.com/xtide/modes.html
  14. https://flaterco.com/xtide/advanced.html
  15. https://flaterco.com/xtide/xtide.html#contents

################################################################

   [1]<- Previous [2]-> Next [3]Contents

   [4]The tide cometh, Provincetown, MA

Advanced usage

  Mark level

   The "mark level" is a specific tidal height or current velocity of your
   choosing.  When you set a mark level for a location, the times at which
   the tide level crosses the mark level will be displayed at the bottom
   of graphs and included in plain listings and calendars.  This option is
   useful to determine the times when the tide will be low enough to
   expose something that is submerged at high tide or high enough to
   provide a desired depth.  You can set a mark level by selecting the Set
   Mark option on the Options menu.  In the following example, a mark
   level of 1 m has been applied to Bar Harbor predictions to find the
   approximate times at which one can walk to Bar Island without getting
   one's feet wet.

   Bar Harbor with mark level

   Mark level crossings are not displayed in clock mode windows due to
   lack of space.

  Aspect

   The "aspect" is a number that controls how stretched out or scrunched
   up a graph is.  If timestamps are overlapping one another on a tide
   graph and becoming unreadable, you can increase the aspect to make them
   farther apart.  An aspect of 1.0 is "normal;" an aspect of 2.0
   stretches the graph by a factor of 2; an aspect of 0.5 does the
   opposite, compressing the graph.  You can change the aspect by
   selecting the Set Aspect option on the Options menu.

  Step

   In raw and medium rare modes, tide levels are normally listed with an
   increment of one hour for successive lines of output.  You can adjust
   this increment using the Set Step option.

  The control panel

  The control panel is the easiest way to customize the many user-serviceable
  [5]settings of XTide.  It is available from the [6]options menu of prediction
  windows.

  It's not pretty, but it gets the job done.  The many individual settings have
  their many individual dialogs, and all are simply thrown together into a
  resizable window in no particular order.  Resize and scroll as needed.

  XTide control panel

  Colors can be changed to any of the "standard" X-windows color names or to
  24-bit RGB specifications of the form rgb:hh/hh/hh by typing the new colors in
  the dialog boxes.  Fonts must be specified in fontconfig format (e.g.,
  "Helvetica-10") if XTide was built with Xaw3dXft, or in traditional XLFD
  (e.g., "-*-helvetica-*-r-*-*-10-*-*-*-*-*-*-*") if not.  Other settings have
  pull-down choice menus or counting buttons to help you along.  Least
  user-friendly, but most powerful, are the timestamp formats.  In return for
  reading the Unix man page for the strftime library function, you are empowered
  to change the timestamp formats to practically anything you could ever need.

  You can choose Apply to see how the settings look in the current session only,
  or Save to make the settings permanent.  They will be saved in the file
  ~/.xtide.xml.  N.B., font changes require a restart to become effective.
  Example 1:  Alternate graph styles

  Graphstyle l (line):

  Graphstyle l example

  Graphstyle s (semitransparent) with line width set to 1.5:

  Graphstyle s example

  Note that semitransparent style makes no sense in formats that don't support
  opacity (text and PseudoColor X-windows).
  Example 2:  Four ways to fix crowding of the bottom caption line

  Original graph with crowded caption line:

  Default current graph

  With aspect 1.5 (to stretch out the graph):

  Current graph with wider aspect

  With time format "%H:%M" (to eliminate AM/PM and time zone verbiage):

  Current graph with more concise time format

  With event mask "Mm" (to filter out moonrise and moonset events):

  Current graph with event mask

  With graph font changed to LiberationSansNarrow-10:

  Current graph with narrow font
  Example 3:  Two ways to fix missing depth axis

  This station has such a small tidal range that the only label on the depth
  axis is zero meters, which is kind of useless:

  Missing depth example

  With option to label tenths of units enabled:

  Missing depth example

  With preferred units set to feet:

  Missing depth example
  Command line options

  The interactive client supports all of the command line switches related to
  [7]settings which are described in a later section.  In addition, it supports
  the following.

   -b "YYYY-MM-DD HH:MM"
          With -l, specify the begin (start) time for predictions using
          the ISO 8601 compliant format YYYY-MM-DD HH:MM, where hours
          range from 00 to 23.  The timestamp is in the local time zone
          for the location, or in UTC if the [8]-z setting is engaged.  If
          clock mode is selected or if no -b is supplied, the current time
          will be used.  (Note [9]Quirk #1)

   -display "X display"
          Specify the X display, e.g. "quake:0.0".  This overrides the
          DISPLAY environment variable.

   -geometry "XOFFYOFF"
          Specify a position for the window corresponding to the first use
          of -l.  (Width and height are controlled by different
          [10]settings.)

   -l "Location Name"
          Specify a location for tide predictions.  When given to the
          interactive client, this causes it to start a tide clock for the
          specified location instead of launching a location chooser on
          startup.  This is useful for starting a tide clock automatically
          when you log on.  Multiple uses of -l will result in multiple
          tide clocks.

   -m a|g|k|m|p|r
          With -l, specify mode to be about, graph, clock, medium rare,
          plain, or raw.

   -ml [-]N.NN(ft|m|kt)
          Specify an initial mark level to be used in prediction windows
          launched from the command line.  The predictions will include
          the times when the tide level crosses the mark.  The mark level
          also can be specified or changed using the Options menu.  Not
          supported in clock mode.  Does not affect windows that are
          launched from the location chooser.  Example usage: -ml -0.25ft

   -v
          Print version string and exit.  Please note that versions marked
          as DEVELOPMENT versions are not really versioned; they are work
          in progress and will change without warning.

  If you use the same location a lot, you can set the environment variable
  XTIDE_DEFAULT_LOCATION to its name instead of using -l every time.

  Other switches that are supported by the [11]non-interactive interface are not
  supported by the interactive interface and will be ignored.

  The arguments to -display, -fn, and -geometry cannot be concatenated with the
  switches (see [12]Quirk #5).
    _________________________________________________________________________

  [13]<- Previous [14]-> Next [15]Contents

References

   1. https://flaterco.com/xtide/interactive.html
   2. https://flaterco.com/xtide/tty.html
   3. https://flaterco.com/xtide/xtide.html#contents
   4. https://flaterco.com/
   5. https://flaterco.com/xtide/settings.html
   6. https://flaterco.com/xtide/interactive.html#optionsmenu
   7. https://flaterco.com/xtide/settings.html
   8. https://flaterco.com/xtide/settings.html#zulu
   9. https://flaterco.com/xtide/bugs.html
  10. https://flaterco.com/xtide/settings.html
  11. https://flaterco.com/xtide/tty.html
  12. https://flaterco.com/xtide/bugs.html
  13. https://flaterco.com/xtide/interactive.html
  14. https://flaterco.com/xtide/tty.html
  15. https://flaterco.com/xtide/xtide.html#contents

################################################################

   [1]<- Previous [2]-> Next [3]Contents

   [4]Tide closes in

Using the command line interface

   The command line interface, tide, supports a number of [5]modes that
   cannot be accessed with the interactive client.  It can run without
   X-windows, and unlike the interactive client, it can easily be invoked
   from shell scripts.

   The minimal usage is simply to specify a location with -l.  The default
   mode is plain, and the default format is text:

$ tide -l "anchorage, al"
Anchorage, Alaska
61.2383 N, 149.8883 W

2003-02-12  7:27 AM AKST   Moonset
2003-02-12  8:50 AM AKST   Sunrise
2003-02-12 10:19 AM AKST  10.72 feet  Low Tide
2003-02-12 11:34 AM AKST   Moonrise
2003-02-12  3:42 PM AKST  24.41 feet  High Tide
2003-02-12  5:37 PM AKST   Sunset
2003-02-12 11:00 PM AKST   1.95 feet  Low Tide
2003-02-13  5:31 AM AKST  25.51 feet  High Tide
2003-02-13  8:29 AM AKST   Moonset

   If you use the same location a lot, you can set the environment
   variable XTIDE_DEFAULT_LOCATION to its name instead of using -l every
   time.

   The non-interactive client supports most of the command line switches
   related to [6]settings which are described in a later section.  (As a
   notable exception, the graph font cannot be changed.)  In addition, it
   supports the following.

   -b "YYYY-MM-DD HH:MM"
          Specify the begin (start) time for predictions using the ISO
          8601 compliant format YYYY-MM-DD HH:MM, where hours range from
          00 to 23.  The timestamp is in the local time zone for the
          location, or in UTC if the [7]-z setting is engaged.  If clock
          mode is selected or if no -b is supplied, the current time will
          be used.  (Note [8]Quirk #1)

   -e "YYYY-MM-DD HH:MM"
          Specify the end (stop) time for predictions in banner, calendar,
          alt. calendar, medium rare, plain, raw, or stats mode.  Does not
          apply in graph and clock modes:  the effective end time for
          graph and clock modes is entirely determined by the start time
          (-b), the width ([9]-cw, [10]-gw or [11]-tw), and the aspect
          ([12]-ga).  The format and time zone are the same as for -b.  If
          no -e is supplied, the end time will be set to four days after
          the begin time.  (Note [13]Quirk #2)

   When it matters, -b and -e ranges mean specifically "all t such that b
   <= t < e."

   -f c|h|i|l|p|t|v
          Specify the output format as CSV, HTML, iCalendar, LaTeX, PNG,
          text, or SVG.  See the [14]modes page for legal modes and
          formats.  The default is text.

   -l "Location Name"
          Specify a location for tide predictions.  You get the first
          station where the name supplied with -l is a case-insensitive
          match with the beginning (or the entirety) of the station's
          name.  You can use the -l switch more than once if you want to
          specify multiple locations.

   -m a|b|c|C|g|k|l|m|p|r|s
          Specify mode to be about, banner, calendar, alt. calendar,
          graph, clock, list, medium rare, plain, raw, or stats.  See the
          [15]modes page for legal modes and formats.  The default is
          plain.

   -ml [-]N.NN(ft|m|kt)
          Specify the mark level to be used in predictions.  The
          predictions will include the times when the tide level crosses
          the mark.  Not supported in clock mode.  Example usage: -ml
          -0.25ft

   -o "filename"
          Redirect output to the specified file (appends).

   -s "HH:MM"
          Specify the step interval, in hours and minutes, for raw or
          medium rare mode predictions.  The default is one hour.

   -v
          Print version string and exit.  Please note that versions marked
          as DEVELOPMENT versions are not really versioned; they are work
          in progress and will change without warning.

   The interactive interface does not support all of these switches and
   options.  Refer to the [16]previous page for a list of the options
   supported by the interactive interface.

   XTide understands the following syntactic shortcuts:
     * Arguments can be concatenated with their switches.
     * A yes/no switch that omits its argument implies "y".
     * Using +xx instead of -xx for a yes/no switch inverts the argument
       (so if the argument is omitted, "n" is implied).

   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.
     __________________________________________________________________

   [17]<- Previous [18]-> Next [19]Contents

References

   1. https://flaterco.com/xtide/advanced.html
   2. https://flaterco.com/xtide/xttpd.html
   3. https://flaterco.com/xtide/xtide.html#contents
   4. https://flaterco.com/
   5. https://flaterco.com/xtide/modes.html
   6. https://flaterco.com/xtide/settings.html
   7. https://flaterco.com/xtide/settings.html#zulu
   8. https://flaterco.com/xtide/bugs.html
   9. https://flaterco.com/xtide/settings.html#cwidth
  10. https://flaterco.com/xtide/settings.html#gwidth
  11. https://flaterco.com/xtide/settings.html#ttywidth
  12. https://flaterco.com/xtide/settings.html#gaspect
  13. https://flaterco.com/xtide/bugs.html
  14. https://flaterco.com/xtide/modes.html
  15. https://flaterco.com/xtide/modes.html
  16. https://flaterco.com/xtide/advanced.html#intopts
  17. https://flaterco.com/xtide/advanced.html
  18. https://flaterco.com/xtide/xttpd.html
  19. https://flaterco.com/xtide/xtide.html#contents

################################################################

   [1]<- Previous [2]-> Next [3]Contents

   [4]Nobska Light, Cape Cod, MA, 1998-06-17

Running the web server

   xttpd is an XTide web server.  It provides web-based access to XTide's
   tide predictions by allowing a web browser to speak directly to the
   XTide program in HTTP.  xttpd can replace httpd or it can co-exist with
   one.

   Once the port is established, xttpd will try to set its UID and GID to
   values that were specified at compile time.  If it is unable to do
   this, it will log failure messages to syslog and then exit.
   Consequently, if it is to be started by someone other than root, that
   user's UID and GID must be configured at compile time.  Instructions
   for doing this are available at
   [5]https://flaterco.com/xtide/installation.html#xttpd.

   You can set the address for feedback either at compile time as
   described in the installation instructions or with the environment
   variable XTTPD_FEEDBACK.

   xttpd will accept [6]settings either from command line switches (as
   used with xtide or tide) or from an .xtide.xml file that is saved in
   the home directory of the account that is used to execute it.  Settings
   that are customized using the xtide [7]control panel and then saved can
   be applied to xttpd by copying in the .xtide.xml file.

   xttpd will produce a small number of zombie processes during normal
   operation.  They are cleaned up after each new connection, so there is
   no cause for concern.

   Since a web site is supposed to be self-explanatory, the process of
   using xttpd will not be documented here.  If there are problems with
   people not being able to figure out how to use it, these should be
   reported to me as bugs, and the explanatory text in the web server will
   be updated accordingly.

  Conventional operation

   Usage:  xttpd [port] [...other xtide [8]settings switches...].

   xttpd forks itself into the background and uses the syslog facility for
   all logging.  Hosts connecting to xttpd are logged with priority INFO.

   If you run xttpd with no command line arguments, it will assume that it
   is replacing httpd and try to bind port 80.  If you want it to co-exist
   with an existing server, or if you do not have privilege to get port
   80, give it the port number as the first command line argument:

% xttpd 8080

   You will then need to link it up as http://www.wherever.org:8080/
   instead of just http://www.wherever.org/, but otherwise, no damage
   done.  Similarly, if you wish to bind a specific address, you can
   specify that as the first argument:

% xttpd 127.0.0.2

   If you need to specify both address and port number, separate the two
   with a slash, like this:

% xttpd 127.0.0.2/8080

   (New in XTide 2.15)  IPv6 addresses and hostnames are now accepted for
   the address.

Systemd operation (XTide 2.15)

   If xttpd was built with --enable-systemd, it cannot be run from the
   command line or from init scripts.  The port, address, and command line
   options can only be changed by editing systemd config files as
   described in the [9]installation section.

   Command line switches for [10]settings can be specified in
   xttpd.service on line ExecStart=.

  Troubleshooting

  Q: When I run xttpd, it exits immediately with no errors to tell me what went
  wrong.

  A: When executed, xttpd immediately disassociates itself from your terminal
  and starts logging all diagnostics to syslog.  So look in your system logs.
  On an init system, you will find these someplace like /var/log or
  /var/adm/log.  On a systemd system, you have to say (as root) journalctl -b -p
  debug --no-pager to dump the log.

  If all else fails, xttpd can be built with the debugging option
  -DXTTPD_NO_DAEMON to make it stay attached to the terminal and print errors to
  stderr.  (Requires XTide 2.15)
    _________________________________________________________________________

  [11]<- Previous [12]-> Next [13]Contents

References

   1. https://flaterco.com/xtide/tty.html
   2. https://flaterco.com/xtide/settings.html
   3. https://flaterco.com/xtide/xtide.html#contents
   4. https://flaterco.com/
   5. https://flaterco.com/xtide/installation.html#xttpd
   6. https://flaterco.com/xtide/settings.html
   7. https://flaterco.com/xtide/advanced.html#cp
   8. https://flaterco.com/xtide/settings.html
   9. https://flaterco.com/xtide/installation.html#systemd
  10. https://flaterco.com/xtide/settings.html
  11. https://flaterco.com/xtide/tty.html
  12. https://flaterco.com/xtide/settings.html
  13. https://flaterco.com/xtide/xtide.html#contents

################################################################

   [1]<- Previous [2]-> Next [3]Contents

   [4]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 [5]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, XTide understands the
   following syntactic shortcuts:
     * Arguments can be concatenated with their switches.
     * A yes/no switch that omits its argument implies "y".
     * Using +xx instead of -xx for a yes/no switch inverts the argument
       (so if the argument is omitted, "n" is implied).

   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.

   Be aware that older versions of XTide will not support all of the
   documented settings.

   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*caldayfmt
          (New in XTide 2.14)  Strftime style format string for printing
          days in calendars.
          Default: %a %d
          Command line: -cf
          config.hh: caldayfmt
          .xtide.xml: <xtideoptions cf="%a %d"/>

   XTide*cbuttons
          Create tide clocks with buttons? (y/n)
          Default: n
          Command line: -cb
          config.hh: cbuttons
          .xtide.xml: <xtideoptions cb="n"/>

   XTide*cheight
          Initial height for tide clocks.
          Default: 312
          Command line: -ch
          config.hh: defcheight
          .xtide.xml: <xtideoptions ch="312"/>

   XTide*currentdotcolor
          Color of dots indicating current stations in the location
          chooser.
          Default: rgb:00/A0/00
          Command line: -cc
          config.hh: currentdotdefcolor
          .xtide.xml: <xtideoptions cc="rgb:00/A0/00"/>

   XTide*cwidth
          Initial width for tide clocks.
          Default: 84
          Command line: -cw
          config.hh: defcwidth
          .xtide.xml: <xtideoptions cw="84"/>

   XTide*datefmt
          Strftime style format string for printing dates.  For calendars
          see caldayfmt.
          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. [[6]*]
          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) [[7]*]
          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.
          [[8]**]
          Default: as incoming from X11 or libXaw3dXft
          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 and clocks.
          Default: 1.0
          Command line: -ga
          config.hh: defgaspect
          .xtide.xml: <xtideoptions ga="1.0"/>

   XTide*gheight
          Initial height for tide graphs.
          Default: 312
          Command line: -gh
          config.hh: defgheight
          .xtide.xml: <xtideoptions gh="312"/>

   XTide*globelongitude
          Initial center longitude for location chooser.  If [9]GPS
          support is present and working, this setting is redundant.
          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*graphfont
          Font used in graphs and clocks in interactive client.  Does not
          affect tide, xttpd, or SVG-format output. [[10]**]
          Default: "embedded"
          Command line: -gf
          config.hh: defgraphfont
          .xtide.xml: <xtideoptions gf="embedded"/>

   XTide*graphstyle
          Style of graphs and clocks.
          Valid values: d (default), l (line), s (semitransparent).
          Default: d
          Command line: -gs
          config.hh: defgraphstyle
          .xtide.xml: <xtideoptions gs="d"/>

   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*linebreak
          (New in XTide 2.14)  Linebreak before prediction value in
          calendars? (y/n)
          Default: n
          Command line: -lb
          config.hh: linebreak
          .xtide.xml: <xtideoptions lb="n"/>

   XTide*lwidth
          Width of line in graph styles l and s (pixels, positive real
          number).
          Default: 2.5
          Command line: -lw
          config.hh: deflwidth
          .xtide.xml: <xtideoptions lw="2.5"/>

   XTide*markcolor
          Color of mark line in graphs.
          Default: red
          Command line: -mc
          config.hh: markdefcolor
          .xtide.xml: <xtideoptions mc="red"/>

   XTide*monofont
          Monospace font used for location list, text predictions, help
          windows and about mode text. [[11]**]
          Default:
          "-misc-fixed-medium-r-normal--13-100-100-100-c-70-iso8859-1"
          (without libXaw3dXft) or "LiberationMono-12" (with libXaw3dXft)
          Command line: -mf
          config.hh: defmonofont
          .xtide.xml: <xtideoptions mf="LiberationMono-12"/>

   XTide*mslcolor
          Color of middle-level line in tide graphs. [[12]*]
          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
          Deprecated.  Use graphstyle instead.
          Default: n
          Command line: -nf
          config.hh: N/A (use graphstyle)
          .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*omitunits
          (New in XTide 2.14)  Print numbers with no ft/m/kt? (y/n)  Where
          possible, adds a header line stating the units and datum.
          Default: n
          Command line: -ou
          config.hh: omitunits
          .xtide.xml: <xtideoptions ou="n"/>

   XTide*pagebreak
          (New in XTide 2.14)  Pagebreak and header before every month of
          a calendar? (y/n)
          Default: y
          Command line: -pb
          config.hh: pagebreak
          .xtide.xml: <xtideoptions pb="y"/>

   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*predictinterval
          Number of days of predictions to generate when no end time is
          specified.
          Default: 4
          Command line: -pi
          config.hh: defpredictinterval
          .xtide.xml: <xtideoptions pi="4"/>

   XTide*tidedotcolor
          Color of dots indicating tide stations in the location chooser.
          Default: red
          Command line: -tc
          config.hh: tidedotdefcolor
          .xtide.xml: <xtideoptions tc="red"/>

   XTide*tideopacity
          Opacity of the fill in graph style s (semitransparent).
          Default: 0.65
          Command line: -to
          config.hh: deftideopacity
          .xtide.xml: <xtideoptions to="0.65"/>

   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 text format (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.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.

   [**] Important usage note:  If XTide is built with Xaw3dXft, font names
   given to XTide must be in fontconfig format (e.g., "Helvetica-10"),
   rather than the traditional XLFD (e.g.,
   "-*-helvetica-*-r-*-*-10-*-*-*-*-*-*-*").  Also, Xaw3dXft does not
   return errors if there are problems with a font name; it just loads a
   default font instead.

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"/>

Locale and terminal settings

   Internally, XTide uses the Latin-1 (a.k.a. ISO-8859-1) character set
   exclusively.  When generating output in text or HTML formats, XTide
   will convert Latin-1 characters to UTF-8 if that is what the POSIX
   locale asks for.  This can be controlled with the LANG environment
   variable; e.g., LANG=en_US.UTF-8.  Any other setting of the codeset
   portion of LANG (which has the format lang[_terr[.codeset]]) will
   result in Latin-1 characters being passed through unchanged.  (CP437 is
   supported for DOS compatibility, but is rejected by Linux setlocale.)

   If the environment variable TERM is set to vt100 or vt102, XTide will
   take it seriously and invoke the DEC Special Graphics character set in
   text format output.  Below is a comparison of how graph mode, text
   format looks in an xterm normally (left) and with TERM set to vt100
   (right).  A VT100 provides five different horizontal line characters,
   which allow depth lines to be drawn more accurately.  On the downside,
   it does not provide any of the accented characters from Latin-1, so
   non-ASCII characters in location names and other data received from the
   harmonics file will do something weird.

   [xtermregular.png] [xtermvt100.png]
     __________________________________________________________________

   [13]<- Previous [14]-> Next [15]Contents

References

   1. https://flaterco.com/xtide/xttpd.html
   2. https://flaterco.com/xtide/harmonics.html
   3. https://flaterco.com/xtide/xtide.html#contents
   4. https://flaterco.com/
   5. https://flaterco.com/xtide/advanced.html#cp
   6. https://flaterco.com/xtide/settings.html#splat
   7. https://flaterco.com/xtide/settings.html#splat
   8. https://flaterco.com/xtide/settings.html#splat2
   9. https://flaterco.com/xtide/installation.html#GPS
  10. https://flaterco.com/xtide/settings.html#splat2
  11. https://flaterco.com/xtide/settings.html#splat2
  12. https://flaterco.com/xtide/settings.html#splat
  13. https://flaterco.com/xtide/xttpd.html
  14. https://flaterco.com/xtide/harmonics.html
  15. https://flaterco.com/xtide/xtide.html#contents

################################################################

   [1]<- Previous [2]-> Next [3]Contents

   [4]Portland Head Light

About harmonic constants and sub station corrections
(What to do if your location isn't listed)

   As was explained in the [5]introduction, tide predictions for a given
   location cannot be conjured out of the void--you need to get some
   special data for each and every location for which you want to predict
   tides.  XTide reads these data from harmonics files.

   The harmonics file available at
   [6]https://flaterco.com/xtide/files.html#harmonicsfiles contains all
   data for U.S. stations that were available from the NOS web site as of
   the last update.  I update it once a year.

   For [7]various reasons, I no longer maintain data for stations outside
   the U.S.  Methods by which non-U.S. stations or unsupported U.S.
   stations can be added are described below; but first, some important
   definitions.
   [8]National Ocean Service tide station at Bar Harbor, Maine

  Harmonic constants (reference stations)

   Harmonic constants are created by analysis of regular water level
   readings taken by automated tide stations like the one pictured here.
   A tide station whose predictions trace directly to harmonic constants
   that were derived from water level readings for that same station is
   called a reference station.

   A set of harmonic constants provides an amplitude and a phase (or
   "epoch") for various harmonic constituents with names like M2 and K1.
   The number of constituents used for a given station can vary from a few
   to over 100.  However, if you get six or fewer constituents then you
   are probably dealing with "simplified" harmonic constants.  Simplified
   harmonic constants limit the accuracy that can be achieved for
   predictions because the less significant constituents have been thrown
   away.  If simplified harmonic constants must be used, it is a good idea
   to [9]enable constituent inference in XTide.

   Some Admiralty data include nonharmonic adjustments that are not
   supported by XTide.  A [10]spreadsheet has been contributed to convert
   Admiralty seasonal corrections to approximate long-term constituents
   that XTide can use.  However, for "S.W. CORRECTIONS" (shallow water
   corrections) called f4 and f6 there really is no support yet.

  Offsets (subordinate stations)

   A subordinate station is a tide station whose predictions are obtained
   by applying corrections to the predictions generated for a reference
   station, i.e., a station for which we have good harmonic constants.
   The words 'corrections,' 'differences,' and 'offsets' are used
   interchangeably when referring to subordinate station data.

   While harmonic constants can be hard to get, you should be able to get
   offsets with relative ease from a local boating magazine, chartbook,
   yacht club, or marine authority.

   There are many different flavors of offsets for subordinate stations.
   At this time, XTide supports all commonly appearing flavors except for
   the Admiralty one that has different height differences depending on
   the time of month.  The following rare and freakish sorts are not
   supported:  those that use different offsets depending on whether the
   flood at the reference station crossed some threshold; those that rely
   on more than one reference station; those that use different offsets
   for higher high or low water versus lower high or low water; currents
   that use a regular tide station as reference, or vice-versa.

   Some putative sets of harmonic constants for subordinate stations were
   created by mangling the constants of a reference station to approximate
   the results of applying corrections.  Such mangled data only junk up
   the database and should be avoided.

  Adding subordinate stations using tideEditor

   If you find suitable offsets, you can add them to harmonics.tcd using
   the tideEditor program available from
   [11]https://flaterco.com/xtide/files.html#extras.  There are two other
   ways to do it, as described below under "[12]Importing batches of
   harmonic constants and offsets," but tideEditor is most expedient for
   the non-expert.

   First, always make a backup copy of whatever you are about to modify.

   TideEditor version 1.4 takes the name of the file to modify as the
   command-line argument.

bash-3.1$ tideEditor whatever.tcd

   When you start tideEditor, you get a map of the world.  Point at the
   location where you want to add a subordinate station and right click.

   You will get a prompt asking "Will the new station be a reference
   station or a subordinate station?"  Choose Subordinate.

   You will get a prompt saying "Please select the new reference
   station."  Use the pull-down list to select the reference station and
   click OK.

   You will then get a window with the tabs General, Verbiage and Offsets,
   initially showing General.  On the General tab, the Reference Station,
   Latitude and Longitude fields will be pre-filled based on your previous
   actions.  If you don't know the correct latitude and longitude, just
   estimate the coordinates as best you can.

   The other fields that you MUST fill in are as follows:
     * Station Name:  Enter the name of the new subordinate station.
     * Time Zone:  Use the pull-down to set the time zone (select the
       major city for the applicable region).  The timezone attribute is
       only used to choose the time zone in which to render output for the
       location.  In the majority of cases this will be the same as for
       the reference station.
     * Level Units:  Select feet or meters for tides, knots for currents.

   All other fields on the General and Verbiage tabs are optional.
   Descriptions of the other fields are obtainable using the question mark
   tool thingy ( [whatsthis.png] ).

   The Offsets tab has the following fields.
     * Minimum Time Add.  The time adjustment for low tide / max ebb.  It
       is expressed as an integer that is hours times 100 plus minutes, so
       for -0:20 (negative 0 hours, 20 minutes) you would write -20, and
       for 1:40 (positive 1 hour, 40 minutes) you would write 140.  If you
       don't have this, leave it blank.
     * Minimum Level Add.  A value, in the units identified by Level
       Units, that is added to the tide level or current velocity
       predicted at low tide or max ebb.  If you don't have this, leave it
       blank.
     * Minimum Level Multiply.  A multiplier for the tide level or current
       velocity predicted at low tide or max ebb.  If you don't have this,
       leave it blank.
     * Maximum Time Add, Level Add, and Level Multiply are analogous, but
       correspond to high tide / max flood.
     * Flood Begins.  Another kind of "Time Add" used only by currents to
       adjust the time of the slack preceding a flood.  If you don't have
       this, leave it blank.  If it got initialized to zero, make it
       blank.
     * Ebb Begins.  Analogous to Flood Begins.

   Notations used to describe corrections will vary:

    Notation              Translation
   -0:20       Time Add -20
   1 23        Time Add 123
   *1.07       Level Multiply 1.07
   +0.4        Level Add 0.4
   (*0.65+0.3) Level Multiply 0.65, Level Add 0.3

   If you were not given separate corrections for max and min, set both
   the max and min values to whatever you got.  For example, if you get

Head Harbor, Isle au Haut    -0:20   (Portland)

   then you should set both Minimum Tide Add and Maximum Time Add to -20.

   Special cases:
     * If you don't get slack offsets (floodbegins, ebbbegins) for a
       current station, OMIT those fields!  When slack offsets are
       omitted, XTide will interpolate a reasonable value.  But if you
       specify zero, you get zero--even if that's unreasonable with
       respect to the specified max and min.
     * If your reference station is in a different time zone, you may need
       to alter the time offsets to REMOVE compensation for the time zone
       difference.  NOAA had a practice of including the time zone
       differential in the offsets, but in XTide, the offsets are
       independent of the time zone.

   When finished, click OK.  When you quit tideEditor, your new station
   will be saved in the updated TCD file.

  Adding reference stations using tideEditor

   To add a reference station with tideEditor, the general process is
   similar to adding a subordinate station, but the data to enter are more
   obscure and there are more opportunities for the non-expert to get
   stuck.

   When you get the prompt asking "Will the new station be a reference
   station or a subordinate station?" choose Reference.

   Instead of "Offsets," the third tab in the dialog is now
   "Constituents."
     * Datum Description.  Choose Mean Lower Low Water or whatever is the
       description of the datum that you have received.  If you don't
       know, you can proceed without setting it.
     * Datum Value.  Enter the datum (sometimes known as Z0) in the level
       units that were specified on the first tab.
     * Meridian.  This is a fixed offset from UTC to which the amplitudes
       of the harmonic constants were calibrated.  Opportunity for
       trouble:  You have to know the right answer for the data that you
       received.  Sometimes it will be local standard time for the
       location; sometimes it will be zero.  The format is hours times 100
       plus minutes, with positive values being east of Greenwich and
       negative values west.
     * Amplitude and Epoch for many constituents.  Scroll down to see all
       of the constituents that are supported by the harmonics file.
       Opportunity for trouble:  Different countries sometimes use
       different names for the same constituents, or worse yet, use the
       same names for different constituents.  XTide's naming scheme is
       just yet another one that had to deal with these ambiguities and
       conflicts.  For the technical definitions of the constituents used
       in XTide's default harmonics files, refer to the [13]Congen
       package.

  Importing batches of harmonic constants and offsets

   All pretense of user-friendliness stops here.  If you want to do large
   numbers of stations without lots of manual data entry, you have two
   options, both of which require a higher level of computer literacy than
   is demanded by tideEditor.
    1. The good way is to install [14]Harmbase 2 and either write an
       import procedure for your data format or convert your data into one
       of the formats that it can already import.  Harmbase 2 uses
       [15]PostgreSQL to manage the data and merely exports to the TCD
       format.
    2. The evil way is to convert your data into the legacy .txt and .xml
       file formats that XTide used in the bad old days and then use
       [16]tcd-utils to convert that to TCD.

  Deriving harmonic constants from water level data

   Anyone with a Linux PC, enough determination to install [17]Octave,
   enough skill to convert data from one format to another, and enough
   data--at least a year's worth of hourly water level
   measurements--should be able to derive harmonic constants using the
   [18]Harmgen package.  Harmgen produces results in the form of an SQL
   insert statement that loads the new station into [19]Harmbase 2 using
   XTide's constituent naming scheme.  Those with sufficient background
   and a reason to do it can change the constituent set, but the new
   constituent definitions must be harmonized between Harmbase and
   Harmgen.

   There is no added complication from multi-year time serieses.  Harmgen
   accounts for the equilibrium arguments and node factors for each year
   and minimizes the error across the entire span of the time series.

   Under the best of circumstances, predictions from harmonic constants
   derived this way can be expected to differ from authoritative
   predictions by 20 minutes or so.  But if the authorities are using a
   nonharmonic method of tide prediction--or if you messed up--the
   discrepancies could be worse.  It is up to you to do quality assurance.

   Details on the operation of Harmgen can be found in that package's
   [20]README file.

  List of web sites with traceable data

   This list is probably neither complete nor current.  These are just the
   data sources that have been brought to my attention.

   Harmonic constants:
     * Italy:  I had [21]this link, but I can't find anything there now.
       Maybe [22]here?
     * [23]National Ocean Service:  Some locations outside of U.S.
       jurisdiction have historically been included along with the U.S.
       data.
     * [24]Norway (simplified harmonic constants only)
     * [25]Spain

   Water level data:
     * [26]Canada
     * [27]Spain
     * [28]France
     * [29]U.K.
     * [30]University of Hawai`i Sea Level Center (see also [31]here or
       [32]here)
     __________________________________________________________________

   [33]<- Previous [34]-> Next [35]Contents

References

   1. https://flaterco.com/xtide/settings.html
   2. https://flaterco.com/xtide/bugs.html
   3. https://flaterco.com/xtide/xtide.html#contents
   4. https://flaterco.com/
   5. https://flaterco.com/xtide/introduction.html
   6. https://flaterco.com/xtide/files.html#harmonicsfiles
   7. https://flaterco.com/xtide/faq.html#60
   8. https://flaterco.com/
   9. https://flaterco.com/xtide/settings.html#infer
  10. https://flaterco.com/xtide/files.html#experts
  11. https://flaterco.com/xtide/files.html#extras
  12. https://flaterco.com/xtide/harmonics.html#batch
  13. https://flaterco.com/xtide/files.html#congen
  14. https://flaterco.com/xtide/files.html#harmbase
  15. http://www.postgresql.org/
  16. https://flaterco.com/xtide/files.html#tcdutils
  17. https://flaterco.com/kb/Octave.html
  18. https://flaterco.com/xtide/files.html#harmgen
  19. https://flaterco.com/xtide/files.html#harmbase
  20. https://flaterco.com/xtide/harmgen-README.html
  21. http://www.apat.gov.it/site/it-IT/Servizi_del_sito/Guida/
  22. http://www.minambiente.it/
  23. http://tidesandcurrents.noaa.gov/
  24. http://vannstand.statkart.no/Engelsk/harm.php
  25. http://www.puertos.es/en/oceanografia_y_meteorologia/redes_de_medida/index.html
  26. http://www.meds-sdmm.dfo-mpo.gc.ca/isdm-gdsi/twl-mne/index-eng.htm
  27. http://www.puertos.es/en/oceanografia_y_meteorologia/redes_de_medida/index.html
  28. http://data.shom.fr/donnees/refmar
  29. http://www.pol.ac.uk/ntslf/data.html
  30. http://uhslc.soest.hawaii.edu/
  31. http://ilikai.soest.hawaii.edu/uhslc/rqds.html
  32. ftp://ilikai.soest.hawaii.edu/rqds/
  33. https://flaterco.com/xtide/settings.html
  34. https://flaterco.com/xtide/bugs.html
  35. https://flaterco.com/xtide/xtide.html#contents

################################################################

   [1]<- Previous [2]-> Next [3]Contents

   [4]Lobster boat and the big ocean, Ogunquit, Maine, 1998-06-08.

Quirks to be aware of

    1. Graphs actually begin a little bit earlier than the nominal start
       time so that the specified start will appear immediately to the
       right of the labels for the depth axis instead of being obscured by
       them.
    2. The effective end time for graph and clock modes is entirely
       determined by the start time, the width, and the aspect.  If an end
       time is also specified by the user, it is ignored.
    3. XTide uses shorter descriptions for the tide events listed across
       the bottom caption line in tide graphs whenever the descriptions
       get to be longer than the timestamps.  Consequently, changing the
       time format setting to something more concise causes the
       descriptions to get shorter too, which is what you want.  However,
       this behavior can result in cosmetic inconsistencies; e.g., with
       default settings, "Mark Rising" is matched by "Mark" instead of
       "Mark Falling," because the one additional letter puts it over.
    4. The -o command line switch causes output to be appended to the
       specified file instead of overwriting it as is the generally
       accepted custom.
    5. While XTide-specific command-line arguments can be concatenated
       with their switches or not, the arguments to standard X11 switches
       sometimes must be separate to work.  Affected switches include
       -display, -fn, and -geometry.
    6. What XTide does about minimum current events at subordinate
       stations might not be what you expect.  See [5]Appendix B for
       details.

Known limitations

    1. RGB color specs (rgb:N/N/N) in sizes other than 24 bits
       (rgb:hh/hh/hh) generally will not work.
    2. All timestamps have a precision of plus or minus one minute.
    3. XTide locates tide events to an accuracy of plus or minus one
       minute.  This refers only to the prediction model, not to how well
       the model agrees with reality.
    4. URLs assigned to specific locations by the xttpd web server are
       rather transient and will change whenever the harmonics files are
       updated.  The xttpd web space will remain internally consistent,
       but hyperlinks from outside pages will be screwed.
    5. The time scale for stations claiming to be in UTC is not strictly
       speaking UTC since it does not implement [6]leap seconds.
    6. If a subordinate station has absurd offsets that cause low tides to
       become higher than high tides, the upper and lower bounds reported
       by stats mode may be incorrect.
    7. When specifying location names on the command line, multiple data
       sets having the same name cannot be distinguished, and it is not
       deterministic which one you will get.
    8. XTide is untested and probably dysfunctional on any platform where
       time_t is a non-integral type.  It would probably still work with
       --enable-time-workaround.
    9. XTide assumes that the first 256 characters of every font agree
       with ISO-8859-1 (except under DOS).
   10. Semitransparent style makes no sense in formats that don't support
       opacity (text and PseudoColor X-windows).

Known bugs

    1. If the control panel is resized, dismissed, and then shown again,
       its buttons are missing.  Cause of bug:  Don't know.  Workaround:
       Close the control panel using the window manager (e.g., hit the 
       in the upper right corner) and then show it again.  The control
       panel retains its new size but the buttons reappear.
    2. Some of the dialog windows cause harmless but annoying toolkit
       warnings when you dismiss them.  Cause of bug:  Don't understand
       what the toolkit grabs are doing.  Workaround:  Ignore warnings.
    3. Line width in line graphs isn't maintained when the slope of the
       graph becomes drastic.  Cause of bug:  Need better algorithm for
       drawing line graphs.  Workaround:  Set the aspect higher.
    4. Buttons will sometimes shift out from under the mouse pointer and
       get "stuck on."  Cause of bug:  (1) button moves due to changing
       geometry of other things in the box, leading to (2) button shifts
       out from under the pointer, which triggers (3) bug in Athena
       Widgets where the button release event gets lost.  Workaround:  As
       needed, click on the stuck button to un-stick it.  This problem can
       be prevented in the control panel by specifying a monospace font
       with the -fn switch, which avoids (1).  The bug is less likely in
       other windows.
    5. The analog tide clock icon flashes when it updates, and doesn't
       update at all under some window managers.  Alternate symptom:  Tide
       clocks crash the window manager at random.  Cause of bug:  Window
       managers don't expect icons to keep changing and aren't designed to
       handle it properly.  Workaround:  Use a window manager that doesn't
       suck.
    6. Dialog boxes don't behave like you would expect when you hit the
       Enter key.  Cause of bug:  Athena widgets use multi-line buffers
       even for one-line fields.  Workaround:  Don't hit Enter.
    7. Syslog messages generated by xttpd have timestamps in UTC or random
       time zones instead of local time, which is highly confusing in a
       log that is otherwise in local time.  Cause of bug:  Design defect
       of syslog():  Every program logs in whatever time zone it happens
       to be using at the time instead of a standard zone.  XTide needs to
       adopt the time zone of each station to generate predictions for
       it.  Workaround:  none.
    8. The location chooser depends on a station naming convention to
       determine which stations are currents.  If that convention is not
       followed, dots may be drawn in the wrong color.  Cause of bug:
       Design defect of libtcd:  libtcd doesn't let you know whether you
       are looking at a tide station or a current station until after you
       load it.  Workaround:  Ensure that "Current" appears in the station
       name if it's a current, and not otherwise.
    9. When XTide is linked with Xaw3d or Xaw3dXft, text dialog boxes
       reachable from the Options menu (save filename, mark level, aspect)
       and control panel may have 2-color bitmap borders instead of
       gray-shaded borders.  Cause of bug:  For reasons unknown, the
       "threeD" widget owned by asciiTextWidget is inaccessible from the
       application level, preventing XTide from setting its
       beNiceToColormap resource to False.  Workaround:  Add
       XTide*beNiceToColormap: False to ~/.Xresources.
     __________________________________________________________________

   [7]<- Previous [8]-> Next [9]Contents

References

   1. https://flaterco.com/xtide/harmonics.html
   2. https://flaterco.com/xtide/faq.html
   3. https://flaterco.com/xtide/xtide.html#contents
   4. https://flaterco.com/
   5. https://flaterco.com/xtide/mincurrents.html
   6. http://tycho.usno.navy.mil/leapsec.html
   7. https://flaterco.com/xtide/harmonics.html
   8. https://flaterco.com/xtide/faq.html
   9. https://flaterco.com/xtide/xtide.html#contents

################################################################

   [1]<- Previous [2]-> Next [3]Contents

   [4]Perkins Cove, Maine, 1998-06-09

Frequently Asked Questions

   Note:  "Mumble Foo Bar" is a made-up place that is meant to represent
   whatever place you are looking for.  Whatever is said in this FAQ about
   Mumble Foo Bar applies to your location as well.

  Ultra-high frequency questions

     * [5]Your tide predictor web site blah blah blah...
     * [6]Can you send me predictions for Mumble Foo Bar?
     * [7]URGENT - DROP EVERYTHING AND READ THIS!  The race starts in 5
       hours so I need a tide chart for Mumble Foo Bar NOW!
     * [8]The ads on your web site are driving me nuts!  Is there any way
       to turn them off?
     * [9]Can you tell me where I can find a web page with predictions for
       Mumble Foo Bar?
     * [10]Can you please add predictions for Mumble Foo Bar?
     * [11]How do I make the calendar print all on one page?
     * [12]Can you tell me the offsets for Mumble Foo Bar?
     * [13]There are multiple listings for the same place, and they give
       different results.  What's going on?
     * [14]Can you predict the tide and/or current if I give you the
       latitude and longitude?
     * [15]The coordinates you provide for Mumble Foo Bar are off by
       miles, or you misspelled Mumble Foo Bar.
     * [16]Why are there few currents in the latest database?

  XTide operational questions

     * [17]Can I still install XTide if I do not have root?
     * [18]I am trying to compile XTide with an unknown version of GCC,
       and I had the following problems....
     * [19]I am trying to install XTide on a server that my web hosting
       company, contractor, or employee has configured in a nonstandard
       way and/or not updated in years.  Their support is unhelpful.
       Please help me to get XTide to work on this server.
     * [20]When compiling XTide with a modern version of GCC on a
       well-maintained computer, I get errors like....
     * [21]What is the significance of the estimated bounds printed by
       stats mode?
     * [22]Are these predictions compliant with the new Daylight Savings
       Time rules for ...?
     * [23]I am doing some historical research and need to project what
       the tides would have been a long long time ago.
     * [24]I live outside of the U.S. and my location is no longer
       supported.  What happened?
     * [25]I want to change the end time of a tide graph but the settings
       that I make have no effect.
     * [26]The text in XTide windows uses uglyfont.
     * [27]I applied a changed setting in the control panel, but it had no
       effect.
     * [28]When I run xttpd, it exits immediately with no errors to tell
       me what went wrong.
     * [29]I always get a warning about "using obsolete time zone
       database."
     * [30]How do I switch from tide to current predictions or vice-versa
       for a given location?
     * [31]What are bogo-knots?
     * [32]First it says high tide is at 3:15 PM but then when I run it
       again it says 3:14 PM.
     * [33]Has this been ported to Windows / PalmOS / anything but Unix?
     * [34]Xttpd sucks!  Can't XTide work with PHP?
     * [35]The tides for my location are totally wrong!
     * [36]The tides for Mumble Foo Bar are obviously bogus because they
       have too many high tides on this day / only one high tide on this
       day / tides that are just a few minutes apart.
     * [37]I have five constituents and some seasonal corrections for my
       location.  Can you get this to work?

  General tide related questions

     * [38]I have a tide watch that only goes through the year 1999.  What
       year could I set it to that would be the same as this year?
     * [39]Is there a set time advancement each day for the next high and
       low tide?  Does it always repeat 12 hours later?
     * [40]Somebody gave me a tide clock, but the instructions say it only
       works on the east coast.  How can this be?
     * [41]Why do the high and low tides have such different levels to
       them on any given day?
     * [42]If it's high tide here, is it low tide in [faraway place]?
     * [43]What does the zero (0) on a tide chart represent?
     * [44]Why is it that the tides two miles from here are an hour
       different than the tides here?
     * [45]Why are there two high tides per day, anyway?  How is this
       possible?
     * [46]What does "slack water" mean?
     * [47]I have a theory that [random phenomenon] is related to tidal
       forces, but I am landlocked.  Can you, like, predict the "tides"
       for [landlocked location]?
     * [48]I want to write my own tide predicting program.  Can you
       provide a SIMPLE explanation of the tide-predicting function?

  Business questions

     * [49]I want to license XTide so I can build a commercial product
       around it.
     * [50]I have a lot of specific questions about the GNU General Public
       License and/or want a ruling that my specific plan is OK.
     * [51]I would like to talk to you concerning the use of your stuff in
       our upcoming product.  Please call me at your convenience.
       [#include email legal disclaimer]
     * [52]I really don't understand the whole purpose of the GNU
       license.  Why should I have to reinvent the wheel just because I
       won't publish my sources?
     * [53]We are a non-profit and we want to sell calendars with
       predictions from your web site.  Is that OK?
     * [54]I have a great idea to make money selling tide predictions, but
       I'm not good with technical stuff, so would you just do this for
       me...
     * [55]I already make money selling tide prediction products, but your
       stuff is better, so would you just do this for me...
     * [56]I just put up a fabulous website that serves up XTide output
       surrounded by banner ads that make me tons of free money.  Would
       you please link to it?
     * [57]Hey, that previous guy had a great idea.  Would you please
       install XTide on my web server for me?
     * [58]I'm a consultant being paid to install XTide.  I'm having a
       million problems with it, but I can't describe them accurately
       because I have never used Linux before.  I think XTide must be
       really broken.  Please fix all of my problems.
     * [59]I need to do [poorly researched brainstorm having something to
       do with tide prediction]--how much would you charge in consulting
       fees to help me do it?
     * [60]Congratulations!  XTide has been added to some online directory
       of software packages.  Please verify that the information on XTide
       is correct and keep it updated.

  Academic questions

     * [61]How should I cite XTide within publications?

  Questions that you should have asked, but didn't

     * [62]What is the difference between a reference station and a
       subordinate station?
     * [63]These predictions are nonsense--what is going on here?
     * [64]Where can I find tons of information about tides that is both
       more authoritative and better written than this FAQ?
     __________________________________________________________________

  Ultra-high frequency questions

   Q: Your tide predictor web site blah blah blah...

   A: I am not the maintainer of the web site you have found.  I am the
   maintainer of [65]XTide.  Although many tide-predicting web sites use
   some version of XTide behind the scenes, I have no control over the
   behavior of those web sites or their maintenance, nor do I receive any
   commissions from any advertising that may appear on them.  The XTide
   software and required data are available free of charge from
   [66]flaterco.com/xtide/files.html, with documentation at
   [67]flaterco.com/xtide.

   Q: Can you send me predictions for Mumble Foo Bar?

   A: I cannot possibly provide this level of service to everyone who
   wants it.  Please use a commercial service and/or a web site.

   Q: URGENT - DROP EVERYTHING AND READ THIS!  The race starts in 5 hours
   so I need a tide chart for Mumble Foo Bar NOW!

   A: You might not believe it, but sometimes I go two weeks without
   reading my e-mail.  Really!  And when I do get back to it, there are
   always lots of messages just like this one, so far past their use-by
   dates that green fuzz has started to grow on them.  The answer is the
   same:  I cannot possibly provide this level of service to everyone who
   wants it.  Please use a commercial service and/or a web site.

   Q: The ads on your web site are driving me nuts!  Is there any way to
   turn them off?

   A: I am not the maintainer of the web site with which you are having a
   problem.  I am the maintainer of the XTide software that you can get
   free with no ads from [68]flaterco.com/xtide.  Others have profited by
   selling advertisements on other web sites built using my software, but
   I give away the software freely to anyone who will make the effort to
   install it, so nobody really needs to be using those web sites.

   Q: Can you tell me where I can find a web page with predictions for
   Mumble Foo Bar?

   A:
     * Canada:  [69]Fisheries and Oceans Canada
     * Germany:  [70]Bundesamt fr Seeschifffahrt und Hydrographie (BSH)
     * Netherlands:  Ministerie van Verkeer en Waterstaat--oops, there's
       been a reorg
     * New Zealand:  [71]Land Information New Zealand (LINZ)
     * Norway:  [72]Norwegian Hydrographic Service
     * U.K.:  [73]National Tidal and Sea Level Facility (NTSLF)
     * U.K.:  [74]U.K. Hydrographic Office
     * U.S.A.:  [75]National Ocean Service (NOS), Center for Operational
       Products and Services (CO-OPS)

   Q: Can you please add predictions for Mumble Foo Bar?

   A: Probably not.  Please read the section entitled [76]What to do if
   your location isn't listed.

   Q: How do I make the calendar print all on one page?

   A: The short answer for Windows users is to do the following:
    1. Bring the calendar up in Internet Explorer.
    2. Read this: [77]How to use Print Preview
    3. Pull down the print size menu ( Shrink To Fit ) and try different
       options until the calendar fits nicely on a page.
    4. When ready, click on the tiny printer icon to print.

   For a more complete answer and/or instructions tailored for Linux, see
   [78]Appendix C.

   Q: Can you tell me the offsets for Mumble Foo Bar?

   A: You can get them easier than I can by checking the sources described
   in the section entitled [79]What to do if your location isn't listed.

   Q: There are multiple listings for the same place, and they give
   different results.  What's going on?

   A: There are two different approaches to predicting the tides at a
   given place.  One approach is to calculate them directly from a data
   set; when this is done it is called a "reference station."  The other
   approach is to estimate them using adjustments to the tides at a nearby
   reference station; when this is done it is called a "subordinate
   station."

   Data gathered from the NOAA web site sometimes include both a reference
   station and a subordinate station for the same place.  For example, the
   subordinate station may be used for published tide tables while the
   reference station is still relatively new and untested.  The results
   will differ, but they should be close (assuming that there are no
   problems with the data).  If you are concerned about matching
   predictions up with those from some particular source, you should try
   each data set and see which one matches the best.

   In rare cases, data gathered from the NOAA web site include two
   reference stations or two subordinate stations with exactly the same
   name and nearly the same location.  When this happens, one of them has
   (2) suffixed to its name.  Again, if you are trying to match official
   predictions, you should try both to determine which is better.

   If you are using old legacy data or a web site that does, you may see
   additional listings for the same place.  These may be expired and/or
   have dubious traceability to authoritative sources.  They cannot be
   expected to agree with up-to-date predictions.

   Q: Can you predict the tide and/or current if I give you the latitude
   and longitude?

   A: The short answer is no.  XTide cannot predict tides unless you
   provide harmonic constants (see [80]What to do if your location isn't
   listed).

   From what I'm told, the tide models that were built from TOPEX/Poseidon
   data work on a global scale, but they are inaccurate on continental
   shelves.  Some organizations have constructed models that function in
   coastal waters in localized regions.  For example, NIWA has a [81]model
   for New Zealand's coastal waters, and NOAA has a model of currents in
   San Francisco Bay.  Although XTide could make use of harmonic constants
   generated from these models, XTide does not implement any such models.

   Q: The coordinates you provide for Mumble Foo Bar are off by miles, or
   you misspelled Mumble Foo Bar.

   A: XTide reports coordinates in degrees only.  Some sources report
   coordinates in degrees and minutes and run these together in a
   confusing way.  For example, a coordinate shown as 2846.330 may
   actually mean 28 degrees, 46.330 minutes, which XTide would report as
   28.7722 degrees.

   If that is not sufficient to explain the discrepancy, or if there is
   some other cosmetic problem like the location name being spelled wrong,
   check [82]NOAA's web site to see if the problem exists there.  If it
   does, please report the problem to NOAA as well as me, and I will
   attempt to ensure that the correction is included in the next annual
   update.

   Q: Why are there few currents in the latest database?

   A: The [83]Center for Operational Oceanographic Products and Services
   (CO-OPS) of [84]NOAA's [85]National Ocean Service (NOS) does not
   presently supply harmonic constants for currents on its public web
   site.  This text from [86]http://tidesandcurrents.noaa.gov/ncop.html
   may partially explain why not:

     Approximately 70 percent of the stations in the 2001 Tidal Current
     Tables are over 30 years old.  Many of these stations are based on
     analyses of less than 7 days of data (the data duration is known for
     24% of all stations).  Channel dredging and changes in the
     configuration of ports and harbors over the years have significantly
     altered the physical oceanography of many of the nation's
     estuaries.  Reports from local users indicate that many of NOS's
     tidal current predictions may be inaccurate.  NOS intends to address
     these deficiencies by rebuilding the program and resampling the
     currents at every major port and estuary within the next 20 years.

  XTide operational questions

   Q: Can I still install XTide if I do not have root?

   A: Yes.  Follow the [87]installation instructions, and just use paths
   in your home directory instead of system-wide directories.  Following
   is one example of how it would work if you have installed dependencies
   (libraries) under /home/myacct/local and wish to install xtide in the
   same directory tree.
bash-3.1$ # install harmonics file
bash-3.1$ bzip2 -d harmonics-dwf-YYYYMMDD-free.tcd.bz2
bash-3.1$ mkdir /home/myacct/local/share/xtide
bash-3.1$ mv harmonics-dwf-YYYYMMDD-free.tcd /home/myacct/local/share/xtide
bash-3.1$ # The following should go in ~/.bash_profile to make it permanent
bash-3.1$ export HFILE_PATH=/home/myacct/local/share/xtide
bash-3.1$ # compile and install XTide
bash-3.1$ ./configure --prefix=/home/myacct/local CPPFLAGS="-I/home/myacct/local
/include" LDFLAGS="-L/home/myacct/local/lib -Wl,-rpath,/home/myacct/local/lib"
bash-3.1$ make
bash-3.1$ make install

   In the unlikely event that you wish to run the web interface xttpd, you
   will need to run it on an unprivileged port as described in [88]Running
   the web server.

   Q: I am trying to compile XTide with an unknown version of GCC, and I
   had the following problems....

   A: XTide requires GCC version 4.4 or newer.  Type gcc -v to find out
   what version you have.

   Q: I am trying to install XTide on a server that my web hosting
   company, contractor, or employee has configured in a nonstandard way
   and/or not updated in years.  Their support is unhelpful.  Please help
   me to get XTide to work on this server.

   A: Sorry, but no.  This is a problem with the service that your web
   hosting company, contractor, or employee is providing; it is not an
   XTide problem.  In my experience, working around problems on a
   mismanaged or merely unmaintained server is an unending game of
   Whac-A-Mole.  Your time would be better spent searching for a more
   competent web hosting company, contractor, or employee.

   Q: When compiling XTide with a modern version of GCC on a
   well-maintained computer, I get errors like....

   A: Please refer to the [89]troubleshooting section of the installation
   instructions.  If your error is not discussed there, please email
   [90]dave@flaterco.com for assistance.

   Q: What is the significance of the estimated bounds printed by stats
   mode?

   A: The stats mode of XTide prints estimated upper and lower bounds that
   are calculated based on the 6 most significant tidal constituents
   simultaneously taking on their maximum and minimum possible values in
   the prediction model.  These are not true bounds in the mathematical
   sense, since any station having more than 6 constituents could
   potentially generate predictions that exceed them.  However, in
   practice, these estimated bounds are seldom exceeded by generated
   predictions.

   Stats mode also determines and outputs the maximum and minimum
   predicted by the model within the span of time specified by the user.
   This generally provides a narrower interval, and one that is equally
   valid for the span of time specified.  However, these bounds will vary
   depending on the span of time searched, while the estimated bounds are
   nearly constant.

   Actual observed heights may exceed any and all bounds of the prediction
   model (e.g., in case of tidal surge from a hurricane).  The highest and
   lowest water levels actually observed and recorded at a reference
   station during the official tidal epoch (presently 1983-2001) can be
   found in the Benchmark Data Sheet provided by NOS.

   Q: Are these predictions compliant with the new Daylight Savings Time
   rules for ...?

   A: XTide relies on [91]the de facto standard time zone database to
   handle Daylight Savings Time.  XTide's results will obey the new
   Daylight Savings Time rules if and only if the version of zoneinfo
   installed is sufficiently new.  See [92]System Requirements.

   Q: I am doing some historical research and need to project what the
   tides at Mumble Foo Bar would have been a long long time ago.

   A: This is generally ill-advised.

   For years 1700 and later, you can install XTide on 64-bit Linux and run
   the predictions with no special effort, but without some form of
   validation there is no telling how large the error could be.

   The perishability of tide data for a given location varies depending on
   how quickly the local topography changes.  Some places go rotten in
   less than a decade.  All locations are impacted by global sea level
   change, which becomes significant in less than a century.

   Over even longer spans, the physics start to go wrong.  Some of the
   astronomical "constants" used in the U.S. method of tide prediction
   really aren't constant; they change very slowly.  For example, the
   speeds of harmonic constituents change.  We are still using constant
   speeds that were calibrated for the year 1900.  When you change the
   speeds of the harmonic constituents, it changes everything.  As we get
   too far away from 1900 in either direction, eventually the model
   collapses and the results are garbage.  As far as I know, nobody has
   done an analysis to determine exactly when this occurs.

   When this happens in the future, we can just update the speeds and
   generate fresh harmonic constants that work within the new model.  But
   we can't do that for historical predictions because we don't have the
   water level observations from that period in history to derive the
   harmonic constants.  We have no choice but to use the physics of 1900,
   with data derived from observations in 2000, to extrapolate back to
   whenever, and hope that we haven't pushed the model too far.

   It is technically possible to get XTide to make projections back to 1
   AD (see [93]Appendix A for details).  However, the credibility of
   projections for anywhere reaches zero well before you get back to 1
   AD.  So please don't ask for BC support.

   Q: I live outside of the U.S. and my location is no longer supported.
   What happened?

   A: Many data were purged after a legal threat from the U.K.
   Hydrographic Office (UKHO) in January 2001.  I ended maintenance of the
   non-U.S. data that replaced them for different reasons in early 2012.

   Legacy data

   Back in the old days, the collection of hydrographic data was done
   almost exclusively using public funds.  The resulting harmonic
   constants were treated as scientific results, published, and
   distributed on request from an international data bank.  Data were
   shared openly, and it was not a big deal.  But in the late 20th
   century, a wave of privatizations occurred, and harmonic constants
   became the intellectual property of the collecting agencies.

   You wouldn't think it possible to "un-publish" data that were
   distributed with considerable freedom at one time.  Nevertheless, the
   international data bank was abolished, the Table des Mares des Grands
   Ports du Monde was withdrawn from publication, and I was coerced into
   removing the associated data from the harmonics files.  [And then, ten
   years later, the Supreme Court of the U.S. ruled 6-2 that works can be
   [94]removed from the public domain after the fact.]

   Under the circumstances of privatization, it would have been reasonable
   to keep newly generated data secret; but to lay claim to the old data
   that were once shared in the spirit of scientific openness was, in my
   opinion, wrong.  It was a disservice and dishonor to all of us who had
   accepted those data on good faith, maintained them, and added value to
   them, to end up accused of copyright infringement.  I regret having
   spent days with my world atlas assigning coordinates and time zones to
   interesting faraway places, and I grieve for the knowledge that has
   vanished into the black hole of trade secrecy.

   Although only the UKHO made an issue of it, the fact that they did
   sufficed to "poison" all of the International Hydrographic Office (IHO)
   and Table des Mares des Grands Ports du Monde (TMGPM) data for every
   country.  We could no longer assume that we had permission to use any
   of them.  So in January 2001, all of the data that arrived via the IHO
   or the TMGPM were removed from the harmonics files.

   Renaissance and decline

   In the years immediately following, I received cooperation from
   organizations in several countries to supply data or to clarify terms
   of use for data they had already published.  Those terms allowed for
   free non-commercial use.  That did not satisfy the [95]Debian
   definition of "free," so for packaging purposes, the non-U.S. data had
   to be segregated from the public domain U.S. data.  Thus, the
   "non-free" harmonics file came about.

   Contributions of otherwise unpublished data then ceased.  In 2009, the
   harmonic constants for Germany--which, being derived from time serieses
   that only minimally met the requirement, were never that hot--disagreed
   significantly with authoritative predictions and were neither reparable
   nor replaceable.  By that time it had become clear that maintaining the
   data for one country once a year was quite enough work, and I had no
   time left to spend on non-free data anyway.

   In 2010, I received a message from Department of Justice, Canada that I
   interpreted as a polite request to beef up the warnings against
   commercial use of the harmonic constants I had generated.  (Ironic,
   since I had done only a fraction of Canadian stations to begin with.)
   After that, however, I was frequently contacted by iPhone and Android
   app developers wanting someone to explain, interpret, justify, and even
   enforce (against their competition) the terms of use on the non-free
   data, or who had already appropriated the data and now wanted training
   in how to exploit it.  I spent a lot of time telling people things that
   they didn't want to hear, and the number of free or open-source apps
   that resulted was approximately zero.

   As a result of the combination of lack of time, commercialism, and
   abuses, I decided in early 2012 to officially end maintenance of the
   non-free data set.  Anyone interested in generating new harmonic
   constants from published data can find information and a list of data
   sources [96]here.  In an ideal world, the data collecting organizations
   themselves would publish harmonic constants directly in TCD format
   using the tools available from
   [97]https://flaterco.com/xtide/files.html.  The irrational legal
   technicalities of how to propagate "non-free" license terms through
   derivative works, Linux distributions and app stores, and across
   national boundaries, would then become a non-issue.

   Q: I want to change the end time of a tide graph but the settings that
   I make have no effect.

   A: This is [98]Quirk #2.  In graph mode, the end time is determined by
   the applicable width and aspect, not the other way around.  Thus,
   neither the -e switch nor the compiled-in defpredictinterval constant
   have any effect in this case.  In the interactive client, you can
   resize the window as you would any window and change the aspect from
   the Options menu.  The applicable command-line switches are -gw for
   X-windows or PNG formats, -tw for text format, and -ga.  For more
   details, refer to "[99]Customizing XTide."

   Q: The text in XTide windows uses uglyfont.

   A: You can change the fonts using [100]-fn, [101]-gf, and [102]-mf or
   the corresponding resources.  However, to use FreeType fonts, XTide
   must be [103]built with Xaw3dXft.

   If XTide is built with Xaw3dXft, font names given to XTide must be in
   fontconfig format (e.g., "Helvetica-10"); otherwise, they must be in
   the traditional XLFD (e.g., "-*-helvetica-*-r-*-*-10-*-*-*-*-*-*-*").

   Q: I applied a changed setting in the control panel, but it had no
   effect.

   A: Settings made using command line switches override settings made in
   the control panel.  In order to see an effect from changes applied in
   the control panel, XTide must be run without conflicting command line
   switches.  In addition, font changes require a restart to become
   effective.

   Q: When I run xttpd, it exits immediately with no errors to tell me
   what went wrong.

   A: When executed, xttpd immediately disassociates itself from your
   terminal and starts logging all diagnostics to syslog.  So look in your
   system logs.  On an init system, you will find these someplace like
   /var/log or /var/adm/log.  On a systemd system, you have to say (as
   root) journalctl -b -p debug --no-pager to dump the log.

   Q: I always get a warning about "using obsolete time zone database."

   A: Please see the [104]System requirements section for details of what
   this means and what you can do to fix it.

   Q: How do I switch from tide to current predictions or vice-versa for a
   given location?

   A: Alas, although the two are clearly connected in the physical world,
   they are unrelated from the perspective of XTide.  Even for the same
   location, tide predictions and current predictions require two
   completely separate data sets, and rarely will you get both.  If
   current predictions are available for a location, they will appear in
   the location list with the word "Current" at the end of the name.

   Q: What are bogo-knots?

   A: If you are still seeing bogo-knots, then you are definitely using
   obsolete data and an obsolete version of XTide, or accessing a web site
   that is using obsolete data and an obsolete version of XTide.  I am not
   the maintainer of any such web sites, and I recommend upgrading to
   XTide 2, which will barf all over any harmonics files that still
   contain "bogo-knots."

   Q: First it says high tide is at 3:15 PM but then when I run it again
   it says 3:14 PM.

   A: XTide's precision is plus or minus one minute.  The behavior that
   you witnessed is normal.

   Q: Has this been ported to Windows / PalmOS / anything but Unix?

   A: Yes, to varying degrees.  Please see the [105]ports page.

   Q: Xttpd sucks!  Can't XTide work with PHP?

   A: A number of people have expressed interest in getting XTide to work
   through PHP.  Thus far I have just been introducing them to each other
   through e-mail and waiting for cool things to happen.  There is now a
   [106]WordPress plugin by Mir Rodrguez.

   Q: The tides for my location are totally wrong!

   A: Unfortunately, there have been some problems recently with data sets
   being assigned the wrong meridians upstream.  The symptom is that all
   predictions are shifted earlier or later by the same number of hours.
   If you can verify that this has happened by comparison with published
   tide tables (available at [107]http://tidesandcurrents.noaa.gov/),
   please report the problem for corrective action.

   Q: The tides for Mumble Foo Bar are obviously bogus because they have
   too many high tides on this day / only one high tide on this day /
   tides that are just a few minutes apart.

   A: That is not necessarily a problem.  Some places really do have only
   one tide cycle per day.  Others generate "extra" tides when the tidal
   forces align in such a way as to produce a "double" high or low tide or
   a temporary reversal near mid-tide.  These extra tides can be
   arbitrarily close together.  Official predictions might omit them, but
   XTide faithfully reports all maxima and minima that it finds.

   Legacy data contain some data sets in which harmonic constants were
   generated for subordinate stations by munging the constants of a
   reference station.  This operation was fragile and sometimes it led to
   spurious maxima and minima.  The fix is to upgrade to the latest data,
   which contains no "munged" data sets.

   Q: I have five constituents and some seasonal corrections for my
   location.  Can you get this to work?

   A: XTide is not presently enabled to handle seasonal corrections
   directly.  To my knowledge, seasonal corrections are only used in
   publications by the British Admiralty that do not allow redistribution
   of data, so the value of providing better support for them in XTide
   would be marginal at best.  However, if you have legal access to such
   data and are determined to use it with XTide, it may be possible to
   synthesize values for long-term constituents to "approximate the
   approximation."  A spreadsheet for doing this is available from
   [108]https://flaterco.com/xtide/files.html#experts.

   It might also help to enable constituent inference in XTide.  This can
   be done from the [109]control panel or using the [110]infer setting.

  General tide related questions

   Q: I have a tide watch that only goes through the year 1999.  What year
   could I set it to that would be the same as this year?

   A: Sorry.  It just doesn't work like that.

   Q: Is there a set time advancement each day for the next high and low
   tide?  Does it always repeat 12 hours later?

   A: No.  The 12 hour 25 minute cycle is literally only a first-order
   approximation.  Most tide predictions involve twenty to thirty terms,
   and some require over a hundred.  The 12:25 cycle is just the most
   dominant term.

   Q: Somebody gave me a tide clock, but the instructions say it only
   works on the east coast.  How can this be?

   A: "Dumb" tide clocks assume that the 12 hour 25 minute cycle mentioned
   in the [111]previous question is a good enough approximation.  For the
   west coast, it isn't.  The following tide graphs illustrate the
   differences between east and west coast tides.  The high and low tide
   times that would be indicated by a "dumb" tide clock are shown with
   vertical yellow lines.  San Francisco shows a 2-hour discrepancy on the
   lower high tide.

   Emulation of dumb tide clock for Bangor, Maine

   Emulation of dumb tide clock for San Francisco, California

   Q: Why do the high and low tides have such different levels to them on
   any given day?  Does it actually coincide with the amount of pull
   exerted by the phase or closeness of the moon?

   A: The tides do not coincide too closely with the moon.  While the moon
   produces most of the force that drives them, the exact tide levels
   result from the sloshing around of huge amounts of water, the effects
   of the shape of the coastline, and things like that.

   Q: If it's high tide here, is it low tide in [faraway place]?

   A: It's hard to infer anything over large distances since localized
   effects can have a huge influence on tides.

   Q: What does the zero (0) on a tide chart represent?

   A: Tide heights are given relative to the "datum" which in most cases
   is one of several benchmarks corresponding to low tides of varying
   extremeness.  The preferred benchmark in the U.S. is Mean Lower Low
   Water (MLLW).  The odds of the predicted tide getting below MLLW on any
   given day are about half.  The preferred benchmark in the Netherlands
   is Mean Low Water Springs (MLWS).  MLWS is lower than MLLW.  The
   predicted tide will get below MLWS on average only about twice a
   month.  The preferred benchmark in Germany is Lowest Astronomical Tide
   (LAT).  LAT is the lowest tide predicted over a 19 year period.  The
   predicted tide will not get below LAT in that 19 year period, and is
   unlikely to get below it by any significant amount ever.

   In harmonics-dwf, some U.S. locations for which a MLLW benchmark was
   unavailable use an estimated value of MLLW that is derived from the
   predictions.  These estimates tend to yield predictions that differ
   from National Ocean Service published tables by (0.1 to 0.2) ft.  Older
   versions of harmonics-dwf used LAT for these stations, which of course
   yielded much larger discrepancies.

   For more information on datums, read the National Ocean Service
   publication [112]Tidal Datums and their Applications.

   Q: Why is it that the tides two miles from here are an hour different
   than the tides here?  If the tidal bulge follows the moon at 1,000
   miles per hour, how can the difference be so great?

   A: When the water tries to follow the moon, it runs up against a lot of
   obstacles, including its own inertia, the shape of the coastline, and
   the resonances that are set up by the continual tidal motion.  In some
   cases the tides are fighting a permanent current, e.g., going up a
   river, and this slows down the tidal crest.  The result is that the
   tides at any one place at any given time don't have a whole lot to do
   with the moon any more.

   Q: Why are there two high tides per day, anyway?  How is this possible?

   A: The standard simple answer to this question is that the water on the
   side of the earth opposite the moon bulges out due to decreased lunar
   gravity in the same way that the water on the side of the earth nearest
   the moon bulges out due to increased lunar gravity.  This is
   counter-intuitive in that one might expect all of the water to just
   rush over to the side where the moon is.  To explain this, I quote from
   "Our Restless Tides," a NOAA tutorial at
   [113]http://tidesandcurrents.noaa.gov/restles1.html:

     To all outward appearances, the moon revolves around the earth, but
     in actuality, the moon and earth revolve together around their
     common center of mass, or gravity.  The two astronomical bodies are
     held together by gravitational attraction, but are simultaneously
     kept apart by an equal and opposite centrifugal force produced by
     their individual revolutions around the center-of-mass of the
     earth-moon system.  This balance of forces in orbital revolution
     applies to the center-of-mass of the individual bodies only.  At the
     earth's surface, an imbalance between these two forces results in
     the fact that there exists, on the hemisphere of the earth turned
     toward the moon, a net (or differential) tide-producing force which
     acts in the direction of the moon's gravitational attraction, or
     toward the center of the moon.  On the side of the earth directly
     opposite the moon, the net tide-producing force is in the direction
     of the greater centrifugal force, or away from the moon.

   Q: What does "slack water" mean?

   A: This and many other terms are defined in the [114]NOAA tide
   glossary.

   Q: I have a theory that [random phenomenon] is related to tidal forces,
   but I am landlocked.  Can you, like, predict the "tides" for
   [landlocked location]?

   A: There is no support for this in XTide (ocean tides have only the
   vaguest connection to latitude, longitude, and the position of the
   moon), but you can find relevant information by searching the web for
   "land tide."

   Q: I want to write my own tide predicting program.  Can you provide a
   SIMPLE explanation of the tide-predicting function?

   A: The tide prediction function is fairly simple, requiring only a
   cosine function.  The piles of code surrounding it in XTide are to
   optimize the process of finding maxima and minima.  This can be done
   less optimally with significantly less code and effort (as early
   versions of XTide did).

   Here is the BASIC pseudocode to generate the tide height or current
   velocity for a specified time point:

     Height = Datum
     for a = 1 to numconst
         Height = Height + amplitude[a] * nodefactor[a] * cos (speed[a] *
     time + eqarg[a] - phase[a])
     next a

   The different quantities referenced are:
     * From the data set for a station:
          + The Datum--also called Z0--is a constant that is provided with
            each data set to calibrate the heights of tides relative to
            [115]whatever is considered to be "zero," or to calibrate the
            velocities of currents against an actual velocity of zero.
            Without this constant term, the results of the equation would
            have a range centered on zero.  It is provided in units of
            length for tides or units of velocity for currents.
          + amplitude[a] is the first of two values given for each
            constituent in a data set.  It is provided in units of length
            for tides or units of velocity for currents.
          + phase[a]--also called the epoch--is the second of two values
            given for each constituent in a data set, and is expressed in
            angular units (degrees, radians, or cycles).
     * Global values not contained in the data set for a station:
          + speed[a] is the frequency of the constituent, often expressed
            in degrees per solar hour, but possibly in cycles per hour or
            even (gasp!) hertz.
          + nodefactor[a], the node factor, is an amplitude multiplier
            given for each constituent to adjust for long-term effects on
            the amplitudes.  In the U.S. system, these are tabulated on a
            yearly basis, so you could write it as nodefactor[a][year].
            Elsewhere, they are usually generated at a finer granularity
            or on demand for the middle of the prediction interval chosen.
          + eqarg[a], the equilibrium argument, is a phase adjustment
            given in angular units for each constituent to adjust for
            long-term effects on the phases.  They are tabulated on a
            yearly basis.
     * Time, of course, is relative.  If speed is in degrees or radians
       per X, then time is in X since the beginning of the year.  What
       constitutes the beginning of the year depends on the meridian of
       the data set.  The phases are calibrated such that time is measured
       from January 1 00:00 in the time zone specified by the meridian.
       Traditionally, the meridian is chosen to be the local standard time
       of the location in question to make life easier on simple tide
       prediction programs that don't mess with time zones or summer time
       adjustments.  However, these days it is simpler to calibrate
       everything to UTC so that all the meridians are zero, and let the
       tide prediction program apply time zones after the fact.

   The speeds, equilibrium arguments, and node factors for arbitrary
   constituents and time periods can be generated using [116]Congen.

  Business questions

   Q: I want to license XTide so I can build a commercial product around
   it.

   A: XTide is released under the terms of the GNU General Public
   License.  [117]This FAQ about the GPL may be applicable to you.

   XTide has been used by commercial packages "at arm's length," to use
   the wording of the FAQ cited above, but I have never licensed it by any
   terms other than the GPL, nor have I ever offered any kind of warranty
   or service that one might expect if it were licensed commercially.

   PLEASE NOTE:  The question whether you can use XTide is completely
   separate from the question of whether you can use the tide data
   (harmonics files).  In general, data for U.S. ports are public domain,
   while others are for non-commercial use only or subject to restrictive
   copyright.  [118]Read the boilerplate for details.

   Q: I have a lot of specific questions about the GNU General Public
   License and/or want a ruling that my specific plan is OK.

   A: Please read the GPL FAQ, available [119]here.  If that does not
   answer your question, the people to ask are at [120]licensing@fsf.org.

   Q: I would like to talk to you concerning the use of your stuff in our
   upcoming product.  Please call me at your convenience.  [#include email
   legal disclaimer]

   A: Your questions have already been answered [121]here and maybe
   [122]here.  There is nothing else to talk about.

   Q: I really don't understand the whole purpose of the GNU license.  Why
   should I have to reinvent the wheel just because I won't publish my
   sources?

   A: XTide is free software.  The GPL gives you the choice between
   respecting that freedom and passing it on, or reinventing the wheel.
   Some additional background on the rationale behind the GPL is available
   from the [123]Free Software Foundation.

   Q: We are a not-for-profit organization and we want to sell calendars
   with predictions from your web site.  Is that OK?

   A: Firstly, it's not my web site.  See [124]Question 1.  Secondly, all
   predictions for places outside the U.S. are for non-commercial use only
   (i.e. you can't sell them no matter what your tax status is).  Lastly,
   if you do want to sell calendars containing predictions for the U.S.,
   you must include all of the "NOT FOR NAVIGATION" disclaimers and agree
   to accept full liability in case someone has a problem.

   Legalities aside, my opinion has always been that people who are
   selling tide predictions have no business selling anything that is not
   directly certified by the [125]National Ocean Service.  Beggars can't
   be choosers, but when people are paying for something, they have a
   right to hold you to a higher standard.

   Q: I have a great idea to make money selling tide predictions, but I'm
   not good with technical stuff, so would you just do this for me...

   A: No.

   Q: I already make money selling tide prediction products, but your
   stuff is better, so would you just do this for me...

   A: No.

   Q: I just put up a fabulous website that serves up XTide output
   surrounded by banner ads that make me tons of free money.  Would you
   please link to it?

   A: No.

   Q: Hey, that previous guy had a great idea.  Would you please install
   XTide on my web server for me?

   A: No.

   Q: I'm a consultant being paid to install XTide.  I'm having a million
   problems with it, but I can't describe them accurately because I have
   never used Linux before.  I think XTide must be really broken.  Please
   fix all of my problems.

   A: Sorry, I can't do that by email.

   Q: I need to do [poorly researched brainstorm having something to do
   with tide prediction]--how much would you charge in consulting fees to
   help me do it?

   A: It's moot.  Your plan won't work for one or more of the following
   reasons:
     * You think that it's possible to predict tides for arbitrary
       locations based on just the latitude and longitude.  It's not.
     * The harmonic constants that you plan to use are either unobtainable
       or encumbered in ways that make what you want to do with them
       illegal.
     * You think that harmonic constants can be burned into the firmware
       of an embedded device and never need maintenance.  They can't be;
       they need to be updated regularly.
     * You think that you can cut corners with a simple tide clock and
       still get tide predictions that match those published by NOAA.  You
       can't.

   Q: Congratulations!  XTide has been added to some online directory of
   software packages.  Please verify that the information on XTide is
   correct and keep it updated.

   A: Congratulations!  No.  You do it.

  Academic questions

   Q: How should I cite XTide within publications?

   A: The web site is the best thing you can cite.  For a general
   reference to XTide, I suggest the following, with the current date.

     [1]  David Flater.  XTide.  https://flaterco.com/xtide/.
     2005-07-04.

   If you are using specific predictions from XTide rather than just XTide
   in general, then you should cite the specific version of XTide and the
   specific data file that you used.  In this case, it would be
   appropriate to use the date indicated in the changelog for that version
   of XTide and the revision date of the data file.

     [2]  David Flater.  XTide version 2.8.2.
     https://flaterco.com/xtide/.  2005-01-06.

     [3]  harmonics-dwf-2005-06-05-v2.  Available from
     https://flaterco.com/xtide/files.html, 2005-06-05.

  Questions that you should have asked, but didn't

   Q: What is the difference between a reference station and a subordinate
   station?

   A: The following information was copied from [126]NOAA's web site on
   2007-02-17.

     The publication of full daily tide predictions is necessarily
     limited to a comparatively small number of stations.  These stations
     are referred to as "reference stations".  Tide predictions for more
     than 3000 other locations, referred to as "subordinate stations",
     can be obtained by applying specific differences to the daily tide
     predictions for one of the reference stations.  [...]

     Caution:  The time differences and height ratios used to calculate
     predictions at subordinate stations are derived from a comparison of
     simultaneous tide observations at the subordinate station and its
     reference station.  Because these adjustments are constant, they may
     not always provide for the daily variations in the actual tides,
     especially if the subordinate station is some distance from the
     reference station.  Therefore, although the application of time
     differences and height ratios will generally provide reasonably
     accurate approximations, they cannot result in predictions as
     accurate as those listed for the reference stations, which are based
     on much larger periods of analysis.

   In plain language, what you need to know is this:  All subordinate
   station predictions are approximate.  Tide predictions are always at
   best approximations of reality, but for subordinate stations that goes
   double.

   Q: These predictions are nonsense--what is going on here?

   Tide graph with a weird zigzag
2007-02-14 12:57 PM AKST   3.46 feet  High Tide
2007-02-14  3:00 PM AKST   Moonset
2007-02-14  7:08 PM AKST   Sunset
2007-02-14  9:06 PM AKST  -0.38 feet  Low Tide
2007-02-15  6:46 AM AKST   3.08 feet  Low Tide
2007-02-15  7:00 AM AKST   2.62 feet  High Tide
2007-02-15  9:07 AM AKST   Moonrise
2007-02-15  9:22 AM AKST   Sunrise
2007-02-15  1:46 PM AKST   3.46 feet  High Tide

   Current graph with weird double-flood
2004-03-31  5:01 AM PST  -0.64 knots  Max Ebb
2004-03-31  5:49 AM PST   Sunrise
2004-03-31 10:06 AM PST   0.02 knots  Max Flood
2004-03-31 10:18 AM PST   0.00 knots  Slack, Flood Begins
2004-03-31 11:21 AM PST  -0.00 knots  Slack, Ebb Begins
2004-03-31  1:01 PM PST   Moonrise
2004-03-31  4:13 PM PST  -0.90 knots  Max Ebb

   These are extreme examples of what can happen when the time differences
   and height ratios for subordinate stations don't "provide for the daily
   variations in the actual tides."  Although in the average case the
   offsets might yield good results, in extreme cases they can yield
   nonsense results like tide events happening in an impossible order or a
   "low" tide actually being higher than the "high" tide right next to
   it.  There is nothing XTide can do to rationalize these paradoxes, and
   the tide levels that are interpolated between paradoxical events are
   essentially garbage.

   Q: Where can I find tons of information about tides that is both more
   authoritative and better written than this FAQ?

   A: [127]http://tidesandcurrents.noaa.gov/education.html
     __________________________________________________________________

   [128]<- Previous [129]-> Next [130]Contents

References

   1. https://flaterco.com/xtide/bugs.html
   2. https://flaterco.com/xtide/design.html
   3. https://flaterco.com/xtide/xtide.html#contents
   4. https://flaterco.com/
   5. https://flaterco.com/xtide/faq.html#5
   6. https://flaterco.com/xtide/faq.html#40
   7. https://flaterco.com/xtide/faq.html#45
   8. https://flaterco.com/xtide/faq.html#OaV
   9. https://flaterco.com/xtide/faq.html#20
  10. https://flaterco.com/xtide/faq.html#10
  11. https://flaterco.com/xtide/faq.html#onepage
  12. https://flaterco.com/xtide/faq.html#50
  13. https://flaterco.com/xtide/faq.html#duplicates
  14. https://flaterco.com/xtide/faq.html#51
  15. https://flaterco.com/xtide/faq.html#100
  16. https://flaterco.com/xtide/faq.html#nocurrents
  17. https://flaterco.com/xtide/faq.html#noroot
  18. https://flaterco.com/xtide/faq.html#ancient
  19. https://flaterco.com/xtide/faq.html#VPS
  20. https://flaterco.com/xtide/faq.html#90
  21. https://flaterco.com/xtide/faq.html#maxmin
  22. https://flaterco.com/xtide/faq.html#DST
  23. https://flaterco.com/xtide/faq.html#HistoricalPredictions
  24. https://flaterco.com/xtide/faq.html#60
  25. https://flaterco.com/xtide/faq.html#92
  26. https://flaterco.com/xtide/faq.html#93
  27. https://flaterco.com/xtide/faq.html#ctrlpan
  28. https://flaterco.com/xtide/faq.html#95
  29. https://flaterco.com/xtide/faq.html#100
  30. https://flaterco.com/xtide/faq.html#110
  31. https://flaterco.com/xtide/faq.html#130
  32. https://flaterco.com/xtide/faq.html#140
  33. https://flaterco.com/xtide/faq.html#150
  34. https://flaterco.com/xtide/faq.html#php
  35. https://flaterco.com/xtide/faq.html#210
  36. https://flaterco.com/xtide/faq.html#220
  37. https://flaterco.com/xtide/faq.html#250
  38. https://flaterco.com/xtide/faq.html#52
  39. https://flaterco.com/xtide/faq.html#170
  40. https://flaterco.com/xtide/faq.html#DumbTideClock
  41. https://flaterco.com/xtide/faq.html#160
  42. https://flaterco.com/xtide/faq.html#180
  43. https://flaterco.com/xtide/faq.html#190
  44. https://flaterco.com/xtide/faq.html#200
  45. https://flaterco.com/xtide/faq.html#230
  46. https://flaterco.com/xtide/faq.html#240
  47. https://flaterco.com/xtide/faq.html#255
  48. https://flaterco.com/xtide/faq.html#260
  49. https://flaterco.com/xtide/faq.html#55
  50. https://flaterco.com/xtide/faq.html#56
  51. https://flaterco.com/xtide/faq.html#RTFL
  52. https://flaterco.com/xtide/faq.html#DNU
  53. https://flaterco.com/xtide/faq.html#calendar
  54. https://flaterco.com/xtide/faq.html#54
  55. https://flaterco.com/xtide/faq.html#300
  56. https://flaterco.com/xtide/faq.html#OaV2
  57. https://flaterco.com/xtide/faq.html#OaV3
  58. https://flaterco.com/xtide/faq.html#notQualified
  59. https://flaterco.com/xtide/faq.html#667
  60. https://flaterco.com/xtide/faq.html#directory
  61. https://flaterco.com/xtide/faq.html#cite
  62. https://flaterco.com/xtide/faq.html#refsub
  63. https://flaterco.com/xtide/faq.html#timewarp
  64. https://flaterco.com/xtide/faq.html#NOAA_education
  65. https://flaterco.com/xtide/index.html
  66. https://flaterco.com/xtide/files.html
  67. https://flaterco.com/xtide/index.html
  68. https://flaterco.com/xtide/index.html
  69. http://www.waterlevels.gc.ca/eng/data
  70. http://www.bsh.de/en/Marine_data/Forecasts/Tides/index.jsp
  71. http://www.linz.govt.nz/hydro/tidal-info/tide-tables
  72. http://kartverket.no/en/sehavniva/
  73. http://www.ntslf.org/
  74. http://easytide.ukho.gov.uk/EasyTide/EasyTide/index.aspx
  75. http://tidesandcurrents.noaa.gov/tide_predictions.html
  76. https://flaterco.com/xtide/harmonics.html
  77. http://windows.microsoft.com/en-US/windows7/Preview-the-appearance-of-a-printed-webpage
  78. https://flaterco.com/xtide/pound_to_fit.html
  79. https://flaterco.com/xtide/harmonics.html
  80. https://flaterco.com/xtide/harmonics.html
  81. http://www.niwa.co.nz/services/online-services/tide-forecaster
  82. http://tidesandcurrents.noaa.gov/
  83. http://tidesandcurrents.noaa.gov/
  84. http://www.noaa.gov/
  85. http://oceanservice.noaa.gov/
  86. http://tidesandcurrents.noaa.gov/ncop.html
  87. https://flaterco.com/xtide/installation.html
  88. https://flaterco.com/xtide/xttpd.html
  89. https://flaterco.com/xtide/installation.html#trouble
  90. mailto:dave@flaterco.com
  91. http://www.iana.org/time-zones
  92. https://flaterco.com/xtide/sysreq.html#TZsysreq
  93. https://flaterco.com/xtide/time_t.html
  94. http://en.wikipedia.org/wiki/Golan_v._Holder
  95. http://www.debian.org/doc/debian-policy/ch-archive.html#s-dfsg
  96. https://flaterco.com/xtide/harmonics.html#harmgen
  97. https://flaterco.com/xtide/files.html
  98. https://flaterco.com/xtide/bugs.html
  99. https://flaterco.com/xtide/settings.html
 100. https://flaterco.com/xtide/settings.html#fn
 101. https://flaterco.com/xtide/settings.html#gf
 102. https://flaterco.com/xtide/settings.html#mf
 103. https://flaterco.com/xtide/installation.html#Xaw3dXft
 104. https://flaterco.com/xtide/sysreq.html
 105. https://flaterco.com/xtide/ports.html
 106. http://www.almanaqueazul.org/?p=132
 107. http://tidesandcurrents.noaa.gov/
 108. https://flaterco.com/xtide/files.html#experts
 109. https://flaterco.com/xtide/advanced.html#cp
 110. https://flaterco.com/xtide/settings.html#infer
 111. https://flaterco.com/xtide/faq.html#170
 112. https://flaterco.com/files/xtide/tidal_datums_and_their_applications.pdf
 113. http://tidesandcurrents.noaa.gov/restles1.html
 114. https://flaterco.com/files/xtide/glossary2.pdf
 115. https://flaterco.com/xtide/faq.html#190
 116. https://flaterco.com/xtide/files.html#congen
 117. http://www.gnu.org/licenses/gpl-faq.html#GPLInProprietarySystem
 118. https://flaterco.com/xtide/harmonics_boilerplate.txt
 119. http://www.gnu.org/licenses/gpl-faq.html
 120. mailto:licensing@fsf.org
 121. https://flaterco.com/xtide/disclaimer.html
 122. http://www.gnu.org/licenses/gpl-faq.html#GPLInProprietarySystem
 123. http://www.fsf.org/about/what-is-free-software
 124. https://flaterco.com/xtide/faq.html#5
 125. http://oceanservice.noaa.gov/
 126. http://tidesandcurrents.noaa.gov/t2help.html
 127. http://tidesandcurrents.noaa.gov/education.html
 128. https://flaterco.com/xtide/bugs.html
 129. https://flaterco.com/xtide/design.html
 130. https://flaterco.com/xtide/xtide.html#contents

################################################################

   [1]<- Previous [2]-> Next [3]Contents

   [4]Sunset over the bar, Bar Harbor, Maine, 1997-06-24

Design notes

  Principles

   As originally codified:
     * Portability
          + The scope is all "reasonably modern" flavors of Unix, X11, and
            C++.
          + Limit language features to those that reliably compile.
          + Respect the holy mantra "./configure; make; make install".
          + Allow trivial workarounds for platform- and
            distribution-specific bugs or special requirements.
          + Disallow nontrivial workarounds and those that conflict with
            correct operation on non-broken platforms.
     * Availability
          + Limit hard dependencies on external tools and libraries to
            those that are typically pre-installed.
     * Usability
          + Maximize orthogonality of settings and switches.
          + Support both interactive and non-interactive use.
          + Command-line switches should be no more than two characters
            long.
     * Maintainability
          + Accept no bogus patches.
          + Maximize orthogonality of modules.
     * Stability
          + Accept no bogus patches.
          + Use no unstable tools or libraries.
          + If it ain't broke, don't fix it.
          + If it damages usability or maintainability, it's considered
            broke.
          + Do not merely deprecate that which deserves to be deleted.

   As it happened:
     * Portability
          + Within the original scope, no Unix but Linux and no compiler
            but GCC gets much testing anymore.
          + Scope creep:  the workarounds that are included to allow
            building the command-line client with Visual Studio are
            ridiculous.
          + Building libxtide for Android required few source code changes
            but plenty of autoconf tricks.
     * Usability
          + The font settings are context-sensitive.
     * Maintainability
          + I have accepted some bogus patches and made them work, but no
            more.
          + Font and character set handling has become totally
            non-orthogonal because every context is different.
     * Stability
          + libXaw3dXft has been unstable (every update breaks the XTide
            build, but there are no version defines to check).
          + The -ns and -nf switches are deprecated but deserve to be
            deleted.

  Harmonics files

   XTide has a long history of harmonics file woes and has been through
   four different file formats trying to solve them.

        Readable Extensible Efficient Available
   TXT     X                              X
   XML               X                    X
   SQL               X          X
   TCD1                         X         X
   TCD2              X          X         X

   XTide 1 used a nice, human-readable text format (harmonics.txt) but it
   was neither efficient nor extensible.  New fields that were really,
   really necessary got wedged in as "hot comments," initiating a long
   downhill slide into architectural chaos.

   Unwisely, XTide 2 perpetuated the harmonics.txt format but added a new,
   extensible XML format for subordinate stations only (offsets.xml).  It
   was anticipated that one of two things would eventually happen:  either
   a reasonably functional and stable SQL database would become standard
   issue with the average Unix, obviating the need to avoid that external
   dependency, or harmonics.txt would go away and all stations would be
   done in extensible XML.  Neither one happened.  Migration to XML was
   put off repeatedly because it would exacerbate the performance
   bottleneck.

   Everybody suffered with the lousy performance until Jan Depner proposed
   to implement a binary format (TCD).  TCD1 fixed the performance problem
   but the extensibility problem persisted.  New fields could be added
   with just minor changes to libtcd, but then you needed to recompile the
   world.  Old versions of XTide couldn't read new harmonics files after
   fields were added.  This had a major chilling effect on all development
   that would have required new fields.

   TCD2 (a major, incompatible revision) emptied the queue of incompatible
   changes but also added a field whose content is extension fields
   encoded as text.  Adding fields this way is not as efficient as adding
   new binary fields, but it avoids the need to make an incompatible
   revision over small stuff.  The option to add new binary fields and
   bump the major rev remains open should that become necessary.

   Unfortunately, as I forget who once observed, "The worst enemy of the
   great is the barely good enough."  Among the downstream user community,
   the obsolete and hopeless .txt and .xml formats refuse to die.

  Known problems

   Consensus is that the XTide source code does a miserable job of
   separating the user interfaces from the reusable tide-prediction
   logic.  As of XTide 2.14 the common files have at least been bundled
   into a library that can be built upon without making too much of a
   mess.  However, the XML parser still protrudes into the global
   namespace, conflicting with any other lex/yacc type parser that the app
   might want to link with.

   Lots of serious design problems were fixed in refactorings beginning
   with version 2.7 (early 2004) and continuing through version 2.9.
   Remaining minor problems:
    1. The interface with X11 is still weird, especially bootstrapping.
    2. The analog tide clock icon caused more problems (with buggy window
       managers) than it was worth.
    3. URLs assigned to prediction pages by the web server should probably
       be based on the harmonics file name and the location name rather
       than a transient "row ID."
    4. Constituent inference was patched in via libtcd and maybe could
       have been integrated better.  In theory, you might want to control
       it on a station-by-station basis like preferred units, and it
       probably should not require a station reload to turn it on or off.
    5. Graph and calendar modes are implemented by transient classes.
       These are not proper objects, but they are too complicated to be
       implemented with methods alone.
    6. libtcd doesn't let you know whether you are looking at a tide
       station or a current station until after you load it.
    7. The mechanism that XTide 2.13 and later use to get client side
       fonts for use in tide graphs is an abomination.
    8. Calendar mode needs an "extended subset" of the settings that every
       other mode uses.
    9. Application-specific error messages don't belong in libxtide.
   10. Graph mode is a bottomless source of requests for more settings to
       customize it.

  C++ feature footprint

   At the time XTide 2 was developed, the fancier features of C++ such as
   the Standard Template Library (STL) and exceptions did not work in a
   portable fashion among the commonly available compilers, so their use
   was avoided.  Similarly, [5]Qt and other free alternatives to Motif
   were not widely available, so Athena Widgets were used.  The resulting
   interface may seem [6]primitive by today's standards, but it still
   works.

   By the time of the 2.7 refactorings, the STL appeared to be stable and
   widely available, so standard templates were introduced where
   appropriate to simplify new code.  Old code was not STLified until the
   Great Cleanup of 2006 (XTide 2.9).

   The long long int data type was introduced in XTide 2.6 as part of the
   changes to handle dates before 1970 and after 2037.  Nobody complained.

   Streams were expunged from XTide 2.6 after compilers started
   deprecating XTide's use of them.  In XTide, C++ streams did not add
   value versus plain old C I/O, but this is not the case for every
   application.

   The bool data type was introduced in XTide 2.9.  C++11 extended
   initializer lists were used in new code in XTide 2.13, but made
   optional in XTide 2.13.1 because of continued non-support in Visual
   Studio 2012.

   Exceptions are still not used, but should be.  The bounds-checking
   operation[] of SafeArray should be replaced with the now-standard at()
   function.

  Coding conventions

   A uniform coding convention was imposed in XTide 2.9 (year 2006).  See
   the file CodingConventions.txt included in the distribution tarball.
   As of 2012, particularly with the issuance of C++11, it has become
   problematically obsolete in some areas.

  Paths not taken

     * There ought to be a way to specify relative dates and times in the
       -b and -e fields.  Need an applicable standard; ISO 8601 doesn't
       support it.
     * Generate maps for xttpd navigation and general illustration,
       include in LaTeX form.
     * Several people have asked for a line in text listings for the
       current time, like "2001-03-19 11:50 AM PST 0.10 feet Falling," but
       it's not clear what the settings and behaviors should be to handle
       the "now" event consistently across all modes.  Graphs and clocks
       have their own ways of showing the "now," and it would be
       inappropriate to include "now" in a calendar.
     * Most tide prediction software generates node factors and
       equilibrium arguments monthly or at least does it for the middle of
       your prediction interval, but the legacy of SP98 is to do it
       yearly.
     * Doodson style tide prediction as used by Godin/Foreman's IOS
       package:
         1. No new Doodson data appear to be forthcoming.
         2. Most Doodson constituents are approximated fairly well by
            Congen.  The ones that aren't approximated well are those that
            are drastically affected by latitude.  To support
            latitude-dependent constituents, node factors and equilibrium
            arguments would have to be generated internally to XTide,
            which would be a significant architectural change.  [Casement
            opined that the latitude-dependent method is bogus anyway
            because tides are generated someplace in mid-ocean with a
            different latitude.]
         3. If you want IOS, then use IOS.
     __________________________________________________________________

   [7]<- Previous [8]-> Next [9]Contents

References

   1. https://flaterco.com/xtide/faq.html
   2. https://flaterco.com/xtide/credits.html
   3. https://flaterco.com/xtide/xtide.html#contents
   4. https://flaterco.com/
   5. https://www.qt.io/
   6. http://www.catb.org/~esr/jargon/html/S/stone-knives-and-bearskins.html
   7. https://flaterco.com/xtide/faq.html
   8. https://flaterco.com/xtide/credits.html
   9. https://flaterco.com/xtide/xtide.html#contents

################################################################

   [1]<- Previous [2]-> Next [3]Contents

   [4]Moonrise over Marginal Way

Bibliography

   Canonical sources on the NOS tide prediction methodology (including a
   mathematical explanation from first principles in SP98):

     [5]Manual of Harmonic Analysis and Prediction of Tides.  Special
     Publication No. 98, Revised (1940) Edition (reprinted 1958 with
     corrections; reprinted again 1994).  United States Government
     Printing Office, 1994.  Downloaded from [6]NOAA Central Library via
     [7]NOAA's Historical Map & Chart Collection, 2015-04-27.

     [8]Computer Applications to Tides in the National Ocean Survey.
     Supplement to Manual of Harmonic Analysis and Prediction of Tides
     (Special Publication No. 98).  National Ocean Service, National
     Oceanic and Atmospheric Administration, U.S. Department of Commerce,
     January 1982.  Downloaded from [9]NOS, 2016-12-18.

   Miscellaneous publications available from
   [10]https://flaterco.com/xtide/files.html#pubs:

     [11]Tide and Current Glossary.  National Ocean Service, January
     2000.  Downloaded from [12]NOS, 2003-12-19.

     [13]Tidal Datums and their Applications.  NOAA Special Publication
     NOS CO-OPS 1, June 2000.  Downloaded from [14]NOS, 2004-08-27.

     [15]Nathaniel Bowditch, LL.D.  The American Practical Navigator:  An
     Epitome of Navigation.  NIMA Pub. No. 9, Bicentennial Edition,
     2002.  Downloaded from [16]NGA, 2004-09-28.  42 MB.  Chapter 9 is a
     tutorial on tides and currents.

   My sources for X-windows programming reference:

     Kimball, Paul E.  The X Toolkit Cookbook.  Prentice Hall P T R, New
     Jersey, 1995.

     Nye, Adrian.  Xlib Programming Manual.  O'Reilly & Associates, Inc.,
     Volume 1, Third Edition, July 1993.

   A catalog of information on the ISO 8601 standard date and time
   notation can be found at
   [17]http://dmoz.org/Science/Reference/Standards/Individual_Standards/IS
   O_8601/.

   iCalendar format and usage is according to [18]RFC 2445 and [19]RFC
   2446, with some hints taken from [20]RFC 2447 (November 1998).

   Harmgen uses ordinary least squares for harmonic analysis of tides.  An
   improved method that is more robust to outliers in the data is
   described in

     Keith E. Leffler and David A. Jay, "Enhancing tidal harmonic
     analysis:  Robust (hybrid L^1/L^2) solutions," Continental Shelf
     Research, 2008.  Available at
     [21]http://web.cecs.pdx.edu/~jaylab/group/leffler/publications/Leffl
     er_Jay_2009.pdf.

   An article about a model-based approach to tide prediction, which is
   completely different from what XTide does, is

     Derek Goring, "Computer Models Define Tide Variability," The
     Industrial Physicist, v. 7, n. 5, October/November 2001, pp. 14-17.

   Michael Foreman's publications are a good read if you are interested in
   the Doodson approach to tide prediction.

     Foreman, M.G.G., 1977.  Manual for Tidal Heights Analysis and
     Prediction.  Pacific Marine Science Report 77-10, Institute of Ocean
     Sciences, Patricia Bay, Sidney, B.C., 58 pp. (2004 revision).

     Foreman, M.G.G., 1978.  Manual for Tidal Currents Analysis and
     Predition.  Pacific Marine Science Report 78-6, Institute of Ocean
     Sciences, Patricia Bay, Sidney, B.C., 57 pp. (2004 revision).

     Foreman, M.G.G., and R.F. Henry, 1979.  Tidal Analysis Based on High
     and Low Water Observations.  Pacific Marine Science Report 79-15,
     Institute of Ocean Sciences, Patricia Bay, Sidney, B.C., 36 pp.
     (2004 revision).

   Miscellaneous publications mentioned by Hugh Casement that I haven't
   read:

     On the response method of tide prediction, which is completely
     different and allegedly better than what XTide does:  Munk, Walter
     H.; Cartwright, David E.:  Tidal spectroscopy and prediction.
     Philosophical Transactions of the Royal Society, A 259 (1966).

     An interesting-sounding publication that Hugh Casement hasn't read
     either:  Horn, Walter:  Some recent approaches to tidal problems
     (Centre Belge d'Ocans, Brussels, year unknown).

     Horn, Walter:  Tafeln der Astronomischen Argumente V0 und der
     Korrektionen j, v (Deutsches Hydrographisches Institut, Hamburg,
     1967).

     Doodson, in Proceedings of the Royal Society A.100 (London, 1921).

     Cartwright and Tayler, in Geophysical Journal of the Royal
     Astronomical Society 23 (1971).

     Jean Meeus, Astronomical Algorithms, Willmann-Bell.
     __________________________________________________________________

   [22]<- Previous [23]-> Next [24]Contents

References

   1. https://flaterco.com/xtide/credits.html
   2. https://flaterco.com/xtide/time_t.html
   3. https://flaterco.com/xtide/xtide.html#contents
   4. https://flaterco.com/
   5. https://flaterco.com/files/xtide/SP98-1958.pdf
   6. http://www.lib.noaa.gov/collections/imgdocmaps/cgs_specpub.html
   7. http://historicalcharts.noaa.gov/
   8. https://flaterco.com/files/xtide/SpecialPubNo98Suppl.pdf
   9. http://www.tidesandcurrents.noaa.gov/pub.html
  10. https://flaterco.com/xtide/files.html#pubs
  11. https://flaterco.com/files/xtide/glossary2.pdf
  12. http://www.tidesandcurrents.noaa.gov/pub.html
  13. https://flaterco.com/files/xtide/tidal_datums_and_their_applications.pdf
  14. http://www.tidesandcurrents.noaa.gov/pub.html
  15. https://flaterco.com/files/xtide/Bowditch.pdf
  16. http://pollux.nss.nga.mil/pubs/pubs_j_apn_sections.html?rid=187
  17. http://dmoz.org/Science/Reference/Standards/Individual_Standards/ISO_8601/
  18. https://flaterco.com/xtide/rfc2445.txt
  19. https://flaterco.com/xtide/rfc2446.txt
  20. https://flaterco.com/xtide/rfc2447.txt
  21. http://web.cecs.pdx.edu/~jaylab/group/leffler/publications/Leffler_Jay_2009.pdf
  22. https://flaterco.com/xtide/credits.html
  23. https://flaterco.com/xtide/time_t.html
  24. https://flaterco.com/xtide/xtide.html#contents

################################################################

   [1]<- Previous [2]-> Next [3]Contents

Appendix A -- Historical predictions and Y2038 compliance

   As of 2002, the average Unix used a signed 32-bit integer to represent
   time as a count of seconds since 1970-01-01 00:00:00Z.  The limits of
   that representation are 1901-12-13 20:45:52Z and 2038-01-19 03:14:07Z.
   Some platforms instead used an unsigned 32-bit integer (time starts in
   1970) while others already used 64-bit integers.

   XTide originally limited itself to the range 1970 to 2037.  This
   provided portability and reliable results regardless of the time_t
   representation and allowed Interval (the difference between two
   timestamps) to be represented using a signed 32-bit integer.  However,
   an increasing number of requests for historical "past predictions"
   combined with slow progress in migrating the average Unix platform to a
   time representation capable of surviving year 2038 finally motivated
   the incorporation of a workaround.

   As of 2013, signed 64-bit time_t is provided by 64-bit Linux and
   unsigned time_t has fallen by the wayside.  The workaround remains
   useful on 32-bit Linux, DOS, and Windows.  Windows actually uses a
   signed 64-bit time_t, but the Run-Time Library [4]barfs on dates before
   1970 anyway.  Go figure.

   If XTide is compiled with the workaround, time_t is unconditionally
   defined as a signed 64-bit integer and the platform's time functions
   are bypassed.  Years from 1 to 4000 are allowed.  However, time zones
   and daylight savings time are sacrificed.  Everything becomes UTC. [5]*

   The workaround can be enabled at configure time using
   configure --enable-time-workaround.  The range of years that is
   selectable in timestamp dialogs is automatically expanded to 1700 to
   2100 when the time workaround is enabled.  If a different range is
   required, the definitions of Global::dialogFirstYear and
   Global::dialogLastYear in Global.cc must be changed manually.

   In order to obtain predictions for past and future years, it is also
   necessary to use a harmonics file that supports those years.  The new
   harmonics file harmonics-dwf, rev. 2004-10-05 or later, supports the
   years 1700 to 2100.  If you need to extend the range of years further,
   use the following procedure.
    1. Obtain and build the most recent versions of Congen, Tcd-utils and
       Harmbase2, available at [6]https://flaterco.com/xtide/files.html.
       You will also need to install the version of Postgres indicated by
       the Harmbase2 instructions.
    2. Obtain the most recent Postgres database dump of harmonics-dwf from
       the same place and load it:  createdb harmbase2; psql harmbase2 <
       harmonics-dwf-*.sql.
    3. Export the database to a new TCD file using the export program of
       Harmbase2, specifying whatever years you wanted:  export -b 1700 -e
       2300 harmonics-me.

   If you are using .txt and .xml files, you can extend the range of years
   as follows.
    1. Obtain and build the most recent versions of Congen and Tcd-utils,
       available at [7]https://flaterco.com/xtide/files.html.
    2. Generate the needed years as explained in the README in the Congen
       distribution.  E.g., congen -a1 -b 1700 -e 2300 < congen_input.txt
       > out.txt.
    3. Using a text editor, edit harmonics.txt and replace the segment
       between "Begin congen output" and "End congen output" with the
       congen output that you just generated.
    4. Convert the data to TCD format using build_tide_db as explained in
       the README of the Tcd-utils distribution.

   Please be aware that extrapolating predictions over large spans of time
   may give extremely inaccurate results.  Don't even go there until you
   [8]read this FAQ about it.

   * The time scale used by the time workaround is not strictly speaking
   UTC since it does not implement [9]leap seconds, but neither does the
   standard library.  See [10]Limitation #5.
     __________________________________________________________________

   [11]<- Previous [12]-> Next [13]Contents

References

   1. https://flaterco.com/xtide/bibliography.html
   2. https://flaterco.com/xtide/mincurrents.html
   3. https://flaterco.com/xtide/xtide.html#contents
   4. http://msdn.microsoft.com/en-us/library/bf12f0hc.aspx
   5. https://flaterco.com/xtide/time_t.html#leap
   6. https://flaterco.com/xtide/files.html
   7. https://flaterco.com/xtide/files.html
   8. https://flaterco.com/xtide/faq.html#HistoricalPredictions
   9. http://www.boulder.nist.gov/timefreq/pubs/bulletin/leapsecond.htm
  10. https://flaterco.com/xtide/bugs.html
  11. https://flaterco.com/xtide/bibliography.html
  12. https://flaterco.com/xtide/mincurrents.html
  13. https://flaterco.com/xtide/xtide.html#contents

################################################################

   [1]<- Previous [2]-> Next [3]Contents
   [4]About harmonic constants and sub station corrections
   [5]Change log

Appendix B -- Application of offsets for Min Flood and Min Ebb events

   [6]B.1  Background
   [7]B.2  Secondary Station Adjustments Instructions (NOS)
   [8]B.3  Comparison of old and new results
   [9]B.4  Comparison with published tables

  Background

   XTide distinguishes the following common events for current stations:

   Max Flood           Maximum current in the flood (+) direction.
   Max Ebb             Maximum current in the ebb (-) direction.
   Slack, Flood Begins Zero current preceding flood.
   Slack, Ebb Begins   Zero current preceding ebb.

   Additionally, it distinguishes two events that are not seen as
   frequently:

   Min Flood Minimum current in the flood (+) direction between two Max
   Floods when the current never crosses zero.
   Min Ebb Minimum current in the ebb (-) direction between two Max Ebbs
   when the current never crosses zero.

   In XTide 2.8, a change was made to the application of offsets for Min
   Flood and Min Ebb events.

   Event XTide 2.7 time adjust XTide 2.7 current adjust XTide 2.8 time
   adjust XTide 2.8 current adjust
   Min Flood Same as Max Ebb Same as Max Ebb Same as Slack, Flood Begins;
   if null, use Max Flood Same as Max Flood
   Min Ebb Same as Max Flood Same as Max Flood Same as Slack, Ebb Begins;
   if null, use Max Ebb Same as Max Ebb

   This change was made based on a reading of the highlighted sections of
   the National Ocean Service web page quoted below, which was downloaded
   from [10]http://co-ops.nos.noaa.gov/currents04/t2chelp.html on
   2004-09-15.

   The second highlighted passage states that no attempt is made to
   predict the speed of the minimum currents.  It would not make sense for
   XTide to leave these values unadjusted because a very small ratio could
   cause the supposed maxima to have lower amplitude than the minimum.
   Applying the ratio used for the surrounding maxima will give reasonable
   looking results as long as the adjustment is only a ratio.  (Additive
   adjustments would not produce reasonable results.)
     __________________________________________________________________

           BEGIN NATIONAL OCEAN SERVICE TEXT (highlighting added)
     __________________________________________________________________

                 Secondary Station Adjustments Instructions

   The publication of full daily predictions is necessarily limited to a
   comparatively small number of stations. These stations are referred to
   as "reference stations". Tidal current predictions for more than 2500
   other locations can be obtained by applying certain differences to the
   daily predictions for the reference stations.

   These pages provide a listing of the more than 2500 "subordinate
   stations" for which such predictions can be made, the differences and
   ratios to be used, and a link to the appropriate reference station. The
   stations in the listing are arranged geographically to make it possible
   to find stations which are available for an area you are interested in.

   Since all tidal current stations are located offshore, many of them are
   named for the channels, rivers, and inlets they are located in, or for
   cities, towns, or navigational points they are located near. Some
   personal knowledge of the area you are interested in may be necessary
   to determine which station(s) are most appropriate for your use.

   Depths: Although current measurements may have been recorded at various
   depths in the past, the data listed here for most subordinate stations
   are mean values determined to have been representative of the current
   at each location. For that reason, no specific current meter depth for
   those stations are given. Beginning with the Boston Harbor tidal
   current survey in 1971, data for individual meter depths were published
   and subsequent new data may be presented in a similar manner.

   Since most of the current data in these pages came from meters
   suspended from survey vessels or anchored buoys, the listed depths are
   those measured downward from the surface. Some later data have come
   from meters anchored at fixed depths from the bottom. These meter
   positions were defined as depth below chart datum. Such defined depths
   in these pages will be accompanied by the small letter "d".

   Minimum Currents: The user may note that at many locations the current
   may not diminish to a true slack water or zero speed stage. For that
   reason, the phrases, "minimum before flood" and "minimum before ebb"
   are used in these pages rather than "slack water" although either or
   both minimums may actually reach a zero speed value at some locations.

   Maximum Currents: Near the coast and in inland waters, the current
   increases from a minimum current (slack water) for a period of about 3
   hours until the maximum speed or strength of the current is reached.
   The speed then decreases for another period of about 3 hours when
   minimum current is again reached and the current begins a similar cycle
   in the opposite direction. The current that flows towards the coast or
   up a stream is known as the flood current; the opposite flow is known
   as the ebb current. Speeds of the current at reference stations are
   listed as positive values for floods and negative values for ebbs.
   These pages list the average directions of the maximum floods and
   maximum ebb currents. The directions listed are given in degrees, true,
   reading from 000 at north to 359 and are the directions toward which
   the current flow.

   Differences and Speed Ratios: These pages contain time differences by
   which the user can compile approximate times for the minimum and
   maximum current phases at the subordinate stations. Time differences
   for those phases should be applied to the corresponding phases at the
   reference station. It will be seen upon inspection that some
   subordinate stations exhibit either a double flood or a double ebb
   stage, or both. In those cases, a separate time difference is listed
   for each of the three flood (or ebb) phases and should be applied only
   to the maximum flood (or ebb) phase at the reference station. The
   results obtained by the application of time differences will be based
   upon the local time meridian. Differences of time meridians between a
   subordinate stations and its reference station have been accounted for.

   The speed ratios are used to compile approximations of the daily
   current speeds at the subordinate stations and refer only to the
   maximum floods and ebbs. No attempt is made to predict the speed of the
   minimum currents. These ratios are multiplied to the corresponding
   maximum current phases at the reference station. As mentioned before,
   however, some stations may exhibit either a double flood or a double
   ebb, or both. As with time differences, separate ratios are listed for
   each of the three flood (or ebb) phases and should be applied only to
   the daily maximum flood (or ebb) speed at the reference station. It
   should be noted that although the speed of a given current phase at a
   subordinate station is obtained by reference to the corresponding phase
   at a reference station, the directions of the current at the two places
   may differ considerably. These pages list the average directions of the
   maximum current phases at the subordinate stations.

   Example Tidal Current Calculations

   For Cape May Channel, the time and speed adjustments listed in the
   tables are:
Minimum       Minimum         Speed
Before Flood  Before  Ebb     Ratio
Flood         Ebb           Flood Ebb
-1 14  -1 30  -1 11  -0 45   1.1  1.8

   and the reference station is Delaware Bay Entrance. If the times and
   speeds listed in column 1 are the minimum and maximum tidal currents
   for a day at Delaware Bay Entrance, column 2 are the time corrections,
   and column 3 are the speed corrections; column 4 will be the predicted
   currents at Cape May Channel. These values are computed by adding or
   subtracting the times in column 1 to the adjustments in column 2; and
   by multiplying the speeds in column 1 by the ratios in column 3.
     (1)                 (2)        (3)         (4)
  Times     Speed                            Times     Speed
0114  0425   1.3    -1 14  -1 30   *1.1    0000  0255   1.4
0736  1055  -1.3    -1 11  -0 45   *1.8    0625  1010  -2.3
1351  1650   1.2    -1 14  -1 30   *1.1    1237  1520   1.3
1958  2316  -1.3    -1 11  -0 45   *1.8    1847  2231  -2.3
     __________________________________________________________________

                       END NATIONAL OCEAN SERVICE TEXT
     __________________________________________________________________

  Comparison of old and new results

   From [11]http://co-ops.nos.noaa.gov/currents04/tab2pc2.html
   (2004-09-15):
                                                              Minimum       Mini
mum         Speed    Direction
                                                              Before Flood  Befo
re  Ebb     Ratio    At Maximum
Station                                              Depth    Flood         Ebb
          Flood Ebb  Flood Ebb  Reference Station
Admiralty Head, 0.5 mile west of                              -0 31  -0 03  +0 0
1  -0 07   1.3  1.2   145  025  Admiralty Inlet

   Resulting XTide data set:

   Name           Admiralty Head, 0.5 mile west of, Washington Current
   Reference      Admiralty Inlet, Washington Current
   Max time add   -00:03
   Max level add  NULL
   Max level mult 1.300
   Min time add   -00:07
   Min level add  NULL
   Min level mult 1.200
   Flood begins   -00:31
   Ebb begins     +00:01

   NOS predictions for 2004-09-08 and 2004-09-09 at reference station,
   from [12]http://co-ops.nos.noaa.gov/currents04/ADMIRALI.shtml
   (2004-09-15):
    Slack    Maximum   Slack    Maximum   Slack    Maximum   Slack    Maximum
Slack    Maximum
    Water    Current   Water    Current   Water    Current   Water    Current
Water    Current
Day  Time  Time  Veloc  Time  Time  Veloc  Time  Time  Veloc  Time  Time  Veloc
 Time  Time  Veloc
     h.m.  h.m.  knots  h.m.  h.m.  knots  h.m.  h.m.  knots  h.m.  h.m.  knots
 h.m.  h.m.  knots

  8         402   -2.3   814  1122    1.5  1449  1801   -1.2        2257   -0.1
  9         508   -2.4   909  1219    1.7  1543  1856   -1.5

   Corresponding XTide results:

   Reference station Sub station (XTide 2.7) Sub station (XTide 2.8)
2004-09-08  4:02 AM PDT  -2.33 knots  Max Ebb
2004-09-08  8:13 AM PDT   0.00 knots  Slack, Flood Begins
2004-09-08 11:22 AM PDT   1.51 knots  Max Flood
2004-09-08  2:48 PM PDT  -0.00 knots  Slack, Ebb Begins
2004-09-08  6:01 PM PDT  -1.22 knots  Max Ebb
2004-09-08 10:57 PM PDT  -0.07 knots  Min Ebb
2004-09-09  5:08 AM PDT  -2.36 knots  Max Ebb
2004-09-09  9:08 AM PDT   0.00 knots  Slack, Flood Begins
2004-09-09 12:19 PM PDT   1.71 knots  Max Flood
2004-09-09  3:42 PM PDT  -0.00 knots  Slack, Ebb Begins
2004-09-09  6:56 PM PDT  -1.47 knots  Max Ebb
2004-09-09 11:22 PM PDT   0.00 knots  Slack, Flood Begins

2004-09-08  3:55 AM PDT  -2.80 knots  Max Ebb
2004-09-08  7:42 AM PDT   0.00 knots  Slack, Flood Begins
2004-09-08 11:19 AM PDT   1.96 knots  Max Flood
2004-09-08  2:49 PM PDT  -0.00 knots  Slack, Ebb Begins
2004-09-08  5:54 PM PDT  -1.47 knots  Max Ebb
2004-09-08 10:54 PM PDT  -0.09 knots  Min Ebb
2004-09-09  5:01 AM PDT  -2.84 knots  Max Ebb
2004-09-09  8:37 AM PDT   0.00 knots  Slack, Flood Begins
2004-09-09 12:16 PM PDT   2.22 knots  Max Flood
2004-09-09  3:43 PM PDT  -0.00 knots  Slack, Ebb Begins
2004-09-09  6:49 PM PDT  -1.77 knots  Max Ebb
2004-09-09 10:51 PM PDT   0.00 knots  Slack, Flood Begins

2004-09-08  3:55 AM PDT  -2.80 knots  Max Ebb
2004-09-08  7:42 AM PDT   0.00 knots  Slack, Flood Begins
2004-09-08 11:19 AM PDT   1.96 knots  Max Flood
2004-09-08  2:49 PM PDT  -0.00 knots  Slack, Ebb Begins
2004-09-08  5:54 PM PDT  -1.47 knots  Max Ebb
2004-09-08 10:58 PM PDT  -0.08 knots  Min Ebb
2004-09-09  5:01 AM PDT  -2.84 knots  Max Ebb
2004-09-09  8:37 AM PDT   0.00 knots  Slack, Flood Begins
2004-09-09 12:16 PM PDT   2.22 knots  Max Flood
2004-09-09  3:43 PM PDT  -0.00 knots  Slack, Ebb Begins
2004-09-09  6:49 PM PDT  -1.77 knots  Max Ebb
2004-09-09 10:51 PM PDT   0.00 knots  Slack, Flood Begins
     __________________________________________________________________

  Comparison with published tables

   When the change in XTide's behavior was made in 2004, the NOS web site
   did not provide calculated predictions at the subordinate stations for
   comparison.  Upon reviewing the issue in 2007 (at which time those
   predictions were available), it was found that the published tables did
   neither of the behaviors that were implemented in XTide.

   CAPTION: Time offsets applied to Min Ebb event

   XTide 2.7     XTide 2.8      NOS 2007
     Flood   Minimum Before Ebb   Ebb

   Whereas the behavior of the published tables seemed to be in conflict
   with the [13]Secondary Station Adjustments Instructions, it was
   resolved not to change the behavior of XTide at that time.

    Reference station

   NOS table copied from
   [14]http://tidesandcurrents.noaa.gov/get_predc.shtml?year=2007&stn=6030
   +Admiralty+Inlet&fldavgd=179&ebbavgd=003&footnote= 2007-02-24

        Admiralty Inlet
   Predicted Tidal Current     March, 2007
   Flood Direction, 179 True.  Ebb (-)Direction, 003 True.
   NOAA, National Ocean Service

     Slack
   Water Maximum
   Current Slack
   Water Maximum
   Current Slack
   Water Maximum
   Current Slack
   Water Maximum
   Current Slack
   Water Maximum
   Current
   Day Time
   h.m. Time
   h.m. Veloc
   knots Time
   h.m. Time
   h.m. Veloc
   knots Time
   h.m. Time
   h.m. Veloc
   knots Time
   h.m. Time
   h.m. Veloc
   knots Time
   h.m. Time
   h.m. Veloc
   knots
   12 0049 0347 -0.9   0825 -0.1   1458 -2.4 1917 2229 +1.5
   13 0207 0512 -1.0   0948 -0.2   1610 -2.4 2019 2335 +1.8

   Comparable XTide output, using harmonics-rmk-20040615.tcd
   tide -l"admiralty inlet" -b"2007-03-12 00:00" -e"2007-03-14 00:00" -mc
   -empSsMm -tf"%H%M" -fh

   Day Slack Flood
   Slack
   Ebb Slack Flood
   Slack
   Mon 12 0048 0347 -0.93 kt
   0824 -0.08 kt
   1457 -2.41 kt 1916 2229 1.52 kt
   Tue 13 0206 0512 -1.04 kt
   0948 -0.18 kt
   1610 -2.45 kt 2018 2335 1.75 kt

    Subordinate station

Name             Agate Pass, North End of, Washington Current
Reference        Admiralty Inlet, Washington Current
Min time add     -0:59
Min level add    NULL
Min level mult   0.700
Max time add     -1:00
Max level add    NULL
Max level mult   0.800
Flood begins     -1:28
Ebb begins       -0:18

   NOS table copied from
   [15]http://tidesandcurrents.noaa.gov/get_predc.shtml?year=2007&stn=6030
   +Admiralty+Inlet&secstn=Agate+Passage,+north+end&sbfh=%2D1&sbfm=28&fldh
   =%2D1&fldm=00&sbeh=%2D0&sbem=18&ebbh=%2D0&ebbm=59&fldr=0.8&ebbr=0.7&fld
   avgd=230&ebbavgd=032&footnote= 2007-02-24

        Agate Passage, north end
   Predicted Tidal Current      March, 2007
   Flood Direction, 230 True.   Ebb (-)Direction, 032 True.
   NOAA, National Ocean Service

     Slack
   Water Maximum
   Current Slack
   Water Maximum
   Current Slack
   Water Maximum
   Current Slack
   Water Maximum
   Current Slack
   Water Maximum
   Current
   Day Time
   h.m. Time
   h.m. Veloc
   knots Time
   h.m. Time
   h.m. Veloc
   knots Time
   h.m. Time
   h.m. Veloc
   knots Time
   h.m. Time
   h.m. Veloc
   knots Time
   h.m. Time
   h.m. Veloc
   knots
   12 0031 0248 -0.6   0726 -0.1   1359 -1.7 1749 2129 +1.2
   13 0149 0413 -0.7   0849 -0.1   1511 -1.7 1851 2235 +1.4

   Comparable XTide output, using harmonics-rmk-20040615.tcd
   tide -l"Agate Pass, North End of, Washington Current" -b"2007-03-12
   00:00" -e"2007-03-14 00:00" -mc -empSsMm -tf"%H%M" -fh

   Day Slack Flood
   Slack
   Ebb Slack Flood
   Slack
   Mon 12 0030 0248 -0.65 kt
   0806 -0.06 kt
   1358 -1.69 kt 1748 2129 1.21 kt
   Tue 13 0148 0413 -0.73 kt
   0930 -0.13 kt
   1511 -1.71 kt 1850 2235 1.40 kt
     __________________________________________________________________

   [16]<- Previous [17]-> Next [18]Contents
   [19]About harmonic constants and sub station corrections
   [20]Change log

References

   1. https://flaterco.com/xtide/time_t.html
   2. https://flaterco.com/xtide/pound_to_fit.html
   3. https://flaterco.com/xtide/xtide.html#contents
   4. https://flaterco.com/xtide/harmonics.html
   5. https://flaterco.com/xtide/changelog.html#2.8
   6. https://flaterco.com/xtide/mincurrents.html#background
   7. https://flaterco.com/xtide/mincurrents.html#instructions
   8. https://flaterco.com/xtide/mincurrents.html#oldnew
   9. https://flaterco.com/xtide/mincurrents.html#tables
  10. http://co-ops.nos.noaa.gov/currents04/t2chelp.html
  11. http://co-ops.nos.noaa.gov/currents04/tab2pc2.html
  12. http://co-ops.nos.noaa.gov/currents04/ADMIRALI.shtml
  13. https://flaterco.com/xtide/mincurrents.html#instructions
  14. http://tidesandcurrents.noaa.gov/get_predc.shtml?year=2007&stn=6030+Admiralty+Inlet&fldavgd=179&ebbavgd=003&footnote=
  15. http://tidesandcurrents.noaa.gov/get_predc.shtml?year=2007&stn=6030+Admiralty+Inlet&secstn=Agate+Passage,+north+end&sbfh=%2D1&sbfm=28&fldh=%2D1&fldm=00&sbeh=%2D0&sbem=18&ebbh=%2D0&ebbm=59&fldr=0.8&ebbr=0.7&fldavgd=230&ebbavgd=032&footnote=
  16. https://flaterco.com/xtide/time_t.html
  17. https://flaterco.com/xtide/pound_to_fit.html
  18. https://flaterco.com/xtide/xtide.html#contents
  19. https://flaterco.com/xtide/harmonics.html
  20. https://flaterco.com/xtide/changelog.html#2.8

################################################################

   [1]<- Previous [2]-> Next [3]Contents
   [4]Modes and formats
   [5]FAQ

Appendix C -- Making calendars fit onto a single page

  Get rid of unwanted information

   Regardless of which format you are using, having extra stuff in the
   calendar that you don't want isn't going to help.  If you are using a
   web page somewhere, look for options that allow you to suppress sun and
   moon events or control the formatting of timestamps.  If you are using
   XTide directly, you do this using various settings.  The following
   examples assume command line usage, but you can change settings in
   several other ways.  See [6]settings for details.

   To get rid of unwanted columns for sun and moon events, use the -em
   command line switch to set an event mask.  E.g, to suppress all sun and
   moon events, set the event mask to the value pSsMm.  p = phase of moon,
   S = sunrise, s = sunset, M = moonrise, m = moonset.

   To get rid of unwanted verbosity in timestamps (AM/PM and/or time
   zone), use the -tf command line switch to set the time format string.
   E.g., to reduce it to four digits of 24-hour notation, set the time
   format string to %H%M.  To keep AM/PM but lose the time zone, set the
   time format string to %l:%M %p.

   Other settings added in XTide 2.14 can be used to condense or tweak
   calendar text:
     * The omitunits setting (-ou) prints numbers with no ft/m/kt and adds
       a header line stating the units and datum (where possible).  Say
       -ou y to omit the units.
     * The caldayfmt setting (-cf) controls the format string used to
       print days in calendars.  To omit the day of week and just keep the
       number, specify %d.
     * The linebreak setting (-lb) controls whether or not calendar mode
       inserts a line break before prediction values.  This reduces
       truncation in text format and tweaks line wrapping in HTML and
       LaTeX formats.
     * The pagebreak setting (-pb) controls whether or not calendar mode
       inserts a page break and repeats the station header for each month
       in text, HTML, and LaTeX formats.  Text uses form feeds and HTML
       uses a page-break-before style.

  Scale down HTML

   If the calendar that you want to print is on a web page or otherwise in
   HTML format, the next step is to set up your print scaling to make it
   fit on the page without a lot of ugly text wrapping.  The process for
   doing this is slightly different depending on your browser.

    Firefox

   Do File -> Print Preview.  Use the controls at the top of the window to
   select Portrait or Landscape printing and to scale down the HTML until
   it fits nicely on a page.  When ready, select Print.

    Internet Explorer

    1. Read this: [7]How to use Print Preview
    2. Pull down the print size menu ( Shrink To Fit ) and try different
       options until the calendar fits nicely on a page.
    3. When ready, click on the tiny printer icon to print.

  Get serious--use LaTeX

   The problem with printing calendars from HTML is that HTML was designed
   for viewing on a monitor.  Whether the result ends up on one page or
   three when you print it was never supposed to be a concern.  The
   concept of pagination eventually appeared in style options, but it was
   never a priority.

   The right language to use in this case is LaTeX.  Like HTML, LaTeX is a
   markup language, but it is designed for typesetting printed documents.

   XTide can generate calendars in LaTeX format.  These can be converted
   to PDFs using pdflatex, and those PDFs can then be printed on any size
   paper using Adobe Reader.

   If you are using XTide through a web page, you just have to hunt for an
   option to generate a PDF and hope that there is one.

   The process to generate and view a PDF from the command line is as
   follows:
bash-3.00$ tide -l"Location Name" -mc -fl -b"Start Time" -e"End Time" > cal.tex
bash-3.00$ pdflatex cal.tex
bash-3.00$ acroread cal.pdf

   The default page geometry in LaTeX mode is probably not optimal for
   making your calendar look nice.  Experiment with different values for
   pageheight (-ph 420) and pagewidth (-pw 297) until the calendar looks
   nice in PDF.  Do not worry that the shape of the pages in the PDF is
   not what you have in your printer.

   [8]Example of nicely formatted calendar

   When you are happy with the look of the PDF, do the following to print
   it.

    Adobe Reader

   Different versions of Adobe Reader present the same options in
   different ways.  On the File -> Print menu, do whichever applies:
    1. Under Size Options, check Fit, and check Auto portrait/landscape.
    2. Change Page Scaling to Fit to Printable Area, and check Auto-Rotate
       and Center.
     __________________________________________________________________

   [9]<- Previous [10]-> Next [11]Contents
   [12]Modes and formats
   [13]FAQ

References

   1. https://flaterco.com/xtide/mincurrents.html
   2. https://flaterco.com/xtide/xtide1diff.html
   3. https://flaterco.com/xtide/xtide.html#contents
   4. https://flaterco.com/xtide/modes.html
   5. https://flaterco.com/xtide/faq.html#onepage
   6. https://flaterco.com/xtide/settings.html
   7. http://windows.microsoft.com/en-US/windows7/Preview-the-appearance-of-a-printed-webpage
   8. https://flaterco.com/xtide/BarHarbor.pdf
   9. https://flaterco.com/xtide/mincurrents.html
  10. https://flaterco.com/xtide/xtide1diff.html
  11. https://flaterco.com/xtide/xtide.html#contents
  12. https://flaterco.com/xtide/modes.html
  13. https://flaterco.com/xtide/faq.html#onepage

################################################################

   [1]<- Previous [2]-> Next [3]Contents

Icon Differences from XTide 1

   [As if anybody remembers XTide 1.  This section is now obsolete.]

   XTide 2 is a complete redesign of XTide 1.  There are too many subtle
   improvements to list them all, but here are the not so subtle ones:
     * New interactive user interface for X windows client
     * Integrated web server now provided in distribution
     * Simpler, better command line interface
     * Handles multiple harmonics files transparently
     * Subordinate stations are now stored in an external database and are
       expanded to handle all known styles of offsets
     * Hydraulic currents are fixed
     * Removed useless options and modes
     * Added sun and moon information (by popular demand...)
     * Fast, efficient binary format for harmonics data

   These are the non-obvious things you must know in order to migrate:
    1. The environment variable HFILE is no longer used to specify the
       harmonics file; instead, HFILE_PATH is used:

export HFILE_PATH=/usr/local/share/xtide/harmonics.tcd

       If HFILE_PATH is not set, XTide looks for the file "harmonics.tcd"
       in the default directory.
    2. XTide now has its own built-in icon.  Remove any icon settings that
       you made in your window manager init files.  [Since the icon
       protocol that XTide 2 uses is no longer supported by newer window
       managers, that advice can be disregarded.]
    3. You may no longer use anonymous units in harmonics files.  The
       units must be one of the recognized alternatives.  These are:
       feet, meters, knots, knots^2 (for hydraulic currents).  If you are
       still using an ancient harmonics file that contains no units or
       "bogo-knots," then shame on you.  It's high time that you upgraded.
     __________________________________________________________________

   [4]<- Previous [5]-> Next [6]Contents

References

   1. https://flaterco.com/xtide/pound_to_fit.html
   2. https://flaterco.com/xtide/quickinst.html
   3. https://flaterco.com/xtide/xtide.html#contents
   4. https://flaterco.com/xtide/pound_to_fit.html
   5. https://flaterco.com/xtide/quickinst.html
   6. https://flaterco.com/xtide/xtide.html#contents

