CDF_EPOCH16 ----------- The CDF_EPOCH16 procedure computes or breaks down a single or an array of CDF_EPOCH16 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 of value(s) for the Epoch argument and set the BREAKDOWN_EPOCH keyword, CDF_EPOCH16 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.) in a scalar or array and set the COMPUTE_EPOCH keyword, CDF_EPOCH16 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_EPOCH16, Epoch, Year [, Month, Day, Hour, Minute, Second, Milli, Micro, Nano, Pico] [, /BREAKDOWN_EPOCH] [, /COMPUTE_EPOCH] Arguments Epoch A single or an array (<= 2D) Epoch value(s) to be broken down, or a named variable into which the computed epoch will be placed. The Epoch value is the number of picoseconds since 01-Jan-0000 00:00:00.000.000.000.000 Note: "Year zero" is a convention chosen by CDF to measure epoch values. This date is more commonly referred to as 1 BC. Remember that 1 BC was a leap year. The Epoch is defined as the number of picoseconds since 01-Jan-0000 00:00:00.000.000.000.000, as computed using the CDF library's internal date routines. The CDF date/time calculations do not take into account the changes to the Gregorian calendar, and cannot be directly converted into Julian date/times. To convert CDF epochs into date/times and vice versa, you should only use the CDF_EPOCH16 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 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. Pico The picosecond(s) (0-999) or a named variable. 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. Examples To compute the epoch value of September 20, 2005 at 3:05:46:02:156: CDF_EPOCH16, epoch, 2005, 9, 20, 3, 5, 46, 27, 2, 156, /COMPUTE_EPOCH To break down the given epoch value into standard date components: CDF_EPOCH16, 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.333, 20-Sep-2005 03:06:22:234.444.555.666, 20-Sep-2005 03:07:12:345.777.888.999: 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, 444, 777] ns = [222, 555, 666] ps = [333, 666, 999] CDF_EPOCH16, epoch2, yy, mm, dd, hh, mn, ss, ms, us, ns, ps, /COMPUTE Since the year, month, day, hour fields are the same in this sample, alternatively, the above command can be written as: CDF_EPOCH16, epoch2, 2005, 9, 20, 3, mn, ss, ms, us, ns, ps, /COMPUTE To break down the above vectorized epoch values into standard date components: CDF_EPOCH16, epoch2, yr, mo, dy, hr, min, sec, milli, micro, nanso, pico, /BREAK All yr, mo, dy, hr, min, sec, milli, micro, nano and pico fields will be in an array. Version History Introduced: CDF 3.4.0 See Also CDF_ENCODE_EPOCH16, CDF_PARSE_EPOCH16