Questions tagged [xarray]
xarray is a Python module for working with N-dimensional arrays
143 questions
1
vote
0
answers
23
views
Multi-source-data-fusion
I am trying to create multichannel dataset (7, h, w) stack 7 bands B2,B3,B4,B8(sentinel2 bands), SAR(VV band), MNDWI and Slope. When I stack it says
MemoryError: Unable to allocate 3.69 GiB for an ...
0
votes
0
answers
25
views
"Compression By Gathering" with xarray for panoply
I try to extract a small spatial subset (defined by a lon/lat bounding box) of data from a satellite image (VIIRS) using python/xarray.
The original data provides 2D-Arrays with pixel lines and rows, ...
0
votes
0
answers
10
views
Why intake_xarray NetCDFSource seems to not use user input parameters
I have prepared a catalog.yml with this content:
metadata:
description: Sample catalog
information.
version: 1
plugins:
source:
- module: intake_xarray
sources:
this_source:
args:
...
1
vote
0
answers
39
views
Assigning correct coordinates to SMAP Soil Moisture data using Xarray
I'm trying to visualize, and then clip, SMAP data for a region. I'm able to download and visualize SMAP data using the following code to generate the figure below. However, while loading a SMAP data ...
0
votes
1
answer
56
views
Extract multi-band values for each pixel in a raster file and store this data as a dataframe for machine learning training
Assuming there is a raster file that contains multiple bands, is there a simple way to extract the pixel value for each band and store this information in a dataframe for later use in machine learning ...
1
vote
0
answers
49
views
Changes in resolution after saving with rasterio.to_raster
This is my code:
reach_ds = xr.open_dataset(reach)
reach_ds.rio.write_crs('EPSG:32632', inplace=True)
reach_ds = reach_ds.fillna(0)
reach_ds = reach_ds.isel(time=0)
reach_ds.rio.to_raster(...
1
vote
1
answer
104
views
Set spatial dims in xarray rio using `coords` from the dataset
This is partially just a curiosity question, but I think it would also help me understand xarray a bit better.
I've loaded a NetCDF file into an xarray Dataset. it has coords I would expect.
ipdb> ...
2
votes
1
answer
44
views
Open a xarray created NetCDF dataset in QGIS
I have created a NetCDF file using xarray in python with this code:
latitude_save = sorted(list(set(copy2_sorted['lat'])))
longitud_save = sorted(list(set(copy2_sorted['lon'])))
time_save =...
0
votes
0
answers
27
views
How can I get `make_geocube()` match results from `terra::rast()` when rasterizing a tile represented as a polygon?
I am trying to create a template xarray raster using a perfectly square polygon vector file. The polygon vector file comes from the Landsat Collection 2 Analysis Ready Data tiling scheme (https://www....
0
votes
1
answer
185
views
Wrong projection- Creating GeoTIFF from Sentinel 3 Land Surface Temperature (LST)
I have been working on creating a Land Surface Temperature (LST) map from the Sentinel-3 LST product. After selecting a polygon region in the Mediterranean I have downloaded the data from the ...
2
votes
0
answers
51
views
Python: Open group dataset with CRS, where top-level variables store CRS
I have a set of NetCDF files that I'm converting to multi-band geotiffs. I'm using xarray to load the data from the NetCDF and rasterio to convert each band to a geotiff before combining them all into ...
1
vote
0
answers
65
views
Getting data at a specific lat/lon point on a curvilinear grid
I'm working with HRRR data, which is in a lambert conic conformal projection. The specifications for the projection are
projection = ccrs.LambertConformal(
central_longitude = -97.5,
...
1
vote
1
answer
138
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
1
answer
218
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
91
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 ...