-----------------------------
script: get_subgrid_ascii.php
-----------------------------

Purpose
-------
Get data from the MATROOS fields database and print in tabular form.
All variables given by 'unit' from 'source' are output which are positioned
with the rectangular box specified by xmin,xmax,ymin,ymax.

Usage
-----
http://matroos.deltares.nl//direct/get_subgrid_ascii.php?source=&unit=&tstart=&tstop=&tinc=&xmin=&xmax=&ymin=&ymax=

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_subgrid_ascii.php?source=dcsm6_kf&unit=veluv_abs,sep&tstart=202105130000&tstop=202105140000&xmin=3.0&xmax=3.1&ymin=55.0&ymax=55.1

wget --proxy=off -O output.txt \
'http://matroos.deltares.nl//direct/get_subgrid_ascii.php?source=dcsm6_kf&unit=veluv_abs,sep&tstart=202105130000&tstop=202105140000&xmin=3.0&xmax=3.1&ymin=55.0&ymax=55.1'

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
----------
- source  : The map source (or alias thereof) as known by Matroos.
            Examples: dcsm6_kf, ijsselmeer1.

- unit    : One or more units known by Matroos separated by commas.
            Examples: SEP (=waterlevel), VELU (=water velocity in x-direction),
            VELV (=water velocity in y-direction), RP (=salt), 
            VELUV_abs (=absolute waterspeed).
            VELUV_dir (=velocity direction, only available in this page!!)

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

- tinc    : Optional. Timestep in minutes.
            Default: all available timesteps between tstart and tstop.

- xmin    : Minimum x-coordinate.

- xmax    : Maximum x-coordinate.

- ymin    : Minimum y-coordinate.

- ymax    : Maximum y-coordinate.

- coordsys: Optional. The coordinate system in which x and y are given.
            Examples: RD (='Rijksdriehoek'), E50G (=ED50), MN (=m,n co-ordinates),
            31U (UTM-31).
            Default: the coordinate system of the requested source