Meteo Historical & Monitoring
Meteo 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.
Automatic access using WGET
WGET command example ("guest" user on Carpentras location 44.083, 5.059)
wget -O output.csv --header="soda-user: guest" --header="soda-passwd: guest" "https://api.soda-solardata.com/pub/meteo_monitoring.php?geopoint=44.083,5.059&firstday=d&lastday=d+15&duration=15&format=unified"
WGET command in details
Request:
wget -O output.csv ...
--header="soda-user: login" --header="soda-passwd: password" ...
"https://api.soda-solardata.com/pub/service_name.php?geopoint=latitude,longitude...
&firstday=yyyy-mm-dd&lastday=yyyy-mm-dd&duration=time_step&time=time_reference&format=output_format"
Inputs:
login/password | authentication: login and password provided by the Commcercial SoDa team. Note that a free permanent automatic access is set up for the site of Carpentras, France (44.083, 5.059) with the login/password guest/guest | |
service_name | (see array above) "meteo_historical" or "meteo_monitoring" | |
latitude and longitude | in degrees, with at least 3 digits after comma | |
yyyy-mm-dd | "firstday" and the "lastday" parameters of the request. It can be defined either by a numerical date YYYY-MM-DD or thanks to date shortcuts. The available date shortcuts are : d, d-x, d+x, m, m-x, y, y-x
For instance "m-2" means "2 months ago". | |
time_step | "1", "5", "10", "15" (minutes), "h" (hourly), "d" (daily), "m" (monthly). | |
time_reference (optional) | The only possible value is "UT" (universal time) Default value is "UT". | |
output_format (optional) | Possible values are standard formats "excel", "netcdf", "json" and "unified" Default format is "unified". |
Outputs:
The output data :
- Temperature (K): Temperature at 2 m above ground in Kelvins (K)
- Relative humidity (%): Relative humidity at 2 m above ground in percent (%)
- Pressure (hPa): Pressure at ground level in hPa
- Wind speed (m/s): Wind speed at 10 m above ground in m/s
- Wind direction (deg): Wind direction at 10 m above ground in degrees (0 means from North, 90 from East...)
- Rainfall (kg/m2): Rainfall (= rain depth in mm)
- Snowfall (kg/m2): Snowfall
- Snow depth (m): Snow depth in meters
- Short-wave irradiation (wh/m2): Surface downward short-wave irradiation (broadband=GHI)
Automatic access using CURL
You can also automatically retrieve HC3 Meteo time series using the CURL command. The advantage is to accelerate the requests by an approx. factor of 2. CURL outputs don't have any header. This is due to the fact that each station configuration (i.e each line of the stations.txt file) can be different (tilted or not, date range, ...), so the "stations" header information (contained in header) may be differrent.
Curl command example ("guest" user on Carpentras location 44.083, 5.059)
curl -f -s -S -F stations=@stations.txt -o output.csv --header "soda-user: guest" --header "soda-passwd: guest" https://api.soda-solardata.com/pub/meteo_historical.php
With the following stations.txt file format:
# Columns description
# id: station name
# latitude and longitude: in degrees, with at least 3 digits after comma
# altitude: ignored
# time reference: "UT" (universal time)
# duration: "1", "5", "10", "15" (minutes), "h" (hourly), "d" (daily), "m" (monthly)
# firstday and lastday: first and the last days of the request, expressed as yyyy-mm-dd
# slope of panel: ignored
# azimuth of panel: ignored
#
#id lat lon elevation time duration firstday lastday slope azimuth
Carpentras1 44.083 5.059 -999 UT 15 m-1 m-1 0 0
Carpentras2 44.083 5.059 -999 UT d y-1 y-1 0 0
CURL command in details
curl -f -s -S -F stations=@my_stations.txt -o output.csv --header "soda-user: login" --header "soda-passwd: password" https://api.soda-solardata.com/pub/service_name.php
- login, password and service_name are described in the table above.
- The station file "my_stations.txt" should be defined with the same format as the "stations.txt" file in the previous example. The columns descriptions are available in the table above.