CDF_TT2000 ========== The CDF_TT2000 procedure computes or breaks down CDF_TIME_TT2000 values in a CDF file. When computing an epoch, any missing value is considered to be zero. If you supply a value for the Epoch argument and set the BREAKDOWN_EPOCH keyword, CDF_TT2000 will compute the values of 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.) and set the COMPUTE_EPOCH keyword, CDF_TT2000 will compute the epoch and place the value in the named variable supplied as the Epoch parameter. Note: You must set either the BREAKDOWN_EPOCH or COMPUTE_EPOCH keyword. The procedure allows input of an array of values. 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, the above command can also 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. Syntax CDF_TT2000, Epoch, Year, Month, Day [, Hour, Minute, Second, Milli, $ Micro, Nano] $ [, /BREAKDOWN_EPOCH] [, /COMPUTE_EPOCH] [, /TOINTEGER] Note: To compute the epoch, the date/time componments can be either a single value or an array of values. The output Epoch field can be a scalar or an array of values. To break down the epoch, the Epoch field can be a scalar or an array of epoch values. Based on the input, the date/time componments can be a single value each, or an array of values. Arguments Epoch The Epoch value to be broken down, or a named variable that will contain the computed epoch. The 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, such as 2012, or a named variable. If COMPUTE_EPOCH is set, a four-digit integer representing the year. If BREAKDOWN_EPOCH is set, a named variable that will contain the year. Month If COMPUTE_EPOCH is set, an integer between 1 and 12 representing the month. Alternately, you can set Month equal to zero, in which case the Day argument can take on a Day of the Year value between 1-366. If BREAKDOWN_EPOCH is set, a named variable that will contain the numeric month value. Day If COMPUTE_EPOCH is set, an integer between 1 and 31 representing the day of the month. Alternately, if the Month argument is set equal to zero, Day can be an integer between 1-366 representing the day of the year. If BREAKDOWN_EPOCH is set, a named variable that will contain the numeric day of the month value. Hour If COMPUTE_EPOCH is set, an integer between 0 and 23 representing the hour of the day. If BREAKDOWN_EPOCH is set, a named variable that will contain the numeric hour of the day value. Minute If COMPUTE_EPOCH is set, an integer between 0 and 59 representing the minute of the hour. If BREAKDOWN_EPOCH is set, a named variable that will contain the numeric minute of the hour value. Second If COMPUTE_EPOCH is set, an integer between 0 and 59 representing the second of the minute. If BREAKDOWN_EPOCH is set, a named variable that will contain the numeric second of the minute value. Milli If COMPUTE_EPOCH is set, an integer between 0 and 999 representing the millisecond. Alternately, if the Hour, Minute, and Second arguments are set all equal to zero, Milli can be an integer between 0-86400000 representing the millisecond of the day. If BREAKDOWN_EPOCH is set, a named variable that will contain the numeric millisecond value. Micro If COMPUTE_EPOCH is set, an integer between 0 and 999 representing the microsecond. Alternately, if the Hour, Minute, and Second arguments are set all equal to zero, Micro can be an integer between 0-86400000000 representing the microsecond of the day. If BREAKDOWN_EPOCH is set, a named variable that will contain the numeric microsecond value. Nano If COMPUTE_EPOCH is set, an integer between 0 and 999 representing the millisecond. Alternately, if the Hour, Minute, and Second arguments are set all equal to zero, Nano can be an integer between 0-86400000000000 representing the nanosecond of the day. If BREAKDOWN_EPOCH is set, a named variable that will contain the numeric nanosecond value. Keywords BREAKDOWN_EPOCH Set this keyword to break down the value of the Epoch argument into its component parts, storing the resulting year, month, day, etc. values in the variables specified by the corresponding arguments. COMPUTE_EPOCH Set this keyword to compute the value of Epoch from the values specified by the Year, Month, Day, etc. arguments. TOINTEGER Set this keyword 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. Version History CDF 3.4.0 Introduced See Also CDF_ENCODE_TT2000, CDF_PARSE_TT2000 © 2015 Exelis Visual Information Solutions, Inc., a subsidiary of Harris Corporation. All Rights Reserved. This information is not subject to the controls of the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR). However, this information may be restricted from transfer to various embargoed countries under U.S. laws and regulations.