pysat / pysatNASA

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

BUG: GOLD Nmax metadata not set properly #97

Closed jklenzing closed 2 years ago

jklenzing commented 2 years ago

Describe the bug UserWarning: Metadata set to defaults, as they were missing in the Instrument

Metadata exists when checked, but some of the required values may not be linked.

To Reproduce

import pysat
gold = pysat.Instrument('ses14', 'gold', tag='nmax', strict_time_flag=False)
gold.load(2021, 31)

Expected behavior no warning, all required meta present

Screenshots n/a

Desktop (please complete the following information):

Additional context n/a

jklenzing commented 2 years ago

The issue stems from using swap_dims and assign_coords without updating metadata.

jklenzing commented 2 years ago

Preliminary fixes in. However, part of this is stemming from assigning dimensional data (ie, integer indices) as coordinates, specifically nlats, nlons, nmask. May need a developer discussion here. pinging @aburrell, @rstoneback

jklenzing commented 2 years ago

Closing with merge of #110