Questions tagged [xarray]
xarray is a Python module for working with N-dimensional arrays
53
questions with no upvoted or accepted answers
4
votes
0
answers
79
views
Looking up whole time-series for specific point from 45 GB file
I want to look-up 8760 times for a single lat/lon combo in less than a second from 43.82 GB file of wind data containing:
8760 times (every hour in a year)
721 latitudes (every 0.25° from -90.0° to ...
3
votes
1
answer
3k
views
Value error when merging .nc files: xarray could not find any dimension coordinates to use to order the datasets for concatenation
I want to merge multiple .nc files into one. Each of the .nc files corresponds to a timestep which should be added together to have one .nc file with all data for all dates.
When I execute the ...
3
votes
0
answers
200
views
Extract time series for features from large masked xarrays
I have done this before with GDAL and Python, but was hoping to be able to use xarray to scale things up.
Let's say I have three datasets:
1. A large multiband geotiff where each band is a different ...
3
votes
0
answers
408
views
How to slice a reduced gaussian gridded grib with xarray?
I want:
to get list of coordinates of points within the specified area (ideal would be geopandas from shapefile or something like this)
I don't want to interpolate the grib, just extract points by ...
2
votes
0
answers
552
views
Create an xarray dataset form a series of GeoTIFFs and clipping problem
I am trying to create a dataset from a series of GeoTIFFs (one .tiff file per day) and then clip it with a given geometry (shapefile).
The TIFF files, one per day, have this format: e.g. day 29-07-...
2
votes
1
answer
459
views
Unable to convert Sentinel-5P NetCDF file to GeoTIFF using xarray python
I am trying to convert Sentinel-5P NetCDF file (available at https://drive.google.com/file/d/1dJdhQspdI3p5YyyiBBiNxUPCCOU91QrU/view?usp=sharing) to GeoTIFF using the following code:
import xarray
...
2
votes
1
answer
548
views
How to fix rioxarray.exceptions.DimensionMissingCoordinateError: x missing coordinates?
I'm trying to reproject a NetCDF file without an assigned projection. I was successful in assigning projection. But, while attempting to reproject the file, I receive the following error: rioxarray....
2
votes
0
answers
1k
views
Conflicting sizes for dimension 'time' with rioxarray
I've been using rioxarray to convert netcdf files to geotiffs, and up till now, it's worked great.
However, when I open a ERA5 reanalysis netcdf dataset, rioxarray appears to find that the data size ...
2
votes
0
answers
847
views
Creating raster stack from xarray in Python
I am trying to create a raster stack from an xarray dataset which I obtained from multiple NetCDF files.
import netCDF4 as nc
import rasterio as rio
import numpy as np
import xarray as xr
import os
...
1
vote
0
answers
34
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 ...
1
vote
0
answers
26
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 ...
1
vote
0
answers
100
views
Landsat from Planetary Computer unexpectedly turns up all no data in some regions
Using some code that gathers Landsat 8 collections from Microsoft Planetary Computer into Open Data Cube xarray using a stac search works fine in some regions but in others returns all nan values. ...
1
vote
0
answers
387
views
Loading geospatial datasets with rioxarray
I'm using xarray to open and reproject some .grib files. The files have x, y, and time dimensions and contain several data variables. However, I have some issues with loading the data.
Loading them ...
1
vote
1
answer
222
views
Using Python (in Colab), how to convert a multiband ee.Image into an ee.ImageCollection?
I ultimately want to convert an ee.Image to an xarray object so I can further process the data.
I know the library wxee can do that with ee.ImageCollection.wx.to_xarray(). However, it requires an ee....
1
vote
0
answers
177
views
Saving extracted array into new NetCDF file
I have a NetCDF file which looks like this:
<xarray.Dataset>
Dimensions: (time: 180, d2: 2, lat: 180, lon: 360)
Coordinates:
* time (time) object 2000-01-15 12:00:00 ... 2014-12-15 12:...