Description
Describe the bug
When using EDDTableFromNcCFFiles
ERDDAP unexpectedly shows subsetVariables
attribute in dataset's metadata even though the attribute is not added in the datasets.xml
configuration nor is it present in the source netCDF file.
Furthermore, it seems to use source variable names - this means that if you rename the variables by using a different <destinationName>
the dataset won't load.
Also when using the GenerateDatasetsXml
tool the subsetVariables
attribute also shows up in the commented "sourceAttributes" section (despite not being an attribute in the source file).
To Reproduce
I will add a separate comment with example files, xml, and instructions.
Expected behavior
subsetVariables
attribute continues to be generated but using variable destination names.
subsetVariables
will be printed under <addAttributes>
and not in the source attributes section when using GenerateDatasetsXml
scripts.
Also this behavior should be documented. I did not find any mention of the attribute being generated besides for SOS datasets.
Additional context
I have traced the problem for dataset xml generation.
I believe the "sourceAttributes" in the output xml come from here:
Table
class is used for the dataSourceTable
:readNcCF
sets the global attribute to a value computed from other attributes:EDITED: corrected sourceVariables -> subsetVariables