xarray-contrib / xarray-simlab

Xarray extension and framework for computer model simulations
http://xarray-simlab.readthedocs.io
BSD 3-Clause "New" or "Revised" License
73 stars 9 forks source link

Solve nan and encoding in dtype (fill value) #173

Closed feefladder closed 3 years ago

feefladder commented 3 years ago

As per #172, I think the default fill value could be set to something that is less likely to be in the output. So I set it to the maximum possible value in (unsigned) integers. Also, encoding options were not taken into account when determining the fill value

feefladder commented 3 years ago

I removed the warning with booleans, since it fired also in the GOLLY example: encoding options are set later (fill_value) in this case.

benbovy commented 3 years ago

Thanks @Joeperdefloep, I think those changes are welcome!

Would you mind adding some tests? Just to be sure that the default fill values will properly be read/written by zarr. Also, a good place for documenting those default values would be in the encoding options section. Could you also update the release notes, please? Thanks!

benbovy commented 3 years ago

Great, thanks @Joeperdefloep !