A A C G M

Altitude Adjusted Corrected Geomagnetic Coordinates

The 1995 version of the AACGM coordinate system is now available. The AACGM coordinate system is a synthesis of the Corrected Geomagnetic Coordinate System (CGM) and the PACE geomagnetic coordinate system (PGM).

The original AACGM coordinate system used the IGRF 1990 magnetic field model to generate the coordinate system. The new version uses the IGRF 1995 field model to generate the coordinate system. The old version can still be used with the new software, by calling an initialization routine. The old version is also available from Phillips Laboratory as a stand-alone program (SFCNEW90.FOR).

A technical report describing the new AACGM software is available from Phillips Laboratory. Contact Dr. Fred Rich

(rich@plh.af.mil)
and ask for the technical report "An Improved Algorithm for Computing Altitude Adjusted Corrected Geomagnetic Coordinates", report # PL-TR-94-2310. You can also download the technical report from the Phillips Laboratory ftp server. You will need to get the postscript file TR2310.PS as well as the files FIGURE*.GIF.

A detailed discussion of the classical Corrected Geomagnetic Coordinate system for 1990 will be found in the paper "A revised corrected geomagnetic coordinate system for Epochs 1985 and 1990" by G. Gustafsson, N.E. Papitashvili, and V.O. Papitashvili,J. Atmos. Terr. Phys., vol. 54, pp. 1609-1631, 1992.

NOTE: There are some subtle problems in defining magnetic coordinates near the magnetic equator. These problems are well discussed in the paper by Gustafsson, et al. The numerical technique employed by the AACGM software smooths over these difficulties but may not be appropriate for high accuracy use near the magnetic equator.

A program for calculating classical CGM coordinates is available from the National Space Science Data Center. Contact Natasha Papitashvili at "natasha@nssdca.gsfc.nasa.gov" or visit the NSSDC homepage for CGM coordinates at http://nssdc.gsfc.nasa.gov/space/cgm/cgm.html

The original PACE geomagnetic coordinate system is described in a paper published in J. Geophys. Res., Vol 94, pp 9139-9143, July, 1989, "A new magnetic coordinate system for conjugate studies at high latitudes" by K.B. Baker and S. Wing.

You can use ftp to download the files. To see how to use the software you can look at the AACGM User's Guide


AACGM Geomagnetic Coordinates: How the system works

Both the Corrected Geomagnetic Coordinate System (CGM) and the AACGM system assume that geophysical data are often best organized in terms of the true geomagnetic field. The fundamental difference between the Corrected Geomagnetic Coordinate system (CGM) and the AACGM system is that the AACGM system assumes that magnetic data are best organized along the magnetic field lines. Therefore, AACGM gives the same magnetic coordinates to any position which lies on the same geomagnetic field line. It is therefore conceptually closely related to Invariant magnetic coordinates. Thus, a point in space is defined by the geomagnetic field line it is on (given by the latitude and longitude), and its altitude.

To determine the AACGM coordinates of any point, start at that point and use the IGRF magnetic field model to trace the field line to the geomagnetic equator. Then, use the pure magnetic dipole model to trace the magnetic field line back to the surface of the earth. At that point, measure the angle between the line joining the point on the earth with the center of the earth, and the axis which defines the magnetic dipole. This angle gives you the co-latitude of the point in the magnetic coordinates. Since the tracing algorithm always brings you back to the surface of the earth (and not the original altitude), all points along a magnetic field line will have the same magnetic latitude and longitude. In the CGM system the initial point is traced back to the original height and the angles are measured at that point. Thus, points along a magnetic field line (which will in general be at different heights) will have different angles with respect to the dipole axis and will hence have different magnetic latitudes.

For any point on the surface of the earth, the AACGM coordinates are identical to the CGM coordinates. Any two points connected by a magnetic field line will have the same magnetic latitude and longitude in the AACGM coordinate system. This is NOT true of the CGM system. However, because dipole field lines obey the equation

               sin**2(A)/r = const
where A is the co-latitude, there is a simple relationship between AACGM latitudes and CGM latitudes.

AACGM Geomagnetic Coordinates Software

The AACGM software is distributed as a tar file, "AACGM.tar". The contents of this tar file are:
aacgm_coeffs1990.asc
The complete set of coefficients defining the 1990 epoch model
aacgm_coeffs1995.asc
The complete set of coefficients defining the 1995 epoch model
aacgm_init.f
Used to initialize the conversion model.
altitude_to_cgm.f
Adjustment routine for converting from non-zero altitude to the reference height.
cgm_to_altitude.f
Adjustment routine to convert from the reference height to a non-zero altitude
cnvcoord.f
This routine provides backwards compatibilitywith the older PACE magnetic coordinates (PGM) software.
coordcnv.f
A driver program to allow a user to enter a set of coordinates from the keyboard and have the results displayed on the console screen.
coordcnv90.f
The same as coordcnv.f, but uses the 1990 model instead of the most current model
eqn_of_time.f
Calculates the equation of time. Used by the magnetic local time routines.
mlt.f
Calculates the Magnetic Local Time for a given postion at a given UT time.
mlt1.f
Used by mlt.f
rylm.f
Calculates the spherical harmonics needed for the coordinate conversions.
sfc_convert_geo_coord.f
This is the main subroutine of the coordinate conversion software. It converts either from geographic to AACGM or vice versa
sfctest.f
This is a driver routine that will create a large table of conversions from geographic to AACGM.
sfctest90.f
The same as sfctest except uses the 1990 model insttead of the most recent model
solar_loc.f
Calculates the magnetic coordinates of the subsolar point. This is used by the MLT routines.
NOTE: The actual names to be used in subroutine and function calls may include dollar signs ($). These dollar signs cause some problems with some unix software when used as the name of a file, however, so the filenames have been changed in some cases to eliminate the dollar signs.

aacgm_init

This subroutine is used to initialize the coordinate conversion model. The default model is the most recent one (currently 1995). At this point the only other model is the 1990 model. The complete set of coefficients for both models are available in ascii text files. This routine reads the appropriate file and places the data in the common block used by the routine SFC$$convert_geo_coord to perform the conversions.

COORDCNV

This is a program which allows you to type in a geographic or geomagnetic location and converts the location to geomagnetic or geographic. It also demonstrates the proper use of the subroutines which do the conversion. These subroutines are described below.

AACGM subroutines

Conversion to the AACGM from geographic or to geographic from AACGM is accomplished by a subroutine named SFC$$convert_geo_coord. This subroutine calls several other subroutines. For users of the older PACE coordinate system, a wrapper routine called "cnv$coord" is also available. The wrapper will make the correct call to the SFC$$convert_geo_coord routine.

The original PACE system used a data file to store the coefficients that defined the coordinate transformation. In the new version, all the coefficients are in a BLOCKDATA routine in the source file "sfc_convert_geo_coord" and no data file is required. The coordinate system defined by the BLOCKDATA routine is based on the IGRF 1995 magnetic field model. These coefficients can be replaced with the older 1990 model coefficients by reading a data file with those coefficients into the Common block containing the coefficients used by SFC$$convert_geo_coord. A routine to do this has also been provided (aacgm_init), as have ascii data files containing the coordinates for both 1990 and 1995.

NOTE: Geographic coordinates as used here actually refer to geocentric coordinates NOT geodetic coordinates.

A help file is also available which defines the calling sequence and returned values for the subroutine. This file, CNV$COORD.HLP can be placed in a VAX VMS help library if you wish to have this information available on-line.

NOTE: Some of the fortran code uses VAX/VMS extensions to the Fortran 77 standard. Most Fortran compilers provide a switch to allow the use of these extensions to the language. In addition, some of the lines extend beyond the 72 character limit of standard fortran, and again most compilers provide a switch that allows long lines. Users will have to determine the appropriate switches and add them to the makefile.

The routines you will need are: CNVCOORD, SFC_CONVERT_GEO_COORD, RYLM and CGM_TO_ALTITUDE, ALTITUDE_TO_CGM, SFC_PUT_USER_MSG, and AACGM_INIT. There is also a MAKEFILE for UNIX systems. The entire suite of routines, including the magnetic local time routines, the makefile, and the necessary data files have been placed in the tar file, "AACGM.tar". Also included in the tar file are some routines that provide an interface to the IDL programming language. These interface routines use the IDL "call_external" mechanism.

MAGNETIC LOCAL TIME

The primary routine needed to determine magnetic local time is the real*4 function MLT. This actually consists of several subroutines and functions. A help file, MLT.HLP is provided which gives the calling sequence for MLT.

Note that the time you give the MLT function is given as a year and a number of seconds in the year. You can either compute the number of seconds (an integer*4 number) yourself or you can use the routine CNV_MDHMS_SEC. This routine converts the Month,Day,Hour, Minute and Second to Seconds in the year. Its inverse is CNV$SEC_MDHMS.

Also note that for a fixed point on the earth and a fixed UT, the value of MLT will vary during the course of a year due to the annual north-south motion of the sun and the ellipticity of the earth's orbit. The plot shown here gives the Magnetic Local Time for 0000 UT at 00 magnetic longitude. Note that the MLT varies by nearly one hour over the course of a year.


Help Files

The best way to find out how to use these subroutines is to look at the driver routine "sfctest.f". If you need to be compatible with the older PACE software look at the driver routines "coordcnv.f" and "coordcnv90.f".

There are several help files included in the directory. These help files can be typed out to give you the information about calling sequences, error conditions, etc. You can also insert these files into a VAX/VMS help library if you wish to have this information available on-line (I find it quite useful). The help files are:

CNV$COORD.HLP, MLT.HLP, CNV$MDHMS_SEC.HLP, CNV$SEC_MDHMS.HLP


If you have any questions or problems with these routines, please contact

(kile_baker@jhuapl.edu )


You can view plots of the contours of constant magnetic latitude by clicking on the appropriate description: You can use ftp to access the files by clicking here

Last modified on March 19, 1996


Back to the SuperDARN homepage.