IDL Geopack DLM

The IDL Geopack DLM is a Dynamic Link Module (DLM) for the Interactive Data Language (IDL) by NV5 Geospatial Solutions. The purpose of this library is to provide easy access to the GEOPACK Fortran library by N. A. Tsyganenko and related routines. I do not claim any rights to those routines. My only intellectual assets are in the interface itself. The interface allows calling of the Geopack functions, which are commonly used in space physics, from the IDL command line without any knowledge of Fortran or C. All commands behave like native IDL procedures. The DLM runs on Windows (32 & 64 bit), Linux (64 bit), and Intel MAC OS X (64 bit).

Acknowledgements: I thank Kolya Tsyganenko for his Geopack and external magnetic field model routines. Support for improvement and maintenance of this utility was provided in part by the THEMIS and Van Allen Probes missions; NASA research grant NNX15AF53G; by the National Science Foundation (NSF) under research grants ATM-0539024, ATM-0739864, ATM-0951420. Since 2015, maintenance has occurred exclusively during my almost nonexistent spare time. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of NASA and/or NSF.

License: The IDL Geopack DLM is BEERWARE. If you use it, like it, adore it, or even worship it, buy me a beer. 🙂

NEW (10/01/2022): IDL GEOPACK DLM v10.9 released. This version adds the TA16 model.

Download IDL Geopack DLM v10.9

Version History:
v1.0: Initial release.
v2.0: Implemented Geopack 2005 library.
v2.1: License check removed.
v2.2: T04S model implemented.
v2.3: Removed obsolete Fortran exports in DLL (Windows only).
v2.4: Fortran code recompiled with IVF 9.0 (so far Windows only).
v2.5: Minor fixes.
v2.6: Added routine GEOPACK_HELP and HELP keyword to all routines.
v2.7: Vectorized GEOPACK_TRACE.
v3.0: Project moved to VS2005 and IVF 9.1.
v3.1: Fixed compile warnings.
v3.2: Fixed conversion of input parameters when DEGREE keyword is set.
v3.3: Fixed serious bugs with interface to T96 and T04S models. Created post v4.1.
v4.0: Project moved to IDL 6.3.
v4.1: Fixed serious bugs with interface to T96 and T04S models.
v4.2: Updated help messages and documentation.
v4.3: Recompiled with IVF 9.1 release version and linked against idl.lib from IDL 6.3 release version to ensure compatibility.
v4.4: Geopack May 2006 updates and T01 & TS04 June 2006 updates incorporated. Warning issued when using storm-time T01 model since it is no longer maintained.
v4.5: Changed processing of HELP keyword to show info without invoking GEOPACK_RECALC first.
v4.6: Output array dimensions now identical with input array dimensions.
v4.7: Added NOBOUNDARY keyword to GEOPACK_TRACE for overriding the boundary limits built into the original routine.
v4.8: Added DATE keyword to GEOPACK_RECALC.
v4.9: Increased the maximum number of trace steps in GEOPACK_TRACE from 1000 (Geopack default) to 10000.
v5.0: Minor internal changes to definition of field line elements arrays in GEOPACK_TRACE.
v5.1: Added GEOPACK_GETW for calculation of W parameters used in T04S model.
v5.2: Combined GEOPACK_T01N and GEOPACK_T01S in GEOPACK_T01; the storm-time version of T01 is now invoked using the STORM keyword (remember, the T01_S is now obsolete). Added QUIET keyword to GEOPACK_T01 and GEOPACK_TRACE to suppress “T01_S obsolete” warning. Renamed GEOPACK_T04S to GEOPACK_TS04. Added GEOPACK_GETG routine to calculate G parameters used in T01 and T01_S models.
v5.3: Minor fixes to eliminate compiler warnings under Linux.
v5.4: FLINE keyword in GEOPACK_TRACE returns actual field line points only and is no longer zero-padded.
v5.6: Fixed bug in leap year logic.
v5.7: Output values are returned as scalars if input values are scalars.
v5.8: Removed references to YEAR keyword in routines GEOPACK_DIP and GEOPACK_TRACE from help text and documentation.
v5.9: Added keywords IOPGEN, IOPT, IOPB, and IOPR to routines GEOPACK_TS04 and GEOPACK_TRACE to improve control of TS04 model.
v6.0: Added range check for keywords IOPGEN, IOPT, IOPB, and IOPR.
v6.1: Minor changes to allow compilation on SunOS and Mac OS X (Intel).
v6.2: Fixed bug in GEO to GSE coordinate transformation.
v6.3: Added trace routine with refined foot point location by Vassilis Angelopoulos. Access to routines is provided with keyword REFINE to GEOPACK_TRACE. Tracing to ionosphere or equatorial plane is controlled with keywords IONOSPHERE and EQUATOR, respectively. Other minor fixes and improvements.
v6.4: Added EPOCH keyword to applicable routines to allow internal execution of RECALC during vectorized processing. Added GEOPACK_EPOCH for converting between UTC and EPOCH time formats.
v6.5: Minor bug fixes in GEOPACK_EPOCH.
v6.6: Bug fixes related to EPOCH keyword. Added foot point to field line array in GEOPACK_TRACE.
v6.7: Bug fix for tracing to the equatorial plane with GEOPACK_TRACE /REFINE.
v6.8: Fixed bug in GEOPACK_TRACE /REFINE that resulted in an endless loop if equatorial trace was started at the Earth’s surface. Updated help information for external field routines. Added DOY keyword to GEOPACK_EPOCH.
v6.9: Fixed bug in GEOPACK_EPOCH to clean up internal variables when using /BREAKDOWN_EPOCH keyword.
v7.0: Routines using the TILT keyword irreversibly modified the Geopack common block variables PS, SPS, and CPS, requiring GEOPACK_RECALC to be recalled. This has been fixed so that the modifications are temporary and the variables are reset after the routine calls.
v7.1: Increased precision of PI.
v7.2: Updated DGRF/IGRF coefficients for 2005 and added DGRF/IGRF coefficients for 2010.
v7.3: Fixed temporary variable clean-up problem in GEOPACK_EPOCH.
v7.4: Fixed segmentation fault in GEOPACK_RECALC in some Linux OS.
v7.5: Changed disclaimer to refer to “Rules of the Road” in this document.
v7.6: Added GEOPACK_T96_MGNP routine.
v7.7: Fixed rare variable cleanup warning in GEOPACK_EPOCH routine.
v7.8: Fixed rare variable cleanup warning in GEOPACK_EPOCH routine; bug in v7.7.
v7.9: Fixed rare variable cleanup warning in GEOPACK_EPOCH routine; was still buggy in v7.8. Problem does not affect computed values but may cause memory leaks.
v8.0: Increased the maximum allowed array elements from 10,000 to 100,000.
v8.1: Fixed bug when reinitializing model using EPOCH keyword.
v9.0: Major update to include Geopack 2008 version. In addition to providing parallel routines of previously existing routines, new routines exposed through the DLM interface are GEOPACK_SHUETAL_MGNP(_08) and GEOPACK_GEODGEO_08.
v9.1, v9.2: Fixed bug when reinitializing model using EPOCH keyword.
v9.3: Fixed bug in refine trace routine. The bug was introduced in v9.0, earlier versions of the DLM were not affected.
v9.4: Added IGRF 12 (2015) coefficients and extended extrapolation to 2020.
v10.0: Added TS07, TA15B, and TA15N magnetic field models.
v10.1: Added TS07 model to trace routines.
v10.2: Limit default trace distance of TS07 model to X > -30 RE.
v10.3: Bug fixes in TS07 logic.
v10.4: Added TA15 models to GEOPACK_TRACE(_08).
v10.5: Fixed crash in GEOPACK_TRACE(_08) when tracing more than 10000 locations simultaneously.
v10.6: Added IGRF-13 coefficients through 2020 and extrapolation through 2025.
v10.7: Fixed NaNs in GEOPACK_GETB and GEOPACK_GETN.
v10.8: Added TA16 model routines GEOPACK_TA16 AND GEOPACK_TA16_SETPATH, added TA16 model to GEOPACK_TRACE(_08).
v10.9: Added routine GEOPACK_GETSYMHC to compute SymHc averages for TA16 model.

For comments and suggestions, contact us here.