next up previous contents
Next: Database Grid Structure Up: Database Structure Previous: Database Structure

The Data Retrieval and Storage (DRS) System

The data in the MCD are written using the Data Retrieval and Storage (DRS) library developed for the Program for (Terrestrial) Climate Model Diagnosis and Intercomparison (PCMDI). The library is available (pre-compiled for common platforms or as source code) from the Lawrence Livermore National Laboratory World Wide Web server at

http://www-pcmdi.llnl.gov/drach/DRS.html.

DRS was developed as part of the Atmospheric Model Intercomparison Project (AMIP) to facilitate the transfer of data between platforms which may have different representations of floating point numbers. It also has a number of features to enable easy updating of model history files both in terms of temporal extension and in the addition of new diagnostic variables. It is a widely used data format and can be read by many data handling and graphical packages such as GrADS.

One of the advantages of the DRS data format which has been used for the database is that the actual byte ordering of the data (often called ``big endian'') is independent of the type of machine that is used to read and write the data, provided the DRS library routines are used. Hence the binary database files are portable and can be read on any type of machine with programs which make use of DRS subroutines. When accessing the DRS files using GrADS from a ``big endian'' machine (such as a Sun or HP) this also presents no problem. However, if GrADS is run on a ``little endian'' machine (such as a DEC or IBM PC) it is still straightforward to read the database files owing to the presence of a record, options big_endian, near the head of the .ctl file corresponding to the .dat file which is being read. This record causes GrADS to swap the byte order if the data are read on a ``little endian'' machine but is effectively ignored on a ``big endian'' machine. Hence, the binary data files for the Mars Climate Database are portable between any type of computer, whatever the details of byte ordering, provided that one of the three access methods (the MCDGM interface, program subroutines calling the DRS library, or GrADS with the .ctl files supplied) described in the User Manual is adopted. Files ending in .dat can be transferred between machines in binary format and files ending in .ctl can be transferred as plain text; no further conversion is necessary.


next up previous contents
Next: Database Grid Structure Up: Database Structure Previous: Database Structure
Stephen Lewis
3/10/1999