Available since This Import function is included in the Delft-FEWS version 2020.02 . Present parser allows to download and import meteorological observations from http://weather.bangkok.go.th/dds_webservices/api/rain/History?id=LOCATION_IDand later. The Import function imports JSON files from a http server in Bangkok. There are two parsers for the same http server:
- BMADay: import receives the last 24 hours of data for a selected location.
- BMALatest: imports only the last data value for all locations of the same type.
Example url request:
http://weather.bangkok.go.th/dds_webservices/api$Server$/rain/History?id=RF.PNK.01
This request returns the data of the last 24 hours for one location.
...
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?> <!-- edited with XMLSpy v2014 rel. 2 sp1 (http://www.altova.com) by Afdeling ICT (Stichting Deltares) --> <timeSeriesImportRun xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/timeSeriesImportRun.xsd"> <import> <general> <importType>BMADay</importType> <serverUrl>http://weather.bangkok.go.th/dds_webservices/api/$Server$/flow/History?id=</serverUrl> <!-- this field is not used, but it is necessary to be able to configure connection timout--> <backupServerUrl>http://weather.bangkok.go.th/dds_webservices/api/</backupServerUrl> <!-- if this field is not configured, it will be set at 2000 automatically. --> <connectionTimeOutMillis>1000000</connectionTimeOutMillis> <user>Username</<user>dummy_username</user> <password>password<<password>dummy_password</password> <relativeViewPeriod unit="day" start="-2" end="1" startOverrulable="true" endOverrulable="true"/> <idMapId>BMADayMap</idMapId> <missingValue>-999.0</missingValue> </general> <timeSeriesSet> <moduleInstanceId>BMADay</moduleInstanceId> <valueType>scalar</valueType> <parameterId>param</parameterId> <locationId>LocA</locationId> <timeSeriesType>external historical</timeSeriesType> <timeStep unit="nonequidistant"/> <readWriteMode>add originals</readWriteMode> <synchLevel>1</synchLevel> </timeSeriesSet> </import> </timeSeriesImportRun> |
...