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.
Return to makeCDF on-line help
; 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
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.
Several options can be turned ON or OFF:
See description of algorithm id's and operands
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.
If the elements of an array are input in row-major or column-major order, matching the specification in the skeleton table or skeleton CDF, then a single entry of the array name (with appropriate value of size) is sufficient to read all the elements. Otherwise, an element of an array is indicated by enclosing the appropriate index or indices in parentheses immediately following the array name. See the discussion under "form" below for an example.
Example: A position vector is to be given in a CDF in both GSE and GSM coordinates. However, the input data gives the X, Y, and Z components in GSE, but only the Y and Z components for GSM, because the X component is the same in both systems. In this case, although the CDF variables will be the size 3 arrays R_GSE and R_GSM, the elements are of size = 1 and are indicated individually in the varname column as R_GSE(1), R_GSM(1), R_GSE(2), R_GSE(3), ..., taking care to put them in correct order to match the input.
There is danger of confusion between an unwanted header record and an actual data record, if the formats are similar. An unwanted header record can be just ignored, iff it doesn't pose any risk of being mistaken for the first input variable, because the makeCDF program will skip the record if it doesn't match the expected format. Such would be the case if the unwanted record is known to contain non-numerical text, but the first variable is a number.However, if the first variable in the actual input record is a character string, then the unwanted text header record(s) must be explicitly identified by defining it (them) to contain a variable, which can be a string variable (form = "s") or a character variable. Note that (in FREEFORM) while a character variable must have a length associated with it, a string variable does not. The string variable is automatically assigned a length of 40.
; 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
; 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
; 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
; 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
; 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
; 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