![]() |
Machine-to-Machine Access to the HelioClim3 Irradiation Data |
A problem of units ? of terminology ? Consult the Education service. |
Framework and Principle
Who?
Several of our Customers offer a electricity production monitoring device and data logger, and use the HelioClim data as an alternative source of irradiation values in a purpose of a more objective assessment. The machine-to-machine access to the data with the wget command is adequate you have to proceed to a large number of repetitive requests. This command enables you to retrieve one time series per site.
Principle: The Customer creates an application on this machine that is capable of launching a series of "wget" commands, one per site, that are executed on his computer. It is made through the protocol HTTP. Download here the executable wget.exe version 1.14.4.
SoDa grants an access to a well-identified Customer's machine through his IP address: SoDa checks the IP of the Customer's machine, the subscribed services, as well as counts the daily requests of each Customer.
Which IP?
The Customers need to provide us their public IP address (proxy, firewall, or more generally the IP address of the machine which is connected to the web). This address can be obtained using http://whatismyipaddress.com/ in a browser. This IP must be fixed, which is generally the case with Companies.
Output Column Content (OCC): identical to the one of free services. You can see here the list of the OCC per service. NB: the output is textfile, which means that the separator is "(space)" instead of a ";" as in a csv file. Please click here to obtain a solution to transform automatically the space character into a semi-colon.
Cost:
- All annual subscriptions includes an average of 200 wget automatic requests per day. This number is averaged over the month, i.e. you are allowed to do 300 requests one day, and 100 next day.
- For more than 200 requests per day, an additional fee is applied, depending on the number of requests. To receive a quotation, contact the sales support.
NB: Please note that all annual subscriptions also include a wget access to the HC1 database.
Leadtime: All details about leadtime are available here. To summarize, the data of day d are available with a minimum of delay of 24 h, more precisely at 11:30 PM UT the next day. If you want to retrieve the HelioClim irradiation data as soon as they are available (i.e. at 11:30 PM UT at night), you need to subscribe our "ner real time option". To receive a quotation, contact the sales support.
Reliability: We remind you that since January 2011, the acquisition of the MSG images and the HelioClim databases first available at Mines ParisTech, Sophia-Antipolis, have been duplicated in Transvalor, Mougins. The system is now fully operational. If you face any difficulty in getting back your data using the wget command with "www.helioclim.org", you can easily access the data using our backup site in Transvalor with "pro.soda-is.com" in your wget and curl requests.
| Click here to read the "General Terms and Conditions" of our contract. |
Build the HC3 wget command
Three examples of scenario:
- Paris: you would like to have a HCday, i.e. retrieve daily values over the horizontal plane. You are interested by all the day during the month of May 2006, with the default digital terrain elevation (DTE) database and albedo values.
- Madrid: HChourDNI, i.e. hourly irradiation values on a plane normal to sun rays, time period: the last 15 days of August 2010, default DTE and albedo values.
- Berlin: HC15Incl, i.e. 15 minute irradiation values on a tilted plane. The plane has a tilt of 35° and is facing the Southern direction (180° in the SoDa conventions). Default DTE and albedo values. You have subscribed the "near real time option", so if we admit we are on December 31th 2010 at 1:30 AM UT, you are allowed to retrieved the data of the previous day, on December 30th 2010.
| Step | Action | ||||||||||||||||||||
| 0 | Listing of the input parameters: cmd="http://www.helioclim.org/pub/hc3v2_request.php?"
NB2: from a Linux platform, add the command:#!/bin/bash before these command elements. |
||||||||||||||||||||
| 1 | The three Examples:wget -O Paris_HCday_May2006.csv "http://www.helioclim.org/pub/hc3v2_request.php?geopoint=48.86,2.33&elevation=-999&firstday=2006-05-01&lastday=2006-05-31&duration=d&time=TU&slope=0&azimuth=0&albedo=0.2"wget -O Madrid_HChourDNI_August15_312010.csv "http://www.helioclim.org/pub/hc3v2_request.php?geopoint=40.4,-3.68&elevation=-999&firstday=2010-08-15&lastday=2010-08-31&duration=h&time=TU&slope=-999&azimuth=-999&albedo=0.2"wget -O Berlin_HC15Incl_August15_312010.csv "http://www.helioclim.org/pub/hc3v2_request.php?geopoint=52.51,13.4&elevation=-999&firstday=2010-09-07&lastday=2010-09-07&duration=15&time=TU&slope=30&azimuth=180&albedo=0.2"NB: Beware that if you have a tilted plane facing the southern direction, in our convention for the azimuth angle is north => 0°, east => 90°, south => 180°, and West => 270° Change the extension of the text file .txt into .bat |
||||||||||||||||||||
| 2 | Download wget.exe from internet | ||||||||||||||||||||
| 3 | By double clicking on the file.bat, you should obtain in return from our servers 3 output files named: - Paris_HCday_May2006.csv - Madrid_HChourDNI_August15_312010.csv - Berlin_HC15Incl_August15_312010.csv |
NB: you can also use the script hc3v3_request.php instead of hc3v2_request.php. However, as MINES ParisTech had not yet published on this latest version of the database, we cannot base our discussion on peer-reviewed publications.
Build the HC1 wget command
As soon as you have an automatic access to any of the HC3 annual subscription, you can automatically access HC1 following the command below:
| Step | Action | ||||||||||
| 0 | Listing of the input parameters: cmd="http://www.helioclim.org/pub/hc3v2_request.php?"
NB2: from a Linux platform, add the command:#!/bin/bash before these command elements. |
||||||||||
| 1 | _Copy these lines into a text file,wget -O Nice.csv "http://www.helioclim.org/pub/hc1_request.php?geopoint=43.7,7.25&firstday=1985-01-01&lastday=1985-01-31&duration=d"Change the extension of the text file .txt into .bat |
||||||||||
| 2 | Download wget.exe from internet | ||||||||||
| 3 | By double clicking on the file.bat, you should obtain in return from our servers a file named: - Nice.csv |
Another option: the CURL request
The wget command implies one file.bat per station. But in the case of numerous stations (more than 100), it turns out to be interested to use another machine-to-machine command, named "curl". The command is built similarly than wget except the parameter -F "stations=@stations.txt" with is used as the list of inputs parameters, as follows:
| Command |
curl -F "stations=@stations.txt" -o result_curl.txt http://www.helioclim.org/pub/hc3v2_request.php |
Content of the stations.txt file: #id lat lon elevation UT time_step first_date last_date slope azimut |
Limit of curl: the timeout for the requests is fixed to 15 min and the maximum output file size is 5 Mega. This corresponds approximately to 2500 stations with a one-day request of daily or hourly values. Anyway, we deeply advise our Customers to send in parallel not more that 1000 stations per Curl request. The parallelization divides by the same factor the time of retrieval. We recommand as well not to exceed 5 parallel requests.
Download here the executable curl.zip
FAQ
| Q1_ "I did all what you explain in this page, but it is not working! What is the pb?" | ||||
| Case 1 | When you launch the "http..." command into your internet navigator, you get the error message: "Unregistered IP address".
Solution 1: We haven't allowed your IP to access automatically the HelioClim data, or the IP sent is private (valid only in your internal network), whereas we need your public IP. Please contact us if you need a quotation or to communicate us the correct IP. |
|||
| Case 2 | When you launch the "http..." command into your internet navigator, you get the correct result. The IP address you sent us is allowed to enter our system and retrieve the data you purchase. Good news! But...
Solution 2.1: The problem is that you need now to deal with internal network constraints. Your internet browser accesses our database because he knows which "gate" (proxy, firewall...) to use to get out and enter in your internal network. It is not obvious that your wget executable knows this information. You can try to specify your proxy in your file.bat, just before the wget commands. In a Windows environment, test in a dos environment, the command line:
Solution 2.2: The second one is that your file explorer can hide by default the known extensions of your files. Instead of creating a file.bat to launch your wget command, you create a file.bat.txt without being aware of it!! To check this point, if you double-click on your file.bat file, your text editor must not open. if this is the case, you need to rename the file selecting "all files format" before saving. |
|||
| Q.2 Why two requests inside the same pixel MSG return 2 different irradiation values? | ||||
| Click here to get the answer. | ||||
| Q3_ I would like to change the spaces in the output file by semi colons, to make it csv compatible. How can I do that? | ||||
Click here to download the sed.exe file and associated libraries. To replace automatically the " " by ";" in your test.txt file obtained using a wget command, you can use the following command:sed "s/ /;/g" test.txt > test.csvAs a consequence, you can create a .bat file with the following command lines: wget -O test.txt "http://www.helioclim.org/pub/hc3v2_request.php?geopoint=45,5&elevation=-999&firstday=2005-01-01&lastday=2005-05-31&duration=m&time=TU&slope=-999&azimuth=-999&albedo=0.2" => the file test.txt will be automatically deleted, and replaced by the test.csv file with ";" as separator. |
||||




