Previous: Classic File Format Next: Classic API Performance Tips Table of contents Frames 2010 Unidata NetCDF Workshop > Formats and Performance

12.3 Benchmark Example
Example benchmark of netCDF copy program, implemented two ways.

Two ways to implement a netCDF copy program for classic files:

  1.     create empty target file
        add dimensions and global attributes to target
        for each variable in the source file
             add the variable definition to the target file
             copy the variable's attributes to target
             copy the variable's data to the target
      
  2.     create empty target file
        add dimensions and global attributes to target
        add all the variable definitions to the target file
        copy all the variable attributes to target
        for each variable in the source file
             copy the variable's data to the target
      

Timings on a 44 MByte WRF model output, with about 100 variables:

Timing for Method 1 Show popup Timing for Method 2 Show popup

NetCDF-4 note:  Since netCDF-4 files do not have a contiguous header, schema changes are efficient.

Timing for slower method copying to a netCDF-4 file Show popup

 


Previous: Classic File Format Next: Classic API Performance Tips Table of contents Frames 2010 Unidata NetCDF Workshop > Formats and Performance