MakeCDF is a tool for reading in flat data sets, in both binary and textual form, and generating a CDF dataset from that data. The CDF files produced by this tool comply with the International Solar-Terrestrial Physics (ISTP) and Inter-Agency Consultative Group (IACG) Guidelines.
MakeCDF is written in standard ANSI-C. Previous versions were tested on VAX/VMS, Sun/Unix, and IBM PC/DOS platforms. The present version has been tested on VAX/VMS, Solaris and Digital UNIX. It is distributed freely by the NASA/GSFC/Space Physics Data Facility. It contains no proprietary software.
MakeCDF is still under development. Planned enhancements include increased validation of user input, performance optimization, expanded on-line help, and additional Epoch calculation algorithms. Any additional functional enhancements requested by our user community will also be added, as time and resources permit.
It is recommended that you compile the source code on your system. The makefile to compile and link the source code has been included in the distribution.
MakeCDF Source Code and MakeFile
Running the makeCDF engine
Use the program makeCDF.
Three input files are required:
(1) is your data file
See if makeCDF can read your time format.
See if makeCDF can read your data format.
Follow the steps below to create the other 2 files:
(2) skeleton CDF and (3) translation file
Instructions to create Skeleton CDFs.
Instructions to create Translation Files.
When you have all three files, then run the makeCDF engine.
makeCDF can read any of the time formats below.
makeCDF will then compute the ISTP standard CDF ‘Epoch’ time from the input format. (Presently, makeCDF can only convert one time tag per input file.) CDF ‘Epoch’ is listed as, e.g., 01-Jan-1997 10:20:00.000, but stored as a Real*8 scalar variable for ease of manipulation across day, month, and year boundary.
A set of independent variables, e.g.
1993 10 2 19 19 48 085 (year, month, day, hour, min, sec, ms)
1993 072 19 19 48 085 (year, day of year, hour, min, sec, ms)
94 101 3.25 (year, day of year, sec) ! notice decimal seconds
Any of the following character strings:
01-Jan-1997 00:00:00.000 (dd-MON-yyyy hh:mm:ss.mmm)
1997-01-15 10:00:00.000 (yyyy-mm-ddThh:mm:ss.mmmZ)
1993/072 19:19:48 085 (yyyy-dd hh:mm:ss.mmmZ)
A variable which is the offset of some base time, e.g.
base time: Year= 94 Day= 101
offset: seconds
If your data already has a CDF Epoch time tag, that is also readable.
Next Step: see if makeCDF can read your data format.
Return to On-line Help
Obtaining the software
Run CDF Translation Service (converts most file formats to CDF and visa versa)
makeCDF can read any of the data formats below.
Simple flat ASCII text file: one or more horizontal lines which contain a free-formatted pattern of n numbers separated by one or more blanks; this defines a logical record which is repeated many times
Complex ASCII text file composed of
header variables followed by simple flat ASCII text (base time can be found in header with offset in the following simple ASCII text)
flat ASCII embedded text within a larger section of flat ASCII text. Each section has its own pattern (logical record structure) and the embedded piece can also have an implied time offset
Because CDF naturally supports dimensional data a series of numbers in your input data file can be specified together as a single variable
16 energy values are stored together in the variable “energy”
200 x 200 values are stored together in the variable “image” (row major or column major can be specified in the translation file)
The first and last variable of the pattern (logical record structure) are specified in the translation file
The length of each number can vary from number to number and from line to line
The pattern (logical record structure) can be repeated many times
Horizontal lines which do not fit the pattern are skipped
The last number of each horizontal line should be followed by an end-of-line (and specified as such in the translation file)
Next Step: look at Example Input Data File formats with corresponding translation files.
Return to On-line Help
Obtaining the software
Run CDF Translation Service (converts most file formats to CDF and visa versa)
makeCDF is a flat data file to CDF file TRANSLATOR
Use the command:
where
has been previously defined in your system.
ERROR messages will always be displayed.
WARNING messages are of two types: ‘Progress’ and ‘Debug’. These messages are enabled or suppressed by setting the runtime parameters ‘progress’ and/or ‘debug’ to ‘ON’ or ‘OFF’ in the translation file.
Progress WARNING messages tell when certain milestones are reached in the program. Setting ‘progress’ to ‘OFF’ may be advisable for production runs, so that real error messages will be more readily noticed
Debug WARNING messages give many additional details useful in the debugging stage of development, including, among other things, each input data record, so ‘debug’ should be set to ‘ON’ only during the debug phase. User should make at least one run with this set ON, to enable the printing of various status and warning messages that might or might not present a real problem in the user’s specific case
If a variable exists in the input data file (and thus is listed in the translation file) but does not exist in the skeleton table, it will not be output to the CDF. THIS MAY (OR MAY NOT) BE EXACTLY WHAT YOU WANT AND MAY (OR MAY NOT) BE OK! makeCDF generates the following ‘progress’ WARNING message in this case: WARNING: the input variable ‘WEW’ does not exist in input CDF
If the input data file contains header records which don’t match the pattern established for the data records in the translation file, a ‘progress’ WARNING message will be generated for each header record, indicating the mis-match on reading the record. THIS MAY (OR MAY NOT) BE EXACTLY WHAT YOU WANT AND MAY (OR MAY NOT) BE OK! makeCDF treats each record in the input data file the same, including any header records which should be ignored