Spectral from HC3
Spectral from HC3 automatic access: PAR & UV |
|
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 with WGET
- Subscribe an annual access to spectral radiation values computes from HelioClim-3 Archives service (Contact us)
- Download wget.exe in a directory (on Windows - wget is available by default on Unix)
- In the same directory, create a text file and copy-paste in a single line the following instruction to test this permanent access to Carpentras, France:
|
- Rename the text file with the .bat extension and double click on it to retrieve the
output.csv
output file (Windows environment). Or, rename the text file with a .sh extension and run it using >my_script.sh in a Unix environment.
WGET, in details
Request:wget -O output.csv --header="soda-user: login" --header=soda-passwd: password" ...
"https://server/pub/spectral_from_hc3_request.php?geopoint=latitude,longitude&elevation=altitude& ...
firstday=yyyy-mm-dd&lastday=yyyy-mm-dd
&duration=time_step&time=time_reference&spectralband=string_spectral_band
&horizon=
boolean_horizon
"
Inputs:
login/password
authentication: login and password provided by the SoDa team to access HelioClim-3 within the framework of your subscription. Note that a free permanent automatic access is set up for the site of Carpentras, France, where a Baseline Surface Radiation Network (BSRN) station is available with the login/password guest/guestserver
: By default, use our load balancer thanks to "api.soda-solardata.com". It will redirect your request on the fastest server available.latitude
andlongitude
: in degrees, with at least 3 digits after commaaltitude
: in meters. Set "elevation=-999" to let SoDa get the elevation from Nasa SRTM databaseyyyy-mm-dd
: set the first and the last days of the request. The available shortcuts to use for first and last days of the requests are: d, d-x, d+x, m, m-x, m+x, y, y-x, y+x with "x" representing numerical value, "d" = day, "m" = month, "y" = yeartime_step
: "1", "5", "10", "15" (minutes), "h" (hourly), "d" (daily), "m" (monthly)time_reference
: "UT" (universal time).
: string corresponding to your spectral band choice: either "PAR" for Photosynthetically Active Radiation data, or "UV" for Ultra-Violet. This information is not case sensitive.string_spectral_band
: (optional) "1" (or "0") to take into account (or not) the shadowing effect due to the far horizon.boolean_horizon
Outputs for UV data:
- Date: format DD-MM-YYYY
- Time: format hh:mm
- UVA: Irradiation in UV-A (315-400 nm) over the period on horizontal plane (-999 if not data)
- UVB: Irradiation in UV-B (280-315 nm) over the period on horizontal plane (-999 if no data)
- UV: Irradiation in UV (280-400 nm) over the period on horizontal plane (-999 if no data)
Outputs for PAR data:
- Date: format DD-MM-YYYY
- Time: format hh:mm
- PAR (µmol/m2/s): PAR (400-700 nm) over the period on horizontal plane (-999 if no data)
- PAR clear-sky (µmol/m2/s): PAR (400-700 nm) over the period on horizontal plane in cloud-free conditions (-999 if no data)
- PAR TOA (µmol/m2/s): PAR (400-700 nm) over the period on horizontal plane at the top of the atmosphere (-999 if no data)
- Code: 0: no data, 1: sun below horizon, 2: satellite assessment, 5: interpolation in time, 6: forecast
Automatic access using CURL
You can also automatically retrieve these data using the CURL command. The advantage is to fasten the requests by an approx. factor of 2. Note that all characteristics (inputs and outputs) described in the WGET section are valid for CURL, except that CURL outputs don't have any header.
Request (Windows): 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/spectral_from_hc3_request.php
With the following stations.txt file format:# Columns:
# id: station name
# latitude and longitude: in degrees, with at least 4 digits after comma
# elevation: in meters. Use -999 to let SoDa get the elevation from Nasa SRTM database.
# time reference: "UT" (universal time)
# duration: "1" (minute), "15" (minutes), "h" (hourly), "d" (daily), "m" (monthly)
# firstday and lastday: first and the last days of the request, expressed as yyyy-mm-dd
# spectral band: string, either 'PAR' or 'UV'. This information is not case sensitive
# horizon: boolean in order to take into account (or not) the shadowing effect due to the
# far horizon in HelioClim-3 version 5 (optional. Default is 0)
#
# id lat lon elevation time duration firstday lastday spectralband horizon
Carpentras1 44.083 5.059 -999 UT 15 2017-01-01 2017-01-05 par 1
Carpentras2 44.083 5.059 -999 UT 15 2018-01-01 2018-01-05 uv 0
...