Closed Frankie91 closed 1 year ago
Hi @Frankie91!
Sorry I'm late answering. Two things:
cubo
uses stackstac
as engine, so, it uses COGs to convert them into a multidimensional array. In the case of Sentinel-5, the data is already a multidimensional array. See https://stackstac.readthedocs.io/en/latest/api/main/stackstac.stack.htmlI hope this solves your questions!
Best,
David
Hello,
I've been trying to use Cubo to download cubes from the Sentinel 5p collection available on the planetary computer:
https://planetarycomputer.microsoft.com/dataset/sentinel-5p-l2-netcdf
The download process works quite well by simply adapting the code snippet you provide in the documentation. But whenever I then try to apply the to_numpy() method to the resulting DataArray i get the rasterio ValueError "Can't read closed raster file". This doesn't happen when attempting to do the same with the sentinel-2 l2a collection.
Here's the code snippet I'm using:
import cubo import xarray as xr
Not working
da = cubo.create( lat=49.80, lon=9.42, collection="sentinel-5p-l2-netcdf", bands=["no2"], start_date="2021-01-01", end_date="2021-01-01", )
da.to_numpy()
Thank you in advance and best regards!