SPHERICAL HARMONICS BINARY DATA RECORD (SHBDR)                                
                                                                              
                                                                              
                                                                              
                                                                              
prepared by                                                                   
                                                                              
Frank G. Lemoine                                                              
                                                                              
Code 698, Planetary Geodynamics Laboratory                                    
                                                                              
NASA Goddard Space Flight Center                                              
                                                                              
Greenbelt, Maryland, 20771 USA                                                
                                                                              
                                                                              
                                                                              
Daniel S. Kahan                                                               
                                                                              
Section 332                                                                   
                                                                              
Jet Propulsion Laboratory                                                     
                                                                              
4800 Oak Grove Dr.                                                            
                                                                              
Pasadena, California, 91109 USA                                               
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
Version 2.3                                                                   
                                                                              
11 September 2013                                                             
                                                                              
                                                                              
                                                                              
                                                                              
|======================================================================|      
|                                                                      |      
| DOCUMENT CHANGE LOG                                                  |      
|                                                                      |      
|======================================================================|      
|REVISION|REVISION | SECTION    | REMARK                               |      
| NUMBER | DATE    | AFFECTED   |                                      |      
|--------+---------+------------+--------------------------------------|      
| 1.0    |06/02/20 | All        |Adapted MGS SHBDR SIS to include      |      
|        |         |            |Mars Reconnaissance Orbiter and       |      
|        |         |            |MESSENGER.                            |      
|--------+--------+-------------+--------------------------------------|      
| 1.0    |06/03/15 | All        |Miscellaneous edits                   |      
|        |         |            |                                      |      
|======================================================================|      
| 1.0    |06/06/29 | All        |Integrate PDS review comments         |      
|======================================================================|      
| 1.1    |05/04/29 | All        |Fix minor formatting issues           |      
|======================================================================|      
| 1.2    |08/07/28 | 2.3        |Updated file naming convention        |      
|        |         |            | for MRO                              |      
|======================================================================|      
| 2.0    |13/04/17 | All        |Adapted to include GRAIL              |      
|======================================================================|      
| 2.1    |13/05/22 | All        |Minor edits                           |      
|======================================================================|      
| 2.2    |13/06/18 | All        |Revised SHBDR naming convention       |      
|======================================================================|      
| 2.3    |13/09/11 | Appendices |Revised Appendices B & C for GRAIL    |      
|======================================================================|      
                                                                              
                                                                              
Contents                                                                      
==============================================================================
Document Change Log................................................2          
                                                                              
Contents...........................................................3          
                                                                              
Acronyms and Abbreviations.........................................5          
                                                                              
1. General Description.............................................6          
                                                                              
1.1. Overview......................................................6          
                                                                              
1.2. Scope.........................................................6          
                                                                              
1.3. Applicable Documents..........................................6          
                                                                              
1.4. System Siting.................................................8          
                                                                              
1.4.1. Interface Location and Medium...............................8          
                                                                              
1.4.2. Data Sources, Transfer Methods, and Destinations............8          
                                                                              
1.4.3. Generation Method and Frequency.............................8          
                                                                              
1.5. Assumptions and Constraints...................................8          
                                                                              
1.5.1. Usage Constraints...........................................8          
                                                                              
1.5.2. Priority Phasing Constraints................................8          
                                                                              
1.5.3. Explicit and Derived Constraints............................8          
                                                                              
1.5.4. Documentation Conventions...................................8          
                                                                              
1.5.4.1. Data Format Descriptions..................................8          
                                                                              
1.5.4.2. Time Standards............................................9          
                                                                              
1.5.4.3. Coordinate Systems........................................9          
                                                                              
1.5.4.4. Limits of This Document...................................9          
                                                                              
1.5.4.5. Typographic Conventions..................................10          
                                                                              
2. Interface Characteristics......................................11          
                                                                              
2.1. Hardware Characteristics and Limitations.....................11          
                                                                              
2.1.1. Special Equipment and Device Interfaces....................11          
                                                                              
2.1.2. Special Setup Requirements.................................11          
                                                                              
2.2. Volume and Size..............................................11          
                                                                              
2.3. Labeling and Identification..................................11          
                                                                              
2.4. Interface Medium Characteristics.............................12          
                                                                              
2.5. Failure Protection, Detection, and Recovery Procedures.......12          
                                                                              
2.6. End-of-File Conventions......................................12          
                                                                              
3. Access.........................................................13          
                                                                              
3.1. Programs Using the Interface.................................13          
                                                                              
3.2. Synchronization Considerations...............................13          
                                                                              
3.2.1. Timing and Sequencing Considerations.......................13          
                                                                              
3.2.2. Effective Duration.........................................13          
                                                                              
3.2.3. Priority Interrupts........................................13          
                                                                              
3.3. Input/Output Protocols, Calling Sequences....................13          
                                                                              
4. Detailed Interface Specifications..............................14          
                                                                              
4.1. Structure and Organization Overview..........................14          
                                                                              
4.2. Detached PDS Label...........................................14          
                                                                              
4.2.1. Label Header...............................................14          
                                                                              
4.2.2. TABLE Object Definitions...................................18          
                                                                              
4.2.2.1. SHBDR Header Object Definition...........................18          
                                                                              
4.2.2.2. SHBDR Names Object Definition............................20          
                                                                              
4.2.2.3. SHBDR Coefficient Object Definition......................21          
                                                                              
4.2.2.4 SHBDR Covariance Object Definition........................22          
                                                                              
4.3. Data File....................................................23          
                                                                              
4.3.1. SHBDR Header Object/Block..................................23          
                                                                              
4.3.2. SHBDR Name Block...........................................23          
                                                                              
4.3.3. SHBDR Coefficients Block...................................24          
                                                                              
4.3.4. SHBDR Covariances Block....................................24          
                                                                              
                                                                              
Appendix A. Description of Spherical Harmonic Model Normalization.26          
                                                                              
A.1 Definition of Model for the Potential.........................26          
                                                                              
A.2 Definition of the normalization used..........................27          
                                                                              
Appendix B. Binary Data Format....................................28          
                                                                              
Appendix C. Example Data Products.................................29          
                                                                              
C.1. Example Label................................................29          
                                                                              
C.2. Example Data Object..........................................35          
                                                                              
Tables                                                                        
==============================================================================
4-3-1. SHBDR Header Block.........................................23          
                                                                              
4-3-2. SHBDR Names Block..........................................24          
                                                                              
4-3-3. SHBDR Coefficients Block...................................24          
                                                                              
4-3-4. SHBDR Covariance Block.....................................25          
                                                                              
Figures                                                                       
==============================================================================
4-2-1. SHBDR Label Header.........................................15          
                                                                              
                                                                              
                                                                              
                                                                              
ACRONYMS AND ABBREVIATIONS                                                    
==============================================================================
ANSI      American National Standards Institute                               
APL       Applied Physics Laboratory                                          
ARC       Ames Research Center                                                
ARCDR     Altimetry and Radiometry Composite Data Record                      
ASCII     American Standard Code for Information Interchange                  
CCSDS     Consultative Committee for Space Data Systems                       
CD-WO     Compact-disc write-once                                             
CNES      Centre National d'Etudes Spatiales                                  
CR        Carriage Return                                                     
dB        Decibel                                                             
DSN       Deep Space Network                                                  
DVD       Digital Video Disc or Digital Versatile Disc                        
EGM96     Earth Gravitational Model 1996                                      
FEA       Front End Assembly                                                  
GRAIL     Gravity Recovery and Interior Laboratory                            
GSFC      Goddard Space Flight Center                                         
IEEE      Institute of Electrical and Electronic Engineers                    
IAU       International Astronomical Union                                    
JHU       Johns Hopkins University                                            
JPL       Jet Propulsion Laboratory                                           
J2000     IAU Official Time Epoch                                             
K         Degrees Kelvin                                                      
kB        Kilobytes                                                           
km        Kilometers                                                          
LAST      Laser Altimeter Science Team (MESSENGER)                            
LF        Line Feed                                                           
LP        Lunar Prospector (mission or spacecraft)                            
MB        Megabytes                                                           
MESSENGER MErcury Surface Space ENvironment, GEochemistry, and Ranging        
          (acronym for mission to Mercury)                                    
MGN       Magellan                                                            
MGS       Mars Global Surveyor                                                
MIT       Massachusetts Institute of Technology                               
MLA       MESSENGER Laser Altimeter                                           
MO        Mars Observer                                                       
MRO       Mars Reconnaissance Orbiter                                         
NAIF      Navigation and Ancillary Information Facility                       
NASA      National Aeronautics and Space Administration                       
NAV       Navigation Subsystem/Team                                           
ODL       Object Definition Language (PDS)                                    
PDB       Project Data Base                                                   
PDS       Planetary Data System                                               
RST       Radio Science Team                                                  
SCET      Space Craft Event Time                                              
SFDU      Standard Formatted Data Unit                                        
SHADR     Spherical Harmonics ASCII Data Record                               
SHBDR     Spherical Harmonics Binary Data Record                              
SHM       Spherical Harmonics Model                                           
SIS       Software Interface Specification                                    
SPARC     Sun Scaleable Processor Architecture                                
SPK       Spacecraft and Planet Kernel Format, from NAIF                      
TBD       To Be Determined                                                    
UTC       Universal Time Coordinated                                          
                                                                              
                                                                              
                                                                              
1. GENERAL DESCRIPTION                                                        
1.1. Overview                                                                 
                                                                              
This Software Interface Specification (SIS) describes Spherical Harmonics     
Binary Data Record (SHBDR) files. The SHBDR is intended to be general and     
may contain coefficients for spherical harmonic expansions of gravity,        
topography, magnetic, and other fields.                                       
                                                                              
1.2. Scope                                                                    
                                                                              
The format and content specifications in this SIS apply to all phases of the  
project for which a SHBDR is produced.                                        
                                                                              
The SHBDR was defined initially for gravity models derived from Magellan      
(MGN) and Mars Observer (MO) radio tracking data [1], but the format is more  
generally useful. The original SHBDR has been adapted for the Mars Global     
Surveyor (MGS), Lunar Prospector (LP), Mars Reconnaissance Orbiter (MRO),     
and MESSENGER missions. This update of the SIS was made to include the        
Gravity Recovery and Interior Laboratory (GRAIL) mission [16]. Some of the    
original mission-specific documentation has been omitted, but the file        
format descriptions should still be applicable for the GRAIL mission.         
                                                                              
Specifics of the various models are included in [2], which will be updated    
as data for new spherical harmonic models are incorporated within the SHADR   
definition. A Spherical Harmonic ASCII Data Record is also defined [3],       
which may be more suitable when error covariances are not included in the     
final product.                                                                
                                                                              
The Jet Propulsion Laboratory (JPL), Pasadena, California, manages the Mars   
Reconnaissance Orbiter Mission [4], the Mars Global Surveyor Mission, and     
the GRAIL Mission for the National Aeronautics and Space Administration       
(NASA). The Johns Hopkins University, Laurel, Maryland, USA manages the       
MESSENGER mission [5,6] for NASA.                                             
                                                                              
1.3. Applicable Documents                                                     
                                                                              
[1] Tyler, G.L., G. Balmino, D.P. Hinson, W.L. Sjogren, D.E. Smith, R. Woo,   
S.W. Asmar, M.J. Connally, C.L. Hamilton, and R.A. Simpson, Radio Science     
Investigations with Mars Observer, J. Geophys. Res., 97, 7759-7779, 1992.     
                                                                              
[2] Simpson, R.A., Interpretation and Use of Spherical Harmonics ASCII Data   
Record (SHADR) and Spherical Harmonics Binary Data Record (SHBDR), Version    
1.0, 1993.                                                                    
                                                                              
[3] Lemoine, F.G., Software Interface Specification: Spherical Harmonics      
ASCII Data Record (SHADR), 2006.                                              
                                                                              
[4] Mars Reconnaissance Orbiter Mission Plan, Revision C: July 2005,          
prepared by Robert Lock. Document JPL D-22239, MRO-31-201.                    
                                                                              
[5] McAdams, J. V. (JHU/APL), MESSENGER mission overview and trajectory       
design, American Institute of Aeronautics and Astronautics, American          
Astronautical Society (AIAA/AAS) Astrodynamics Specialist Conference, Paper   
AAS 03-541, 20 pp., Big Sky, MT, August 3-7, 2003.                            
                                                                              
[6] McAdams, J. V., D. W. Dunham, R. W. Farquhar, A. H. Taylor, and           
B. G. Williams, Trajectory design and maneuver strategy for the MESSENGER     
mission to Mercury, 15th American Astronautical Society (AAS)/American        
Institute of Aeronautics and Astronautics (AIAA) Space Flight Mechanics       
Conference, Paper AAS 05-173, 21 pp., Copper Mountain, CO, Jan. 23-27, 2005.  
                                                                              
[7] Seidelmann, P.K., V.K. Abalakin, M. Bursa, M. E. Davies, C. de Bergh,     
J. H. Lieske, J. Oberst, J. L. Simon, E. M. Standish, P. Stooke, P. C.        
Thomas, Report of the IAU/IAG Working Group on Cartographic Coordinates and   
Rotational Elements of the Planets and Satellites: 2000, Celes. Mechanics and 
Dyn. Astronomy, 82, 83-110, Dec 2002.                                         
                                                                              
[8] MRO-D-22685, Rev B., Planetary Constants and Models, 05-15-2003.          
                                                                              
[9] Konopliv, A.S, C.F. Yoder, E. M. Standish, D.-N. Yuan, and W. L. Sjogren, 
A global solution for the Mars static and seasonal gravity, Mars orientation, 
Phobos, Deimos Masses, and Mars Ephemeris, Icarus, 182(1), 23-50, 2006.       
                                                                              
[10] Konopliv A.S., S.W. Asmar, E. Carranza, W.L. Sjogren, and D.N. Yuan,     
Recent Gravity models as a results of the Lunar Prospector Mission, Icarus,   
150, 1-18, 2001.                                                              
                                                                              
[11] Lambeck, Kurt, Geophysical Geodesy, Oxford University Press, Oxford,     
UK, 1988.                                                                     
                                                                              
[12] Kaula, William M., Theory of Satellite Geodesy, Applications of          
satellites to geodesy, Dover Publications, Mineola, NY, 2000.                 
                                                                              
[13] Lemoine, F.G., S.C. Kenyon, J.K. Factor, R.G. Trimmer, N.K. Pavlis, C.M. 
Cox, S.M. Klosko, S.B. Luthcke, M.H. Torrence, Y.M. Wang, R.G. Williamson,    
E.C. Pavlis, R.H. Rapp and T.R. Olson, The Development of the Joint NASA      
GSFC and the National Imagery and Mapping Agency (NIMA) Geopotential Model    
EGM96, NASA/TP-1998-206861, NASA Goddard Space Flight Center, Greenbelt,      
Maryland 20771, July 1998.                                                    
                                                                              
[14] JPL D-7116, Rev. F, Planetary Science Data Dictionary Document, Jet      
Propulsion Laboratory, Pasadena, California, October 20, 2008.                
(http://pds.jpl.nasa.gov/documents/psdd/psdd.pdf)                             
                                                                              
[15] JPL D-7669 Part 2, Planetary Data System Standards Reference, PDS        
Version 3.8, Jet Propulsion Laboratory, February 27, 2009.                    
(http://pds.jpl.nasa.gov/documents/sr/index.html)                             
                                                                              
[16] Roncoli, R. B., and K. K. Fujii, Mission Design Overview for the         
Gravity Recovery and Interior Laboratory (GRAIL) Mission, AIAA/AAS            
Astrodynamics Specialist Conference, Toronto, Ontario, Canada, 2010.          
http://arc.aiaa.org/doi/pdf/10.2514/6.2010-8383.                              
                                                                              
[17] Standish, E. M., Jr. (November 1982), Conversion of positions and        
proper motions from B1950.0 to the IAU system at J2000.0, Astronomy and       
Astrophysics 115 (1): 20-22. Bibcode 1982A&A...115...20S.                     
http://adsabs.harvard.edu/full/1982A%26A...115...20S                          
                                                                              
[18] Folkner, William M., The Planetary and Lunar Ephemeris DE 421, 2009.     
IPN Progress Report 42-178.                                                   
http://ipnpr.jpl.nasa.gov/progress_report/42-178/178C.pdf                     
                                                                              
1.4. System Siting                                                            
                                                                              
1.4.1. Interface Location and Medium                                          
                                                                              
SHBDR files are created at the institution conducting the science analysis.   
SHBDR files can be electronic files or can be stored on compact-disc          
write-once (CD-WO) or DVD type media.                                         
                                                                              
1.4.2. Data Sources, Transfer Methods, and Destinations                       
                                                                              
SHBDR files are created from radio tracking, vertical sounding, in situ,      
and/or other measurements at the institution conducting the scientific data   
analysis. They are transferred to and deposited in a data system (such as     
the PDS) specified by the managing institution.                               
                                                                              
1.4.3. Generation Method and Frequency                                        
                                                                              
Spherical Harmonic Models are developed separately at each institution        
conducting scientific analyses on raw data; each model meets criteria         
specified by the investigators conducting the analysis. Each model requires   
data with complete sampling (in terms of longitude and latitude coverage on   
the planet), so that SHBDR files will be issued infrequently and on           
schedules which cannot be predicted at this time.                             
                                                                              
                                                                              
1.5. Assumptions and Constraints                                              
                                                                              
1.5.1. Usage Constraints                                                      
                                                                              
None.                                                                         
                                                                              
1.5.2. Priority Phasing Constraints                                           
                                                                              
None.                                                                         
                                                                              
1.5.3. Explicit and Derived Constraints                                       
                                                                              
None.                                                                         
                                                                              
1.5.4. Documentation Conventions                                              
                                                                              
1.5.4.1. Data Format Descriptions                                             
                                                                              
The reference data unit is the byte. Data may be stored in fields with        
various sizes and formats, viz. one-, two-, and four-byte binary integers,    
four- and eight-byte binary floating-point numbers, and character strings.    
Data are identified throughout this document as                               
                                                                              
char 8 bits character                                                         
uchar 8 bits integer                                                          
short 16 bits integer                                                         
long 32 bits integer                                                          
float 32 bits floating point (sign, exponent, and mantissa)                   
double 64 bits floating point (sign, exponent, and mantissa)                  
u (prefix) unsigned (as with ulong for unsigned 32-bit integer)               
other special data structures such as time, date, etc. which are described    
within this document                                                          
                                                                              
If a field is described as containing n bytes of ASCII character string       
data, this implies that the leftmost (lowest numbered) byte contains the      
first character, the next lowest byte contains the second character, and so   
forth.                                                                        
                                                                              
An array of n elements is written as array[n]; the first element is           
array[0], and the last is array[n-1]. Array[n][m] describes an n x m element  
array, with first element array[0][0], second element array[0][1], and so     
forth.                                                                        
                                                                              
                                                                              
                                                                              
Floating point (real) numbers are represented as double precision character   
strings in the FORTRAN 1P1E23.16 format. Fixed point (integer) numbers are    
represented using the FORTRAN I5 format.                                      
                                                                              
1.5.4.2. Time Standards                                                       
                                                                              
SHBDR files use the January 1.5, 2000 epoch as the standard time. Within the  
data files, all times are reported in Universal Coordinated Time (UTC) as     
strings of 23 ASCII characters. The time format is                            
"YYYY-MM-DDThh:mm:ss.fff", where "-", "T", ":", and "." are fixed             
delimiters; "YYYY" is the year "19nn" or "20nn"; "MM" is a two-digit month    
of year; "DD" is a two-digit day of month; "T" separates the date and time    
segments of the string; "hh" is hour of day; "mm" is the minutes of hour      
(00-59); "ss" is the seconds of minute (00-59); and "fff" is fractional       
seconds in milliseconds.                                                      
                                                                              
The date format is "YYYY-MM-DD", where the components are defined as above.   
                                                                              
1.5.4.3. Coordinate Systems                                                   
                                                                              
The SHBDR uses the appropriate planetocentric fixed body coordinate system    
[7,8]. This may be an IAU system (e.g. IAU2000 [7]) or the new body-fixed     
Mars reference frame defined by Konopliv et al. [9]. At present, the          
MESSENGER mission has adopted the IAU2000 model for Mercury [7].              
                                                                              
The coordinate system for lunar geopotential models will be a body figure     
axis system defined by the lunar librations, which are resolved by lunar      
laser ranging [10], or a coarser frame defined by the IAU [7].                
                                                                              
GRAIL uses the DE 421 Lunar Body-Fixed Frame [17] as defined in the DE 421    
planetary ephemeris [18].                                                     
                                                                              
1.5.4.4. Limits of This Document                                              
                                                                              
This document applies only to SHBDR data files.                               
                                                                              
1.5.4.5. Typographic Conventions                                              
                                                                              
This document has been formatted for simple electronic file transfer and      
display. Line lengths are limited to approximately 80 ASCII characters,       
including line delimiters. No special fonts or structures are included        
within the file. Constant width characters are assumed for display.           
                                                                              
                                                                              
                                                                              
2. INTERFACE CHARACTERISTICS                                                  
                                                                              
2.1. Hardware Characteristics and Limitations                                 
                                                                              
2.1.1. Special Equipment and Device Interfaces                                
                                                                              
Users of the SHBDR product must have access to the data system (or to media)  
on which SHBDR files are stored.                                              
                                                                              
2.1.2. Special Setup Requirements                                             
                                                                              
None.                                                                         
                                                                              
                                                                              
2.2. Volume and Size                                                          
                                                                              
SHBDR products have variable length, depending on the degree and order of     
the model and the number of tables included. A model of degree and order N    
will include approximately N**2 terms and therefore the number of terms in    
the covariance matrix will be of order N**4. For 8-byte storage and N=50,     
the total SHBDR volume will be about 30 MB. For N=100, the total SHBDR        
volume will be approximately 416 MB. Vector quantities (e.g., magnetic        
field) may be described by a single SHBDR (in which all components are        
represented) or by a separate SHBDR for each field component. If the single   
SHBDR includes covariances, the file size will be approximately 27 times      
larger than the combined volumes of the three component files because of the  
inter-component covariance terms.                                             
                                                                              
In general, the SHBDR is recommended over the SHADR [3] when the data         
include error covariances because of the smaller data volume associated with  
binary formats.                                                               
                                                                              
2.3. Labeling and Identification                                              
                                                                              
The length of file names is limited to 27 or fewer characters before the      
period delimiter and 3 characters after the period delimiter. Each file has   
a name which describes its contents. The name includes the following          
structure which uniquely identifies it among SHBDR products. Beginning with   
                                                                              
the GRAIL gravity products the following file naming convention is used:      
                                                                              
GTsss_nnnnvv_SHB_Lccc.DAT                                                     
where                                                                         
"G" denotes the generating institution                                        
   "J" for the Jet Propulsion Laboratory                                      
   "G" or Goddard Space Flight Center                                         
   "M" for Massachusetts Institute of Technology                              
 "T" indicates the type of data represented                                   
   "G" for gravity field                                                      
"sss" is a 3-character modifier specified by the data producer. This          
   modifier is used to indicate the source spacecraft or Project, such as GRX 
   for the pair of GRAIL spacecraft.                                          
"_" the underscore character is used to delimit modifiers in the file name    
   for clarity.                                                               
"nnnnvv" is a 4- to 6-character modifier specified by the data producer.      
   Among other things, this modifier may be used to indicate the target body, 
   whether the SHBDR contains primary data values as specified by "T" or      
   uncertainties/errors, and/or the version number. For GRAIL, this modifier  
   indicates the degree and order of the solution for the gravity field,      
   topography or magnetic field.                                              
"SHB" denotes that this is a Binary file of Spherical Harmonic coefficients   
   and error covariance information                                           
"Lccc" is a 2- to 4-character modifier specified by the data producer to      
   indicate the degree and order to which degree (L) the gravity covariance   
   has been truncated, if applicable.                                         
".DAT" indicates the data is stored in binary format.                         
                                                                              
Each SHBDR file is accompanied by a detached PDS label; that label is a file  
in its own right, having the name GTsss_nnnnvv_SHB_Lccc.LBL.                  
                                                                              
2.4. Interface Medium Characteristics                                         
                                                                              
SHBDR products are electronic files.                                          
                                                                              
2.5. Failure Protection, Detection, and Recovery Procedures                   
                                                                              
None.                                                                         
                                                                              
2.6. End-of-File Conventions                                                  
                                                                              
End of file labeling complies with standards for the medium on which the      
files are stored.                                                             
                                                                              
3. ACCESS                                                                     
                                                                              
3.1. Programs Using the Interface                                             
                                                                              
Data contained in SHBDR files will be accessed by programs at the home        
institutions of science investigators. Those programs cannot be identified    
here.                                                                         
                                                                              
3.2. Synchronization Considerations                                           
                                                                              
3.2.1. Timing and Sequencing Considerations                                   
                                                                              
N/A                                                                           
                                                                              
3.2.2. Effective Duration                                                     
                                                                              
N/A                                                                           
                                                                              
3.2.3. Priority Interrupts                                                    
                                                                              
None.                                                                         
                                                                              
3.3. Input/Output Protocols, Calling Sequences                                
                                                                              
None.                                                                         
                                                                              
                                                                              
4. DETAILED INTERFACE SPECIFICATIONS                                          
                                                                              
                                                                              
4.1. Structure and Organization Overview                                      
                                                                              
The SHBDR is a file generated by software at the institution conducting       
scientific data analysis. Each SHBDR file is accompanied by a detached PDS    
label.                                                                        
                                                                              
4.2. Detached PDS Label                                                       
                                                                              
The detached PDS label is a file with two parts -- a header, and a set of     
one to four PDS TABLE object definitions. The header contains information     
about the origin of the file and its general characteristics such as record   
type and size.                                                                
                                                                              
The TABLE object definitions describe the format and content of the tables    
that make up the SHBDR data file. The SHBDR Header Table Object definition    
is required. The SHBDR Names Object Definition is required if there is an     
SHBDR Names Object in the file. The SHBDR Coefficients Table Object           
definition is required if there is a SHBDR Coefficients Table in the file;    
the SHBDR Covariance Table Object definition is required if there is a SHBDR  
Covariance Table.                                                             
                                                                              
Each detached PDS label is constructed of ASCII records; each record in the   
label contains exactly 80 characters. The last two characters in each record  
are the carriage-return (ASCII 13) and line-feed (ASCII 10) characters.       
                                                                              
An example of a complete label and data object is given in Appendix C.        
                                                                              
The EXTRAS directory contains ASCII files to be used as a reference for the   
user to confirm proper reading of the SHBDR binary file format.               
                                                                              
4.2.1 Label Header                                                            
                                                                              
The structure of the label header is illustrated in Figure 4-2-1.             
Keyword definitions are given below.                                          
                                                                              
PDS_VERSION_ID =                                                              
The version of the Planetary Data System for which these data have been       
prepared; set to PDS3 by agreement between the mission and PDS.               
                                                                              
RECORD_TYPE =                                                                 
The type of record. Set to "FIXED_LENGTH" to indicate that all logical        
records have the same length.                                                 
                                                                              
RECORD_BYTES =                                                                
The number of bytes per (fixed-length) record.                                
                                                                              
FILE_RECORDS =                                                                
The number of records in the SHBDR file: instance dependent.                  
                                                                              
^SHBDR_HEADER_TABLE=                                                          
File name and record number at which SHBDR_HEADER_TABLE begins. Set to        
("GTsss_nnnnvv_SHB_Lccc.DAT",1) where "GTsss_nnnnvv_SHB_Lccc.DAT" is the      
file name as described in Section 2.3, and 1 is the record number since this  
is the first record in the SHBDR file.                                        
                                                                              
                                                                              
|====================================================================|        
|                                                                    |        
| Figure 4-2-1 SHBDR Label Header                                    |        
|                                                                    |        
|====================================================================|        
|                                                                    |        
| PDS_VERSION_ID = PDS3                                              |        
| RECORD_TYPE = FIXED_LENGTH                                         |        
| RECORD_BYTES = nnn                                                 |        
| FILE_RECORDS = nnn                                                 |        
| ^SHBDR_HEADER_TABLE = ("GTsss_nnnnvv_SHB_Lccc.DAT",1)              |        
| ^SHBDR_NAMES_TABLE = ("GTsss_nnnnvv_SHB_Lccc.DAT ",1)              |        
| ^SHBDR_COEFFICIENTS_TABLE = ("GTsss_nnnnvv_SHB_Lccc.DAT ",nn)      |        
| ^SHBDR_COVARIANCE_TABLE = ("GTsss_nnnnvv_SHB_Lccc.DAT ",nnn)       |        
| INSTRUMENT_HOST_NAME = "cccccccccccccccccccc"                      |        
| TARGET_NAME = "cccc"                                               |        
| INSTRUMENT_NAME = "ccccccccccccccccccccccc"                        |        
| DATA_SET_ID = "ccccccccccccccccccccccc"                            |        
| OBSERVATION_TYPE = "ccccccccccccc"                                 |        
| ORIGINAL_PRODUCT_ID = "ccccccccccccc"                              |        
| PRODUCT_ID = "GTnnnnvv.SHB"                                        |        
| PRODUCT_RELEASE_DATE = YYYY-MM-DD                                  |        
| DESCRIPTION = "cccccccccccccccccc"                                 |        
| START_ORBIT_NUMBER = nnnn                                          |        
| STOP_ORBIT_NUMBER = nnnn                                           |        
| START_TIME = YYYY-MM-DDThh:mm:ss                                   |        
| STOP_TIME = YYYY-MM-DDThh:mm:ss                                    |        
| PRODUCT_CREATION_TIME = YYYY-MM-DDThh:mm:ss.fff                    |        
| PRODUCER_FULL_NAME = "cccccccccccc"                                |        
| PRODUCER_INSTITUTION_NAME = "ccccccccccc"                          |        
| PRODUCT_VERSION_TYPE = "cccccccccccc"                              |        
| PRODUCER_ID = "ccccccc"                                            |        
| SOFTWARE_NAME = "ccccccc;Vn.m"                                     |        
|====================================================================|        
                                                                              
^SHBDR_NAMES_TABLE =                                                          
File name and record number at which the SHBDR_NAMES_TABLE begins. The Names  
Table is required if the Coefficients Table is included in the file. This     
pointer will not appear in the SHBDR label if there is no Coefficients        
Table. Set to ("GTsss_nnnnvv_SHB_Lccc.DAT",nn) where                          
"GTsss_nnnnvv_SHB_Lccc.DAT" is the file name as described in Section 2.3,     
and "nn" is the record number in the file where the Names Table begins.       
                                                                              
^SHBDR_COEFFICIENTS_TABLE=                                                    
File name and record number at which SHBDR_COEFFICIENTS_TABLE begins. The     
Coefficients Table is optional; this pointer will not appear in the SHBDR     
label if there is no Coefficients Table. Set to                               
("GTsss_nnnnvv_SHB_Lccc.DAT",nn) where "GTsss_nnnnvv_SHB_Lccc.DAT" is the     
file name as described in Section 2.3, and "nn" is the record number in the   
file where the Coefficients Table begins.                                     
                                                                              
^SHBDR_COVARIANCE_TABLE=                                                      
File name and record number at which SHBDR_COVARIANCE_TABLE begins. The       
Covariance Table is optional; this pointer will not appear in the SHBDR       
label if there is no Covariance Table. Set to                                 
("GTsss_nnnnvv_SHB_Lccc.DAT",nn) where "GTsss_nnnnvv_SHB_Lccc.DAT" is the     
file name as described in Section 2.3, and "nn" is the record number in the   
file where the Covariance Table begins.                                       
                                                                              
INSTRUMENT_HOST_NAME =                                                        
Name of the spacecraft; acceptable names include "MARS GLOBAL SURVEYOR"       
"LUNAR PROSPECTOR", "MARS RECONNAISSANCE ORBITER", and "MERCURY SURFACE,      
SPACE, ENVIRONMENT, GEOCHEMISTRY, AND RANGING", and "GRAVITY RECOVERY AND     
INTERIOR LABORATORY".                                                         
                                                                              
TARGET_NAME =                                                                 
A character string that identifies the target body. For MRO- and MGS-         
derived SHBDR files, the character string will be "MARS". For MESSENGER       
SHBDR files the character string will be "MERCURY". For Lunar Prospector      
and GRAIL SHBDR files, the character string will be "MOON".                   
                                                                              
INSTRUMENT_NAME =                                                             
Name of the instrument; set to "RADIO SCIENCE SUBSYSTEM" for products         
generated from radio science data, or set to other instrument names as        
appropriate. Set to "LUNAR GRAVITY RANGING SYSTEM" for GRAIL.                 
                                                                              
DATA_SET_ID =                                                                 
Identifier for the data set of which this SHBDR product is a member.          
-Set to "MRO-M-RSS-5-SDP-Vn.m" for Mars Reconnaissance Orbiter;               
-Set to "MESS-H-RSS-5-SDP-Vn.m" for MESSENGER;                                
-Set to "MGS-M-RSS-5-SDP-Vn.m" for MGS; and "                                 
-Set to "LP-L-RSS-5-SHGBDR-L2-Vn.m" for Lunar Prospector;                     
-Set to "GRAIL-L-LGRS-5-RDR-Vn.m" for GRAIL.                                  
                                                                              
The suffix Vn.m indicates the version number of the data set.                 
                                                                              
OBSERVATION_TYPE =                                                            
A character string that identifies the data in the product. For the           
spherical harmonic model of a gravity field, the character string             
"GRAVITY FIELD". For a model of planet topography, the character string       
"TOPOGRAPHY".                                                                 
                                                                              
ORIGINAL_PRODUCT_ID =                                                         
Optional. An identifier for the product provided by the producer. Generally   
a file name, different from PRODUCT_ID, which would be recognized at the      
producer's home institution.                                                  
                                                                              
PRODUCT_ID =                                                                  
A unique identifier for the product within the collection identified by       
DATA_SET_ID. Generally, the file name used in pointers ^SHBDR_HEADER_TABLE.   
The naming convention is defined in Section 2.3.                              
                                                                              
PRODUCT_RELEASE_DATE =                                                        
The date on which the product was released to the Planetary Data System;      
entered in the format "YYYY-MM-DD", where components are defined in Section   
1.5.4.2.                                                                      
                                                                              
DESCRIPTION =                                                                 
A short description of the SHBDR product.                                     
                                                                              
START_ORBIT_NUMBER =                                                          
Optional. The first orbit represented in the SHBDR product. An integer.       
                                                                              
STOP_ORBIT_NUMBER =                                                           
Optional. The last orbit represented in the SHBDR product. An integer.        
                                                                              
START_TIME =                                                                  
Optional. The date/time of the first data included in the model, expressed    
in the format "YYYY-MM-DDThh:mm:ss" where the components are defined in       
section 1.5.4.2.                                                              
                                                                              
STOP_TIME =                                                                   
Optional. The date/time of the last data included in the model, expressed     
in the format "YYYY-MM-DDThh:mm:ss" where the components are defined in       
section 1.5.4.2.                                                              
                                                                              
PRODUCT_CREATION_TIME =                                                       
The time at which this SHBDR was created; expressed in the format             
"YYYY-MM- DDThh:mm:ss.fff" where the components are defined in Section        
1.5.4.2.                                                                      
                                                                              
PRODUCER_FULL_NAME=                                                           
The name of the person primarily responsible for production of this SHBDR     
file. Expressed as a character string, for example "JOHANNES KEPLER".         
                                                                              
PRODUCER_INSTITUTION_NAME=                                                    
                                                                              
The name of the institution primarily responsible for production of this      
SHADR. Standard values include:                                               
"STANFORD UNIVERSITY"                                                         
"GODDARD SPACE FLIGHT CENTER"                                                 
"JET PROPULSION LABORATORY"                                                   
"CENTRE NATIONAL D'ETUDES SPATIALES"                                          
"MASSACHUSETTS INSTITUTE OF TECHNOLOGY"                                       
                                                                              
PRODUCT_VERSION_TYPE=                                                         
The version of this SHBDR.                                                    
Standard values include "PREDICT", "PRELIMINARY", and "FINAL".                
                                                                              
PRODUCER_ID =                                                                 
The entity responsible for creation of the SHBDR product. For products        
generated by the Mars Reconnaissance Orbiter Gravity Science Team set to      
"MRO GST". For products generated by the MESSENGER Laser Altimeter Science    
Team, set to "MESS LAST". For products generated by the Mars Global Surveyor  
Radio Science Team, set to "MGS RST". For products generated by the GRAIL     
Science Data System set to "SDS".                                             
                                                                              
SOFTWARE_NAME =                                                               
The name and version number of the program creating this SHBDR file;          
expressed as a character string in the format "PROGRAM_NAME;n.mm" where       
"PROGRAM_NAME" is the name of the software and "n.mm" is the version number.  
(e.g. "SOLVE;200201.02")                                                      
                                                                              
4.2.2 TABLE Object Definitions                                                
                                                                              
4.2.2.1 SHBDR Header Object Definition                                        
                                                                              
Each SHBDR Header Object is completely defined by the Header Object           
Definition in its Label. The definition which follows gives the structure of  
the Header Object; some of the DESCRIPTION values may vary from product to    
product. The SHBDR Header Object Definition is a required part of the SHBDR   
label file. It immediately follows                                            
                                                                              
OBJECT = SHBDR_HEADER_TABLE                                                   
ROWS = 1                                                                      
COLUMNS = 9                                                                   
ROW_BYTES = 56                                                                
INTERCHANGE_FORMAT = BINARY                                                   
DESCRIPTION = "The SHBDR header includes descriptive                          
information about the spherical harmonic coefficients that follow in          
SHBDR_COEFFICIENTS_TABLE. The header consists of a single record of           
nine data columns requiring 56 bytes. The Header is followed by a             
pad of binary integer zeroes to ensure alignment with RECORD_BYTES."          
                                                                              
OBJECT = COLUMN                                                               
NAME = "REFERENCE RADIUS"                                                     
DATA_TYPE = IEEE_REAL                                                         
START_BYTE = 1                                                                
BYTES = 8                                                                     
UNIT = "KILOMETER"                                                            
DESCRIPTION = "The assumed reference radius                                   
of the spherical body."                                                       
END_OBJECT = COLUMN                                                           
                                                                              
OBJECT = COLUMN                                                               
NAME = "CONSTANT"                                                             
DATA_TYPE = IEEE_REAL                                                         
START_BYTE = 9                                                                
BYTES = 8                                                                     
UNIT = "KM^3/S^2"                                                             
DESCRIPTION = "For a gravity field model                                      
the assumed gravitational constant GM in kilometers cubed per seconds         
squared for the body. For a topography model, set to 1."                      
END_OBJECT = COLUMN                                                           
                                                                              
OBJECT = COLUMN                                                               
NAME = "UNCERTAINTY IN CONSTANT"                                              
DATA_TYPE = IEEE_REAL                                                         
START_BYTE = 17                                                               
BYTES = 8                                                                     
UNIT = "KM^3/S^2"                                                             
DESCRIPTION = "For a gravity field model the uncertainty                      
in the gravitational constant GM in kilometers cubed per seconds squared      
for the planet. For a topography, set to 0."                                  
END_OBJECT = COLUMN                                                           
                                                                              
OBJECT = COLUMN                                                               
NAME = "DEGREE OF FIELD"                                                      
DATA_TYPE = MSB_INTEGER                                                       
START_BYTE = 25                                                               
BYTES = 4                                                                     
UNIT = "N/A"                                                                  
DESCRIPTION = "The degree of model field."                                    
END_OBJECT = COLUMN                                                           
                                                                              
OBJECT = COLUMN                                                               
NAME = "ORDER OF FIELD"                                                       
DATA_TYPE = MSB_INTEGER                                                       
START_BYTE = 29                                                               
BYTES = 4                                                                     
UNIT = "N/A"                                                                  
DESCRIPTION = "The order of the model field."                                 
END_OBJECT = COLUMN                                                           
                                                                              
OBJECT = COLUMN                                                               
NAME = "NORMALIZATION STATE"                                                  
DATA_TYPE = MSB_INTEGER                                                       
START_BYTE = 33                                                               
BYTES = 4                                                                     
UNIT = "N/A"                                                                  
DESCRIPTION = "The normalization indicator.                                   
For gravity field:                                                            
0 coefficients are unnormalized                                               
1 coefficients are normalized                                                 
2 other."                                                                     
END_OBJECT= COLUMN                                                            
                                                                              
OBJECT = COLUMN                                                               
NAME = "NUMBER OF NAMES"                                                      
DATA_TYPE = MSB_INTEGER                                                       
START_BYTE = 37                                                               
BYTES = 4                                                                     
UNIT = "N/A"                                                                  
DESCRIPTION = "Number of valid names in the SHBDR Names                       
Table. Also, the number of valid coefficients in the SHBDR                    
Coefficients Table."                                                          
END_OBJECT = COLUMN                                                           
                                                                              
                                                                              
                                                                              
OBJECT = COLUMN                                                               
NAME = "REFERENCE LONGITUDE"                                                  
POSITIVE_LONGITUDE_DIRECTION = "EAST"                                         
DATA_TYPE = IEEE_REAL                                                         
START_BYTE = 41                                                               
BYTES = 8                                                                     
UNIT = "DEGREE"                                                               
DESCRIPTION = "The reference longitude                                        
for the spherical harmonic expansion; normally 0."                            
END_OBJECT = COLUMN                                                           
                                                                              
OBJECT = COLUMN                                                               
NAME = "REFERENCE LATITUDE"                                                   
DATA_TYPE = IEEE_REAL                                                         
START_BYTE = 49                                                               
BYTES = 23                                                                    
FORMAT = "E23.16"                                                             
UNIT = "DEGREE"                                                               
DESCRIPTION = "The reference latitude                                         
for the spherical harmonic expansion; normally 0."                            
END_OBJECT = COLUMN                                                           
                                                                              
END_OBJECT = SHBDR_HEADER_TABLE                                               
                                                                              
4.2.2.2 SHBDR Names Object Definition                                         
                                                                              
The SHBDR Names Object is completely defined by the Names Object Definition   
in the label. The definition below illustrates general structural form. The   
SHBDR Names Object is an optional part of the SHBDR file. If the Names        
Object is not included, either the Names Object Definition will be omitted    
or the number of rows will be set to zero (ROWS = 0). If the Names Object is  
not included, the pointer ^SHBDR_NAMES_TABLE will not appear in the Standard  
Keywords and Values. If the Coefficients Object is included in the SHBDR      
file, the Names Object is required.                                           
                                                                              
OBJECT = SHBDR_NAMES_TABLE                                                    
ROWS = *                                                                      
COLUMNS = 1                                                                   
ROW_BYTES = 8                                                                 
INTERCHANGE_FORMAT = BINARY                                                   
DESCRIPTION = "The SHBDR Names Table contains names                           
for the solution parameters (including gravity field coefficients) which      
will follow in the SHBDR_COEFFICIENTS_TABLE. The order of the names           
in the SHBDR_NAMES_TABLE corresponds identically to the order                 
of the parameters in the SHBDR_COEFFICIENTS_TABLE. Each coefficient           
name is of the form Cnm or Snm where n is the degree of the                   
coefficient and m is the order of the coefficient.                            
Both indices are three-digit zero-filled right-justified ASCII                
character strings (for example, C010005 for the 10th degree 5th order         
C coefficient, or S002001 for the 2nd degree 1st order S coefficient).        
The eighth byte in the table is an ASCII blank used to ensure                 
that the row length is equal to RECORD_BYTES. Names of other solution         
parameters are limited to 8 ASCII characters; if less than 8, they            
will be left-justified and padded with ASCII blanks. The Names Table          
itself will be padded with ASCII blanks, if necessary, so that                
its length is an integral multiple of RECORD_BYTES."                          
                                                                              
OBJECT = COLUMN                                                               
NAME = "PARAMETER NAME"                                                       
DATA_TYPE = CHARACTER                                                         
START_BYTE = 1                                                                
BYTES = 8                                                                     
UNIT = "N/A"                                                                  
DESCRIPTION = "The name of the coefficient or other                           
solution parameter, left-justified and padded with ASCII blanks               
(if needed) to 8 characters."                                                 
END_OBJECT = COLUMN                                                           
                                                                              
END_OBJECT = SHBDR_NAMES_TABLE                                                
                                                                              
                                                                              
4.2.2.3 SHBDR Coefficients Object Definition                                  
                                                                              
The SHBDR Coefficients Object is completely defined by the Coefficients       
Object Definition in the label. Small differences in DESCRIPTION values       
should be expected from product to product. The structure outlined in the     
Definition below should not vary, however. The SHBDR Coefficients Object is   
an optional part of the SHBDR data file. This allows the SHBDR to be used     
for targets which are too small or too remote to have easily discerned        
coefficients, but for which estimates of mass have been obtained (e.g.,       
satellites Phobos and Deimos). If the Covariance Object is included in the    
SHBDR, the Coefficients Object is required.                                   
                                                                              
If the Coefficients Object is not included in the SHBDR file, either the      
SHBDR Coefficients Object Definition will be omitted or the number of rows    
will be set to zero (ROWS = 0). If the SHBDR Coefficients Object is not       
included, the pointer ^SHBDR_COEFFICIENTS_TABLE will not appear in the        
label header. If the SHBDR Coefficients Object Definition is included in the  
label, it immediately follows the SHBDR Names Object Definition. The order    
in which coefficients appear in the Coefficients Object is defined by the     
Names Object [2].                                                             
                                                                              
OBJECT = SHBDR_COEFFICIENTS_TABLE                                             
ROWS = *                                                                      
COLUMNS = 1                                                                   
ROW_BYTES = 8                                                                 
INTERCHANGE_FORMAT = BINARY                                                   
DESCRIPTION = "The SHBDR Coefficients Table                                   
contains the coefficients and other solution parameters                       
for the spherical harmonic model. The order of the                            
coefficients in this table corresponds exactly to the                         
order of the coefficient and parameter names in                               
SHBDR_NAMES_TABLE. The SHBDR Coefficients Table will be                       
padded with double precision DATA_TYPE zeroes so that                         
its total length is an integral multiple of RECORD_BYTES."                    
                                                                              
OBJECT = COLUMN                                                               
NAME = "COEFFICIENT VALUE"                                                    
DATA_TYPE = *                                                                 
START_BYTE = 1                                                                
BYTES = 8                                                                     
UNIT = "N/A"                                                                  
DESCRIPTION = "A coefficient Cnm or                                           
Snm or other solution parameter as specified in the                           
SHBDR Names Table."                                                           
END_OBJECT = COLUMN                                                           
                                                                              
END_OBJECT = SHBDR_COEFFICIENTS_TABLE                                         
                                                                              
                                                                              
4.2.2.4 SHBDR Covariance Object Definition                                    
                                                                              
The SHBDR Covariance Object is completely defined by the Covariance Object    
Definition in the label. Small differences in DESCRIPTION values should be    
expected from product to product. The structure established by the            
Definition below should not change, however.                                  
                                                                              
The SHBDR Covariance Object is an optional part of the SHBDR data file. If    
the Covariance Object is not included, either the Covariance Object           
Definition will be omitted or the number of rows will be set to zero          
(ROWS = 0). If the SHBDR Covariance Object is not included, the pointer       
^SHBDR_COVARIANCE_TABLE will not appear in the label header. If the SHBDR     
Covariance Object Definition is included in the label, it immediately         
follows the SHBDR Coefficients Object Definition. The order in which          
covariance terms appear in the Covariance Object is defined by the Names      
Object [2].                                                                   
                                                                              
OBJECT = SHBDR_COVARIANCE_TABLE                                               
ROWS = *                                                                      
COLUMNS = 1                                                                   
ROW_BYTES = 8                                                                 
INTERCHANGE_FORMAT = BINARY                                                   
DESCRIPTION = "The SHBDR Covariance Table                                     
contains the covariances for the spherical harmonic model                     
coefficients and other solution parameters. The order of                      
the covariances in this table is defined by the product                       
of the SHBDR Names Table with its transpose, except that                      
redundant terms are omitted on their second occurrence.                       
The SHBDR Covariance Table will be padded with double                         
precision DATA_TYPE zeroes so that its total length is                        
an integral multiple of RECORD_BYTES."                                        
                                                                              
OBJECT = COLUMN                                                               
NAME = "COVARIANCE VALUE"                                                     
DATA_TYPE = *                                                                 
START_BYTE = 1                                                                
BYTES = 8                                                                     
UNIT = "N/A"                                                                  
DESCRIPTION = "The covariance value                                           
for the coefficients and other solution parameters                            
specified by the product of SHBDR_NAMES_TABLE with                            
its transpose, after omitting redundant terms."                               
END_OBJECT = COLUMN                                                           
                                                                              
END_OBJECT = SHBDR_COVARIANCE_TABLE                                           
                                                                              
                                                                              
4.3. Data File                                                                
                                                                              
Each SHBDR data file comprises one or more data blocks. The data objects      
were defined in Section 4.2. The data blocks are illustrated below.           
                                                                              
The Header Object is required in each SHBDR file; the Names Object, the       
Coefficients Object, and the Covariance Object are optional. If the           
Covariance Object is included, both the Coefficients Object and the Names     
Object are required; if the Coefficients Object is included, the Names        
Object is required.                                                           
                                                                              
4.3.1. SHBDR Header Object/Block                                              
                                                                              
The SHBDR Header Object contains the parameters necessary to interpret the    
data in the SHBDR file. The structure and content of the SHBDR Header Object  
are defined in Section 4.2.2.1. The SHBDR Header Object is a one-row table;   
hence the Header Object and the Header Block are logically synonymous. The    
structure of the Header Block is shown in Table 4-3-1.                        
                                                                              
|====================================================================|        
|                                                                    |        
| Table 4-3-1. SHBDR Header Block                                    |        
|                                                                    |        
|====================================================================|        
| Col No | Offset | Length | Format | Column Nam                     |        
|--------|--------|--------|--------|--------------------------------|        
| 1      | +0     | 8      | double |Planetary Radius                |        
|--------|--------|--------|--------|--------------------------------|        
| 2      | 8      | 8      | double |Constant                        |        
|--------|--------|--------|--------|--------------------------------|        
| 3      | 16     | 8      | double |Uncertainty in Constant         |        
|--------|--------|--------|--------|--------------------------------|        
| 4      | 24     | 4      | long   |Degree of Field                 |        
|--------|--------|--------|--------|--------------------------------|        
| 5      | 28     | 4      | long   |Order of Field                  |        
|--------|--------|--------|--------|--------------------------------|        
| 6      | 32     | 4      | long   |Normalization State             |        
|--------|--------|--------|--------|--------------------------------|        
| 7      | 36     | 4      | long   |Number of Names                 |        
|--------|--------|--------|--------|--------------------------------|        
| 8      | 40     | 8      | double |Reference Longitude             |        
|--------|--------|--------|--------|--------------------------------|        
| 9      | 48     | 8      | double |Reference Latitude              |        
|--------|--------|--------|--------|--------------------------------|        
|        | +56                      |                                |        
|========|========|========|========|================================|        
                                                                              
                                                                              
4.3.2. SHBDR Names Block                                                      
                                                                              
The SHBDR Names Object comprises one or more SHBDR Names Blocks. Each block   
contains the name of one coefficient or solution parameter in the Spherical   
Harmonic Model. The structure and content of the SHBDR Names Object are       
defined in Section 4.2.2.2. The structure of an individual block is shown in  
                                                                              
Table 4-3-2.                                                                  
                                                                              
|====================================================================|        
|                                                                    |        
| Table 4-3-2. SHBDR Names Block                                     |        
|                                                                    |        
|====================================================================|        
| Col No | Offset | Length | Format | Column Name                    |        
|--------|--------|--------|--------|--------------------------------|        
| 1      | +0     | 8      | A8     |Coefficient or Solution         |        
|        |        |        |        |Parameter Name                  |        
|--------|--------|--------|--------|--------------------------------|        
|        | +8                       |                                |        
|========|========|========|========|================================|        
                                                                              
                                                                              
4.3.3. SHBDR Coefficients Block                                               
                                                                              
The SHBDR Coefficients Object comprises one or more SHBDR Coefficients        
Blocks. Each block contains the value of one coefficient or other solution    
parameter for the overall model defined by the SHBDR product. The structure   
and content of the SHBDR Coefficients Object are defined in Section 4.2.2.3.  
The structure of an individual block is shown in Table 4-3-3.                 
                                                                              
                                                                              
|====================================================================|        
|                                                                    |        
| Table 4-3-3. SHBDR Coefficients Block                              |        
|                                                                    |        
|====================================================================|        
| Col No | Offset | Length | Format | Column Name                    |        
|--------|--------|--------|--------|--------------------------------|        
| 1      | +0     | 8      | double |Coefficient Cnm or Snm or       |        
|        |        |        |        |other solution parameter        |        
|--------|--------|--------|--------|--------------------------------|        
|        | +8                       |                                |        
|========|========|========|========|================================|        
                                                                              
                                                                              
4.3.4. SHBDR Covariance Block                                                 
                                                                              
The SHBDR Covariance Object comprises one or more SHBDR Covariance Blocks.    
Each SHBDR Covariance Block contains one covariance for the overall model     
defined by the SHBDR product. The structure and content of the SHBDR          
Covariance Object are defined in Section 4.2.2.4. The structure of an         
individual block is shown in Table 4-3-4. The SHBDR Covariance Object is an   
optional component of the SHBDR file.                                         
                                                                              
|====================================================================|        
|                                                                    |        
| Table 4-3-4. SHBDR Covariance Block                                |        
|                                                                    |        
|====================================================================|        
| Col No | Offset | Length | Format | Column Name                    |        
|--------|--------|--------|--------|--------------------------------|        
| 1      | +0     | 8      | double |Covariance Value                |        
|--------|--------|--------|--------|--------------------------------|        
|        | +8                       |                                |        
|========|========|========|========|================================|        
                                                                              
                                                                              
APPENDIX A.                                                                   
                                                                              
A.1 Definition of Spherical harmonic models for the geopotential.             
                                                                              
Spherical harmonics satisfy Laplace's equation in spherical coordinates. The  
gravity potential field of the planets and the mathematical representation    
of magnetic fields and topographic fields are readily expressed in terms of   
spherical harmonics. Useful reviews are by Lambeck [11] (Section 2.2,         
Elements of Potential Theory) and Kaula [12] (Section 1.1 Potential Theory,   
and Section 1.2 Spherical Harmonics).                                         
V = (GM/r) + (GM/r)*SUMMATION_n SUMMATION_m (Re/r)**n [Cnm" cos(mL) + Snm"    
sin(mL)]* Pnm"(sin(phi))                                                      
(Equation A-1-1)                                                              
where GM is the gravitational constant of the planet, r is the radial         
distance of the test point from the origin, and Re is the assumed reference   
radius of the spherical planet for which the coefficients were calculated.    
The summations take place from degree n=1 to infinity, and order m=0 to n;    
Cnm" and Snm" refer to the normalized spherical harmonic coefficients (see    
Section A.2 below); L is the longitude; the Pnm" are the normalized           
associated Legendre functions of degree n and order m; and phi is the         
latitude of the test point. If we assume the origin is at the center of mass, 
the degree one terms vanish, and the summation in degree starts at degree     
n=2.                                                                          
                                                                              
A "solution" for a spherical harmonic model of the geopotential refers to a   
solution for these spherical harmonic coefficients and the gravitational      
constant, GM, of the body.                                                    
                                                                              
In practice the spherical harmonic series is truncated at a maximum degree    
nmax. For MRO, the likely degree of truncation will be between n=100 and      
n=120. For MESSENGER gravity solutions of the planet Mercury, solutions will  
likely be truncated at degree 20. The degree of truncation depends on the     
quality of the tracking data, and the orbits of the spacecraft in the         
geopotential solution. For Lunar Prospector derived gravity solutions, the    
maximum degree has ranged from n=100 to n=165 [10]. For GRAIL, which used a   
different measurement technique, the gravity signal to noise ratio was very   
strong and the truncation was at a high degree. nmax was unprecedented 660    
for the Prime Mission.  The field size is expected to exceed 1000 for the     
combined Prime and Extended missions solution.                                
                                                                              
If the origin is placed at the center of mass, the degree 1 terms vanish      
from the spherical harmonic expansion, and the first summation above is then  
from (n=2) to the maximum degree, nmax.                                       
                                                                              
Figure 1, section 1.2 from Kaula [11] gives examples of spherical harmonics.  
The zonal terms, m=0, have n zeros in a distance pi along a meridian N-S in   
other words they represent only latitudinal varations in the potential.       
Zonal terms may be represented in the literature as Jn = - Cn0.               
                                                                              
Aside from GM, C20 is the most significant term in the gravity field (for     
planets such as the Earth and Mars), and reflects the dynamical expression    
of the planet's polar flattening.                                             
                                                                              
Tesseral harmonics (coefficients where n is not equal to m, and m > 0, have   
n-m zeros in a distance pi along a meridian (like the tesserae of a mosaic).  
                                                                              
Sectoral harmonics are coefficients where n=m and are constant in sectors of  
longitude (N-S) and have n zero crossings in a distance pi along a meridian   
of latitude (E-W).                                                            
                                                                              
                                                                              
A.2 Definition of the normalization used for geopotential coefficients.       
                                                                              
The normalization for spherical harmonic coefficients is given by Lambeck[11] 
                                                                              
Cnm" = Cnm/PI_nm                                            (Equation A-2-1)  
                                                                              
where Cnm" is normalized and Cnm is un-normalized, and                        
                                                                              
[PI_nm]**2 = (2 - delta_0m) * (2n+1) * (n-m)! / (n+m)!      (Equation A-2-2)  
                                                                              
delta_0m refers to the Kronecker delta function -- unity for coefficients     
where m=0 (the zonal terms), zero for order m > 0.                            
                                                                              
For zonal coefficients (m=0) the relation reduces to                          
                                                                              
Cnm" = Cnm / sqrt(2n+1)                                                       
                                                                              
                                                                              
For example, for the Earth C20 = -1.08262668355E-03 (un-normalized) so        
                                                                              
C20" = C20 / sqrt(5) = -4.8416537173572E-04 (normalized)                      
                                                                              
Working the process backwards for Earth's C22 we have                         
                                                                              
C22" = .24391435239839D-05                                                    
                                                                              
(from the Earth Gravitational Model 1996, EGM96, [13])                        
                                                                              
[PI_nm]**2 = (2-0)*(2n+1) (2-2)! / (4)!                                       
                                                                              
= 2*5*1/(4!) = 5/12                                                           
                                                                              
which yields                                                                  
                                                                              
C22 = sqrt(5/12) * (.24391435239839E-05) = 1.5744604E-06                      
closely matching Lambeck's [11] result (page 14).                             
                                                                              
                                                                              
Likewise for Earth's S22, we have S22" = -.14001668365394E-05                 
(normalized from the Earth Gravitational Model 1996, EGM96, [13])             
                                                                              
Thus,                                                                         
                                                                              
S22= sqrt(5/12) * (-.14001668365394E-05) = -9.038038E-07 (un-normalized)      
                                                                              
which matches closely the example given by Lambeck [11].                      
                                                                              
                                                                              
APPENDIX B. BINARY DATA FORMAT                                                
                                                                              
See PDS 3.8 Standards Reference, Appendix C.7, for the PC binary format.      
                                                                              
APPENDIX C EXAMPLE DATA PRODUCTS                                              
                                                                              
Appendix C.1 Example Label                                                    
                                                                              
The following lists an example SHBDR LBL file for a GRAIL-derived lunar       
gravity solution, "GGGRX_0660PM" (GRGM660PRIM), prepared by the GRAIL         
gravity team at  NASA GSFC.                                                   
                                                                              
GRGRM660PRIM is a 660x660 gravity model based on primary mission data,        
and in this example only the covariance of that solution to 50x50 is provided.
The full reference for this solution is:                                      
                                                                              
Lemoine, F.G., S. Goossens, T.J. Sabaka et al., "High-degree gravity models   
from GRAIL primary mission data", J. Geophys. Res., 118(8), 1676-1698,        
doi: 10.1002/jgre.20118.                                                      
                                                                              
PDS_VERSION_ID               = "PDS3"                                         
FILE_NAME                    = "GGGRX_0660PM_SHB_L50.DAT"                     
RECORD_TYPE                  = FIXED_LENGTH                                   
RECORD_BYTES                 = 512                                            
FILE_RECORDS                 = 52998                                          
^SHBDR_HEADER_TABLE          = ("GGGRX_0660PM_SHB_L50.DAT",1)                 
^SHBDR_NAMES_TABLE           = ("GGGRX_0660PM_SHB_L50.DAT",2)                 
^SHBDR_COEFFICIENTS_TABLE    = ("GGGRX_0660PM_SHB_L50.DAT",43)                
^SHBDR_COVARIANCE_TABLE      = ("GGGRX_0660PM_SHB_L50.DAT",84)                
INSTRUMENT_HOST_NAME         = {"GRAVITY RECOVERY AND INTERIOR LABORATORY A", 
                                "GRAVITY RECOVERY AND INTERIOR LABORATORY B"} 
TARGET_NAME                  = "MOON"                                         
INSTRUMENT_NAME              = {"LUNAR GRAVITY RANGING SYSTEM A",             
                                "LUNAR GRAVITY RANGING SYSTEM B"}             
DATA_SET_ID                  = "GRAIL-L-LGRS-5-RDR-V1.0"                      
OBSERVATION_TYPE             = "GRAVITY FIELD"                                
PRODUCT_ID                   = "GRGM660PRIM"                                  
PRODUCT_RELEASE_DATE         = 2012-07-31                                     
DESCRIPTION                  = "                                              
 This file contains coefficients and related data for the GSFC Lunar gravity  
 field GRGM660PRIM, a degree and order 660 spherical harmonic model. It is    
 a preliminary GSFC gravity field that includes the entire nominal mission of 
 GRAIL tracking data (March 1, 16:30 to May 29, 16:36, 2012).                 
                                                                              
 Some details describing this model are:                                      
                                                                              
   The spherical harmonic coefficients are fully normalized.                  
   The reference radius = 1738.0 km                                           
   The planetary ephemeris is de421 and defines the lunar body-fixed          
       coordinate system.                                                     
   A Kaula type power law constraint is applied to the spherical harmonics    
       coefficients for degrees >330 (2.5e-4/n^2).                            
   The weighting of the data is 0.05 microns/sec for the 5-s KBRR data and    
       0.12mm/s for the 10-s 2-way S-band DSN tracking data.                  
                                                                              
 The estimated tidal Love numbers are:                                        
     k20 = 0.024165 +/- 0.000091                                              
     k21 = 0.023915 +/- 0.000013                                              
     k22 = 0.024852 +/- 0.000017                                              
   for an aggregate k2 = 0.02427 +/- 0.000054                                 
     k30 = 0.007342+/-0.001534                                                
                                                                              
 This product contains the truncated n=50 covariance of the GRGM660PRIM       
 gravity model or GGGRX_0660PM_SHA.                                           
                                                                              
 The reference for the GRGM660PRIM gravity field is LEMOINEETAL2013,          
 published in the Journal of Geophysical Research with the DOI number         
 10.1002/jgre.20118 .                                                         
                                                                              
 This product is a set of binary tables:                                      
 a header table, a names table, a coefficients table, and a covariance        
 table. Definitions of the tables follow. This GRAIL moon gravity model       
 is in the form of a Spherical Harmonics Binary Data Record (SHBDR)."         
                                                                              
START_TIME                   = 2012-03-01T16:28:00.000                        
STOP_TIME                    = 2012-05-29T16:36:00.000                        
PRODUCT_CREATION_TIME        = 2013-06-06T00:00:00.000                        
PRODUCER_FULL_NAME           = "GSFC LEVEL-2 TEAM"                            
PRODUCER_INSTITUTION_NAME    = "GODDARD SPACE FLIGHT CENTER"                  
PRODUCT_VERSION_TYPE         = "PRELIMINARY"                                  
PRODUCER_ID                  = "GRAIL"                                        
                                                                              
/* Structure Objects */                                                       
                                                                              
OBJECT                     = SHBDR_HEADER_TABLE                               
  ROWS                       = 1                                              
  COLUMNS                    = 9                                              
  ROW_BYTES                  = 56                                             
  INTERCHANGE_FORMAT         = BINARY                                         
  DESCRIPTION                = "The SHBDR Header includes                     
  descriptive information about the spherical harmonic                        
  coefficients which follow in SHBDR_COEFFICIENTS_TABLE.                      
  The header consists of a single record of nine data                         
  columns requiring 56 bytes.  The Header is followed by                      
  a pad of binary integer zeroes to ensure alignment                          
  with RECORD_BYTES."                                                         
                                                                              
  OBJECT                   = COLUMN                                           
    NAME                         = "REFERENCE RADIUS"                         
    DATA_TYPE                    = PC_REAL                                    
    START_BYTE                   = 1                                          
    BYTES                        = 8                                          
    UNIT                         = "KILOMETER"                                
    DESCRIPTION                  = "The assumed reference                     
    radius of the spherical planet."                                          
  END_OBJECT               = COLUMN                                           
                                                                              
  OBJECT                   = COLUMN                                           
    NAME                         = "CONSTANT"                                 
    DATA_TYPE                    = PC_REAL                                    
    START_BYTE                   = 9                                          
    BYTES                        = 8                                          
    UNIT                         = "N/A"                                      
    DESCRIPTION                  = "For a gravity field model                 
    the gravitational constant GM in kilometers cubed per seconds             
    squared for the planet.  For a topography model, set to 1."               
  END_OBJECT               = COLUMN                                           
                                                                              
  OBJECT                   = COLUMN                                           
    NAME                         = "UNCERTAINTY IN CONSTANT"                  
    DATA_TYPE                    = PC_REAL                                    
    START_BYTE                   = 17                                         
    BYTES                        = 8                                          
    UNIT                         = "N/A"                                      
    DESCRIPTION                  = "For a gravity field model                 
    the uncertainty in the gravitational constant GM in kilometers            
    cubed per seconds squared for the planet.  For a topography               
    model, set to 0."                                                         
  END_OBJECT               = COLUMN                                           
                                                                              
  OBJECT                   = COLUMN                                           
    NAME                         = "DEGREE OF FIELD"                          
    DATA_TYPE                    = LSB_INTEGER                                
    START_BYTE                   = 25                                         
    BYTES                        = 4                                          
    UNIT                         = "N/A"                                      
    DESCRIPTION                  = "Degree of the model field."               
  END_OBJECT               = COLUMN                                           
                                                                              
  OBJECT                   = COLUMN                                           
    NAME                         = "ORDER OF FIELD"                           
    DATA_TYPE                    = LSB_INTEGER                                
    START_BYTE                   = 29                                         
    BYTES                        = 4                                          
    UNIT                         = "N/A"                                      
    DESCRIPTION                  = "Order of the model field."                
  END_OBJECT               = COLUMN                                           
                                                                              
  OBJECT                   = COLUMN                                           
    NAME                         = "NORMALIZATION STATE"                      
    DATA_TYPE                    = LSB_INTEGER                                
    START_BYTE                   = 33                                         
    BYTES                        = 4                                          
    UNIT                         = "N/A"                                      
    DESCRIPTION                  = "The normalization indicator.              
    For gravity field:                                                        
        0   coefficients are unnormalized                                     
        1   coefficients are normalized                                       
        2   other."                                                           
  END_OBJECT               = COLUMN                                           
                                                                              
  OBJECT                   = COLUMN                                           
    NAME                         = "NUMBER OF NAMES"                          
    DATA_TYPE                    = LSB_INTEGER                                
    START_BYTE                   = 37                                         
    BYTES                        = 4                                          
    UNIT                         = "N/A"                                      
    DESCRIPTION                  = "Number of valid names in                  
    the SHBDR Names Table.  Also, the number of valid                         
    coefficients in the SHBDR Coefficients Table."                            
  END_OBJECT               = COLUMN                                           
                                                                              
  OBJECT                   = COLUMN                                           
    NAME                         = "REFERENCE LONGITUDE"                      
    POSITIVE_LONGITUDE_DIRECTION = "EAST"                                     
    DATA_TYPE                    = PC_REAL                                    
    START_BYTE                   = 41                                         
    BYTES                        = 8                                          
    UNIT                         = "DEGREE"                                   
    DESCRIPTION                  = "The reference longitude for               
    the spherical harmonic expansion; normally 0."                            
  END_OBJECT               = COLUMN                                           
                                                                              
  OBJECT                   = COLUMN                                           
    NAME                         = "REFERENCE LATITUDE"                       
    DATA_TYPE                    = PC_REAL                                    
    START_BYTE                   = 49                                         
    BYTES                        = 8                                          
    UNIT                         = "DEGREE"                                   
    DESCRIPTION                  = "The reference latitude for                
    the spherical harmonic expansion; normally 0."                            
  END_OBJECT               = COLUMN                                           
                                                                              
END_OBJECT           = SHBDR_HEADER_TABLE                                     
                                                                              
OBJECT               = SHBDR_NAMES_TABLE                                      
  ROWS                     = 2602                                             
  COLUMNS                  = 1                                                
  ROW_BYTES                = 8                                                
  INTERCHANGE_FORMAT       = BINARY                                           
  DESCRIPTION              = "The SHBDR Names Table                           
  contains names for the solution parameters (including                       
  gravity field coefficients) which will follow in                            
  SHBDR_COEFFICIENTS_TABLE.  The order of the names                           
  in SHBDR_NAMES_TABLE corresponds identically to the                         
  order of the parameters in SHBDR_COEFFICIENTS_TABLE.                        
  Each coefficient  name is of the form  Cij  or  Sij                         
  where  i  is the degree of the coefficient and  j  is                       
  the order of the coefficient.  Both indices are three-                      
  digit zero-filled right-justified ASCII character strings                   
  (for example,  C010005  for the 10th degree 5th order C                     
  coefficient, or  S002001  for the 2nd degree 1st order                      
  S  coefficient).  The eighth byte in the table is an                        
  ASCII blank used to ensure that the row length                              
  is equal to RECORD_BYTES.  Names of other solution                          
  parameters are limited to 8 ASCII characters; if less                       
  than 8, they will be left-justified and padded with                         
  ASCII blanks.  The Names Table itself will be padded                        
  with ASCII blanks, if necessary, so that its length is                      
  an integral multiple of RECORD_BYTES."                                      
                                                                              
  OBJECT                   = COLUMN                                           
    NAME                         = "PARAMETER NAME"                           
    DATA_TYPE                    = CHARACTER                                  
    START_BYTE                   = 1                                          
    BYTES                        = 8                                          
    UNIT                         = "N/A"                                      
    DESCRIPTION                  = "The name of the                           
    coefficient or other solution parameter, left-                            
    justified and padded with ASCII blanks (if needed)                        
    to 8 characters."                                                         
  END_OBJECT               = COLUMN                                           
                                                                              
END_OBJECT           = SHBDR_NAMES_TABLE                                      
                                                                              
OBJECT               = SHBDR_COEFFICIENTS_TABLE                               
  ROWS                     = 2602                                             
  COLUMNS                  = 1                                                
  ROW_BYTES                = 8                                                
  INTERCHANGE_FORMAT       = BINARY                                           
  DESCRIPTION              = "The SHBDR Coefficients Table                    
  contains the coefficients and other solution parameters                     
  for the spherical harmonic model.  The order of the                         
  coefficients in this table corresponds exactly to the                       
  order of the coefficient and parameter names in                             
  SHBDR_NAMES_TABLE.  The SHBDR Coefficients Table will be                    
  padded with double precision DATA_TYPE zeroes so that                       
  its total length is an integral multiple of RECORD_BYTES."                  
                                                                              
  OBJECT                   = COLUMN                                           
    NAME                         = "COEFFICIENT VALUE"                        
    DATA_TYPE                    = PC_REAL                                    
    START_BYTE                   = 1                                          
    BYTES                        = 8                                          
    UNIT                         = "N/A"                                      
    DESCRIPTION                  = "A coefficient Cij or                      
    Sij or other solution parameter as specified in the                       
    SHBDR Names Table."                                                       
  END_OBJECT               = COLUMN                                           
                                                                              
END_OBJECT           = SHBDR_COEFFICIENTS_TABLE                               
                                                                              
OBJECT               = SHBDR_COVARIANCE_TABLE                                 
  ROWS                     = 3386503                                          
  COLUMNS                  = 1                                                
  ROW_BYTES                = 8                                                
  INTERCHANGE_FORMAT       = BINARY                                           
  DESCRIPTION              = "The SHBDR Covariance Table                      
  contains the covariances for the spherical harmonic model                   
  coefficients and other solution parameters.  The order of                   
  the covariances in this table is defined as rowwise                         
  vector storage of the upper triangular matrix formed by                     
  the product of the SHBDR Names Table with its transpose.                    
  For example, if the Names Table has four entries  A, B,                     
  C, and D,  then the covariances are given by the row                        
  vectors in the upper triangular matrix of                                   
                                                                              
           | A | [ A B C D ] = | AA AB AC AD |                                
           | B |               | BA BB BC BD |                                
           | C |               | CA CB CC CD |                                
           | D |               | DA DB DC DD |                                
                                                                              
  That is, the covariance table will list (in this order)                     
  AA, AB, AC, AD, BB, BC, BD, CC, CD, and DD.                                 
  The SHBDR Covariance Table will be padded with double                       
  precision DATA_TYPE zeroes so that its total length is                      
  an integral multiple of RECORD_BYTES."                                      
                                                                              
  OBJECT                   = COLUMN                                           
    NAME                         = "COVARIANCE VALUE"                         
    DATA_TYPE                    = PC_REAL                                    
    START_BYTE                   = 1                                          
    BYTES                        = 8                                          
    UNIT                         = "N/A"                                      
    DESCRIPTION                  = "The covariance value                      
    for the coefficients and other solution parameters                        
    specified by the product of SHBDR_NAMES_TABLE with                        
    its transpose, after omitting redundant terms."                           
  END_OBJECT               = COLUMN                                           
                                                                              
END_OBJECT           = SHBDR_COVARIANCE_TABLE                                 
                                                                              
END                                                                           
                                                                              
                                                                              
Appendix C.2 Example SHBDR Data Object Output                                 
                                                                              
The following lists the first few lines from an example SHBDR file, the       
gggrx_0660pm_shb_l50.dat gravity field solution covariance.                   
                                                                              
                                                                              
We describe below the extracts from a FORTRAN program to read the above       
gggrx_0660pm_shb_l50.dat covariance file, the error covariance of the         
gravity solution GRGM660PRIM.                                                 
                                                                              
The SHB file is opened with the following FORTRAN open statement. The key is  
that the SHB file is a direct access binary file with a record length (in     
this example) of 512 bytes.                                                   
                                                                              
i.e.                                                                          
open (10, file='gggrx_0660pm_shb_l50.dat', status ='old', access='DIRECT',    
RECL=512)                                                                     
                                                                              
The first record reads the general solution information, where the variables  
have been carefully predefined at the top of the program.                     
                                                                              
...................................                                           
real*8 ae, gm, gmsig, reflon, reflat                                          
integer*4 lmax,mmax,inorm, nvar                                               
read(10,rec=1) ae, gm, gmsig, lmax, mmax, inorm, nvar, reflon, reflat         
...................................                                           
On output these records are:                                                  
ae = 1738.0                                                                   
gm = 4902.799807 | GM in km**3/sec**2                                         
gmsig = 7.74E-06 | GM sigma in km**3/sec**2                                   
lmax = 50                                                                     
mmax = 50                                                                     
inorm = 1                                                                     
nvar = 2602 | total number of parameters in the solution.                     
reflon = 0.0E+0                                                               
reflat = 0.0E+0                                                               
                                                                              
The next step is to read the coefficient name table and compute the number    
of lines in the coefficient name table. In this example file there are        
64 8 byte characters per record of 512 bytes.                                 
.....................                                                         
nline = (nvar/64) + 1                                                         
.....................                                                         
c integer multiplication on the following line is intentional                 
c we need to know number of variables on the last line                        
..........................                                                    
jend = nvar - (nvar/64)*64                                                    
..........................                                                    
                                                                              
Record 2, or the first record of the names table contains the following:      
GM      K002000 K002001 K002002 K003000 C002000 C002001 S002001               
C002002 S002002 C003000 C003001 S003001 C003002 S003002 C003003               
S003003 C004000 C004001 S004001 C004002 S004002 C004003 S004003               
C004004 S004004 C005000 C005001 S005001 C005002 S005002 C005003               
S005003 C005004 S005004 C005005 S005005 C006000 C006001 S006001               
C006002 S006002 C006003 S006003 C006004 S006004 C006005 S006005               
C006006 S006006 C007000 C007001 S007001 C007002 S007002 C007003               
S007003 C007004 S007004 C007005 S007005 C007006 S007006 C007007               
                                                                              
                                                                              
Record 42 contains the last few coefficient names of the solution:            
C050030 S050030 C050031 S050031 C050032 S050032 C050033 S050033               
C050034 S050034 C050035 S050035 C050036 S050036 C050037 S050037               
C050038 S050038 C050039 S050039 C050040 S050040 C050041 S050041               
C050042 S050042 C050043 S050043 C050044 S050044 C050045 S050045               
C050046 S050046 C050047 S050047 C050048 S050048 C050049 S050049               
C050050 S050050                                                               
                                                                              
                                                                              
The Coefficients table begins at Record 43:                                   
                                                                              
The first eight variables of that record are:                                 
                                                                              
   4.90280E+03   2.41948E-02   2.38352E-02   2.49544E-02   7.34222E-03        
-9.08828E-05   1.19428E-10   9.47060E-10                                      
                                                                              
                                                                              
The first coefficient value is for GM.                                        
                                                                              
The Coefficients table ends at Record 83 with 42 valid records and the        
remainder zero filled:                                                        
  -1.07382E-07   5.81702E-08  -2.50231E-07  -1.53542E-07   1.11406E-07        
1.78570E-08  -9.91932E-08   6.97906E-08                                       
  -6.72927E-08  -6.43053E-08   5.34257E-09   9.84231E-08  -1.49303E-07        
4.46417E-08   2.29334E-07   7.48138E-08                                       
   1.63668E-07   1.93044E-07  -1.20901E-09   6.59939E-08   1.98945E-07        
1.22273E-07   5.10204E-08   1.89710E-08                                       
  -4.17405E-08   6.61186E-08   2.04331E-07   2.61453E-07   1.96770E-07        
1.85188E-07  -2.70291E-07   3.54506E-09                                       
  -3.07759E-07   1.00677E-08  -5.41954E-09   5.20505E-08   1.19688E-07        
3.69751E-07  -2.46317E-08   1.62949E-07                                       
   2.85172E-07   5.79127E-08                                                  
                                                                              
                                                                              
..........                                                                    
                                                                              
The last valid record is the value of S(50,50) for this solution, as per      
the order specified in the names record.                                      
