Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
davidhassell opened this issue Apr 27, 2020 · 0 comments · Fixed by #29
Assignees
Labels
enhancement New feature or request netCDF read Relating to reading netCDF datasets netCDF write Relating to writing netCDF datasets

Comments

@davidhassell
Copy link
Contributor

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.

@davidhassell davidhassell added the enhancement New feature or request label Apr 27, 2020
@davidhassell davidhassell self-assigned this Apr 27, 2020
@davidhassell davidhassell added netCDF write Relating to writing netCDF datasets netCDF read Relating to reading netCDF datasets labels Nov 15, 2023
@davidhassell davidhassell linked a pull request Nov 15, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request netCDF read Relating to reading netCDF datasets netCDF write Relating to writing netCDF datasets
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants