pysat / pysatNASA

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

BUG: TIMED SABER and extra time variable #174

Closed jklenzing closed 1 year ago

jklenzing commented 1 year ago

Describe the bug TIMED SABER is not correctly renaming the 'Epoch' variable to 'time'. This breaks when the new concat routine for xarray in pysat 3.1.0 is used to load data. This stems from SABER having a secondary time variable already.

To Reproduce With pysat 3.1.0, run

import pysat

saber = pysat.Instrument('timed', 'saber')
saber.load(2019, 1)

Expected behavior Data should load normally

Screenshots n/a

Desktop (please complete the following information):

Additional context Since time already exists, Epoch does not get renamed.

https://github.com/pysat/pysatNASA/blob/71b807447c86bc1fb7e08dd3d06900c0a4863fed/pysatNASA/instruments/methods/cdaweb.py#L379-L382

jklenzing commented 1 year ago

Potentially could solve by adding drop_vars similar to drop_dims kwarg already used. Or could rename this variable (also using new kwarg) so that data is preserved..

aburrell commented 1 year ago

I like the rename idea.