The makeCDF Tool
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.
Jump
to Obtaining the software
Look
at On-line Help
Obtaining the software
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
MakeCDF On-line Help
I want to put my data into CDF! Where do I start?
Use the program makeCDF. Three input files
are required; one is your data file.
Follow the steps below to create the other 2 files: skeleton
CDF and translation file.
When you have all three files, then run the makeCDF
engine.
Jump
to Obtaining the software
Supported time formats
makeCDF can read any of the time formats below.
makeCDF will then compute the ISTP/IACG
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.
Return
to On-line Help
Jump
to Obtaining the software
Run
CDF Translation Service (converts most file formats to CDF and visa versa)
Supported data formats
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.
Notes:
-
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).
Return
to On-line Help
Jump
to Obtaining the software
Run
CDF Translation Service (converts most file formats to CDF and visa versa)
On-line help for the makeCDF engine
makeCDF is a flat data file to CDF file TRANSLATOR
-
translator, no programming required of user
-
engine is ANSI standard C
-
incorporates no commercial s/w
How is the makeCDF engine run?
Use the command:
makecdf input_file translation_file
input_CDF output_CDF
where the command symbol makecdf
has been previously
defined in your system.
-
All 4 parameters must be present and in proper order.
-
Pathnames are permitted in the filenames.
-
Wildcards are allowed in the input_file name, allowing
you to translate multiple files with a single command. You must use automatic
file naming when using this option.
-
The input_CDF can be either a CDF file or a skeleton table, but
the name must include the extension (.cdf or .skt), so that the makeCDF
program can determine which it is. However, even on platforms that allow
version numbers, there must not be a version number included.
-
The output_CDF name must not include the extension (.cdf); the
program will automatically add the extension to output_CDF.
The output_CDF can be named automatically according to ISTP or ISIS file
naming conventions. Simply set the output_CDF name to 'auto' in the command
above, and set 'autonaming_style' to 0 in the translation file runtime
parameters. Also in the runtime parameters, set ' autonaming_case' to 1 to
generate a lower case name or 0 for upper case name of the output_CDF.
-
The log file created by makeCDF (if any) will have the name that you provide
for the output_CDF with a .LOG extension.
Potential Problems/Warning Messages
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.
Return to On-line Help
Jump to Obtaining the software
Space Physics Use of CDF
SPDF Home Page
Author & Curator:
Tami Kovalick, tamara.j.kovalick@nasa.gov, (301)286-9422
Code 672, NASA Goddard Space Flight Center
Greenbelt, MD 20771, USA
Authorized by 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