---------------------
script: kustwacht.php
---------------------

Purpose
-------
Get a NetCDF file with hydrological or meteo data for import in application SARIS.

Usage
-----
http://matroos.deltares.nl//direct/kustwacht.php?source=&type=&xmin=&xmax=&ymin=&ymax=&nx=&ny=&coordsys=&tstart=&tstop=&tinc=

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
--------
Hydrological data (velocity):
   http://matroos.deltares.nl//direct/kustwacht.php?source=dcsm6_kf&xmin=4.07&xmax=4.81&ymin=52.87&ymax=53.47&nx=164&ny=134&tstart=202105130000&tstop=202105140000&type=water

   wget --proxy=off -O output.txt \
   'http://matroos.deltares.nl//direct/kustwacht.php?source=dcsm6_kf&xmin=4.07&xmax=4.81&ymin=52.87&ymax=53.47&nx=164&ny=134&tstart=202105130000&tstop=202105140000&type=water'

Hydrological data (water level):
   http://matroos.deltares.nl//direct/kustwacht.php?source=dcsm6_kf&xmin=4.07&xmax=4.81&ymin=52.87&ymax=53.47&nx=164&ny=134&tstart=202105130000&tstop=202105140000&type=waterlevel

   wget --proxy=off -O output.txt \
   'http://matroos.deltares.nl//direct/kustwacht.php?source=dcsm6_kf&xmin=4.07&xmax=4.81&ymin=52.87&ymax=53.47&nx=164&ny=134&tstart=202105130000&tstop=202105140000&type=waterlevel'

Meteo data (not available on NOOS Matroos):
   http://matroos.deltares.nl//direct/kustwacht.php?source=knmi_harmonie40&xmin=4.07&xmax=4.81&ymin=52.87&ymax=53.47&nx=164&ny=134&tstart=202105130000&tstop=202105140000&type=wind

   wget --proxy=off -O output.txt \
   'http://matroos.deltares.nl//direct/kustwacht.php?source=knmi_harmonie40&xmin=4.07&xmax=4.81&ymin=52.87&ymax=53.47&nx=164&ny=134&tstart=202105130000&tstop=202105140000&type=wind'

Wave data:
   http://matroos.deltares.nl//direct/kustwacht.php?source=dcsm1_swan&xmin=4.07&xmax=4.81&ymin=52.87&ymax=53.47&nx=164&ny=134&tstart=202105130000&tstop=202105140000&type=wave

   wget --proxy=off -O output.txt \
   'http://matroos.deltares.nl//direct/kustwacht.php?source=dcsm1_swan&xmin=4.07&xmax=4.81&ymin=52.87&ymax=53.47&nx=164&ny=134&tstart=202105130000&tstop=202105140000&type=wave'

Cut and paste one of the above URL's 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.
             See http://matroos.deltares.nl/maps2d/search for possible sources.

- type     : Get water, wind or wave data.
             Possible values for type are: 'water' (for water velocity), 'waterlevel' (for water level),
             'wind' (for wind velocity), wave (for significant wave height and mean wave direction).
             Default: water.

- xmin     : Minimum x-coordinate.

- xmax     : Maximum x-coordinate.

- ymin     : Minimum y-coordinate.

- ymax     : Maximum y-coordinate.

- nx       : Number of grid points in x-direction.

- ny       : Number of grid points in y-direction.

- coordsys : Optional. The coordinate system in which x and y are given.
             Default: WGS84.
             Examples: RD (='Rijksdriehoek'), ED50, MN (=m,n co-ordinates)
             or any epsg-code as epsg:<code>.

- 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.
             Currently, only timezone GMT is supported.

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

- tinc     : Optional. Timestep in minutes.
             Default: 30 minutes.
             Wind data will be interpolated from 3 hours to 30 minutes.

- force    : Optional. When '1', the download will start without interrupt.
             Otherwise information will be printed showing the estimated
             download size and you will be asked to press a link for download.