User Tools

Site Tools


codes:dbaccess

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
codes:dbaccess [2023/05/08 10:34]
jlsolano [GET FUNCTIONS FOR LEVEL 0]
codes:dbaccess [2024/02/14 15:35] (current)
jlsolano [Last measurement at EUBREWNET]
Line 75: Line 75:
 ^ SLS | Returns the SL summaries | [[codes:​dbaccess#​sls|SLS]] |[[http://​eubrewnet.aemet.es/​eubrewnet/​data/​get/​SLS?​brewerid=157&​date=2015-01-01&​format=text|Get SLS]] | ^ SLS | Returns the SL summaries | [[codes:​dbaccess#​sls|SLS]] |[[http://​eubrewnet.aemet.es/​eubrewnet/​data/​get/​SLS?​brewerid=157&​date=2015-01-01&​format=text|Get SLS]] |
 ^ ConfigbyDate ​   | Returns the available Configuration | [[codes:​dbaccess#​configbydate|ConfigbyDate]] |[[http://​eubrewnet.aemet.es/​eubrewnet/​data/​get/​ConfigbyDate?​brewerid=157&​date=2015-01-01|Get Config by Date]] ​       | ^ ConfigbyDate ​   | Returns the available Configuration | [[codes:​dbaccess#​configbydate|ConfigbyDate]] |[[http://​eubrewnet.aemet.es/​eubrewnet/​data/​get/​ConfigbyDate?​brewerid=157&​date=2015-01-01|Get Config by Date]] ​       |
 +^ HK | Returns housekeeping Details|[[codes:​dbaccess#​hk|HK]] |[[http://​eubrewnet.aemet.es/​eubrewnet/​data/​get/​HK?​brewerid=157&​date=2020-07-20|Get HK]] |
 ^ HG | Returns the mercury lamp tests |[[codes:​dbaccess#​hg|HG]] |[[http://​eubrewnet.aemet.es/​eubrewnet/​data/​get/​HG?​brewerid=157&​date=2015-01-01&​format=text|Get HG]] | ^ HG | Returns the mercury lamp tests |[[codes:​dbaccess#​hg|HG]] |[[http://​eubrewnet.aemet.es/​eubrewnet/​data/​get/​HG?​brewerid=157&​date=2015-01-01&​format=text|Get HG]] |
 ^ HP | Returns the grating synchronisation tests |[[codes:​dbaccess#​hp|HP]] |[[http://​eubrewnet.aemet.es/​eubrewnet/​data/​get/​HP?​brewerid=157&​date=2015-01-01&​format=text|Get HP]] | ^ HP | Returns the grating synchronisation tests |[[codes:​dbaccess#​hp|HP]] |[[http://​eubrewnet.aemet.es/​eubrewnet/​data/​get/​HP?​brewerid=157&​date=2015-01-01&​format=text|Get HP]] |
Line 91: Line 92:
 ^ AVG    | Returns the available AVG measures ​     | [[codes:​dbaccess#​avg|AVG]] |[[http://​eubrewnet.aemet.es/​eubrewnet/​data/​get/​AVG?​avg=apnavg&​brewerid=070&​date=2003-01-01&​enddate=2014-01-01|Get AVG]]        | ^ AVG    | Returns the available AVG measures ​     | [[codes:​dbaccess#​avg|AVG]] |[[http://​eubrewnet.aemet.es/​eubrewnet/​data/​get/​AVG?​avg=apnavg&​brewerid=070&​date=2003-01-01&​enddate=2014-01-01|Get AVG]]        |
 ^ CO     | Return comments from the B files | [[codes:​dbaccess#​co|CO]] | [[https://​rbcce.aemet.es/​eubrewnet/​data/​get/​CO?​brewerid=185&​date=2023-01-01&​format=text|Get comments]] | ^ CO     | Return comments from the B files | [[codes:​dbaccess#​co|CO]] | [[https://​rbcce.aemet.es/​eubrewnet/​data/​get/​CO?​brewerid=185&​date=2023-01-01&​format=text|Get comments]] |
 +^ bfiletimes | Returns the time span included in a bfile | [[codes:​dbaccess#​bfiletimes|bfiletimes]] | [[https://​rbcce.aemet.es/​eubrewnet/​data/​get/​bfiletimes?​brewerid=185&​date=2023-01-01&​enddate=2023-01-05&​format=text|Get bfile time span]] |
  
-----+-----
  
  
Line 216: Line 218:
  
 ---- ----
 +
 +==== HK ====
 +  * Function: HK
 +  * Description:​ Returns instrumental information to characterize the measuring conditions
 +  * Inputs:
 +      - brewerid: see [[codes:​dbaccess#​common_inputs|Brewerid in common inputs]]
 +      - date: see [[codes:​dbaccess#​common_inputs|Date in common inputs]]
 +      - enddate: see [[codes:​dbaccess#​common_inputs|Enddate in common inputs]]
 +      - format: see [[codes:​dbaccess#​format|Format]]
 +  * Output: instrumental parameters: temperature at the PMT, fan temperature,​ temperature of base plate, relative humidity, absolute humidity, atmospheric pressure and external temperature.
 +
 +
 +----
 +
 +
  
 ==== HP ==== ==== HP ====
Line 396: Line 413:
       - ''​gmt''​       - ''​gmt''​
       - ''​comment''​       - ''​comment''​
 +
 +----
 +
 +==== bfiletimes ====
 +  * Function: ''​bfiletimes''​
 +  * Description:​ return the time range, both UTC and solar, included in a B file, as determined from the first and last CO comment included in the file
 +  * Example: [[https://​rbcce.aemet.es/​eubrewnet/​data/​get/​bfiletimes?​brewerid=185&​date=2023-01-01&​enddate=2023-01-05&​format=text]]
 +  * Input:
 +      - ''​brewerid'':​ see [[codes:​dbaccess#​common_inputs|Brewerid in common inputs]]
 +      - ''​date'':​ see [[codes:​dbaccess#​common_inputs|Date in common inputs]]
 +      - ''​enddate'':​ see [[codes:​dbaccess#​common_inputs|Enddate in common inputs]]
 +      - ''​format'':​ see [[codes:​dbaccess#​format|Format]]
 +  * Output:
 +      - ''​brewerid''​
 +      - ''​bfile'':​ jjjyy value in the name of the bfile
 +      - ''​gmt'':​ UTC time of the first CO comment in the bfile
 +      - ''​endgmt'':​ UTC time of the last CO comment in the bfile
 +      - ''​solartime'':​ solar time corresponding to ''​gmt''​
 +      - ''​endsolartime'':​ solar time corresponding to ''​endgmt''​
 +      - ''​longitude'':​ longitude of the Brewer location
 +      - ''​bfileid'':​ id used by EUBREWNET to identify the bfile
  
 ---- ----
Line 787: Line 825:
 | Stray Light (V1) | Stray Light | Systematic | 16384 | 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 | | 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 [[codes:​dbaccess&#​process_uncl1_5_and_uncl1_5_v2|UNCL1_5 and UNCL1_5_V2]] functions. Note the values below 1024 correspond to the [[codes:​ozoneproduct&#​level_15_realtime_observation|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 |
  
 ---- ----
Line 843: Line 898:
 ===== Bypassing data filters ===== ===== 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 +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 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+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 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 and 4 which will would have been hidden were it not for the ''&​reject''​ included in the URL+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:+The ''​filter_flag'' ​values correspond to the following conditions and variables:
  
 ^ Flag type ^ Flag name ^ Description ^ Value ^ ^ Flag type ^ Flag name ^ Description ^ Value ^
Line 862: Line 917:
 | Ozone data filter | FLAG_MAX_FILT | Above Max Ozone Value |  16  | | Ozone data filter | FLAG_MAX_FILT | Above Max Ozone Value |  16  |
 | Ozone data filter | FLAG_BLACKLIST | Date in Exclusion List |  32  | | 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. 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.
Line 869: Line 927:
 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 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.+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 =====
 +  * Function: ''​last_measurement''​
 +  * Example: http://​rbcce.aemet.es/​eubrewnet/​stats/​last_measurement?​gaw_id=izo
 +  * Description:​ by returning the type and time of the most recent command run at the Brewer on the present day, and the value of the most recent Direct Sun summary, this function provides a quick way to check the status of a Brewer connected to EUBREWNET'​s database
 +  * Input: ''​brewerid''​ or ''​gaw_id'',​ to return the data of a specific Brewer or of all the Brewers present at a station, respectively
 +  * Output: one line for each Brewer, with three fields separated by commas:
 +    - ''​brewerid'', ​
 +    - ''​last command''​@''​time when the last command was run'', ​
 +    - dss:''​ozone value''​@''​time of the Direct Sun summary''​
 +  * Output example:
 +<​code>​
 +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
 +</​code>​
codes/dbaccess.1683542079.txt.gz · Last modified: 2023/05/08 10:34 by jlsolano