I get this warning when I try to write out a raster using rioxarray:

Free disk space available is 0 bytes, whereas 1152072000 are at least necessary. You can disable this check by defining the CHECK_DISK_FREE_SPACE configuration option to FALSE.

I know this is a GDAL thing, which solutions are well-documented for. However, rioxarray is wrapped over GDAL, and I'm having trouble finding a way to overwrite the error. There is certainly enough disk space to write the file.

1 Answer 1


Rasterio is just stuff on top of GDAL, where the issue you mention arises. You can pass the GDAL configuration to rasterio as

with rasterio.Env(CHECK_DISK_FREE_SPACE="NO"):
    rds = rioxarray.open_rasterio(...)

(I don't know whether you need to pass "NO" or False. You can read more about this here.

  • It's rioxarray, not rasterio
    – hmnoidk
    Commented Oct 27, 2022 at 11:54
  • rioxarray wraps rasterio wraps GDAL. Have you tried having your rioxarray call within the first context manager? You can also pass an already opened rasterio dataset to rioxarray.
    – Jose
    Commented Oct 27, 2022 at 16:02
  • I'm not sure I understand the first option. Do you mean, opening with rioxarray and then using rasterio.Env to deactivate the disc space check? I think I did this and still had errors
    – hmnoidk
    Commented Oct 28, 2022 at 11:45
  • 1
    Updated the example to wrap rioxarray code.
    – snowman2
    Commented Oct 28, 2022 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.