CDF_TT2000 ---------- The CDF_TT2000 procedure computes or breaks down a single or an array of CDF_TIME_TT2000 value(s) in a CDF file. When computing an epoch, any missing value is considered to be zero. If you supply a scalar or an array values for the TT2000 argument and set the BREAKDOWN_EPOCH keyword, CDF_EPOCH will break down the epoch value(s) into the Year, Month, Day, etc. and insert the values into the named variables you supply. If you specify the Year (and optionally, the Month, Day, etc.) in a scalar or array and set the COMPUTE_EPOCH keyword, CDF_EPOCH will compute the epoch and place the value(s) in the named variable supplied as the Epoch parameter. Note: You must set either the BREAKDOWN_EPOCH or COMPUTE_EPOCH keyword. Syntax CDF_TT2000, Epoch, Year, Month, Day [, Hour, Minute, Second, Milli, Micro, Nano] [, /BREAKDOWN_EPOCH] [, /COMPUTE_EPOCH] [, /TOINTEGER] Arguments Epoch A scalar or an array (<= 2D) of Epoch value(s) to be broken down, or a named variable into which the computed epoch will be placed. A TT2000 Epoch value is the number of nanoseconds since J2000 (2000-01-01T12:00:00.000000000) with leap seconds included. Note: CDF_TIME_TT2000 is based on J2000. It can only cover +/- 272 years from J2000. To convert CDF TT2000 epochs into date/times and vice versa, you should only use the CDF_TT2000 routine with either the BREAKDOWN_EPOCH or COMPUTE_EPOCH keyword. Year The year(s) (such as 1992) or a named variable. Month The month(s) (1-12) or a named variable. You can also set the Month argument equal to zero, in which case the Day argument can take on any value between 1-366; this number is interpreted as the "Day of the Year" rather than a "Day of the Month". Day The day(s) (1-31) or a named variable. If the Month argument is set equal to zero, Day can be set to any value between 1-366. Hour The hour(s) (0-23) or a named variable. Minute The minute(s) (0-59) or a named variable. Second The second(s) (0-59 or 0-60 if leap second) or a named variable. Milli The millisecond(s) (0-999) or a named variable. Micro The microsecond(s) (0-999) or a named variable. Nano The nanosecond(s) (0-999) or a named variable. Note: For the entered date/time components to compute the epoch, only the last component is allowed to be fractional. Otherwise, a message of illegal value is returned. When an epoch is broken down into date/time components, all are in double form by default. Keywords BREAKDOWN_EPOCH If this keyword is set, Epoch is a value which will broken down and the resulting Year, Month, Day, etc. are returned in the remaining parameters which must be named variables. COMPUTE_EPOCH If this keyword is set, Epoch is a named variable into which the epoch is placed and the other parameters are values which will be used to compute the epoch. TOINTEGER This keyword is applicable when an epoch value(s) is broken down to date/time components (with BREAKDOWN_EPOCH keyword). If this keyword is set, all components will be in integer, instead of their default of doubles. Examples To compute a single epoch value of September 20, 2005 at 3:05:46.27.02.156: CDF_TT2000, epoch, 2005, 9, 20, 3, 5, 46, 27, 2, 156, /COMPUTE_EPOCH To break down the given epoch value into standard date components: CDF_TT2000, epoch, yr, mo, dy, hr, min, sec, milli, micro, nano, /BREAK To compute an array of epoch values from the following three dates: 20-Sep-2005 03:05:46:156.111.222, 20-Sep-2005 03:06:22:234.333.444, 20-Sep-2005 03:07:12:345.555.666: yy = [2005, 2005, 2005] mm = [9, 9, 9] dd = [20, 20, 20] hh = [3, 3, 3] mn = [5, 6, 7] ss = [46, 22, 12] ms = [156, 234, 345] us = [111, 333, 555] ns = [222, 444, 666] CDF_TT2000, epoch2, yy, mm, dd, hh, mn, ss, ms, us, ns, /COMPUTE_EPOCH Since the year, month, day, hour fields are the same in this sample, alternatively, the above command can be written as: CDF_TT2000, epoch2, 2005, 9, 20, 3, mn, ss, ms, us, ns, /COMPUTE_EPOCH To break down the above vectorized epoch values into standard date components: CDF_TT2000, epoch2, yr, mo, dy, hr, min, sec, milli, micro, nano, /BREAK All yr, mo, dy, hr, min, sec, milli, micro, nano fields will be in array form. Version History Introduced: CDF 3.4.0 See Also CDF_ENCODE_TT2000, CDF_PARSE_TT2000