Closed davidwilby closed 3 months ago
Thanks @davidwilby! Can you try pip install
ing rioxarray
and repeating?
https://github.com/alan-turing-institute/deepsensor/blob/main/requirements/requirements.txt#L4
If that works I think we just need to tell people to pip install -r requirements/requirements.txt
if wanting to run the documentation notebooks.
This relates to https://github.com/alan-turing-institute/deepsensor/issues/102 about the docs not being clear enough about set-up for running the doc notebooks.
Absolutely, can confirm that having rioxarray
installed allows xarray to read the EarthEnv tiffs correctly. Will close this issue and look at adding something brief to the docs about installing the optional dependencies, which I believe might already be mentioned.
Description
deepsensor.data.sources.get_earthenv_auxiliary_data
used in various sections of the "Getting Started" and "User Guide" sections of the docs is currently broken in DeepSensor v0.3.6 & xarray 2024.2.0 (also tested: 2023.12.0).get_earthenv_auxiliary_data
downloads TIF files from EarthEnv, which are then opened byxarray.open_dataset
. As far as I can work out,xr.open_dataset
doesn't support opening TIFs via any of xarray's backends.Calling
get_earthenv_auxiliary_data
causes xarray to raise a ValueError:According to the xarray docs linked in the error message (https://docs.xarray.dev/en/stable/user-guide/io.html#rasterio), TIF handling is supported using the
rioxarray
package by calling it directly, e.g.:rather than via
open_dataset
.So I'm confused as to how
xr.open_dataset
inget_earthenv_auxiliary_data
has ever worked. I've been through the file history fordeepsensor/data/sources.py
in this repo and the changelog for xarray and can't find anything to indicate why this behaviour would have changed in either package. Was another backend used to xarray previously? Was TIF reading supported in an earlier version?I have a branch using rioxarray ready to go if that is the right answer here.
P.S. Sorry for the flurry of issues lately, just going through the docs and logging anything I catch to add to the docs or fix.
Reproduction steps
Version
0.3.6
Screenshots
No response
OS
Linux