;+ ; NAME: ; TimeReadMe ; PURPOSE: ; Help file for time variables in SMEI IDL software ; CATEGORY: ; gen/idl/toolbox/time ; SEE ALSO: ; defsysv_smei, TimePieces ; PROCEDURE: ; Three system variables are defined at startup (in defsysv_smei.pro) ; to control the handling of time variables: ; ; IDL> help, /structure, !timeunits ; ** Structure TIMEUNITS, 2 tags, length=8, data length=8: ; IN_DAY LONG 86400000 ; TINY LONG 86400000 ; IDL> help, /structure, !thetime ; ** Structure THETIME, 2 tags, length=8, data length=8: ; DAYS LONG 0 ; UNITS LONG 0 ; IDL> help, /structure, !timezero ; ** Structure THETIME, 2 tags, length=8, data length=8: ; DAYS LONG 0 ; UNITS LONG 0 ; ; !TimeUnits has two integer fields: ; ; !TimeUnits.in_days defines the unit used to keep track of the time of day ; in !TheTime.units. It is the number of these time units in one whole day. ; Currently this unit is milli-second, i.e. !TimeUnits.in_day = 86,400,000 ; Other allowed values are 24 (time-of-day units are hours), 1440 (units are ; minutes) or 86400 (units are seconds). ; ; !TimeUnits.tiny defines the smallest allowed time units allowed for the ; time of day. Currently this also is milli-second, i.e. ; !TimeUnits.tiny=!TimeUnits.in_day. ; ; !TimeUnits.tiny is used primarily in rounding operations ; (see the /roundt keyword on TimeGet). ; ; All time variables are defined as arrays of !TheTime structures. ; ; !TheTime has two long integer fields that together define the time elapsed since ; some reference time (time origin). ; ; !TheTime.days keeps track of integer days. ; !TheTime.units keeps track of the time of day in units defined by !TimeUnits.in_day. ; ; i.e. the time (in days) elapsed since the reference time is ; !TheTime.days+!TheTime.units/!TimeUnits.in_day. ; ; By default the reference time is set in !TimeZero. ; !TimeZero itself is a !TheTime structure, and defines the time elapsed since ; the 'absolute time origin' 2000, Jan 1, 0 UT. The default for !TimeZero is {0,0} ; i.e. the current origin is set by default to the absolute origin. ; ; TimeOrigin: ; ; The function TimeOrigin is used to manipulate !TimeZero, and the setting ; of !TimeUnits.in_day (!TimeUnits.tiny is never changed). ; ; TimeShift: ; ; A change of origin usually means that time variables need to be modified to ; reflect the new origin. This is done with TimeShift. ; ; TimeSet: ; ; Most common real-life times can be converted to a !TheTime structure using ; TimeSet. Examples are yr,mon,day triplets, yr,doy pair, (Modified) Julian Days, ; Julian epochs, various string formats, etc. ; ; TimeGet: ; ; This function is used to extract real-life data from a !TheTime structure. ; Examples are year, day of year, day of week, day of month, Julian day, etc. ; It also provides additional services, such as rounding of times. ; ; Usage: ; ; In principle, every routine that takes a time structure as input, ; should assume that the time specifies time elapsed since the origin ; !TimeZero. ; MODIFICATION HISTORY: ; FEB-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- ; No code in this file