Home | Overview | Data and Products | GEON IDV | Research | Education and Outreach


Table of Contents for GEON IDV web site

Introducing the GEON IDV

Working with Your Data in the GEON IDV

Download & Run the GEON IDV

Tutorial ... How to Use the GEON IDV ... More Tips

Data Formats: How to Put Your Data in the IDV

Point Data in Text Format (CSV files)

NetCDF Data for the GEON IDV

UNAVCO's ASCII to NetCDF Data Converters

UNAVCO's Online Interactive Data Reformater
for 2D grids, single parameter only

    GIAP Format: An ASCII column format for point data (irregulat lat-lon-depth, with time)

    GIAG Format: An ASCII column format for 2D and 3D grids in lat-lon-depth, with time

UNAVCO's ASCII NetCDF Data Reformaters

How to convert ASCII data files into NetCDF format files for the GEON IDV.

The IDV reads data from NetCDF format files. NetCDF is very widely used and is machine-independent. NetCDF files include user-defined metadata describing the data, in particular its mapping on the Earth, and units and names for variables. Read more about NetCDF.

As a convenience for GEON IDV users who write data in ASCII files, UNAVCO provides simple ASCII formats for data, and format converters to make NetCDF formatted files from those ASCII files. The format for 3D lon-lat-depth grids is called GIAG (GEON IDV ASCII Grids) , and the format for point data (each data point with its own independent lat, lon, and depth) is called GIAP (GEON IDV ASCII Point data). The formats are designed to work with ASCII files already used by GEON IDV users for other purposes. UNAVCO These ASCII formats basically add a few header lines of information to existing files.

The format converters run on any system that runs Java and NetCDF code, same as the IDV. You can include conversion in routine creation of your ASCII files, to make equivalent NetCDF files for IDV use.

GIAG and GIAP format files are also GMT "xyz" files and should work in GMT.

Also there is a UNAVCO online interactive data format converter for ASCII list and column data files, which has a user interface where you enter control values to convert one data file with one parameter, in any of several ASCII formats, to a NetCDF file. This may be useful in converting some kinds of ASCII data that is not easily adapted to the GIAP or GIAG formats, such as the NGDC topography data


GIAP: ASCII format for Point Data with independent longitude & latitude

The GIAP format is a simple ASCII file for "point data," data where every location has an independent latitude, longitude and depth position, not on a regular grid. Several parameter variables and a time value can be provided at each point. For time animation you could have several "points" - lines in the file - at the same exact lat-lon-depth location, with differing time values. Typical examples of data suitable for this format include:

  • point observations such as GPS vectors, strain measurements, etc.
  • natural events such as earthquakes
  • soundings such as borehole data

    The GIAP format description is online at GIAP format. For gridded data use the GIAG format.

    Format Converter for the GIAP Format

    The format converter program to convert GIAP ASCII files to NetCDF can be downloaded here. (You need Java to run the converter -- and you probably already have it to run the IDV. If you need to get Java, see the system requirements for the GEON IDV.)

    Linux Format Converter

    For the Linux GIAP format converter, download the GIAPconverter.jar and ncgen for Linux into the same directory. Make sure ncgen has execution privilege.

    To run the converter, in its directory, do a command like
    java -Xmx512m -jar GIAPconverter.jar /home/my/full/path/gps_vectors.giap

    /home/my/full/path/gps_vectors.giap stands for the complete path and filename for a GIAP data file.

    If java is not found, add the location of java to your PATH environment variable, or use the full path for the java program, such as /usr/java/java1.4.09/bin/java

    The program will print output to the screen, state whether the process succeeded, and show the names of two files made, a ".cdl" file and the NetCDF ".nc" file.

    You will find, in the directory with your original GIAP file, the two new files, such as gps_vectors.cdl (the new CDL file) and gps_vectors.nc, the new NetCDF data file which is what the GEON IDV needs.

    See Correct Attribution of Your Data, and GEON Search below if you are going to supply this data to others, or to the GEON portal, to make sure the data file contains your attribution.

    Windows Format Converter

    Download the GIAPconverter.jar Get the NetCDF utility program "ncgen" for Windows from the NetCDF package. Make sure ncgen is in the same folder as the converter program. You will need to execute the program with a command line like described under Linux above, in ".bat" file.

    See Correct Attribution of Your Data, and GEON Search below if you are going to supply this data to the GEON portal, to make sure the data file contains your attribution.

    Solaris Sun systems

    Download the GIAPconverter.jar. Get the NetCDF utility program ncgen for Solaris from the NetCDF package. Make sure ncgen is in the same directory as the format converter program. Execute the program with a command line, like described under Linix above.

    See Correct Attribution of Your Data, and GEON Search below if you are going to supply this data to the GEON portal, to make sure the data file contains your attribution.


    GIAG: ASCII Format for Two-D and Three-D Grids in Longitude-Latitude (-Depth) (-Time)

    The GIAG format is a simple ASCII file for data for 2D (one file at one depth) or 3D grids (multiple depths, one depth in each file) mapped on the Earth on latitude-longitude-depth grids. One or more parameters may be provided on the same grid. The format converter handles grids for one data time. In the future we hope to extend this format to provide support for multiple data times.

    The GIAG format description is online at GIAG format.

    Format Converter for the GIAG Format

    The format converter program to convert GIAG ASCII files can be downloaded here. You need Java to run the converter, and to run the IDV. If you need to get Java, see the system requirements for the GEON IDV.

    Linux Format Converter -

    For the Linux GIAG converter, download GIAGconverter.jar and ncgen for Linux into the same directory. Make sure ncgen has execute privilege.

    To run the converter, in its directory do a command like
    java -Xmx512m -jar GIAGconverter.jar /fullpath/mydatasetname.22.333

    /fullpath/mydatasetname.22.333 stands for the complete path and filename for one file, from all your GIAG format files. The data files must be in one directory but need not be in the same directory as the converter program.

    (If java is not found, add the location of java to your PATH environment variable, or provide the full path for the java program, such as /usr/java/java1.4.09/bin/java/).

    Typical print output from the run is shown below.

    After the program runs you will find in the directory with your GIAG files two new files, such as mydatasetname333.cdl and mydatasetname333.nc. The "nc" file will work in the GEON IDV.

    Windows Converter -

    Download and use the Java program GIAGconverter.jar described above for Linux; since it is a Java program it runs on Windows as well. You will need to obtain the NetCDF utility program ncgen for Windows from the NetCDF package. Make sure ncgen is in the same folder as the converter program.

    Solaris Sun systems -

    Download and use the Java program GIAGconverter.jar described above for Linux; since it is a Java program it runs on Solaris as well. You will need to obtain the NetCDF utility program ncgen for Solaris from the NetCDF package. Make sure ncgen is in the same directory as the converter program.


    Correct Attribution of Your Data, and GEON Search

    If you provide data to the GEON data portal, be sure that it has correct attribution of the creators, and can be "discovered" using the GEON Search.

    Look at the ".cdl" file that was made in the conversion process. It is a plain ASCII file and can be viewed and editied with a text editor.

    You will see entries in it including

            // global attributes
            // To provide correct attribution of data creator(s)
            :title = " ";
            :summary = " "; // a paragraph describing the dataset
            :keywords = " "; // a comma-separated list of keywords and phrases
            :creator_name = " " ;
            :creator_url = " " ;
            :creator_email = " " ;
            :institution = " " ; // where produced
            :acknowledgment = " "; // various types of support for the project that produced data
            :references=" ";//publications or web references that describe data or its production
            :history = " "; // audit trail for modifications, with dates, version numbers, etc.
            :comment = " "; // miscellaneous information
            // to assist dataset discovery in GEON by area and/or time.
            :geospatial_lat_min = " " ;
            :geospatial_lat_max = " " ;
            :geospatial_lat_units = "degrees_north" ;
            :geospatial_lat_resolution = " " ;
    
    Enter the correct information for each item. Each item must be enclosed in quotes " " and ending with a semi-colon ";"

    Covert the revised .cdl file to a NetCDF (binary) file with a command such as

    ncgen -o final_data.nc revised_file.cdl

    Send the ".nc" file to GEON.

    These attribute names are part of the conventions of Unidata Dataset Discovery v1.0 (see http://www.unidata.ucar.edu/software/netcdf-java/formats/DataDiscoveryAttConvention.html).


    Possible future extension --

    An extended GIAG ascii to NetCDF format converter which will accept multiple time values for 3D grids of multiple parameters.

  •  

    Comments or questions about this page? Send e-mail to Chuck Meertens (meertensunavco.org).