Skip to content

Issue a warning if reading and writing datasets that have valid_[min|max|range] attributes #30

@davidhassell

Description

@davidhassell

The presence of the the valid_min, valid_max or valid_range attributes causes data to be masked for its "out-of-range" values. This is sometime surprising, particularly if the data has been modified between the read and write operations.

Proposal:

Add a warn_valid keyword parameter, default True to cfdm.read and cfdm.write that warns when such properties are present. The cfdm.write case will only warn if the data contains out-of-range values. Since data is not actually read by cfdm.read (lazy loading), it is not possible to check for out-of-range data during the read, so merely the presence of any of these properties will trigger the warning.

If warn_valid=False then warnings are suppressed.

Metadata

Metadata

Labels

dataset readRelating to reading datasetsdataset writeRelating to writing datasetsenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions