-----------------------------
script: get_maps1d_series.php
-----------------------------

Purpose
-------
Get timeseries from the Matroos maps1d database.

Usage
-----
http://matroos.deltares.nl/direct/get_maps1d_series.php?node=&source=&unit=&tstart=&tstop=&tinc=&timezone=&format=

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_maps1d_series.php?node=Nieuwe Maas km 1000&source=rws_prediction&unit=waterlevel&tstart=202105130000&tstop=202105140000&timezone=gmt&format=text

wget --proxy=off -O output.txt \
'http://matroos.deltares.nl/direct/get_maps1d_series.php?node=Nieuwe Maas km 1000&source=rws_prediction&unit=waterlevel&tstart=202105130000&tstop=202105140000&timezone=gmt&format=text'

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
----------
- node        : The node name. See below for a list of node names. Node names can also
                be found in the OpenStreetMap portal: 'http://matroos.deltares.nl/leaflet/index.html'.
                Multiple nodes may be specified; these must be separated by a semi-colon (;)
                Each entry in the list of node names may contain one or more wild cards '*',
                e.g. node name 'Maas*' retrieves all locations that start with the
                word 'Maas', while node name 'Oude*Maas' retrieves all locations
                that start with the word 'Oude' and end with the word 'Maas'. Note
                that the search for node names is case insensitive if a wild card
                is used, otherwise the search is case sensitive.

- node_id     : The node id. This can be used as an alternative for the node parameter.
                Multiple node_ids may be specified; separated by a semi-colon (;).

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

- unit        : A unit as known by Matroos (see below).

- realization : Realization number. This may be a single number, a
                range (two numbers separated by two dots (..)), or a
                list containing single numbers and/or ranges
                (separated by semi-colon (;)), e.g. 0 or 0..10 or
                0;1 or 0;1;5..10. The strings 'all' and '*' (without
                quotes) return all the available realizations.

- 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.
                Default: date and time of last analysis.

- tstop       : Last time for the timeseries in the same format as tstart.
                Default: tstart + 50 days.

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

- timezone    : Timezone MET or GMT.
                Default: MET.

- anal_time   : Analysis time, default 'most recent'. If given, analyses
                after this time will be ignored.

- last_anal   : If last_anal=1, only returns data of the latest
                analysis at or before anal_time.

- single_anal : If single_anal=1, only returns data for one analysis,
                i.e. the result is not a combination of multiple analyses.
                Default: 0

- fc_min      : Minimum forecast lead time in minutes; default no minimum.

- fc_max      : Maximum forecast lead time in minutes; default no maximum.

- print_anal  : Add an extra column in the output containing the analysis
                time of that value (anal_time=Y or anal_time=1).
                Default: when anal_time=0 or anal_time='' analyse time is not printed.

- get_anal    : If Y(es) or 1, only the available analyse times between
                tstart and tstop are given.

- all_anal    : If Y(es) or 1, all the available analyse times between
                tstart and tstop are given.
                (w.r.t. fc_min and fc_max if given)

- zip         : Optional. If given and not '0', the NetCDF-file (in case format='netcdf')
                will be zipped before the download starts.

- format      : Output format 'text' or 'xml' or 'netcdf' or 'dd_v1.0' or 'dd_v1.9';
                'dd' without a version number redirects to the most recent version of Digital Delta.
                Default: text.

- includeMetaData : Optional. Flag that specifies whether to write meta
                data (true) or not (false) in Digital Delta output (format=dd).
                Default: true.

- responseLocation : Optional. Rename certain location response parameters for Digital Delta output (format=dd).
                Arguments should look like: <original_attribute>:eq:<custom_response>;
                multiple attributes can be replaced by adding more of these arguments separated by a semi-colon (;).

- responseObservationType : see 'responseLocation', but for unit parameters.

- process     : Optional. If format=dd, the results are filtered for the given process. Process can be one of:
                'measurement', 'astronomical', or 'forecast'.
                Default: measurement.


Available nodes, sources and units
----------------------------------
Sources:
--------
bma2
bma2_swellwave_height_hm0
bma2_wave_height_hm0
bos_brabant_discharge
bos_brabant_discharge_eps
bos_brabant_waterlevel
bos_brabant_waterlevel_eps
dcsm_fm05nm_ecmwf
dcsm_fm05nm_ecmwf_bias
dcsm_fm05nm_ecmwf_eps
dcsm_fm100m_ecmwf
dcsm_fm100m_ecmwf_bias
dcsm_v6_ecmwf
dcsm_v6_ecmwf_eps
dcsm_v6_ecmwf_eps_51members
dcsm_v6_ecmwf_eps_51members_bias
dcsm_v6_ecmwf_eps_bias
dcsmv6_zunov4_astro
dcsmv6_zunov4_harmonie
dcsmv6_zunov4_harmonie_deltares
dcsmv6_zunov4_hirlam
dcsmv6_zunov4_kf_harmonie
dcsmv6_zunov4_kf_harmonie_deltares
dcsmv6_zunov4_kf_hirlam
dcsmv6_zunov4_kfr_hirlam
dwd_cosmo_leps_aggregated
dwd_icon_aggregated
dwd_icon_eu_aggregated
ecmwf_ens_aggregated
ecmwf_hres_aggregated
fews_iwp_nhi22_afvoeren
fews_iwp_nzk_chemmap
fews_iwp_tk_zijkanaal_chemmap
fews_iwp_twentekanaal_chemmap
fews_meren_bretschneider
fews_meren_eps
fews_meren_eps_ijsselmeer
fews_meren_eps_markermeer
fews_meren_eps_veluwerandmeren
fews_meren_harmonie_bretschneider
fews_meren_harmonie_dwnsc_bretschneider
fews_meren_harmonie_dwnsc_pcoverslag
fews_meren_harmonie_dwnsc_pcoverslag_dam
fews_meren_harmonie_dwnsc_pcoverslag_dam_deltares
fews_meren_harmonie_dwnsc_pcoverslag_deltares
fews_meren_harmonie_dwnsc_pcoverslag_nood
fews_meren_harmonie_dwnsc_pcoverslag_nood_deltares
fews_meren_harmonie_pcoverslag
fews_meren_harmonie_pcoverslag_dam
fews_meren_harmonie_pcoverslag_nood
fews_meren_pcoverslag
fews_meren_pcoverslag_dam
fews_meren_pcoverslag_dam_deltares
fews_meren_pcoverslag_dam_nood
fews_meren_pcoverslag_deltares
fews_meren_pcoverslag_nood
fews_meren_pcoverslag_nood_deltares
fews_riv_choozeijsd_chemmap
fews_riv_dwd_cosmo_leps_hbv_maas
fews_riv_dwd_cosmo_leps_hbv_maas_bias
fews_riv_dwd_cosmo_leps_hbv_rijn
fews_riv_dwd_cosmo_leps_hbv_rijn_bias
fews_riv_dwd_cosmo_leps_sobek3_choozkeiz
fews_riv_dwd_cosmo_leps_sobek3_choozkeiz_bias
fews_riv_dwd_cosmo_leps_sobek3_choozkeiz_ens_dres
fews_riv_dwd_cosmo_leps_sobek3_maxrtk
fews_riv_dwd_cosmo_leps_sobek3_maxrtk_bias
fews_riv_dwd_icon_eu_hbv_maas
fews_riv_dwd_icon_eu_hbv_maas_bias
fews_riv_dwd_icon_eu_hbv_rijn
fews_riv_dwd_icon_eu_hbv_rijn_bias
fews_riv_dwd_icon_eu_sobek3_choozkeiz
fews_riv_dwd_icon_eu_sobek3_choozkeiz_bias
fews_riv_dwd_icon_eu_sobek3_maxrtk
fews_riv_dwd_icon_eu_sobek3_maxrtk_bias
fews_riv_dwd_icon_eu_wflow_flex_topo_meuse
fews_riv_dwd_icon_eu_wflow_hbv_rhine
fews_riv_dwd_icon_hbv_maas
fews_riv_dwd_icon_hbv_maas_bias
fews_riv_dwd_icon_hbv_rijn
fews_riv_dwd_icon_hbv_rijn_bias
fews_riv_dwd_icon_sobek3_choozkeiz
fews_riv_dwd_icon_sobek3_choozkeiz_bias
fews_riv_dwd_icon_sobek3_maxrtk
fews_riv_dwd_icon_sobek3_maxrtk_bias
fews_riv_ecmwf_ens_ext_hbv_maas
fews_riv_ecmwf_ens_ext_hbv_rijn
fews_riv_ecmwf_ens_hbv_maas
fews_riv_ecmwf_ens_hbv_maas_bias
fews_riv_ecmwf_ens_hbv_rijn
fews_riv_ecmwf_ens_hbv_rijn_bias
fews_riv_ecmwf_ens_sobek3_choozkeiz
fews_riv_ecmwf_ens_sobek3_choozkeiz_bias
fews_riv_ecmwf_ens_sobek3_maxrtk
fews_riv_ecmwf_ens_sobek3_maxrtk_bias
fews_riv_ecmwf_ens_sobek3_maxrtk_ens_dres
fews_riv_ecmwf_hres_hbv_maas
fews_riv_ecmwf_hres_hbv_maas_bias
fews_riv_ecmwf_hres_hbv_rijn
fews_riv_ecmwf_hres_hbv_rijn_bias
fews_riv_ecmwf_hres_sobek3_choozkeiz
fews_riv_ecmwf_hres_sobek3_choozkeiz_bias
fews_riv_ecmwf_hres_sobek3_maxrtk
fews_riv_ecmwf_hres_sobek3_maxrtk_bias
fews_riv_enkf_avg_sobek3_maxrtk
fews_riv_enkf_sobek3_maxrtk
fews_riv_forecast_sobek3_eijsdkeiz
fews_riv_forecast_sobek3_eijsdkeiz_bias
fews_riv_forecast_sobek3_lobrtk
fews_riv_forecast_sobek3_lobrtk_bias
fews_riv_hindcast_hbv_maas
fews_riv_hindcast_hbv_rijn
fews_riv_hindcast_sobek3_choozkeiz
fews_riv_hindcast_sobek3_eijsdkeiz
fews_riv_hindcast_sobek3_lobrtk
fews_riv_hindcast_sobek3_maxrtk
fews_riv_hindcast_wflow_flex_topo_meuse
fews_riv_hindcast_wflow_hbv_rhine
fews_riv_ijssel
fews_riv_ijssel_chemmap
fews_riv_knmi_hirlam_hbv_maas
fews_riv_knmi_hirlam_hbv_maas_bias
fews_riv_knmi_hirlam_hbv_rijn
fews_riv_knmi_hirlam_hbv_rijn_bias
fews_riv_knmi_hirlam_sobek3_choozkeiz
fews_riv_knmi_hirlam_sobek3_choozkeiz_bias
fews_riv_knmi_hirlam_sobek3_maxrtk
fews_riv_knmi_hirlam_sobek3_maxrtk_bias
fews_riv_lek
fews_riv_lek_chemmap
fews_riv_locaties
fews_riv_maas
fews_riv_maas_chemmap
fews_riv_maas_km
fews_riv_maxlob_chemmap
fews_riv_neerslag
fews_riv_rijn_km
fews_riv_waal
fews_riv_waal_chemmap
fews_rmm_km
fews_rmm_km_pk
fews_rmm_km_pk_bias
fews_rmm_km_sobek3
fews_rmm_km_sobek3_bias
fews_rmm_ndb
fews_rmm_ndb_plus
fews_rmm_osr
fews_rmm_sobek3_ecmwf_eps
fews_rmm_sobek3_lph2012
fews_rmm_sobek3_lph2012_bias
fews_rmm_sobek3_lph2012_ha
fews_rmm_sobek3_lph2012_ha_bias
fews_rmm_sobek3_lph2012_ha_ok
fews_rmm_sobek3_lph2012_ha_ok_bias
fews_rmm_sobek3_lph84
fews_rmm_sobek3_lph84_bias
fews_vecht_eps
fews_wv_ijsselmeer_ecmwf_ext
hatyan
hbr_observed
hmcn_kustfijn
knmi_dcsmv5_eps
knmi_harmonie_aggregated
knmi_hirlam_aggregated
nhi30_districts
nhi30_districts_ecmwf_det
nhi30_knopenbalans
nhi30_knopenbalans_ecmwf_det
nhi30_links
nhi30_links_ecmwf_det
nhi30_nodes
nhi30_nodes_ecmwf_det
nhi_2050g_CL_DM
nhi_2050g_MOZART
nhi_2050g_Q_DM
nhi_2050g_WL_DM
nhi_2050gp_CL_DM
nhi_2050gp_MODFLOW
nhi_2050gp_MOZART
nhi_2050gp_Q_DM
nhi_2050gp_WL_DM
nhi_2050w_CL_DM
nhi_2050w_MODFLOW
nhi_2050w_MOZART
nhi_2050w_Q_DM
nhi_2050w_WL_DM
nhi_2050wp_CL_DM
nhi_2050wp_MODFLOW
nhi_2050wp_MOZART
nhi_2050wp_Q_DM
nhi_2050wp_WL_DM
osr_hbr
osr_rws
rws_prediction
sobek_2050w_Q
sobek_2050w_WL
sobek_2050wp_Q
sobek_2050wp_WL
sobek_hmr
sobek_huidig_Q
sobek_huidig_WL
swan_dcsm
swan_dcsm_deltares
swan_dcsm_harmonie
swan_dcsm_harmonie_spec1d
swan_dcsm_harmonie_spec1d_deltares
swan_dcsm_spec1d
swan_kuststrook_harmonie_spec1d
swan_kuststrook_harmonie_spec1d_deltares
swan_kuststrook_harmonie_spec2d
swan_kuststrook_harmonie_spec2d_deltares
swan_kuststrook_spec1d
swan_kuststrook_spec2d
swan_zuno
swan_zuno_deltares
swan_zuno_harmonie
swan_zuno_harmonie_spec1d
swan_zuno_harmonie_spec1d_deltares
swan_zuno_spec1d
waterbeheer_ndb_cl
waterbeheer_ndb_cl_ecmwf_det

Units:
------
afvoerdm_takken
air_pressure
air_temperature
chloride
chloride_gehalte
chloridedm_knopen
dewpoint_temperature
discharge
discharge_main_channel
district_lozingsbehoefte
district_lozingsreductie
district_onttrekkingsbehoefte
district_onttrekkingsreductie
dm_bnd_d
dm_bnd_e
dm_debiet
dm_diw_d
dm_diw_e
dm_dwcode_d
dm_dwcode_e
dm_kwel_d
dm_kwel_e
dm_neerslag_d
dm_neerslag_e
dm_neerslag_netto
dm_qin
dm_qout
dm_rwzi_d
dm_rwzi_e
dm_schut_lekverlies_d
dm_schut_lekverlies_e
dm_storage
flow_area
flow_area_main_channel
flow_area_main_section
flow_width_main_channel
golf_oploop
golf_oploop_niveau
golf_overslag
golf_overslag_niveau
groundwater_layer1
groundwater_layer2
inflow
makkink_evapotranspiration
outflow
overslag_debiet
precipitation
precipitation_aggregated
runoff_coefficient
sa
sep
snow_depth_water_equivalent_surface
snow_water_equivalent
surface_solar_radiation_downwards
swellwave_height_hm0
tekort_beregening
tekort_doorspoeling
tekort_drinkwater
tekort_industrie
tekort_peilbeheer
tem
totale_tekort
totale_watervraag
VaDens
VaDens1d
velocity
velocity_main_channel
velu
velv
water_depth
water_depth_main_channel
water_direction
water_speed
water_velocity
waterlevel
waterlevel_astro
waterlevel_model
waterlevel_surge
waterstandendm_knopen
watervraag_beregening
watervraag_doorspoeling
watervraag_drinkwater
watervraag_industrie
watervraag_peilbeheer
wave_height_hm0
waveangle
WaveDir
waveheight
waveperiod
WaveSpread
wind_speed_u
wind_speed_v

Nodenames will be listed after a source has been specified.