# spacepy.pybats.NgdcIndex

class spacepy.pybats.NgdcIndex(filename=None, load=True, *args, **kwargs)

  Many models incorporated into the SWMF rely on National Geophysical Data Center (NGDC) provided index files (especially F10.7 and Kp). These files, albeit simple ascii, have a unique format and expansive header that can be cumbersome to handle. Data files can be obtained from http://spidr.ngdc.noaa.gov .

  NgdcIndex objects aid in reading, creating, and visualizing these files.

  Creating an `NgdcIndex` object is simple:

      >>> from spacepy import pybats
      >>> obj=pybats.NgdcIndex(filename='ngdc_example.dat')

  Upon instantiation, if filename is a valid file AND kwarg load is set to boolean True, the contents of filename are loaded into the object and no other work needs to be done.

  If filename is False or load is False, a blank `NgdcIndex` is created for the user to manipulate. The user can set the time array and the ssociated data values to any values desired and use the method obj.write() to dump the contents to an NGDC formatted input file. See the documentation for the write method for more details.

  This class is a work-in-progress. It is especially tuned for SWMF-needs and cannot be considered a general function for the handling of generic NGDC files.

  Kwarg | Description
  filename | Set the input/output file name.
  load | Read file upon instantiation? Defaults to True