valid_range
attribute is unsafely cast on NETCDF4_CLASSIC
save
#6178
Labels
Milestone
valid_range
attribute is unsafely cast on NETCDF4_CLASSIC
save
#6178
🐛 Bug Report
When saving a cube to a netCDF file using the
NETCDF4_CLASSIC
format, thevalid_range
attribute is unsafely cast.How To Reproduce
Steps to reproduce the behaviour:
valid_range
attribute with a value greater than the maximum for a 32-bit intNETCDF4_CLASSIC
valid_range
has been unsafely castNotice that the data has been cast to int32 as expected, but the
valid_range
has been corrupted.Expected behaviour
An error should be raised to inform that the
valid_range
cannot be safely cast to an allowed netCDF classic type. This would be similar to the current behaviour when a too-large value appears in the data:Screenshots
Environment
The text was updated successfully, but these errors were encountered: