get started!

Frequently Asked Questions

Questions:


Answers:


Why isn't my API key working to access the MesoWest API database?

You don't use your API key in the query string. You use an API token, which is generated by the /auth service or by using the link sent to you in the email containing your API key.

Can I get all of the data for a single station at once?

Yes, but only in a CSV format. This is because JSON returns are limited to 100,000 station*hours per request.

Does the MesoWest API only return JSON output, or can returns be customized?

API returns will output data in JSON format as a default. The API is currently able to format data in CSV format for single stations, in GeoJSON for metadata queries (due to GeoJSON limitations), and XML format. Development of new output formats is always underway. Email output format suggestions to help@synopticlabs.org.

Can I get the date-times for stations returned in local time instead of UTC?

Yes. Just add &obtimezone=local to your query string to get local times instead of UTC times. You can also provide your own format with the &timeformat=... query string parameter. See documentation for usage options.

Here are a few examples:
Local Time Zone Query
Custom Time Format Query

Sometimes I see '_set_1' and '_set_2' (and sometimes more) for the same variable. What is the difference in "sets" of data?

Each set refers to an additional nth sensor on the station. Multiple sensors will sometimes exist at different heights or locations at any given station and so they are marked with different set numbers corresponding to their sensors. To see the actual query, click here: Multiple Sets Query

Here you can see that the variable 'wind_speed' has multiple 'sets':

    SENSOR_VARIABLES: {
        wind_speed: {
            wind_speed_set_2: {
                start: "2014-11-24T01:00:00Z",
                end: "2015-11-06T22:15:00Z"
            },
            wind_speed_set_3: {
                start: "2014-11-24T01:00:00Z",
                end: "2015-11-06T22:15:00Z"
            },
            wind_speed_set_1: {
                start: "2013-05-01T00:00:00Z",
                end: "2015-11-06T22:15:00Z"
            }
        }...

Additional variables would follow these where the ellipsis is. In cases like this, you would want to look to a corresponding metadata query to find out specific details about the position of the sensors on the station tower or to other. For this particular example, the corresponding metadata query would be: Metadata Query

Here we can see that the position (most often meaning height on the tower) of each sensor is different, further necessitating separate instances in the API return.

    SENSOR_VARIABLES: {
        wind_speed: {
            wind_speed_3: {
            position: "9",
            period_of_record: {
                start: "2014-11-24T01:00:00Z",
                end: "2015-11-06T22:15:00Z"
                }
            },
            wind_speed_2: {
            position: "2",
            period_of_record: {
                start: "2014-11-24T01:00:00Z",
                end: "2015-11-06T22:15:00Z"
                }
            },
            wind_speed_1: {
            position: "10",
            period_of_record: {
                start: "2013-05-01T00:00:00Z",
                end: "2015-11-06T22:15:00Z"
                }
            }
        }...

How do I know what variables a MesoWest station reports?

The MesoWest API /variables service can easily return that information. The Variables Query does the job perfectly. However, you can use the /metadata service and include '&sensorvars=1' on your metadata query string to get station-specific variables with period of record. Just change the geographic selection (i.e. station, state, country, etc...) as needed for different queries.

All I get back from a MesoWest API call is station metadata. Why is this?

There are a variety of reasons for why this could be occurring. The first issue to check would be to make sure that all of your spellings for query string parameters are correct. Second, make sure that the query string parameters being used are valid for the API service being called. Third, make sure that date-time groups and specified variables (if applicable) are valid for the station. If none of those appear to be the issue, feel free to email the MesoWest support team at help@synopticlabs.org for help.

Where do I go to find out what data sources are available in the MesoWest API?

A simple API query can return the list of all networks in the database: Network Query. Each network has an ID, or category, that can be used in other queries and long- and short-names for each network.

How can I find out how many stations are available in an area (state/country/territory/etc)?

For the time being, the MesoWest API does not have the functionality to display the total number (or active/inactive) stations in a given geographic area. Until such functionality is implemented, please refer to the Area Station Totals page

How can I check the status of a network using the MesoWest API

For the time being, the MesoWest API does not have the functionality to check network status efficiently. Until this functionality is added, please refer to the MesoWest Mesonet Station Status page

What is the difference between wind gust and peak wind speed?

The peak wind speed is typically the highest wind speed that is sustained over a given time period (usually two minutes), while the wind gust is the overall highest reported instantaneous wind speed. When using wind gust or peak wind speed, be aware that some stations report both the wind gust and the peak wind speed, others do not. If a station reports more than one peak wind variable, it is likely that only one will be used.

Why do certain precipitation values change from a non-zero number to zero?

Precipitation is a very difficult quantity to measure and there are dozens of types of gauges and ways to report precipitation. For example, sudden drops in accumulated precipitation values may occur due to annual or other routine maintenance that result in manual resets of the base value. The value may not simply be reset to zero, since antifreeze may be added to the gauge in regions that experience snow.