Questions tagged [xarray]
xarray is a Python module for working with N-dimensional arrays
136
questions
0
votes
0
answers
38
views
Earth Engine client library not initialized when using a dask cluster and xarray?
I'm trying to test running a simple math operation client-side using xee, an xarray extension for the Google Earth Engine API. When I set up the Dask client and run the compute() method I keep getting
...
0
votes
0
answers
41
views
xee: Total request size (56623104 bytes) must be less than or equal to 50331648 bytes
I am using xee, an extension of xarray to work with data from Google Earth Engine. I am trying to test computing NDVI through an xarray of Landsat imagery, but I keep getting this error.
EEException: ...
2
votes
1
answer
31
views
Create .nc file from multiple tif files : metadata time
I'm trying to create a single .nc file with 3 dimensions : x,y and time. In order to do so I have multiple tif files named by their date : 2013-04-24_Turb.tif for the 24-04-2013. I would like to do ...
1
vote
0
answers
33
views
All-NaN slice encountered when apply xr_phenology function?
I want calculate vegetation phenology from ndvi netcdf dataset, I follow yours tutorials (DEA Australia and DEA Africa) to apply xr_phenology
function , defined here. To avoid killed kernel of my ...
0
votes
1
answer
31
views
Invert latitude of NetCDF in Python / xarray
I thought it would be straight up, but I don't find a question like this one here.
I created a NetCDF out of a GeoTIFF, but it did not have coordinates or CRS.
I added it doing this:
coords = {
'time' ...
0
votes
0
answers
74
views
rioxarray.open_rasterio() won't close a file when using it with a context manager
I am writing some unit tests to test reading in raster data into an xr.Dataset data structure via the rioxarray.open_rasterio() method. The code creates a test raster to read into rioxarray....
0
votes
0
answers
90
views
Performance difference between xarray open_mfdataset and open_dataset
I'm dealing with CMIP6 Scenariomip data, I have eight ESMs precipitation grid that each one is composed by multiple netcdf files. There is one ESMs's netcdf files are seperately reserved every decade, ...
0
votes
0
answers
126
views
Low performance when writing a large xarray.DataArray with dask
I'm preprocessing HMASR data, the data contains multiple data files with format of netcdf, and each tile (1X1 degree) is a nc file. So I read it through xarray open_mfdataset() to mosaic it spatially ...
1
vote
1
answer
118
views
While exporting the rasters using rioxarray, nodata value is undefined after the mask
I have used xarray to open the netcdf file, and using rioxarray exported the raster as a .tif file. However, the exported raster doesn't have definition for nodata value, and hence, the GIS software ...
0
votes
1
answer
333
views
AttributeError: 'Dataset' object has no attribute 'rio' when using a LocalCluster from dask.distributed
I am trying to parallelize a function that uses a zarr datacube read from an s3 bucket to perform some calculations. However, when using a LocalCluster from dask.distributed, I lose the .rio accessor ...
0
votes
0
answers
119
views
xarray : no such file directory
I'm trying to transform a .nc file in .tiff using this code :
import xarray as xr
import rioxarray as rio
nc_file = xr.open_dataset("C:/Users/aurel/OneDrive/Documents/Mémoire/Datasets/CCI_lake/...
0
votes
0
answers
59
views
How can I extract the array indices from a xarray.rio.clip operation?
I have a line of code that clips a Dataset from a larger xarray.core.dataset.Dataset.
clipped = ds.rio.clip([user_polygon], crs=4326, all_touched=True)
I need to process many of these large datasets (...
1
vote
0
answers
25
views
Buffer Error when using xarray
When I tried to using python package "xarray" to read grib files, I got an error. It's quite weird, because I had did it successfully yesterday.
This is my code:
import xarray as xr
import ...
0
votes
1
answer
45
views
Gridworkflow intersection with other spatial objects such as a geodataframe
I am working with a large GridWorkFlow object; I am not able to load all the tiles due to in-memory compute resources (24.00 GB mem 8 CPU) and do not need to either. I am interested in intersecting ...
3
votes
1
answer
395
views
How to write CRS info to NetCDF in a way QGIS can read? (Python/Xarray)
I have a NetCDF file I have subset by geometry and time, and now I need to save it as a new NetCDF file. The original file does not have the CRS set, thus I am setting it in this one. The problem is ...