Metobs Data Request Application

Note


The data are provided courtesy of SSEC/AOSS UW-Madison. Clients causing issues due to size or quantity of queries may be blocked from further access until the issue is resolved


Disclaimer

Data Available

Currently, there are data from 2 instrument platforms accessible through this interface, the Mendota Buoy and AOSS Tower.

Query Format

Base URL

The base URL of a data query specifies the requested data return format:

http://metobs.ssec.wisc.edu/api/data.<fmt>

Valid values for fmt are:

    csv
    json
    xml
                    

The formats are documented below in the section Data Formats.

Query String

The query string will specify what specific data you would like to query for. The standard format for a HTTP GET query string can be found at http://en.wikipedia.org/wiki/query_string. Essentially, separate the URL from the query string using a ? and the key=value parameters with a &. Depending on the client, you may need to use URL character encoding in the URL, such as a + in place of any spaces. For more information see Example queries.

The query string supports the following query parameters:

symbols: (Required) Colon separated list of data quantities to query for. These are specified as colon-separated list of '<site>.<instrument>.<symbol>'. Valid symbols for each site/instrument are listed below. If 'site' and 'inst' are specified, then the corresponding portion of the symbol identifier may be removed. Note that the resulting response will use the same symbol name specified in this parameter; shortened or full name.
site: The name of the instrument's site. The tower's site is 'aoss' and the buoy's site is 'mendota'. The name is case sensitive. If inst is used, site is required.
inst: The name of the instrument. There are only two instruments supported, the 'buoy' and the 'tower'. The name is case sensitive. If site is used, inst is required.
begin: Start of the query interval in UTC as YYYY-MM-DDTHH:MM:SS or -HH:MM:SS. If the format -HH:MM:SS is used, begin is interpreted as a relative time starting from the current time. If begin is not specified, it defaults to the equivalent of -00:02:00 (the last two minutes).
end: End of the query interval in UTC as YYYY-MM-DDTHH:MM:SS or -HH:MM:SS. If the format -HH:MM:SS is used, end is interpreted as a relative time starting from the current time. If end is not specified, it defaults to the current time. This time is exclusive meaning records exactly at this time will not be included in the results.
sep: The separator to use between each data point. Works with CSV and XML formats. By default, the separator is a ','.
interval: The interval for the requested data. The intervals supported are '1m' (1 minute), '5m' (5 minutes), '1h' (1 hour). By default, the interval is 1m.
callback: (Creates a JSONP response) Name of the call back function to wrap the JSON response data. JSONP is a JSON structure wrapped in a javascript callback. This is one method if you want to use the data for display using Javascript or AJAX because it avoids the SOP issue. For the second method, look at the JSON Format Below. Note: it looks like 'mycallback(JSON);'.
epoch: Only included in the query string if the user wants the returned timestamps in a Unix epoch format. So far, the supported formats are 'h' (hours since epoch), 'm' (minutes since epoch), 's' (seconds since epoch), 'ms' (milliseconds since epoch), 'u' (microseconds since epoch), 'ns' (nanoseconds since epoch).
order: The format of the json return values as row-major or column-major. If specified as 'row', the results will be organized as a 2-d array. If specified as column the results are organized as <varname>:<list of value>. The 'order' is set as row by default. Only 'row' and 'column' are supported.

Instrument Symbols

AOSS Tower:

Field Name: Symbol Name: Units: Notes:
Air Temperature air_temp °C
Relative Humidity rel_hum %
Dewpoint Temperature dewpoint °C
Wind Speed wind_speed m/s
Wind Direction wind_direction °
Accumulated Precipitation accum_precip in
Pressure pressure hpa
Altimeter altimeter inHg
Solar Flux solar_flux W/M^2 Solar radiation

Mendota Buoy:

Field Name: Symbol Name: Units: Notes:
Air Temperature air_temp °C
Relative Humidity rel_hum %
Dewpoint Temperature dewpoint °C
Wind Speed wind_speed m/s
Wind Direction wind_direction °
Water Temperature water_temp_NUMBER °C Water temperature based upon measurement number (°C). Valid values for NUMBER are 1-23. Numbers increase as water depth increases (further down). The number 1 represents the surface temperature (0m), 2 is 0.5m, 3 is 1.0m, 4 is 1.5m, 5 is 2m, followed by 1m increments up to number 23 which is at a depth of 20m below the surface. Starting in the 2019 season, a new sensor was added at a depth of 0.75m. It is available as "water_temp_2_5" (2.5, half way between index 2 and 3).
Dissolved Oxygen doptoppm ppm
Dissolved Oxygen Saturation doptosat %
Chlorophyll chlorophyll RFU
Phycocynanin phycocyanin RFU
Wind Gust gust m/s Max wind speed over the past 2 minutes.
Average Wind Speed run_wind_speed m/s Average wind speed over the past 2 minutes.
Dissolved CO2 pco2ppm_avg ppm
Photosynthetically Active Radiation (above water) par_above_avg micromols/m^2/s Radiation above the water at about 2m above the water.
Photosynthetically Active Radiation (below water) par_below_avg micromols/m^2/s Radiation below the water at about 1m below the water.
pco2 raw voltage pco2volt_avg millivolts New in 2019 season. Raw pco2 sensor voltage.
Specific conductivity of the water spcond microSiemens/cm New in 2019 season.
pH of water ph 1 New in 2019 season.
Dissolved Oxygen 2 do_raw2 mg/L New in 2019 season. Replaces "doptoppm" as preferred dissolved oxygen measurement.
Dissolved Oxygen Saturation 2 do_sat2 % New in 2019 season. Replaces "doptosat" as preferred dissolved oxygen saturation measurement.
Chlorophyll (YSI) chlorophyll_ysi RFU New in 2019 season. Replacement for "chlorophyll" field. Sensor from YSI Inc.
Phycocyanin (YSI) phycocyanin_ysi RFU New in 2019 season. Replacement for "chlorophyll" field. Sensor from YSI Inc.
Turbidity turbidity FNU New in 2019 season.
Fluorescent dissolved organic matter fdom RFU New in 2019 season.
Limno Battery limno_battery volts New in 2019 season. Battery level of new 2019 sensor suite.

Example Queries

Data Formats:

CSV

  • Comma separated list of values with a single line header of symbol names:
    # status: success
    # code: 200
    # message:
    # num_results: 2
    # fields: YYYY-MM-DDTHH:MM:SSZ,aoss.tower.air_temp,aoss.tower.rel_hum
    2016-07-13T18:25:00Z,28.5,66.0
    2016-07-13T18:26:00Z,28.6,66.0
                            

JSON

For displaying data using javascript or AJAX, there are two methods the API uses. The user could set the callback parameter to return a JSONP format which avoids the SOP issue, or use a JSON format without a callback parameter, which the api automatically returns as a CORS HTTP request; this particular CORS request allows cross origin get requests.

  • The JSON structure for a row format:
    {
        "code":200,
        "message":"",
        "num_results":"4",
        "results":
        {
            "data": [[28.6,65.0,21.7,8.2,13.0,0.0,970.8,29.8,193.9],
                     [28.5,65.0,21.5,8.3,8.0,0.0,970.7,29.8,239.6],
                     [28.5,65.0,21.5,5.3,8.0,0.0,970.8,29.8,268.2],
                     [28.5,65.0,21.5,6.6,20.0,0.0,970.7,29.8,237.1]],
            "symbols":["aoss.tower.air_temp","aoss.tower.rel_hum","aoss.tower.dewpoint","aoss.tower.wind_speed","aoss.tower.wind_direction","aoss.tower.accum_precip","aoss.tower.pressure","aoss.tower.altimeter","aoss.tower.solar_flux"],
            "timestamps":["2016-07-13T18:32:00Z","2016-07-13T18:33:00Z","2016-07-13T18:34:00Z","2016-07-13T18:35:00Z"]
        },
        "status":"success"
    }
                            
  • The JSON structure for a column format:
    {
        "code":200,
        "message":"",
        "num_results":"4",
        "results":
        {
            "data": {
                        "aoss.tower.accum_precip":[0.0,0.0,0.0,0.0],
                        "aoss.tower.air_temp":[28.5,28.5,28.5,28.6],
                        "aoss.tower.altimeter":[29.8,29.8,29.8,29.8],
                        "aoss.tower.dewpoint":[21.5,21.4,21.3,21.5],
                        "aoss.tower.pressure":[970.7,970.7,970.8,970.8],
                        "aoss.tower.rel_hum":[65.0,65.0,65.0,65.0],
                        "aoss.tower.solar_flux":[237.1,387.5,711.4,725.0],
                        "aoss.tower.wind_direction":[20.0,12.0,348.0,357.0],
                        "aoss.tower.wind_speed":[6.6,7.9,5.9,4.2]
                    },
            "timestamps": ["2016-07-13T18:35:00Z","2016-07-13T18:36:00Z","2016-07-13T18:37:00Z","2016-07-13T18:38:00Z"]
        },
        "status":"success"
    }
                            
  • When the callback parameter is set to 'mycallback', the JSON structure is transformed into a jsonp format. This format looks like:
    mycallback({
        "code":200,
        "message":"",
        "num_results":"4",
        "results":
        {
            "data": {
                        "aoss.tower.accum_precip":[0.0,0.0,0.0,0.0],
                        "aoss.tower.air_temp":[28.5,28.5,28.5,28.6],
                        "aoss.tower.altimeter":[29.8,29.8,29.8,29.8],
                        "aoss.tower.dewpoint":[21.5,21.4,21.3,21.5],
                        "aoss.tower.pressure":[970.7,970.7,970.8,970.8],
                        "aoss.tower.rel_hum":[65.0,65.0,65.0,65.0],
                        "aoss.tower.solar_flux":[237.1,387.5,711.4,725.0],
                        "aoss.tower.wind_direction":[20.0,12.0,348.0,357.0],
                        "aoss.tower.wind_speed":[6.6,7.9,5.9,4.2]
                    },
            "timestamps": ["2016-07-13T18:35:00Z","2016-07-13T18:36:00Z","2016-07-13T18:37:00Z","2016-07-13T18:38:00Z"]
        },
        "status":"success"
    });
                            

XML

  • A timestamp element containing a list of timestamps and a data element for each requested symbol with a list of values:
    <metobs code="200" message="" num_results="2" seperator="," status="success">
        <symbols>
            <symbol format="%Y-%m-%dT%H:%M:%SZ" name="time" short_name="time"/>
            <symbol inst="tower" name="aoss.tower.air_temp" short_name="air_temp" site="aoss"/>
        </symbols>
        <data>
            <row id="0">2016-07-11T23:58:00Z 29.5</row>
            <row id="1">2016-07-11T23:59:00Z 29.5</row>
        </data>
    </metobs>
                            
  • Getting Help

    If you have comments, suggestions, or require help, please contact the MetObs Webmaster.