The ClimDB and HydroDB database offers several web services in an effort to allow programmatic access to the LTER data contained therein. This document attempts to describe the API's to two of these web services. The two web services described in this document are climdb_agg and climdb_raw.

These web services are built using Perl and Soap. Sample Perl clients and a link to a third party web based client (http://www.soapclient.com/) are supplied. A brief tutorial is also included.

This tutorial will use the get_agg_monthly method of the ClimDB_agg web service for demonstration. get_agg_monthly gives you monthly aggregates for ClimDB and HydroDB data. For example you could get the aggregate values (max,mean,min,or total) for any variable for any site at any station that is participating in the ClimDB and HydroDB program.

The sites, stations, and variables listed above apply to all of the methods described in this document. Variables are all the ClimDB and HydroDB short names;

As new variables are added this list will grow, but keep in mind not all variables are submitted for all sites and stations. If a variable is requested that does not exist for that station or time period no result will be returned, however no error will be indicated.

Please refer to the ClimDB and HydroDB documentation for more information about variables.

As an example, assume you wished to know the average monthly values of maximum air temperature (TMAX) at the primary meteorological station (PRIMET) at the H.J. Andrews LTER site (AND) for the years of 1997 and 1999. NOTE: All values are soap types of string.

This web service allows remote access to the ClimDB_agg table in the ClimDB and HydroDB database. ClimDB_agg is aggregated data (means, totals, etc.) for various time frames. Three methods are presently offered; get_agg_monthly, get_agg_yearly, and agg_over_all.

The (WSDL) for ClimDB_agg is available. The actual service can be found at http://climhy.lternet.edu/wambam/services/climdb_agg_handler.pl. You may test this service at http://www.soapclient.com/soapclient.

This method gives you monthly aggregates for ClimDB and HydroDB data. The request would consist of site_code, station, variable, aggregate_type, begin, and end. Begin and end are both of the form YYYY-MM-DD. All other variables are as described in the tutorial

The response would consist of site_code, station, variable, aggregate_type, year, month, and value. Month is a value between 1 and 12 where 1 is January, 12 is December.

This method gives you yearly aggregates for ClimDB and HydroDB data. The request would consist of site_code, station, variable, aggregate_type, begin, and end. Begin and end are both years (YYYY). All other variables are as described in the tutorial

The response would consist of site_code, station, variable, aggregate_type, year, and value.

This method gives you monthly values aggregated over all available years for ClimDB and HydroDB data. The request would consist of site_code, station, variable, aggregate_type. All other variables are as described in the tutorial

The response would consist of site_code, station, variable, aggregate_type, month, and value.

This web service allows remote access to the ClimDB_raw table in the ClimDB and HydroDB database. ClimDB_raw is the raw data that was harvested for the various stations. Three methods are presently offered; get_day, last_harvest, and get_variable.

The (WSDL) for ClimDB_raw is available. The actual service can be found at http://climhy.lternet.edu/wambam/services/climdb_raw_handler.pl. You may test this service at http://www.soapclient.com/soapclient.

This method returns all the data for a given research site id on a given day. Date is a soap string following the YYYY-MM-DD format. An example request would be; res_site_id = 47 date = 2000-01-01. An example response would consist of a sequence of variable name, value, and flag. i.e. (TMAX,12,G,TMIN,10,G,TMEA,....)

Given a site, a station, and a ClimDB long name (DAILY_AIRTEMP_MAX_C) , or short name (TMAX). This method will return the day after the last harvest of that variable. An example request would be site = AND, station = PRIMET, variable = TMAX. An example response would be 2004-02-13 (if the last harvest was on the 12).

This method returns the value for a variable between a given date range, i.e. given site = AND, station = PRIMET, variable = TMAX, date = 2000-01-01, date1 = 2000-01-03. The response would consist the variable name, its value, and flag, and the date for the three values on the 1st through the third of January 2000.