pysat / pysatNASA

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

BUG: TIMED SABER and xarray #175

Closed jklenzing closed 1 year ago

jklenzing commented 1 year ago

Description

Addresses #174

TIMED SABER has an extra variable for time, for use with the tpaltitude profiles. This means that 'Epoch' will not be renamed 'time', breaking the new expand_dims code in pysat 3.1.0.

BONUS BUG: when multiple xarray files are combined via xr.combine_nested, the attrs for each variable are dropped, meaning that meta is not set for each variable.

Type of change

How Has This Been Tested?

Loading a day of data and inspecting the metadata.

import pysat
saber = pysat.Instrument('timed', 'saber', use_header=True)
saber.load(2019, 1)
saber.meta['tp_time']

Test Configuration

Checklist:

jklenzing commented 1 year ago

Additional meta header issues out of scope, documented as #176

jklenzing commented 1 year ago

This should fix the issues seen in the other PRs