# spacepy.datamodel.fromCDF

spacepy.datamodel.fromCDF(fname, **kwargs)

  Create a SpacePy datamodel representation of a NASA CDF file

  Parameters
    file string

      the name of the cdf file to be loaded into a datamodel

  Returns
    out spacepy.datamodel.SpaceData

      SpaceData with associated attributes and variables in dmarrays

  See also

  `spacepy.pycdf.CDF.copy`

  Examples

      >>> import spacepy.datamodel as dm
      >>> data = dm.fromCDF('test.cdf')