--------------------------
script: get_anal_times.php
--------------------------

Purpose
-------
Get the available analysis times from the Matroos database.

Usage
-----
http://matroos.deltares.nl/direct/get_anal_times.php?database=&loc=&source=&unit=&tstart=&tstop=

The part after '?' is meant to define parameters for the script.
Each parameter should be given as <param>=<value>, the different
parameters are separated by the '&' sign.

Examples
--------
http://matroos.deltares.nl/direct/get_anal_times.php?database=series&loc=hoekvanholland&source=dcsm6_kf&unit=waterlevel&tstart=202105130000&tstop=202105140000

wget --proxy=off -O output.txt \
'http://matroos.deltares.nl/direct/get_anal_times.php?database=series&loc=hoekvanholland&source=dcsm6_kf&unit=waterlevel&tstart=202105130000&tstop=202105140000'

Cut and paste the above URL in the address bar of the browser, or click on the link, to get an example of the output.

Parameters
----------
- database   : The database to look in (series, maps2d or maps1d).
               Default: series or maps1d, based on source name

- loc        : The location as known by Matroos (only needed for database=series).

- source     : The source (or alias thereof) as known by Matroos.

- unit       : A unit as known by Matroos (only needed for database=series).

- tstart     : First time for the timeseries in format YYYYMMDDHHMM.
               Any '-', <space>, or ':' will be ignored, so a format
               like YYYY-MM-DD HH:MM will be accepted as well

- tstop      : Last time for the timeseries in the same format as tstart.

- timezone   : MET, GMT or GMT[+/-][hours] default GMT.
               Default: GMT

- most_recent: If given and not '0', only the last available analysis time that
               contains forecast data within timeframe <tstart> to <tstop> is returned.
               If tstart and tstop are omitted, the last available analysis time
               that contains forecast data at the current time is returned.
               Note that analyses with only hindcast data are omitted if and only if most_recent=1.