REFMAR and data.shom.fr staff are available to help you make the switch and answer all your questions.
Any application for registration or account changes are no longer taken into account.
Automatic data feed download of REFMAR tidal observations on http://data.shom.fr
You can set up an automatic data feed to automatically download sea level measurements. This system allows users to collect data from tide gauges by queries. It uses the SOS (Sensor Observation Service) web service. This OGC service queries sensors (tide gauges) remotely via an interoperable web interface.
How it works
From each page of a station, you can set up a data feed to obtain some or all of the sea level observations.
Step 1: Click on "Consume the stream"
Click on the "Consume the stream" button to the right, above the graph of the sea levels.
Screenshot from the non-final version of the tidal data download page on data.shom.fr
Step 2: Fill in the required fields in the new window
In the new window that opens, enter your name (1) and your email address (2) and click "Send".
Screenshot from the non-final version of the tidal data download page on data.shom.fr
If you want to receive information on tide gauge stations (information on new observatories, observatories undergoing maintenance and other sea level-related news), simply leave the box checked. You can subscribe at any time by downloading new data and making sure the box is checked.
Screenshot from the non-final version of the tidal data download page on data.shom.fr
Step 3: Set up the feed
Once you receive the server URL by email, you can make http requests in different ways:
Step 3a: Data collection by direct interface with the server
Access to this interface is through the following type of URL: [URL of the service provided by email]/sos/client/
In your browser, you see the following interface:
Screenshot from the non-final version of the tidal data download page on data.shom.fr
The parameters to enter are:
- First list (A): select SOS;
- Second list (B): select 2.0.0;
- Third list (C): select JSON or POX.
Note: The following descriptions are based on the JSON option.
- Fourth list (D): select the request (operation) that you want to perform.
For field (E) the basic operations are:
- GetCapabilities to request a self-description of the service (list of functions and associated parameters). It contains the settings of the SOS server "tide gauge." These are the parameters that will be used to build the request.
In field (E), the user can choose the level of detail of the request:
- All sections: full details (recommended in order to see all the possible parameters for each function;
- Contents Section: intermediate level of detail;
- Minimal: minimal description.
- DescribeSensor to request information on a sensor. This is the SML file described here.
In field (E), the user can choose the level of detail of the request:
- DescribSensor SOS 2.0.0: standard description (preferred);
- With ValidTime Instant: description at a given date / time (of no value here for tide gauges);
- With ValidTime Period: over a given time period (of no value here for tide gauges).
- GetObservation to request data from the tide gauge.
In field (E), the user can choose the level of detail of the request:
- Multiple filter: details of all the available parameters;
- No filter: no filter on the observations (do not use);
- Single filter: spatial filter (of no value for tide gauges) and temporal filter (to select the time period for which you want to collect data). This latter filter is recommended.
In the Service URL field (F), enter the URL of the following type: [URL of the service provided by email]/sos/service/
In the "Request" section, use the following settings:
- First list (G): select POST
- Second list (H) and Third list (I): select application/JSON
Depending on the selected settings, the prototype of the request is displayed in section (J).
Then simply tailor this request to the tide gauge server, based on the specific parameters of the SOS tide gauge server provided by GetCapabilities. Finally, press the "Send" button, and the result is displayed in the Response section below.
Screenshot from the non-final version of the tidal data download page on data.shom.fr
Step 3b: Example of a request for data collection by direct interface with the server
For GetCapabilities:
The following request provides all the functions and associated parameters of the server and is also used to set the other functions.
{ "request": "GetCapabilities", "service": "SOS", "sections": [ "ServiceIdentification", "ServiceProvider", "OperationsMetadata", "FilterCapabilities", "Contents" ] } |
For DescribeSensor:
The following request requests information on a tide gauge (here the Roscoff tide gauge with the identifier 54). There is a special page that shows the identifier of each tide gauge. The identifier is entered on the line "procedure". The URL is the one provided by GetCapabilities.
{ "request": "DescribeSensor", "service": "SOS", "version": "2.0.0", "procedure": "http://xxxxxxx/maregraphie/procedure/54", "procedureDescriptionFormat": "http://www.opengis.net/sensorML/1.0.1" } |
For GetObservation:
This request will retrieve data from the Toulon tide gauge observatory (identifier 68) from 01.15.2014 at 00:00 to 02.17.2015 at 23:59:59. The Z is Zulu time (UTC = GMT + = 0h).
{ "request": "GetObservation", "service": "SOS", "version": "2.0.0", "procedure": "http://xxxxxxxxxx/maregraphie/procedure/68", "offering": "http:// xxxxxxxxxx /maregraphie/offering/68", "observedProperty": "http:// xxxxxxxxxx /maregraphie/observedProperty/WaterHeight/1", "temporalFilter": { "during": { "ref": "om:phenomenonTime", "value": [ "2014-01-15T00:00:00Z", "2015-02-17T23:59:59Z" ] } } |
Other settings are possible on the following functions:
- "procedure" and "offering". The corresponding URLs are provided by GetCapabilities. Identifier 68 corresponds to the Toulon tide gauge;
- "observedProperty" allows you to choose the type of water height data you want:
- WaterHeight/1: Raw high frequency;
- WaterHeight/2: Raw 10 min;
- WaterHeight/3: Validated 10 min;
- WaterHeight/4: Raw hourly;
- WaterHeight/5: Validated hourly;
- WaterHeight/6: High and low waters
- "temporalFilter" lets you specify your start and end dates for retrieving data.
The format "2015-01-15T00:00:00+00:00", corresponds to:
[year]-[month]-[day]T[hour]:[minutes]:[seconds] [time system here UTC]
Step 3c: Example of a request for data collection by an HTTP request module in a browser
- For Firefox, one of the add-ons available to make HTTP requests is "HTTPRequester" (downloadable here: https://addons.mozilla.org/fr/firefox/addon/httprequester/?src=userprofile).
- For Chrome, one of the add-ons available to make HTTP requests is "Request Maker" (downloadable here: https://chrome.google.com/webstore/detail/request-maker/kajfghlhfkcocafkcjlajldicbikpgnp).
For the rest of the description, the module used is "HTTPRequester".
One the extension is installed in Firefox, it is accessible via an icon in your browser:
Clicking on this icon opens the following window:
Screenshot of HttpRequester in Firefox
The configuration is as follows:
- In the Service URL field (A), enter the URL of the following type: [URL of the service provided by email]/sos/service/;
- In the field below (GET) (B): Select "POST";
- In the "content type" field (C): select "application / json";
- In space (D), enter the request (see examples in the previous paragraph);
- Click "Submit" to send the request.
The result appears in section (E).
To find out more
- List of tidal stations available on data.shom.fr
- explanation on the XML data exchange format
- explanation on the JSON data exchange format
- explanation on the TXT data exchange format
- What is a zipped file? Wikipedia page on ZIP (file format)
last updated: 2015 06 05