Issue a warning if reading and writing datasets that have valid_[min|max|range] attributes #30
Labels
enhancement
New feature or request
netCDF read
Relating to reading netCDF datasets
netCDF write
Relating to writing netCDF datasets
The presence of the the
valid_min
,valid_max
orvalid_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, defaultTrue
tocfdm.read
andcfdm.write
that warns when such properties are present. Thecfdm.write
case will only warn if the data contains out-of-range values. Since data is not actually read bycfdm.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.The text was updated successfully, but these errors were encountered: