# Designing and Implementing Weather Generators as Web Services
## 2 Addressing Bottlenecks of Legacy Weather Generators for Service
### Standard Web Service for Climatic Data  
World Wide Web Consortium (W3C) generally defined that web service is \"a software system designed to support interoperable machine-to-machine interaction over a network\" [18]. Web services are dynamic applications that can be described, published, located, or invoked over the Internet. Web services use standardized messaging and protocols for exchanging data and communication between applications or systems over the Internet [18]. Open Geospatial Consortium (OGC) is an international consortium of over 300 industries, governments, and academic institutions established in 1994. OGC has been aiming to develop open specifications for geospatial interoperability including sensor interoperability. According to growing demand on information interoperability in sensor systems, OGC developed Sensor Web Enablement (SWE) for enabling sensors, transducers and sensor data repositories to be discoverable and accessible via web [19]. SWE framework includes Sensor Model Language (SensorML), O & M and web service named as SOS. SOS defines a standard protocol and web service interface for discovery and retrieval of real time or archived data produced by sensors or simulation [20]. Official OGC implementation specification version 2.0 is available on OGC website [21]. SOS assures interoperability of sensor data in time series format. Sensor data can be referred as observed data from physical sensor or simulated data from a model [20]. The main objectives of SOS are providing a standard accessing API to observed data by acting as a mediator of data exchange while hiding heterogeneous structure of sensor data formats and protocols. System and system can exchange data without perceiving complicated structure of each site. Effort on data formatting can be dramatically reduced. Three core operations are required for SOS:  
1. GetCapabilities: This operation allows client to access metadata and list of available operation on SOS server. The metadata is description of sensor data such as location and observed property. The request and response format is defined in XML document as getCapabilities request and getCapabilities response. The full specification is available on SOS 2.0 specification document. 2. DescribeSensor: This is the operation for retrieving metadata of physical sensors. The metadata is encoded in Sensor Model Language (SensorML). 3. GetObservation: This operation is for accessing sensor data by allowing spatial, temporal and thematic filtering. The data are returned in Observations and Measurements (O & M) document approved as an OGC standard, which is XML format [22]. The O & M document is comprised of timestamp, observed property, value, UOM and feature of interest. As mentioned in earlier section, climatological data published on the Internet are often in arbitrary format as well as arbitrary API to retrieve data. The interface defined in SOS can smoothly serve all features of climatological data. 52 North GmbH, which is one of the affiliations of OGC, has been implementing a broad range of services using SOS standardized interfaces. 52 North also provides SOS source code packages for constructing SOS services [23]. Recently, SOS has started to be applied in agricultural applications, such as agricultural decision support application [24], and crop yield simulation on web application [24]. They retrieve weather data from various kinds of sensors from various sources through SOS. There are several examples of applications and services, which manage weather data and metadata, using SOS API such as agriculture service application [24], and crop simulation application [25]. These applications have been providing information to farmers in Japan, which demonstrates efficiency of SOS in retrieving climatological data that accesses several different sensor systems. National Oceanic and Atmospheric Administration (NOAA) has been utilizing SOS API for providing weather data such as on [26].