-----------------------
script: get_matroos.php
-----------------------

Purpose
-------
Get various data from the Matroos maps2d database.

Usage
-----
https://noos.matroos.rws.nl/direct/get_matroos.php?source=&field=&fieldoutput=&xmin=&xmax=&ymin=&ymax=&coords=&coordsoutput=&xn=&yn=&from=&to=&dtmin=&ncout=&format=&interp_time=&anal=&nolayer=

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
--------
https://noos.matroos.rws.nl/direct/get_matroos.php?source=knmi_harmonie&anal=202512170000&z=0&xmin=3.3&xmax=4.3&ymin=51.2&ymax=52.2&coords=WGS84&color=wind_speed&from=202512170000&to=202512170000&stridetime=2&format=nc

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 source (or alias thereof) as known by Matroos [default = knmi_harmonie].

- astro       : Flag. Must be set to 1 if astro data is requested [default = 0].

- format      : Output format [default = png].

- trim        : Flag. Trim image edges [default = 0].

- anal        : Analysis time.
- last_anal   : Last analysis time.

- tstart      : Start time in format YYYYMMDDhhmm.
- from        : Start time (alias for tstart).

- now         : Current time.

- tstop       : End time in format YYYYMMDDhhmm.
- to          : End time (alias for tstop).

- dtmin       : Optional. Timestep.

- coords      : Optional. Desired coordinate system.

- coordsoutput: Optional. Coordinate names in output (renaming dimensions) [default = x,y].

- interp_time : Flag, optional. Interpolate in time [default = 0].

- nolayer     : Flag, optional. Remove 3rd dimension from netCDF file in interpolation.

- points      : Optional. Only show results for given list of points.
                Format: x1,y1:x2,y2:x3,y3 

- stridex     : Optional. Stride value for x values [default = 1].

- stridey     : Optional. Stride value for y values [default = 1].

- stridetime  : Optional. Stride for time values [default = 1].

- color       : List (comma-separated) of parameters that is requested (alias for field).
- field       : List (comma-separated) of parameters that is requested (alias for color).

- fieldoutput : List (comma-separated) of parameters that must be used in output
                (renaming of input parameters specified with color or field).

- contour     : Parameter name to be plotted as a contour in a graph.

- scontour    : Scale contour values (e.g. -1,0,2).

- vector      : Parameter name to be plotted as a vector in a graph.

- vecsize     : Velocity in m/s needed for a vector length of 1 in a graph [default = 1].

- vx          : Number of vectors in a graph in x-direction [default = 25].
- vy          : Number of vectors in a graph in y-direction [default = 25].

- size        : Size of image in pixels [default = 640].

- smin        : Minimum value for color in graphs.
- smax        : Maximum value for color in graphs.

- smincolor   : Color of minimum value [default = yellow].
- smaxcolor   : Color of maximum value [default = blue].

- storm       : Flag. Trigger storm layout [default = 0].

- xmin        : Minimum x-coordinate.
- xmax        : Maximum x-coordinate.
- ymin        : Minimum y-coordinate.
- ymax        : Maximum y-coordinate.

- xn          : Number of cells in x-direction.
- yn          : Number of cells in y-direction.

- lang        : Optional. Language for plot [default = en].

- ncout       : Optional. Filename for output NetCDF. If it exists, it is overwritten [default = output.nc].

- zip         : Flag. Zip output netCDF when zip=1 [default = 0].

- geo         : Flag. Indicator to deliver wms-picture [default = 0].

- pic         : Indicate which picture will be output (only one of "legend", "contour", "vector", "map" or "boundary") option.
                Only active if geo=1 [default= map].

- anim        : Flag, optional. Create animation. [default = 0].