spedas / pyspedas

Python-based Space Physics Environment Data Analysis Software
https://pyspedas.readthedocs.io/
MIT License
143 stars 58 forks source link

Warnings when reading CDFs with virtual variables #801

Closed jameswilburlewis closed 3 months ago

jameswilburlewis commented 3 months ago

Loading L2 ESA data produces lots of warnings:

22-Mar-24 09:59:18: Unable to get ydata for variable tha_peif_densityQ
22-Mar-24 09:59:18: Unable to get ydata for variable tha_peif_avgtempQ
22-Mar-24 09:59:18: Unable to get ydata for variable tha_peif_vthermalQ
22-Mar-24 09:59:18: Unable to get ydata for variable tha_peif_sc_potQ

These are virtual variables. We should probably skip them when loading a CDF (at least until we implement code to fill them in on the fly, by translating the relevant CDAWlib routines)

jameswilburlewis commented 3 months ago

This is now implemented. If a variable has attribute VIRTUAL set to "true", we skip it (with a debug level log message). Some variables (e.g. a few of the THEMIS ESA quality-filtered variables) don't have a VIRTUAL attribute, but they do have "FUNCT" and "COMPONENT_0" attributes. These variables are also skipped, with log level "info" to make them a little more visible. See https://github.com/spedas/bleeding_edge/issues/150 for that issue.