makeCDF

How To Make A Translation File

A translation file (extension .ffd) is an ASCII file that describes the input data file and the run-time options to the makeCDF program. To make a translation file, copy the example file shown below, then make modifications to it as appropriate. The first two sections of the translation file give almost self-explanatory run-time options and general input file information, and are similar for every translation file. The third section, EPOCH_DESCRIPTION, contains the time handling algorithm to use, and its operands. See the Allowed Time Formats page to determine the algorithm and operands needed. The fourth section, VARIABLE_DESCRIPTIONS, contains the detailed description of the input data file and how each data item is to be handled. General Explanatory Notes for all sections of a translation file follow the first example translation file.

This set of examples starts with a translation file for a simple input file format, and continues to progressively more complicated examples. At the beginning of each translation file example is a link to the data file that it describes. It is suggested that the user first look at the data file, then come back to this page to see how to describe it in the translation file. The page of data file examples follows the same outline as this page of translation files.


Table of Contents for Translation File Examples


*Return to makeCDF on-line help


Translation File for the Simplest ASCII Data File and the Simple File with Unwanted Header Records


Look at simple ASCII input data file

Look at simple ASCII input data file with unwanted header records

; This is the translation file (.ffd file) for the example of 
; a simple ASCII data file and 
; a simple ASCII data file with unwanted header records.

RUNTIME_PARAMETERS
progress_output             ON        ;(ON/OFF),default=OFF
debug_output                OFF       ;(ON/OFF),default=OFF
log_to_screen               ON        ;(ON/OFF),default=ON
logfile_maxrecs             400       ;(positive integer),default=100
log_to_file                 OFF       ;(ON/OFF),default=OFF
autonaming_style            0         ;(0=ISTP,1=ISIS),default=0
autonaming_case             1         ;(0=upper-case,1=lower-case),default=1
END_RUNTIME_PARAMETERS
;
INFILE_DESCRIPTION
format                       FREEFORM  ;(FREEFORM/FORMATTED),default=FREEFORM
data_type                    TEXT      ;(TEXT/BINARY),default=TEXT
text_type                    ASCII     ;(ASCII/EBCDIC),default=ASCII
binary_type                  VAX       ;(VAX/SUN/IBMPC) iff data_type=BINARY
; The complete list of recognized binary types is: 
; VAX/ALPHAVMSD/ALPHAVMSG/SUN/SGI/DECSTATION/ALPHAOSF1/IBMRS/IBMPC/HP/NEXT/MAC
delimiter                    blank     ;special value 'blank'
END_INFILE_DESCRIPTION
;
EPOCH_DESCRIPTION
algorithm                    0                      ;algorithm id
operands                     1 0 2 0 0 3 0 0 0 0    ;operands
END_EPOCH_DESCRIPTION
;
VARIABLE_DESCRIPTIONS
;varname     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     1   0 n n  n  n  n  0
DOY          1    i    n n 0  0  1     0     1   0 n n  n  n  n  0
seconds      1    r    n n 0  0  1     0     1   0 n n  n  n  n  0
Density      1    r    n n 0  0  1     0     1   0 n n  n  n  n  0
Speed        1    r    n n 0  0  1     0     1   0 n n  n  n  n  0
Temp         1    r    n y 0  1  1     0     1   0 n n  n  n  n  0
END_VARIABLE_DESCRIPTIONS


General Explanatory Notes for Translation Files


A semi-colon (;) in the translation file indicates comments: the program disregards the remainder of the line after the semi-colon. In the first three sections, comments are used to indicate the allowed values and the defaults.
Values are not case sensitive.
The section markers such as 'INFILE_DESCRIPTION' and 'END_INFILE_DESCRIPTION' must be present for all sections.

RUNTIME_PARAMETERS:

Several options can be turned ON or OFF:

Other options use specified values: INFILE_DESCRIPTION:

EPOCH_DESCRIPTION:

See description of algorithm id's and operands

VARIABLE_DESCRIPTIONS:

All columns in the VARIABLE_DESCRIPTIONS section are required to have an entry, although only the varname and the next seven columns are used for simple-format ASCII files. The remaining nine columns, if not otherwise needed, should be given the default values shown. Usage of these additional columns will be addressed elsewhere in the various examples of input data files. Columns do not have to line up, it just looks better. Varnames are case sensitive, all others are not case sensitive.



Translation File for the Simple ASCII Input File with Complicated Unwanted Header Records


Look at simple ASCII input data file with complicated unwanted header records

; This is the translation file (.ffd file) for the example of 
; a simple ASCII data file with complicated unwanted header records, 
; That is, the header records are text, and the first actual data variable is
; also text, so that the header records could be confused with data records 
; unless the header records are addressed specifically.
;
RUNTIME_PARAMETERS
progress_output             ON        ;(ON/OFF),default=OFF
debug_output                OFF       ;(ON/OFF),default=OFF
log_to_screen               ON        ;(ON/OFF),default=ON
logfile_maxrecs             400       ;(positive integer),default=100
log_to_file                 OFF       ;(ON/OFF),default=OFF
autonaming_style            0         ;0=ISTP,1=ISIS,default=0
autonaming_case             1         ;0=upper-case,1=lower-case,default=1
END_RUNTIME_PARAMETERS
;
INFILE_DESCRIPTION
format                       FREEFORM  ;(FREEFORM/FORMATTED),default=FREEFORM
data_type                    TEXT      ;(TEXT/BINARY),default=TEXT
text_type                    ASCII     ;(ASCII/EBCDIC),default=ASCII
binary_type                  VAX       ;(VAX/SUN/IBMPC) iff data_type=BINARY
; The complete list of recognized binary types is: 
; VAX/ALPHAVMSD/ALPHAVMSG/SUN/SGI/DECSTATION/ALPHAOSF1/IBMRS/IBMPC/HP/NEXT/MAC
delimiter                    blank     ;special value 'blank'
END_INFILE_DESCRIPTION
;
EPOCH_DESCRIPTION
algorithm                    1                      ;algorithm id
operands                     4 0 0 0 0 0 0 0 0 0    ;operands
END_EPOCH_DESCRIPTION
;
VARIABLE_DESCRIPTIONS
;varname     size form H E br er nreps delta #/r M C aV aS aF Fc fill
Dum1         1    s    y y 1  0  1     0     1   0 n n  n  n  n  0
Dum2         1    s    y y 0  0  1     0     1   0 n n  n  n  n  0
Dum3         1    s    y y 0  1  1     0     1   0 n n  n  n  n  0
Timestring   1    c23  n n 2  0  1     0     1   0 n n  n  n  n  0
Density      1    r    n n 0  0  1     0     1   0 n n  n  n  n  0
Speed        1    r    n n 0  0  1     0     1   0 n n  n  n  n  0
Temp         1    r    n y 0  1  1     0     1   0 n n  n  n  n  0
END_VARIABLE_DESCRIPTIONS



Translation File for the 1-Dimensional Variable Data File


Look at input data file with 1-dimensional variables

; This is the ffd file for the example: 1-dimensional variables.
RUNTIME_PARAMETERS
progress_output             ON        ;(ON/OFF),default=OFF
debug_output                OFF       ;(ON/OFF),default=OFF
log_to_screen               ON        ;(ON/OFF),default=ON
logfile_maxrecs             400       ;(positive integer),default=100
log_to_file                 OFF       ;(ON/OFF),default=OFF
autonaming_style            0         ;0=ISTP,1=ISIS,default=0
autonaming_case             1         ;0=upper-case,1=lower-case,default=1
END_RUNTIME_PARAMETERS
;
INFILE_DESCRIPTION
format                       FREEFORM  ;(FREEFORM/FORMATTED),default=FREEFORM
data_type                    TEXT      ;(TEXT/BINARY),default=TEXT
text_type                    ASCII     ;(ASCII/EBCDIC),default=ASCII
binary_type                  VAX       ;(VAX/SUN/IBMPC) iff data_type=BINARY
; The complete list of recognized binary types is: 
; VAX/ALPHAVMSD/ALPHAVMSG/SUN/SGI/DECSTATION/ALPHAOSF1/IBMRS/IBMPC/HP/NEXT/MAC
delimiter                    blank     ;special value 'blank'
END_INFILE_DESCRIPTION
;
EPOCH_DESCRIPTION
algorithm                    0                      ;algorithm id
operands                     1 0 2 0 0 3 0 0 0 0    ;operands
END_EPOCH_DESCRIPTION
;
VARIABLE_DESCRIPTIONS
;varname     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     1   0 n n  n  n  n  0
DOY          1    i    n n 0  0  1     0     1   0 n n  n  n  n  0
seconds      1    r    n n 0  0  1     0     1   0 n n  n  n  n  0
Density      1    r    n n 0  0  1     0     1   0 n n  n  n  n  0
Velocity     3    r    n n 0  0  1     0     1   0 n n  n  n  n  0
Temp         1    r    n y 0  1  1     0     1   0 n n  n  n  n  0
END_VARIABLE_DESCRIPTIONS

Return to table of contents



Translation File for the 2-Dimensional Variable Data File


Look at input data file with 2-dimensional variables

; This is the ffd file for the example: 2-dimensional variables.
RUNTIME_PARAMETERS
progress_output             ON        ;(ON/OFF),default=OFF
debug_output                OFF       ;(ON/OFF),default=OFF
log_to_screen               ON        ;(ON/OFF),default=ON
logfile_maxrecs             400       ;(positive integer),default=100
log_to_file                 OFF       ;(ON/OFF),default=OFF
autonaming_style            0         ;0=ISTP,1=ISIS,default=0
autonaming_case             1         ;0=upper-case,1=lower-case,default=1
END_RUNTIME_PARAMETERS
;
INFILE_DESCRIPTION
format                       FREEFORM  ;(FREEFORM/FORMATTED),default=FREEFORM
data_type                    TEXT      ;(TEXT/BINARY),default=TEXT
text_type                    ASCII     ;(ASCII/EBCDIC),default=ASCII
binary_type                  VAX       ;(VAX/SUN/IBMPC) iff data_type=BINARY
; The complete list of recognized binary types is: 
; VAX/ALPHAVMSD/ALPHAVMSG/SUN/SGI/DECSTATION/ALPHAOSF1/IBMRS/IBMPC/HP/NEXT/MAC
delimiter                    blank     ;special value 'blank'
END_INFILE_DESCRIPTION
;
EPOCH_DESCRIPTION
algorithm                    0                      ;algorithm id
operands                     1 0 2 0 0 3 0 0 0 0    ;operands
END_EPOCH_DESCRIPTION
;
VARIABLE_DESCRIPTIONS
;varname     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     1   0 n n  n  n  n  0
DOY          1    i    n n 0  0  1     0     1   0 n n  n  n  n  0
seconds      1    r    n n 0  0  1     0     1   0 n n  n  n  n  0
Flux        3,3   r    n n 0  0  1     0     9   R n n  n  n  n  0
Temp         1    r    n y 0  1  1     0     1   0 n n  n  n  n  0
END_VARIABLE_DESCRIPTIONS

Return to table of contents



Translation File for the Records Spanning More Than One Line Data File


Look at input file with data records spanning more than one line

; This is the ffd file for the example: records spanning more than one line.
RUNTIME_PARAMETERS
progress_output             ON        ;(ON/OFF),default=OFF
debug_output                OFF       ;(ON/OFF),default=OFF
log_to_screen               ON        ;(ON/OFF),default=ON
logfile_maxrecs             400       ;(positive integer),default=100
log_to_file                 OFF       ;(ON/OFF),default=OFF
autonaming_style            0         ;0=ISTP,1=ISIS,default=0
autonaming_case             1         ;0=upper-case,1=lower-case,default=1
END_RUNTIME_PARAMETERS
;
INFILE_DESCRIPTION
format                       FREEFORM  ;(FREEFORM/FORMATTED),default=FREEFORM
data_type                    TEXT      ;(TEXT/BINARY),default=TEXT
text_type                    ASCII     ;(ASCII/EBCDIC),default=ASCII
binary_type                  VAX       ;(VAX/SUN/IBMPC) iff data_type=BINARY
; The complete list of recognized binary types is: 
; VAX/ALPHAVMSD/ALPHAVMSG/SUN/SGI/DECSTATION/ALPHAOSF1/IBMRS/IBMPC/HP/NEXT/MAC
delimiter                    blank     ;special value 'blank'
END_INFILE_DESCRIPTION
;
EPOCH_DESCRIPTION
algorithm                    0                      ;algorithm id
operands                     1 0 2 0 0 3 0 0 0 0    ;operands
END_EPOCH_DESCRIPTION
;
VARIABLE_DESCRIPTIONS
;varname     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     1   0 n n  n  n  n  0
DOY          1    i    n n 0  0  1     0     1   0 n n  n  n  n  0
seconds      1    r    n n 0  0  1     0     1   0 n n  n  n  n  0
Density      1    r    n y 0  0  1     0     1   0 n n  n  n  n  0
Velocity     3    r    n n 0  0  1     0     1   0 n n  n  n  n  0
Temp         1    r    n y 0  1  1     0     1   0 n n  n  n  n  0
END_VARIABLE_DESCRIPTIONS

Return to table of contents



Translation File for the Header Variables Data File


Look at input data file with header variables

; This is the ffd file for the example: header variables.
RUNTIME_PARAMETERS
progress_output             ON        ;(ON/OFF),default=OFF
debug_output                OFF       ;(ON/OFF),default=OFF
log_to_screen               ON        ;(ON/OFF),default=ON
logfile_maxrecs             400       ;(positive integer),default=100
log_to_file                 OFF       ;(ON/OFF),default=OFF
autonaming_style            0         ;0=ISTP,1=ISIS,default=0
autonaming_case             1         ;0=upper-case,1=lower-case,default=1
END_RUNTIME_PARAMETERS
;
INFILE_DESCRIPTION
format                       FREEFORM  ;(FREEFORM/FORMATTED),default=FREEFORM
data_type                    TEXT      ;(TEXT/BINARY),default=TEXT
text_type                    ASCII     ;(ASCII/EBCDIC),default=ASCII
binary_type                  VAX       ;(VAX/SUN/IBMPC) iff data_type=BINARY
; The complete list of recognized binary types is: 
; VAX/ALPHAVMSD/ALPHAVMSG/SUN/SGI/DECSTATION/ALPHAOSF1/IBMRS/IBMPC/HP/NEXT/MAC
delimiter                    blank     ;special value 'blank'
END_INFILE_DESCRIPTION
;
EPOCH_DESCRIPTION
algorithm                    5                      ;algorithm id
operands                     2 0 4 0 0 0 0 5 5 0    ;operands
END_EPOCH_DESCRIPTION
;
VARIABLE_DESCRIPTIONS
;varname     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     1   0 n n  n  n  n  0
Year         1    i    y n 0  0  1     0     1   0 n n  n  n  n  0
string2      1    s    y n 0  0  1     0     1   0 n n  n  n  n  0
DOY          1    i    y y 0  1  1     0     1   0 n n  n  n  n  0
seconds      1    r    n n 1  0  1     0     1   0 n n  n  n  n  0
Density      1    r    n n 0  0  1     0     1   0 n n  n  n  n  0
Velocity     3    r    n n 0  0  1     0     1   0 n n  n  n  n  0
Temp         1    r    n y 0  1  1     0     1   0 n n  n  n  n  0
END_VARIABLE_DESCRIPTIONS

Return to table of contents



Translation File for the Embedded Variables Data File


Look at input data file with variables embedded in a repeating sub-record

; This is the ffd file for the example: embedded variables.

RUNTIME_PARAMETERS
progress_output             ON        ;(ON/OFF),default=OFF
debug_output                OFF       ;(ON/OFF),default=OFF
log_to_screen               ON        ;(ON/OFF),default=ON
logfile_maxrecs             400       ;(positive integer),default=100
log_to_file                 OFF       ;(ON/OFF),default=OFF
autonaming_style            0         ;0=ISTP,1=ISIS,default=0
autonaming_case             1         ;0=upper-case,1=lower-case,default=1
END_RUNTIME_PARAMETERS
;
INFILE_DESCRIPTION
format                       FREEFORM  ;(FREEFORM/FORMATTED),default=FREEFORM
data_type                    TEXT      ;(TEXT/BINARY),default=TEXT
text_type                    ASCII     ;(ASCII/EBCDIC),default=ASCII
binary_type                  VAX       ;(VAX/SUN/IBMPC) iff data_type=BINARY
; The complete list of recognized binary types is: 
; VAX/ALPHAVMSD/ALPHAVMSG/SUN/SGI/DECSTATION/ALPHAOSF1/IBMRS/IBMPC/HP/NEXT/MAC
delimiter                    blank     ;special value 'blank'
END_INFILE_DESCRIPTION
;
EPOCH_DESCRIPTION
algorithm                    0                      ;algorithm id
operands                     1 0 2 3 0 0 0 0 0 0    ;operands
END_EPOCH_DESCRIPTION
;
VARIABLE_DESCRIPTIONS
;varname     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     1   0 n n  n  n  n  0
DOY          1    i    n n 0  0  1     0     1   0 n n  n  n  n  0
hour         1    i    n n 0  1  1     0     1   0 n n  n  n  n  0
Velocity     3    r    n n 2  0  60  60000   1   0 n n  n  n  n  0
Temp         1    r    n y 0  2  1     0     1   0 n n  n  n  n  0
END_VARIABLE_DESCRIPTIONS


Author and Curator

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

Last Updated: December 2008, TJK


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