Table of Contents

ACCESS FUNCTIONS

Definition of the access functions that are developed in Eubrewnet

The users with the right permissions have access to some functions to directly get the information stored in the database. The root of the access functions is the same for all http://eubrewnet.aemet.es/eubrewnet/data/. From this point users can select different function. As Example Get DS.

The DS database access function provides the Direct Sun individual measures enhanced by information from their summaries and if they are between correct Mercury Lamp Tests.

Description of the DS Get Function:

There is a Get Function Table with a summary of the available functions to access stored data and their links as example. The extended documentation for each function can be directly access from the table using the links in the column Long Description.

For products, the Eubrewnet provides an interface for processing by demand. The Process Function Table gives a summary of the available process functions. Even the data providers can force a process and database stored data update using the update interface. The Update Function Table sumarizes the available functions. Providers can force only the update of the products of their Brewers.

There are some common inputs for the functions as the parameter format or the list of common inputs (as the brewerid and dates) wich can be used in almost every function. The description can be found in the COMMON SECTION.

Examples of the use of the functions are provided for Matlab 2013A, Matlab 2015A and Python in the EXAMPLE SECTION.

For security purposes user authentication has been added to this tools and their use is registered.


COMMON

Format

The access functions provide four different ways of data access using the format input parameter.

Format input Description Example
jsonM JSON matrix formed by lists of lists (default value). The first list is formed by the value names and the following lists are the query outputs Get DS by default
jsonO JSON object of lists, where each key is the value name and its value is the time sorted list of them Get DS with jsonO format
text Human readable comma separated values where first row is the value names and the following are the query outputs Get DS with text format
csv CSV direct download where first row are the value names and the following are the query outputs Get DS with text format

Common Inputs

Almost all functions accept the following input options:

Parameter Description Example
brewerid Brewer identification number Get function with brewerid input parameter
date Date in YYYY-MM-DD or JJJYY format Get function with date input parameter
enddate Date in YYYY-MM-DD or JJJYY format. If provided, the function will return the query in a date range Get function with enddate input parameter
fields Comma separated list of fields to write in the output. You can use myfields* to select all fields starting with myfields O3L1_5 output with just the ''gmt'' and ''o3'' fields

See also the code examples in matlab and python.

Means

For selected functions, passing the &means=xk variable in the URL will return the mean of all the output fields in the period specified by xk, where x is a number and k is any of min, h (hours), d (days), or M (months). The output includes two extra fields, stats_nobs, with the number of measurements which have been used to calculate the mean, and stats_std_o3 with the standard deviation of the ozone over the specified period. Examples:


GET FUNCTIONS FOR LEVEL 0

Function Short Description Long Description Link
DS Returns DS measures DS Get DS
DSS Returns the DS summaries DSS Get DSS
ZS Returns ZS measures ZS Get ZS
ZSS Returns the ZS summaries ZSS Get ZSS
FM Returns FM measures FM Get FM
FMS Returns the FM summaries FMS Get FMS
SL Returns SL measures SL Get SL
SLS Returns the SL summaries SLS Get SLS
ConfigbyDate Returns the available Configuration ConfigbyDate Get Config by Date
HK Returns housekeeping DetailsHK Get HK
HG Returns the mercury lamp tests HG Get HG
HP Returns the grating synchronisation tests HP Get HP
FV Returns the FV tests FV Get FV
BFV Returns the FV tests (from B file) BFV Get BFV
AP Returns the AP tests (from B file) AP Get AP
BHeader Returns the B File Header with INST values BHeader Get BHeader
DTO3 Returns the DTO3 tests (from B file) DTO3 Get DTO3
RSO3 Returns the RSO3 tests (from B file) RSO3 Get RSO3
ActiveBrewers Returns the number of Brewers whith at least one SL test by dates HG Get HG
FileStatus Returns the status of the received files FileStatus Get FileStatus
ActiveBrewers Returns the number of Active Brewers ActiveBrewers Get ActiveBrewers
Umkehr Returns the Umkehr measures Umkehr Get Umkehr
BfilesbyLocation Returns the Available B files for a range of locations BfilesbyLocation Get Bfiles by Location
BrewerLocation Returns the changes in location of a Brewer BrewerLocation Get Brewer Location
AVG Returns the available AVG measures AVG Get AVG
CO Return comments from the B files CO Get comments
bfiletimes Returns the time span included in a bfile bfiletimes Get bfile time span

Descriptions

DS


DSS


ZS


ZSS


FM


FMS


SL


SLS


ConfigbyDate


HK


HP


HG


FV


BFV


AP


BHeader


DTO3


RSO3


FileStatus


AVG

The list of available AVGS access functions is:


CO


bfiletimes



GET FUNCTIONS FOR HIGHER LEVELS

The output of the GET functions is stored in Eubrewnet's database, from where it's retrieved on each function call with little further processing. They are faster than their equivalent PROCESS functions, which process the data in real time, usually starting from the previous level. Whenever possible, GET functions should be used instead of the PROCESS equivalents.

Function Short Description Long Description Link
O3L1 Returns the Level 1 of Ozone O3L1 Get O3L1
O3L1_5 Returns the Level 1.5 of Ozone O3L1_5 Get O3L1_5
O3L2_0 Returns the Level 2.0 of Ozone O3L2_0 Get O3L2_0
O3L1ZS Returns the Level 1 of the Zenith Sky Ozone O3L1ZS Get O3ZS
O3L1_5ZS Returns the Level 1.5 of the Zenith Sky Ozone O3L1_5ZS Get O3L1_5ZS
O3L2_0ZS Returns the Level 2.0 of the Zenith Sky Ozone O3L2_0ZS Get O3L2_0ZS
O3L1byStation, O3L1_5byStation, and O3L2_0byStation For the requested station, returns the L1, L1_5 or L2_0 ozone product O3L1byStation, O3L1_5byStation, and O3L2_0byStation Get O3L1_5byStation
O3L1ALLbyStation, O3L1_5ALLbyStation, and O3L2_0ALLbyStation For the requested station, returns the L1, L1_5 or L2_0 ozone product, with both DS and ZS measurements O3L1ALLbyStation, O3L1_5ALLbyStation, and O3L2_0ALLbyStation Get O3L1_5ALLbyStation
O3L1PRIObyStation, O3L1_5PRIObyStation, and O3L2_0PRIObyStation For the requested station, returns the L1, L1_5 or L2_0 ozone product, with both DS and ZS measurements – the latter only if no DS measurements are available in the day O3L1PRIObyStation, O3L1_5PRIObyStation, and O3L2_0PRIObyStation Get O3L1_5PRIObyStation
UNCL1 and UNCL1_V2 Returns the Uncertainty L1 products for the standard and V2 Ozone algorithms UNCL1 and UNCL1_V2 Get UNCL1, Get UNCL1_V2
UNCL1_5 and UNCL1_5_V2 Returns the Uncertainty L1.5 products for the standard and V2 Ozone algorithms UNCL1_5 and UNCL1_5_V2 Get UNCL1_5, Get UNCL1_5_V2
UNCL1byStation, UNCL1_V2byStation, UNCL1_5byStation and UNCL1_5_V2byStation For the requested station, returns the Uncertainty L1 or L1.5 products for the standard or V2 Ozone algorithms UNCL1byStation, UNCL1_V2byStation, UNCL1_5byStation, and UNCL1_5_V2byStation Get UNCL1_5byStation

Get O3L1

In Products Description Ozone Level 1 there is a summary table with the output of this product


Get O3L1_5

In Products Description Ozone Level 1.5 there is a summary table with product content


Get O3L2_0

In Products Description Ozone Level 2.0 there is a summary table with the output of this product


Get O3L1ZS, O3L1_5ZS, and O3L2_0ZS


Get O3L1byStation, O3L1_5byStation, and O3L2_0byStation


Get O3L1ALLbyStation, O3L1_5ALLbyStation, and O3L2_0ALLbyStation


Get O3L1PRIObyStation, O3L1_5PRIObyStation, and O3L2_0PRIObyStation


Get brewerStationClimatology


Get UNCL1 and UNCL1_V2


Get UNCL1_5 and UNCL1_5_V2


Get UNCL1byStation, UNCL1_V2byStation, UNCL1_5byStation, and UNCL1_5_V2byStation



PROCESS FUNCTIONS FOR HIGHER LEVELS

The main output of the PROCESS functions is the same as their GET equivalents, but here the calculation is done in real time, usually starting from the previous level. This makes the PROCESS functions much slower, so we recommend using the GET equivalents when available.

Function Description Help Example
O3L1 Returns the Level 1 of Ozone O3L1 Process O3L1
O3L1_5 Returns the Level 1.5 of Ozone O3L1_5 Process O3L1_5
O3L2_0 Returns the Level 2.0 of Ozone O3L2_0 Process O3L2_0
UNCL1 and UNCL1_V2 Returns L1 uncertatinty for the standard and V2 Ozone algorithms UNCL1 and UNCL1_V2 Process UNCL1 Process UNCL1_V2
UNCL1_5 and UNCL1_5_V2 Returns L1.5 uncertatinty for the standard and V2 Ozone algorithms UNCL1_5 and UNCL1_5_V2 Process UNCL1_5 Process UNCL1_5_V2
TempCoef Returns SL Temperature analysis TempCoef Process TempCoef

Process O3L1

In Products Description Ozone Level 1 there is a table with a summary of this function's output


Process O3L1_5

In Products Description Ozone Level 1.5 there is a table with a summary of this function's output


Process O3L2_0

In Products Description Ozone Level 2.0 there is a table with summary of this function's output



Process UNCL1 and UNCL1_V2


Process UNCL1_5 and UNCL1_5_V2


UNC Flag

The following table describes the values of the unc_flag field found in the UNCL1 and UNCL1_V2 and UNCL1_5 and UNCL1_5_V2 functions

Correction Component Type Flag Default Value Units Source
Dead Time Measurement Systematic 1 1E-9 sec Fountoulakis et al., AMT 9(4), 1799-1816 (2016)
Temperature Coeff. Measurement Systematic 2 0.093578 counts/s/ºC Campaign maximum
Sun Scan Measurement Systematic 4 0.02262 %MS9/step Campaign maximum
Time (SZA) Measurement Systematic 8 1 sec Software
Ozone Eff. Temperature (V1) Absorption Random 16 3.95 ºC Climatology
Ozone Eff. Temperature (V2) Absorption Random 16 1.56 ºC Climatology
Temperature Grad. Absorption Random 32 0.0149 (atm-cm)-1/K Dispersion
Wavelength Grad. (V1) Absorption Random 64 -0.00102 (atm-cm)-1/step Dispersion
Wavelength Grad. (V2) Absorption Random 64 -0.00097 (atm-cm)-1/step Dispersion
Rayleigh Eff. Altitude Rayleigh airmass Random 128 0.5 km Constant
Ozone Eff. Altitude (V1) Ozone airmass Random 256 0.75 km Climatology
Ozone Eff. Altitude (V2) Ozone airmass Random 256 0.54 km Climatology
Rayleigh Scatt. Coeff. (V1) Scattering Coeff Systematic 512 1 % hard-coded
Rayleigh Scatt. Coeff. (V2) Scattering Coeff Systematic 512 0.002 % Bodhaine et al., Journal of Atmospheric and Oceanic Technology, 16(11), 1854-1861 (1999)
Pressure Pressure Random 1024 15 milibars Climatology
ETC (V1) ETC Systematic 2048 15 R6 Campaing Mean
ETC (V2) ETC Systematic 2048 15 R6 Campaing Mean
Standard Lamp (V1) Standard Lamp Systematic 4096 Yes/No Dobson Units
Standard Lamp (V2) Standard Lamp Systematic 4096 Yes/No Dobson Units
Filter No-Linearity (V1) Filter No-Linearity Systematic 8192 Yes/No Dobson Units
Filter No-Linearity (V2) Filter No-Linearity Systematic 8192 Yes/No Dobson Units
Stray Light (V1) Stray Light Systematic 16384 Yes/No Dobson Units
Stray Light (V2) Stray Light Systematic 16384 Yes/No Dobson Units

UNC Filter Flag

The following table describes the values of the filter_flag field found in the UNCL1_5 and UNCL1_5_V2 functions. Note the values below 1024 correspond to the standard ozone ''filter_flag''

Name Set when Value
FLAG_OZONE_STD_FILT Ozone standard deviation above 2.5 (ds) or 5 (zs), unless another values is set in the configuration 1
FLAG_AIRMASS_FILT above airmass 3.5 (brewers affected by straylight) or 6 (straylight correction provided or MKIII), unless another value is set in the configuration 2
FLAG_HG_FILT no valid HG 4
FLAG_MIN_FILT below min Ozone Value, as set in the configuration 8
FLAG_MAX_FILT above max Ozone Value, as set in the configuration 16
FLAG_BLACKLIST date and time included in the Exclusion List 32
FLAG_U_O3 outside the [0,25] limit for the combined uncertainty of individual measurements 1024
FLAG_U_O3_SYS outside the [0,25] limit for the systematic uncertainty of individual measurements 2048
FLAG_U_O3_RAN outside the [0,25] limit for the random uncertainty of individual measurements 4096


UPDATE FUNCTIONS

These functions use the PROCESS functions to update Eubrewnet's database, so that the data is available to the GET functions. This process is automatically done when a configuration is updated, so users do not need to directly access these functions.

O3L1 Update the Database content for the Level 1 of Ozone O3L1 Update O3L1
O3L1_5 Update the Database content for 1.5 of Ozone O3L1_5 Update O3L1_5
O3L2_0 Update the Database content for 2.0 of Ozone O3L2_0 Update O3L2_0

Update O3L1


Update O3L1_5


Update O3L2_0


Bypassing data filters

Data with a non-zero filter_flag value will not be included in the O3L1_5 and AODL1_5 output unless &rejected is added included in the URL. For example, the output of

https://eubrewnet.aemet.es/eubrewnet/data/process/O3L1_5?brewerid=185&date=2018-11-01&enddate=2018-11-02&format=text&fields=gmt,filter_flag

only shows data with filter_flag equal to zero, whereas

https://eubrewnet.aemet.es/eubrewnet/data/process/O3L1_5?brewerid=185&date=2018-11-01&enddate=2018-11-02&rejected&format=text&fields=gmt,filter_flag

includes observations with filter_flag values of 1, 2, 3, 6…, which will would have been hidden were it not for the &reject included in the URL

The filter_flag values correspond to the following conditions and variables:

Flag type Flag name Description Value
Ozone data filter FLAG_OZONE_STD_FILT Above the ozone standard deviation threshold 1
Ozone data filter FLAG_AIRMASS_FILT Above max airmass 2
Ozone data filter FLAG_HG_FILT Wrong HG 4
Ozone data filter FLAG_MIN_FILT Below Min Ozone Value 8
Ozone data filter FLAG_MAX_FILT Above Max Ozone Value 16
Ozone data filter FLAG_BLACKLIST Date in Exclusion List 32
Uncertainty data filter FLAG_U_O3 outside the [0,25] limit for combined uncertainty 1024
Uncertainty data filter FLAG_U_O3_SYS outside the [0,25] limit for systematic uncertainty 2048
Uncertainty data filter FLAG_U_O3_RAN outside the [0,25] limit for random uncertainty 4096

You can also omit any of these data filters adding allowfilter=xxx[,yyy] to the URL, where xxx is one of the Flag names in the above table. Note you can pass more than one Flag name, separating them by commas. Capitalization is not taken into account.

Thus for example, if the last URL is changed to

https://eubrewnet.aemet.es/eubrewnet/data/process/O3L1_5?brewerid=185&date=2018-11-01&enddate=2018-11-02&rejected=True&format=text&fields=gmt,filter_flag&allowfilter=FLAG_OZONE_STD_FILT,flag_hg_filt

both the FLAG_OZONE_STD_FILT and FLAG_HG_FILT data filters will be ignored and all the data will have a filter_flag value of 0.


Last measurement at EUBREWNET

157, hk@14:49:54, dss:289.1@14:46:22
183, co@14:40:40, dss:286.8@12:06:03
185, co@14:24:57, dss:283.9@10:45:09
257, hk@14:50:02, dss:289.1@14:48:14
258, hk@14:48:17, dss:283.3@14:42:50