1.26

PORTING AWIPS TO LINUX

Darien Davis(1), U. Herbert Grote, and Michael Biere*

NOAA Office of Atmospheric Research, Forecast Systems Laboratory

* In collaboration with the Cooperative Institute for Research in the Atmosphere (CIRA), Colorado State University



1. INTRODUCTION

The Forecast Systems Laboratory (FSL) has been working closely with the National Weather Service (NWS) for over 10 years to develop the Advanced Weather Interactive Processing System (AWIPS), an integral part of the NWS modernization. The AWIPS system was officially commissioned in 2000 and is now supporting forecast operations in all Weather Forecast Offices (WFOs) in the United States. FSL continues to play an active role in developing future releases of the AWIPS software. Also, to insure that the AWIPS system will remain responsive to operational needs, FSL will continue to investigate new technologies. A decision was made to utilize the advantages of the Linux operating system.

2. RATIONALE FOR USING LINUX

The AWIPS system has benefited considerably in the past by taking advantage of advanced and unique capabilities provided by a particular vendor's hardware. However, advances in technology have made it possible to obtain the same capabilities now on a variety of different processing platforms. The AWIPS software was developed and optimized for a single vendor's hardware. For example, the display code uses the features of a proprietary graphics controller, the system uses unique vendor software to provide system failover, system monitoring and control, and the AWIPS software was written using language extensions supported by the vendor's compilers. In the early years of development, this approach made it possible to quickly meet the AWIPS functional and performance requirements. However, this approach also made the system dependent on a single vendor which could be problematic if the vendor decides to discontinue particular hardware or software features. Furthermore, system improvements are limited to the technological advances by that vendor. The goal of the porting effort is to achieve greater hardware independence and reduce software dependence on any particular hardware platform.

3. ASSESSMENT OF SOFTWARE

FSL started to port the AWIPS system to Linux, known as FX-Linux, approximately three years ago. It became quickly apparent that the issues faced in porting any application software to a Linux platform depend heavily on the nature and complexity of the software. Based on FSL's initial analysis, some key issues in porting the AWIPS software to a PC Linux platform were identified. The initial, cursory analysis included a limited, moderate modification of software for assessing portability.

3.1 Use of multiple X-11 visuals for displaying graphics

The AWIPS display software uses the X11 libraries and their implementation for specifying the color model for the X-window by using the X-visual. A somewhat unique feature of the Hewlett Packard (HP) hardware and software is the support for multiple concurrent X-visuals. The AWIPS display contains five image display windows, of which four use the 24-bit visual and the fifth uses an 8-bit visual. In addition to multiple X-visuals, the HP graphic card provides several overlay and underlay planes.

The lack of these features on the PC graphic cards requires that the entire display be set to the 24-bit color mode. This places significant extra memory and processing burden on the machine, since the size of the pixmaps (containing the image to be displayed in a window) increases by a factor of four (from 8 bits to 32 bits per byte). The simple operation of removing a graphic overlay from an image requires that the entire image be rerendered instead of merely turning off a graphic plane. Also, functions such as changing the image color require recomputing each pixel value instead of modifying a color lookup table.

3.2 Use of programming language extensions to the ANSI Standard

The AWIPS software is written in C, C++, Fortran, and scripting languages such as Tcl/tk. It is compiled on the HP hardware using HP's CC and Fortran compilers. A requirement in porting the software to a PC was to ensure that the modified code could still run on the HP hardware with the HP compilers. Therefore, FSL needed to compile all software changes on the HP using the GNU and HP compilers, and on the PC using the GNU compilers.

The compilers used for the FX-Linux system include the GNU gcc and PGI (Portland Group) F90. Since these compilers require greater adherence to the ANSI standards than the HP CC (c-front) and HP Fortran compilers, the AWIPS code must be modified to make it ANSI-compliant. For example, some of FSL's legacy Fortran code frequently uses integers in boolean expressions. The code needed to be changed to ensure that boolean expressions only operated on boolean variables. Other differences in Fortran compilers are in the intrinsic functions, which can be dealt with by writing an "F90 wrapper" for the Fortran functions.

3.3 Differences in Processor Architecture

The ordering of bytes within a word for a PC is different than for the HP-UX CC compiler. As a result, some binary data files that are generated on the HP are read incorrectly on the PC. Since the code has to be executable on the PC and the HP, a run-time test is performed to determine if the bytes need to be reordered. Certain data files (netCDF and shapefile) use an XDR data representation that allows them to read the data correctly on both types of machines. The AWIPS software that reads binary cartographic (map backgrounds) data and certain tables is affected the most by the difference in byte order.

Another challenge is the difference in how processing threads are implemented by different hardware and software. The HP systems uses DCE threads versus POSIX threads for Linux. A crucial component of the AWIPS system is the Interprocess Communications (IPC) in which tens of thousands of messages are exchanged every day between processes. The IPC software is designed to use multiple threads to efficiently and reliably handle large volumes of messages, thus has been rewritten using Linux POSIX threads.

3.4 Target Desktop Environment

An undecided issue is the replacement for the Common Desktop Environment (CDE), the standard HPUX desktop. Linux users have a plethora of alternatives to choose from, of which Gnome and KDE appear to be the frontrunners. The Red Hat Linux systems we have been developing with use Gnome by default, so we have been using it as the desktop for our initial systems. Developers continue to use whatever window manager they are comfortable with.

4. TECHNICAL ISSUES

4.1 Development environment

Given its Unix-like nature, the Linux development environment is very similar to the HP-UX environment under which AWIPS was originally developed. We have not been using any Integrated Development Environment (IDE) product per se for development. Some programmers consider Unix and Linux themselves to be large and powerful IDEs. We are reminded that most of the large set of powerful tools we associate with Linux are more properly part of the GNU system, and maybe the world will start referring to the resulting software as the GNU/Linux system (www.gnu.org/gnu/linux-and-gnu.html). Among the high-quality GNU tools that we have relied on are the compilers, linker, run-time libraries, debugger, Emacs editor, and many more utilities too numerous to enumerate.

The development tools we lack on Linux are two commercial products from Rational Software Corporation: Purify (to diagnose memory problems) and Quantify (to identify performance problems). While there are tools available under Linux that address these areas, none are quite as easy to use. We have been using gprof, Electric Fence, and debugging malloc libraries among others.

Most AWIPS commercial off-the-shelf (COTS) and public domain software is available for Linux. The COTS Informix relational database manager is an example of a key component of the AWIPS system. COTS software accounts for a measurable portion of AWIPS code.

4.2 Operational environment

One of the most powerful applications of this software port is the AWIPS workstation which runs in an operational weather forecast office setting. The current hardware delivered to the WFOs necessitates innovative solutions to using the PC in the forecast offices.

The current forecast office has an FDDI ring and a network switch to support ethernet-type devices. Since most PCs have fast ethernet connectivity (100 Mbps), they must be hosted on the network switch at the traditional ethernet speed (10 Mbps per host).

In addition, the AWIPS build in the field differs dramatically in the data storage formats. The structure of the netCDF files has been modified with the AWIPS 5.0 build. In order to test a system within the operational office (AWIPS 4.3), data conversion routines have to be staged for use with the Linux display workstation. Current sites are testing a PC display workstation within the WFO's AWIPS network.

4.2.1 Data Ingest

FSL has started testing the ported code for the data ingest software within AWIPS. The data ingest port will facilitate the need for a review capability at the WFOs.

The data ingest port has been applied to the software from the ingest on the data server through decoding and storage (including Informix storage for the text database). Future testing at FSL will include use of a Linux network file server on a 100 Mbps network.

4.2.2 COTS and Middleware

The current WFO setting has myriad operational support software as well as many pieces of freeware needed on the system. A complete Linux port needs to address suitable replacements for this software, including:

Future FSL efforts will address replacement of these software components.

4.3 Status

The display and ingest software has been ported in the AWIPS 5.1 build. As of this writing, the redbook graphics decoder has not been completely ported. Development staff expect this to be finished by the first of the calendar year.

FSL would like to explore the following efforts:

5. PERFORMANCE RESULTS AND OBSERVATIONS

The software port to a PC environment creates opportunity to run sophisticated AWIPS functionality on a low-end computer. The price performance ratio of the CPU power on the PC is far less than the high-end workstations deployed by the National Weather Service (NWS). Some initial performance metrics show a 10:1 performance gain for some functions running on AWIPS servers (see Table 1). The workstation display shows a 2:1 performance gain for most user actions.

TABLE 1. Performance Comparisons

Function Time on Linux system Time on HP system 4.3.1 AWIPS
Starting D-2D 21.5 sec 190.0 sec
14-frame AVN family 10.4 sec 17.2 sec
9-frame NGM 4 panel family 13.9 sec 25.6 sec
12-frame 1.5 degree Z/V radar 13.6 sec 27.8 sec
12-frame Vis satellite 26.6 sec 57.2 sec
decode 2000 GRIB-encoded grids 160 sec 1080 sec
Informix storage time for fxatext DB .03 sec/product .24 sec/product

6. APPLICATIONS

FX-Linux has many potential applications within and outside the NWS. Although only the display software and some of the workstation infrastructure has been ported to Linux, FX-Linux could be used operationally by connecting it to the appropriate real-time database. This would allow the NWS to add a FX-Linux workstation to its current AWIPS system at offices where additional workstation are needed. Also, FX-Linux could be used at remote sites such as the Center Weather Service Units if the sites are sent the appropriate real-time data.

Initial testing of the FX-Linux workstation is being conducted at selected forecast offices in the NWS Southern Region and Central Region. Based on results from these sites wider implementation of the system may be considered by the AWIPS Program Office in the future.

Since FX-Linux can be connected to any database that meets the AWIPS database specifications, the system could be used to display data from non-AWIPS sources. Combined with a flexible software design that allows the system to be located at any geographic location, it is now possible to place the system in such locations as Taiwan and Korea. FSL has cooperative agreements with the Central Weather Bureau in Taiwan and the Korean Meteorological Administration to work together on improving their forecasting systems.

An immediate need for the forecast office is review capabilities. Users want to look at retrospective data for training purposes as well as scientific study. The FX-Linux software allows a viable case study mechanism for the forecast office (Page et al., 2001).

7. CONCLUSION

The FX-Linux software can be run on more than one computer platform. It has been thoroughly tested by FSL on the Hewlett Packard running HP-UX 10.20, and PC/Linux hardware. The ability to run the software on another platform has made it possible to achieve AWIPS functionality and better performance on a desktop PC and a laptop computer. Greater hardware independence will make it possible to take advantage of new technological developments by the computer industry.

At this time, FSL has ported and tested only the AWIPS display software and basic system infrastructure. However, expect the remaining portions of the AWIPS system to be ported in the future.

8. ACKNOWLEDGEMENTS

The performance metric work completed under the leadership of W. F. (Woody) Roberts at FSL has been critical to the success of this project.

9. REFERENCES

Page, E. M., Davis, D., Magsig, M., 2001: Case Study Playback Functionality in AWIPS. Proc., 17th Inter. Conf. on IIPS for Meteorology, Oceanography, and Hydrology, Albuquerque, NM, Amer. Meteor. Soc., In this preprint volume.


1. Corresponding author address: Darien Davis, NOAA Forecast Systems Laboratory, R/FS4, David Skaggs Research Center, 325 Broadway, Boulder, CO, 80305-3328


HTML conversion by Joe Wakefield
Last update 1 May 01