pysat / pysatNASA

pysat support for NASA Instruments
BSD 3-Clause "New" or "Revised" License
21 stars 7 forks source link

BUG: header-level meta not set for cdf pandas files #176

Closed jklenzing closed 1 year ago

jklenzing commented 1 year ago

Describe the bug Load a day of data for a cdflib instrument with the use_header flag set to True. The header meta is not there

To Reproduce Load a day of data and inspect the header

import pysat
ivm = pysat.Instrument('cnofs', 'ivm', use_cdflib=True, use_header=True)
ivm.load(2009, 1)
ivm.meta.header

Expected behavior top level attrs should be transferred

Screenshots n/a

Desktop (please complete the following information):

Additional context Found in #175

jklenzing commented 1 year ago

It looks like the issue is in the CDF.to_pysat method. I don't see where header level attributes are being transferred.