unilib.pro - IDL initialisation routine¶
Description¶
unilib.pro
includes the IDL structure definitions for the UNILIB library.
ux***__define
procedures create IDL structures that are compatible with passing to theCALL_EXTERNAL
procedure and to the UNILIB dynamic library.
uzxyz__define - zxyz - cartesian vector components.
uzgeo__define - zgeo - geographic location
uzvec__define - zvec - spherical components of a vector
uzlbl__define - zlbl - magnetic drift shell labels
uzpnt__define - zpnt - location on a magnetic field line
uzseg__define - zseg - element of a magnetic field line segment
uzind__define - zind - pointers into an array of zseg
uzfln__define - zfln - magnetic field line segment
uzsun__define - zsun - Sun’s location
uzdat__define - zdat - date and time
uzatm__define - zatm - atmospheric model configuration parameters
pro unilib¶
pro unilib, kunit=kunit, kinit=kinit, version=version, solib=solib
The IDL
unilib
procedure attempts to locate the UNILIB dynamic library and then initialises the library by calling ut990 with thekunit
andkinit
values passed to the call.To specify the location of the
libunilib.so
dynamic library, the preferred option is to set theUNILIB
environment variable to point at the dynamic library, otherwiseunilib
searches for it in the../lib/
directory relative to where the IDL session is running.
The
UNILIB
version is returned as an integer in theversion
keyword.The path to the found dynamic library is returned via the
solib
keyword.
Example Usage¶
bash-4.2$ export UNILIB='./libunilib.so'
bash-4.2$ idl
IDL 8.7.2 (linux x86_64 m64).
(c) 2019, Harris Geospatial Solutions, Inc.
Licensed for use by: -----
License: ----
IDL> .compile examples/unilib.pro
% Compiled module: UZXYZ__DEFINE.
% Compiled module: UZGEO__DEFINE.
% Compiled module: UZVEC__DEFINE.
% Compiled module: UZLBL__DEFINE.
% Compiled module: UZPNT__DEFINE.
% Compiled module: UZSEG__DEFINE.
% Compiled module: UZIND__DEFINE.
% Compiled module: UZFLN__DEFINE.
% Compiled module: UZIMF__DEFINE.
% Compiled module: UZSUN__DEFINE.
% Compiled module: UZEMF__DEFINE.
% Compiled module: UZDAT__DEFINE.
% Compiled module: UZATM__DEFINE.
% Compiled module: UNILIB.
IDL>
IDL>
IDL> unilib,kunit=6, kinit=1, version=version, solib=solib
% UNILIB: File ./libunilib.so linked
SPENVIS
UNILIB Library
Version v3.00
Generated by SPENVIS team
--- Main control parameters ---
UC160 (general constants):
Geoid major axis = 6378.16 km
Geoid minor axis = 6356.77 km
Mean Earth radius (Re) = 6371.20 km
Ecliptic inclination = 23.441512 deg
McIlwain Earth dipole = 0.311653 G/Re^3
UC190 (field line tracing):
Maximum step size = 477.8 km at one Re
Maximum "last" step size = 15.0 km
Minimum step size = 2.0 km
Altitude precision = 200. m
Magnetic field precision = 0.0006 %
UC192 (magnetic field evaluation):
Max. geomagnetic latitude = 85.0 deg
Minimum radius = 0.157 Re
(drift shell tracing):
Precision on L = 0.10000 %
Precision on the longitude = 0.05 deg
% UNILIB: Unilib initialised
IDL>
IDL> print,version
0
IDL> print,solib
./libunilib.so
IDL>
IDL> zgeo = {uzgeo}
IDL> help,zgeo
** Structure UZGEO, 3 tags, length=24, data length=24:
RADIUS DOUBLE 0.0000000
COLAT DOUBLE 0.0000000
ELONG DOUBLE 0.0000000
IDL>
See Also¶
The following examples also have equivalent IDL programs.
UNILIB/tags/v3.02