lundi 22 mars 2021

Install XTide in Ubuntu server

In terminal

sudo apt-get install xorg-dev libxaw3dxft8-dev libpng-dev libsystemd-dev

cd $HOME

wget https://flaterco.com/files/xtide/harmonics-dwf-20210110-free.tar.xz

tar -xJf harmonics-dwf-20210110-free.tar.xz

cd harmonics-dwf-20210110 

sudo mkdir /usr/local/share/xtide

sudo chmod 755 /usr/local/share/xtide
sudo chmod 644 harmonics-dwf-20210110-free.tcd
sudo mv harmonics-dwf-20210110-free.tcd /usr/local/share/xtide

cd $HOME

rm -rf harmonics-dwf-20210110

rm harmonics-dwf-20210110-free.tar.xz

mkdir wxtide

cd wxtide

wget http://svhorizon.com/wxtide32/wxtdata/wxtide47.zip

unzip wxtide47.zip

chmod 644 harmonics-2004-06-14.tcd 

sudo mv harmonics-2004-06-14.tcd  /usr/local/share/xtide

cd $HOME

rm -rf wxtide

export HFILE_PATH=/usr/local/share/xtide/harmonics-dwf-20210110-free.tcd:/usr/local/share/xtide/harmonics-2004-06-14.tcd

mkdir wvs

cd wvs

wget https://flaterco.com/files/xtide/wvs.tar.xz

tar -xJf wvs.tar.xz

rm wvs.tar.xz

cd $HOME

export WVS_DIR=$HOME/wvs/

wget https://flaterco.com/files/xtide/libtcd-2.2.7-r3.tar.xz

tar -xJf libtcd-2.2.7-r3.tar.xz

cd libtcd-2.2.7

./configure; make; sudo make install

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"

cd $HOME

rm libtcd-2.2.7-r3.tar.xz

rm -rf libtcd-2.2.7


wget https://flaterco.com/files/xtide/xtide-2.15.3.tar.xz

tar -xJf xtide-2.15.3.tar.xz

cd xtide-2.15.3

./configure; make; sudo make install

cd $HOME

rm xtide-2.15.3.tar.xz

rm -rf xtide-2.15.3

wget https://flaterco.com/files/xtide/tcd-utils-20120115.tar.bz2

tar jxvf tcd-utils-20120115.tar.bz2

cd tcd-utils-20120115

./configure; make; sudo make install

cd $HOME

rm tcd-utils-20120115.tar.bz2

rm -rf tcd-utils-20120115


The binaries are here:

cd /usr/local/bin

build_tide_db  restore_tide_db  rewrite_tide_db.sh  tide  xtide

export PATH="$PATH:/usr/local/bin"

The harmonics files are here: 

cd /usr/local/share/xtide

harmonics-2004-06-14.tcd  harmonics-dwf-20210110-free.tcd

The coast lines are here:

cd wvs

wvs12.dat  wvs1.dat  wvs250k.dat  wvs3.dat  wvs43.dat  wvsfull.dat


To convert a tcd file in .txt and .xml file:
cd /usr/local/share/xtide
restore_tide_db harmonics-2004-06-14.tcd $HOME/harmonics-2004-06-14
restore_tide_db harmonics-dwf-20210110-free.tcd $HOME/harmonics-dwf-20210110-free

Example of use:

tide -l "Les Hattes" -b "2010-01-01 00:00" -e "2010-12-31 23:59" -f c -o "Yalimapo2010.csv"

Syntaxe

-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 -z setting is engaged.  If clock mode is selected or if no -b is supplied, the current time will be used.  (Note 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 (-cw, -gw or -tw), and the aspect (-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 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 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 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.


Aucun commentaire: