You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently encountered a file (from investigating spammy warnings which brought me to Unidata/cftime#328 - see the file attached in the opening comment there as an example) which had the Conventions global attribute value of :Conventions = "CF-1.6/CF-1.7" (checked via ncdump -h), , a compound form which isn't standard that cfdm can't read it because it errors on processing the version in a naive way, taking whatever it finds after matching the first "CF-" pattern if found:
Whilst a weird-y value such as 'CF-1.6/CF-1.7' is not the CF-compliant value to set on that attribute and we shouldn't account for any weirdness that data may possess, IMO it shouldn't mean such files can't be read in at all. I looked at the logic of the 'Conventions' property processing and concluded that it isn't very robust and should be improved so that weird edge cases don't error and instead any non-standard and therefore ambiguous values such as this are ignored - the files can be read in but the CF version is considered ambiguous therefore gets set by our default logic for lack of known/set version.
PR to follow, which makes the Conventions attribute versions processing more robust through regular expressions.
The text was updated successfully, but these errors were encountered:
I recently encountered a file (from investigating spammy warnings which brought me to Unidata/cftime#328 - see the file attached in the opening comment there as an example) which had the
Conventions
global attribute value of:Conventions = "CF-1.6/CF-1.7"
(checked viancdump -h
), , a compound form which isn't standard that cfdm can't read it because it errors on processing the version in a naive way, taking whatever it finds after matching the first "CF-" pattern if found:Whilst a weird-y value such as 'CF-1.6/CF-1.7' is not the CF-compliant value to set on that attribute and we shouldn't account for any weirdness that data may possess, IMO it shouldn't mean such files can't be read in at all. I looked at the logic of the 'Conventions' property processing and concluded that it isn't very robust and should be improved so that weird edge cases don't error and instead any non-standard and therefore ambiguous values such as this are ignored - the files can be read in but the CF version is considered ambiguous therefore gets set by our default logic for lack of known/set version.
PR to follow, which makes the
Conventions
attribute versions processing more robust through regular expressions.The text was updated successfully, but these errors were encountered: