>  Docs Center  >  Libraries  >  Mankoff  >  LOAD_CGM
Libraries

LOAD_CGM

LOAD_CGM

Name


  LOAD_CGM

Purpose


  This procedure loads the Correctd Geomagnetic Grid (CGM) for all
  latitude and longitudes for a given year. The grid can be binned
  on geomagnetic or geographic. Also returned are LSHELL and Bz.

Category


  SNOE, mapping, coordinates, magnetic

Calling Sequence


  LOAD_CGM, Data

Inputs


  None

Optional Inputs


  None

Keyword Parameters


  YEAR: Set this to the year of the CGM model to use
        [ VALID: 1998 through 2002 ]
        [ DEFAULT: 1999 ]
  GRID: Set this to the grid that the data should be binned on
        [ VALID: 'geo' or 'mag' ]
        [ DEFAULT: 'geo' ]
  B_ONLY: Set this keyword to only return the magnetic field strength
  SNOE_COORDS: Set this keyword to return the data on the SNOE
    coordinate system (-180 to 180 longitude, rather than 0 to 360)

Outputs


  Data: This procedure returns an array of geographic latitude,
    longitude, geomagnetic latitude, longitude, Bz (magnetic field
    strength), and Lshell, gridded on the requested coordinate
    systems.
    The data array returned is a FLTARR( 361, 181, 6 ).
    The 3rd dimension is [ gLat, gLon, mLat, mLon, Lshell, Bz ]
    Each of these is FLTARR( 361 lon, 181 ), or (Lat,Lon).
    The longitudes run from 0 to 360 or -180 to 180 if /SNOE_COORDS set
    **The latitudes run from -90 to 90. Up-side down.**
    Lat having 360 and Lon having 180 is counter-intuitive, but
    think of it this way: The latitude ring on the globe at the
    equator has 360 possible longitude values. A longitude column
    on a globe has only 180 possible values. See the EXAMPLES
    section, maybe it will help.

Restrictions


  Requires the CGM datasets (in !snoe.p.base+'other/CGM/')

Procedure


  * See code.
  * http://nssdc.gsfc.nasa.gov/space/cgm/cgm.html
  * http://nssdc.gsfc.nasa.gov/space/model/models/igrf.html
    This websites have interactive ways to test and verify the data.

Example


  LOAD_CGM, data
  LOAD_CGM, data, year=1999, grid='mag', /SNOE
  To print the geographic coordinates of the geomagnetic north pole:
  LOAD_CGM, data, grid='mag'
  print, data[ 180, 90+90, 0:3 ] ;;; = [glat,glon,mlat,mlon] @ [90,0] magn
  To print the geographic coordinates of the geomagnetic south pole:
  LOAD_CGM, data, grid='mag'
  print, data[ 180, 90-90, 0:1 ] ;;; = [glat,glon,mlat,mlon] @ [-90,0] magn
  To print the magnetic coordinates of Boulder (40N, 105W):
  LOAD_CGM, data, grid='geo'
  print, data[ 105, 90+40, [2,3] ]

Modification History


  Written by: Ted Fisher, 2000.
  2002-07-23; KDM; Added documentation
  2002-07-25; KDM; Switched path to !SNOE.p.base
  2002-09-18; KDM; Switched to /SWAP_IF_LITTLE_ENDIAN so its portable



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us