Keyword

The SOFA Service

This report first describes the current state of the SOFA service and then highlights the time scales and calendar dates group of routines. Finally, some usage statistics are presented.

The IAU’s SOFA service has the task of establishing and maintaining an accessible and authoritative set of algorithms and procedures that implement standard models used in fundamental astronomy. The service is managed by an international panel, the SOFA Board, which is an IAU Functional Working Group appointed through Division A, Fundamental Astronomy. SOFA also works closely with the International Earth Rotation and Reference Systems Service (IERS).

SOFA was set up in the 1990s by IAU Division I, the predecessor to Division A. Since the first release in 2001, which contained only Fortran routines, there have been 12 releases. Since the sixth release at the beginning of 2009, there have been both Fortran and ANSI C libraries. All Fortran routines are named iau_ABC, where the letters or numbers ABC is a short string giving some indication of the purpose of the routine and in many cases an epoch. ANSI C routines are named iauAbc. When writing about the routines, it is often just the Fortran form of the name, ignoring the iau_, that is used: ABC. If the name ends in a two-digit number, then the routine is connected to some IAU resolution in a given year; for example, NUT06A refers to the IAU 2006 resolutions. Each routine contains detailed documentation on the arguments, the units, and how the routine should be used, together with relevant references. An alternative to this expert-orientated documentation is the set of Cookbooks, for both Fortran and ANSI C users. There are at present three:

  • Tools for Earth Attitude

  • Time Scale and Calendar Tools

  • Astrometry Tools

They give an overview, which will be particularly helpful to the nonexpert and include explanations, code examples, and test results, to help users understand and check their own application code.

The 12th Release

This latest release, issued on May 3, 2012, consists of some 231 astronomy routines and 55 vector/matrix and utility routines, organized in some 11 categories, which are:

  • Calendars and Time Scales (27 routines): Conversions between Gregorian and Julian dates and epochs and routines relating the time scales UTC, TAI, UT1, TT, TDB, TCB, and TCG. Further information on these groups is given below.

  • Earth Rotation and Sidereal Time (15 routines): Routines for ERA, mean and apparent sidereal time and equation of the origins.

  • Precession/Nutation/Polar Motion (64 routines): IAU 2006/2000A theories; the matrices C, B, P, and N (in various combinations); the CIO X, Y, and s; and all the traditional angles. Long-term precession routines (±200,000 years) of Vondrak, Capitaine, and Wallace were added in this latest release.

  • Geocentric/Geodetic Transformations (5 routines): Transformations between the WGS 72 and 84, GRS80, and users’ own reference ellipsoids, plus various routines for conversion between systems.

  • Ephemerides (2 routines): Low precision position and velocity of the Earth/Sun, planets, and Earth/Moon barycenter.

  • Astrometry (36 routines): Space motion, parallax, light deflection, aberration, and the various routines required for the conversion between the various systems, viz., ICRS, BCRS, GCRS, CIRS, TIRS, and ITRS.

  • Galactic Coordinates (2 routines): Conversions between IAU 1958 and ICRS.

  • Ecliptic Coordinates (6 routines): Conversion between equatorial and ecliptic coordinates. This is a new group in the twelfth release.

  • Fundamental Arguments (14 routines): These are the 14 fundamental arguments, i.e., the mean longitude Sun, Moon, planets, elongation Sun minus Moon, etc. used in the nutation series and given by the IERS’s 2003 conventions.

  • Star Catalog Conversions (5 routines): Conversions between FK5 and Hipparcos catalog positions.

  • Vector/matrix/utility routines (55 routines):

Those routines that implement IAU Standards are designated as canonical (there are 59 in this category), which is indicated by a two-digit year in the name, e.g., ERA00 and PMN06A.

The Time Scale and Calendar Routines

SOFA has several routines for converting between the Gregorian calendar dates and Julian dates (JD). Julian dates, as opposed to Julian day numbers, include the time as a fractional part. The SOFA code always expresses Julian dates (or quasi-Julian dates when dealing with UTC and leap seconds) as two double precision numbers, the sum of which is the desired JD, including the fraction. These are handled in ways that preserve precision, important when dealing with microseconds. Other calendar routines deal with Julian and Besselian epochs.

The time scales that SOFA recognizes are listed in Table 21.1. SOFA chose the simple scheme illustrated in Fig. 21.1, not only because each of these seven time scales has a distinctive nature and use but also to give the user the maximum flexibility and control while maintaining correctness.

Table 21.1 Summary of time scales
Fig. 21.1
figure 1

Linkage between time scales. The dotted lines indicate the relationships that depend on the user providing the appropriate linking value. UT1–UTC is provided by the IERS. The functions f(LG) and f(LB) represent IAU defined linear models

It is worth noting that these routines include the transformations to and from UTC and consequently have to deal with leap seconds. A positive leap second is formatted as 23:59:60.0000 (with as many decimals as is necessary for the user application and within the limit of the computer architecture).

There are two important routines that are part of these time scale conversions: DAT and DTDB. DAT—a canonical routine—deals with the difference between UTC and TAI. It must be updated whenever a leap second is added or removed. It is automatically called whenever a conversion is made between UTC and TAI. Routine DTDB, which delivers TDB–TT, is not automatically called. Users must supply TDB–TT as an argument to the routine converting between TT and TDB and thus may either use the model provided by SOFA or one of their own choosing. Time scale support was first included in the 2010 December release.

The Use of SOFA

There are a few groups that use other implementations of SOFA. It should be stressed that under SOFA’s terms and conditions users may change any of the code, but if they do, then at least they must remove the letters “iau” from the name of the routine so that the modified form cannot be inadvertently linked to an application that is expecting the standard form. This strategy is vitally important since SOFA code, as downloaded, forms an IAU standard, and any change of code is then not part of that IAU standard.

There are three implementations listed on the SOFA website. One is a JAVA version by Paul Harrison, from the Jodrell Bank Centre for Astrophysics at the University of Manchester. There is a C# version for the World Wide Astronomy (WWA) library, implemented by Attila Abrudan. Lastly, there is the Essential Routines for Fundamental Astronomy (ERFA) implemented by the AstroPy group. This version has modified routine names in order to be compatible with the typical free/open-source software licenses that unfortunately do not recognize the concept of “read-only software.”

Currently SOFA uses the AWStats web tool to analyze usage. However, it must be borne in mind that website statistics can be misleading. It is not necessarily a record of individuals use since it is unclear whether it is an individual downloading one of the libraries or a system manager setting up the SOFA library for a group. Having said that, the use of the SOFA website has increased from an average of 769 unique visitors per month in 2008 to over 1900 in 2015. There have been over 15,000 downloads of the previous release, 11a (both Fortran and ANSI C), over 14 months. There are currently 760 registered users. All users are encouraged to register, as this allows them to be notified when there are issues and releases.

The SOFA libraries provide the astronomical community with a set of well-tested independent standard routines that support IAU resolutions. This gives users the tools for easily implementing fundamental astronomy transformations, such as Earth attitude, for use in research, in applications, and importantly in testing. We ask users to acknowledge their use of SOFA in their publications.