makeCDF

Allowed Time Formats

All ISTP CDF's must be time-ordered by the 'Epoch' variable. The CDF 'Epoch' is stored as REAL*8 and is displayed as yyyy-mon-dd hh:mm:ss.ms.

makeCDF can compute the CDF 'Epoch' time from any of the following cases by identifying the algorithm from the list of 7 possible algorithms below. For each algorithm there are 10 operands numbered 0-9 below. The operands have the value 0 (zero) if not-applicable for the specified algorithm. Otherwise, the operands denote which variable (starting with 1) in the input data record contains the indicated value (with the exception of all operands in algorithm 5, operand 8 in algorithm 6, and operands 5, 6, 8 and 9 in algorithm 7 below). See examples by clicking on the individual formats in the first column.

For those formats that use a "base time", the complete time of any data point is the "base time" plus the offset time for that data point.

The year can be either two digits or four digits. If the year is less than 100, it will be changed into the corresponding year in the 1900's if the value is 57 or greater. If less than 57, the year will be in the 2000's.

Time values can be integer or real numbers. Ranges of certain time units are limited, as follows: hh < 24 (24 not allowed); minutes and seconds < 60; and milliseconds < 1000. However, in time formats where ddd is used as the day of the year, the minutes, seconds or milliseconds values can exceed these limits as needed.


        Format of time         | Algorithms |            Operands
       in the data file        |            |
----------------------------------------------------------------------------------
A set of independent variables |     0      | 0:year, 1:month, 2:day, 3:hour,
(year, month, day, etc.)       |            | 4:min, 5:sec, 6:msec, 7-9:n/a
                               |            |Example: 1 0 3 0 0 0 4 0 0 0
                               |            |indicates that the 1st variable in
                               |            |the input data is the year, 3rd is
                               |            |the day, 4th is the msec.
----------------------------------------------------------------------------------
A character string             |     1      | 0:string_variable, 1-9:n/a
(dd-MON-yyyy hh:mm:ss.mmm)     |            |
Any punctuation mark may exist |            |
between the fields.            |            |
Not restricted to "-" or ":".  |            |
Only dd, MON, yyyy required;   |            |
other fields are assumed = 0   |            |
unless present.                |            |
----------------------------------------------------------------------------------
A character string             |     2      | 0:string_variable, 1-9:n/a
(yyyy-mm-ddThh:mm:ss.mmmZ)     |            | 
Any punctuation mark may exist |            |
between the fields.            |            |
Not restricted to "-" or ":".  |            |
Only yyyy, mm, dd required;    |            |
other fields are assumed = 0   |            |
unless present.                |            |
----------------------------------------------------------------------------------
A character string             |     3      | 0:string_variable, 1-9:n/a
(yyyy-ddd hh:mm:ss.mmmZ)       |            |
Any punctuation mark may exist |            |
between the fields.            |            |
Not restricted to "-" or ":".  |            |
Only yyyy, ddd required;       |            |
other fields are assumed = 0   |            |
unless present.                |            |
----------------------------------------------------------------------------------
A CDF 'Epoch'                  |     4      | 0:Epoch_variable, 1-9:n/a
----------------------------------------------------------------------------------
A variable which is the offset |     5      | 0:base_year, 1:base_month,
from some base time.           |            | 2:base_day, 3:base_hour,
The base time is specified     |            | 4:base_min, 5:base_sec,
directly in the operands.      |            | 6:base_msec, 7:offset_variable,
                               |            | 8:offset_units (0=y, 1=mo, 2=d,
                               |            |   3=h, 4=min, 5=s, 6=ms), 9:n/a
                               |            |Example: 1976 0 34 12 0 0 0 3 5 0
                               |            |indicates that the 3rd variable 
                               |            |of the input data is the time, in 
                               |            |seconds, after the base time of 
                               |            |Feb. 3, 1976 at 1200 UT.
                               |            |Equivalently, the operands could
                               |            |also be: 1976 2 3 12 0 0 0 3 5 0
----------------------------------------------------------------------------------
A variable which is the offset |     6      | 0:base_year, 1:base_month,
from some base time.           |            | 2:base_day, 3:base_hour,
The base time is given by      |            | 4:base_min, 5:base_sec,
the variables indicated by the |            | 6:base_msec, 7:offset_variable,
operands.                      |            | 8:offset_units (0=y, 1=mo, 2=d,
                               |            |   3=h, 4=min, 5=s, 6=ms), 9:n/a
----------------------------------------------------------------------------------
A variable which is the offset |     7      | 0-4:n/a
from some base time.           |            | 5:number of characters in "yr" format
The base time is embedded in   |            |   below in filename (either 2 or 4),
the input data filename in a   |            | 6:character number (starting with 1)
string of digits in the format |            |   of start of time string in filename,
denoted by operand 9 and maybe |            | 7:offset_variable,
modified by operand 5.         |            | 8:offset_units (0=y, 1=mo, 2=d, 
                               |            |   3=h, 4=min, 5=s, 6=ms),
                               |            | 9:time_format (0=yrmmdd, 1=yrmmddhh,
                               |            |   2=yrmmddhhmm, 3=(deleted; see 11), 
                               |            |   4=yrddd, 5=yrdddhh,
                               |            |   6=yrdddhhmm, 7=yrdddhhmmss,
                               |            |   8=(deleted; see 9), 
                               |            |   9=yrdddmsec (msec is 8 digits),
                               |            |   10=yrdddsec (sec is 5 digits),
                               |            |   11=yrmmddhhmmss, 12=yrmmddhhmmssms)
----------------------------------------------------------------------------------
Two independent variables,     |     8      | 0:year, 1:n/a=0, 2:DOY, 3-9:n/a=0
year and day-of-year (DOY),    |            |Example: 1 0 2 0 0 0 0 0 0 0
where DOY is given in days and |            |indicates that the 1st variable in the
fraction of day. DOY is a      |            |input data is the year, 2nd is the
double-precision variable.     |            |day-of-year, including the fraction.
                               |            |If DOY=3.5, time is 12:00 UT, Jan. 3.
----------------------------------------------------------------------------------
A set of independent variables |     9      | 0-1:n/a=0, 2:offset_day,
that give the time offset from |            | 3:offset_hour, 4:offset_min,
the base of January 1, 1950.   |            | 5:offset_sec, 6:offset_msec
The offset time variables are  |            | 7-9:n/a
indicated by the operands.     |            |Example: 0 0 0 0 0 0 1 0 0 0
Offset year and offset month   |            |indicates that the 1st variable
are not used, so the first two |            |of the input data is the time, in
operands (0: and 1:) are       |            |milli-seconds, since the beginning
always 0.                      |            |of Jan. 1, 1950.
                               |            |Offset_day=1 indicates Jan. 2, 1950.
----------------------------------------------------------------------------------


Go to input data file examples

Go to translation file examples


Example of Algorithm 0


Input Data File:

94 101  3.25 0.440  215.6  6060.8
94 101  5.75 0.659  195.3  5026.2
94 101  8.15 0.604  185.1  5177.3

Translation File (Sections 3 & 4 Only):

EPOCH_DESCRIPTION
algorithm                    0                      ;algorithm id
operands                     1 0 2 0 0 3 0 0 0 0    ;operands
END_EPOCH_DESCRIPTION
;
VARIABLE_DESCRIPTIONS
;vname       Size form H E br er nreps delta #/r M C aV aS aF Fc fill
Year         1    i    n n 1  0  1     0     n   0 n n  n  n  n  0
DOY          1    i    n n 0  0  1     0     n   0 n n  n  n  n  0
seconds      1    r    n n 0  0  1     0     n   0 n n  n  n  n  0
Density      1    r    n n 0  0  1     0     n   0 n n  n  n  n  0
Speed        1    r    n n 0  0  1     0     n   0 n n  n  n  n  0
Temp         1    r    n y 0  1  1     0     n   0 n n  n  n  n  0
END_VARIABLE_DESCRIPTIONS

Return to the time formats table


Example of Algorithm 3


Input Data File:

__________________________________________________________
SpaceCraft Event Time  Density   Vx     Vy    Vz     Temp
year/day hh:mm:ss.mm (cm-3.amu) km/s   km/s  km/s     eV
__________________________________________________________
1993/072 19:19:48 085  0.440   -215.6  34.5   7.1   6060.8
1993/072 19:21:56 023  0.659   -195.3  56.4   4.8   5026.2
1993/072 19:24:03 953  0.604   -185.1  18.9   6.8   5177.3

Translation File (Sections 3 & 4 Only):

EPOCH_DESCRIPTION
algorithm                    3                      ;algorithm id
operands                     1 0 0 0 0 0 0 0 0 0    ;operands
END_EPOCH_DESCRIPTION
;
VARIABLE_DESCRIPTIONS
;vname       Size form H E br er nreps delta #/r M C aV aS aF Fc fill
datestring   1  c21    n n 1  0  1     0     n   0 n n  n  n  n  0
Density      1    r    n n 0  0  1     0     n   0 n n  n  n  n  0
Velocity     3    r    n n 0  0  1     0     n   0 n n  n  n  n  0
Temp         1    r    n y 0  1  1     0     n   0 n n  n  n  n  0
END_VARIABLE_DESCRIPTIONS

Return to the time formats table


Example of Algorithm 5


Input Data File:


3.25  0.440  -215.6  34.5   7.1  6060.8
5.75  0.659  -195.3  56.4   4.8  5026.2
8.15  0.604  -185.1  18.9   6.8  5177.3

The base time is not included in the data file, but is 
known to be Year = 76, Day= 34.

Translation File (Sections 3 & 4 Only):

EPOCH_DESCRIPTION
algorithm                    5                      ;algorithm id
operands                  1976 0 34 0 0 0 0 1 5 0   ;operands
END_EPOCH_DESCRIPTION
;
VARIABLE_DESCRIPTIONS
;vname       Size form H E br er nreps delta #/r M C aV aS aF Fc fill
seconds      1    r    n n 1  0  1     0     n   0 n n  n  n  n  0
Density      1    r    n n 0  0  1     0     n   0 n n  n  n  n  0
Velocity     3    r    n n 0  0  1     0     n   0 n n  n  n  n  0
Temp         1    r    n y 0  1  1     0     n   0 n n  n  n  n  0
END_VARIABLE_DESCRIPTIONS

Return to the time formats table


Example of Algorithm 6


Input Data File:

Year= 94 Day= 101
3.25  0.440  -215.6  34.5   7.1  6060.8
5.75  0.659  -195.3  56.4   4.8  5026.2
8.15  0.604  -185.1  18.9   6.8  5177.3

Translation File (Sections 3 & 4 Only):

EPOCH_DESCRIPTION
algorithm                    6                      ;algorithm id
operands                     2 0 4 0 0 0 0 5 5 0    ;operands
END_EPOCH_DESCRIPTION
;
VARIABLE_DESCRIPTIONS
;vname       Size form H E br er nreps delta #/r M C aV aS aF Fc fill
string1      1    s    y n 1  0  1     0     n   0 n n  n  n  n  0
Year         1    i    y n 0  0  1     0     n   0 n n  n  n  n  0
string2      1    s    y n 0  0  1     0     n   0 n n  n  n  n  0
DOY          1    i    y y 0  1  1     0     n   0 n n  n  n  n  0
seconds      1    r    n n 1  0  1     0     n   0 n n  n  n  n  0
Density      1    r    n n 0  0  1     0     n   0 n n  n  n  n  0
Velocity     3    r    n n 0  0  1     0     n   0 n n  n  n  n  0
Temp         1    r    n y 0  1  1     0     n   0 n n  n  n  n  0
END_VARIABLE_DESCRIPTIONS

Return to the time formats table


Example of Algorithm 7


Input Data File:


(Input data filename is "PROJ_A_19760341521.TXT")

3.25  0.440  -215.6  34.5   7.1  6060.8
5.75  0.659  -195.3  56.4   4.8  5026.2
8.15  0.604  -185.1  18.9   6.8  5177.3

Translation File (Sections 3 & 4 Only):

EPOCH_DESCRIPTION
algorithm                    7                      ;algorithm id
operands                     0 0 0 0 0 4 8 1 5 6    ;operands
END_EPOCH_DESCRIPTION
;
VARIABLE_DESCRIPTIONS
;vname       Size form H E br er nreps delta #/r M C aV aS aF Fc fill
seconds      1    r    n n 1  0  1     0     n   0 n n  n  n  n  0
Density      1    r    n n 0  0  1     0     n   0 n n  n  n  n  0
Velocity     3    r    n n 0  0  1     0     n   0 n n  n  n  n  0
Temp         1    r    n y 0  1  1     0     n   0 n n  n  n  n  0
END_VARIABLE_DESCRIPTIONS

Return to the time formats table


Author and Curator

H. Kent Hills, howard.k.hills@nasa.gov, (301)286-9431
ADNET/NSSDC, Code 690.1, NASA/Goddard Space Flight Center
Greenbelt, MD 20771, USA


NASA Official: R.E. McGuire, Head, Space Physics Data Facility (Code 670, NASA/GSFC)
Robert.E.McGuire@gsfc.nasa.gov, (301)286-7794.
Last Updated: December 2008, TJK