CAMS McClear automatic access
CAMS McClear automatic access
Warning! It is strongly recommanded to avoid the launch of parallel requests, using the "&" at the end of each wget request line. This would endanger our system.
- Download wget.exe in a directory (Windows environment - by default available in Unix)
- In the same directory, create a text file and copy-paste in a single line the following instruction, by discarding the yellow part by your own email address:
- NB1: please note that you CANNOT directly copy and paste this line in a Windows command file as you need to replace the yellow part with your own email address used to register on the SoDa website. The reason is that we need to identify you when launching the requests for statistical constraints imposed by the European Union.
- NB2: replace the "@" by a single %2540 on a Windows command terminal, an internet browser or on Unix, but use a double %%2540 in a Windows .bat file.
- Rename the text file with the .bat extension and double click on the .bat file to retrieve the
output.csvoutput file (Windows environment), or in a .sh script file that you launch using >my_script.sh in a Unix environment.
The WGET command in details
Request (Unix and Windows, write the following command in a single line):
wget -O output.csv "
server: "www.soda-is.com" (main server) or "pro.soda-is.com" (backup-mirror server)
longitude: in degrees, with at least 4 digits after comma
altitude: in meters. Set "elevation=-999" to let SoDa get the elevation from NASA SRTM database
yyyy-mm-dd: set the first and the last days of the request
time_step: "PT01M" (1 minutes), "PT15M" (15 minutes), "PT01H" (hourly), "P01D" (daily) and "P01M" (monthly). For "summarization=PT01M" only, a verbose mode is available by adding ";verbose=true" to the DataInputs.
time_reference: "UT" (universal time) or "TST" (True Solar Time)
email-address: your email address used to generate your SoDa account, by replacing the "@" by "%%2540" if this command is in a Windows executable .bat file, and by "%2540" if on a Windows command terminal, an internet browser or on Unix
Outputs: Identical to the outputs of the McClear Web interface
CAMS Radiation Service follows the WPS (Web Processing Service) standard that defines how a computer can invoke a web service, without human-machine interface. This way of doing is a standard in Earth Observation and Digital Geography domains and offers many other advantages over a text-interface like the other services on SoDa web site. In particular, anyone can create a portal invoking these services by calling the WPS that we are offering. It greatly helps the dissemination.
These services are described in the catalog:
that reveals the get_mcclear operations.
If you are using an appropriate library, it is fairly easy to develop the application.
Otherwise, you may try to find one. There are plenty, for example google "library execute wps ogc".
The call to DescribeProcess provides a description of the inputs and outputs of each service (that you discover in the result of the call to GetCapabilities):
How to do it by hand (or in an application not calling specific libraries)?
You need to call the WPS using the HTTP POST protocol, e.g. with curl tool. The request will have the following form:
curl -o output.xml -v -d @test_mcclear_params.xml -H "Content-Type: text/xml" http://www.soda-is.com/service/wps
where "output.xml" is the output file that contains the URL of the result (here a csv file) and "test_mcclear_params.xml" is the input file.
The input file contains the inputs (obviously...). Most of them have clear names and are exactly those which are requested on the human interface at soda-pro.com.
If choice is offered, e.g. "summarization", the various options are provided by the call to DescribeProcess above.
The "username" parameter is the email registered in soda-pro.com.
The "mimeType" parameter is the output format: select "text/csv" for CSV, "application/x-netcdf" for NetCDF, "application/json" for JSON or "application/x-hdf" for HDF5.