ALLMAG, GDALMG, LINTRA: Computer programs for geomagnetic field and field-line calculations

A set of computer programs has been developed for the calculation of the geomagnetic field and the tracing of field lines in space. The basic subroutine, geocentric ALLMAG, contains coefficients for seven recently-published field models as built-in data statements. At execution time the user can vary the model and/or the time period by simply changing input parameters. Subroutine GDALMG is adapted for input and output in geodetic coordinates. ALLMAG and GDALMG are equivalent to Cain's FIELD and FIELDG, with the added flexibility of the choice of seven models. LINTRA traces field lines from any point in space to a specified altitude intersect in the same or opposite hemisphere, using any of the models contained in ALLMAG. Input is in either geocentric or geodetic coordinates, and output is returned in both. McIlwain's INVAR package, which calculates B and L, has been adapted to use ALLMAG. All programs are described in detail, and sample calculations are given.