Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
2 votes
0 answers
43 views

I am trying to analyze the 30 day standardized precipitation index for a multi-state range of the southeastern US for the year 2016. I'm using xclim to process a direct pull of gridded daily ...
helpmeplease's user avatar
0 votes
0 answers
20 views

There has been at least one other question regarding the introduction of new dimensions in the output of xarray.apply_ufunc; I have two problems with this answer: First, I feel like the answer avoids ...
derM's user avatar
  • 13.8k
0 votes
0 answers
35 views

Very new to python! I am trying to model bottom water temperatures over time and need to reduce the resolution of my model from 1/20º to 1º. My ultimate goal is to map this and select specific grid ...
Alexis's user avatar
  • 1
1 vote
2 answers
69 views

I have a dataset that I need to convert into a rioxarray dataset so I can use regridding features but I can't work out how to convert an already existing xarray object to rioxarray. Unfortunately I ...
thefrollickingnerd's user avatar
0 votes
1 answer
51 views

I'm working in a Jupyter Notebook using Python 3.12. I have a 2D xarray (in reality, it's 3D, but we can treat it as 2D). I want to pull out the values based on indices I acquire elsewhere, and then ...
Kas Knicely's user avatar
3 votes
0 answers
69 views

I’m trying to subset a large xarray.Dataset backed by Dask and save it back to Zarr, but I’m running into a major memory problem when attempting to drop rows with a boolean mask. Here’s a minimal ...
Gary Frewin's user avatar
0 votes
0 answers
34 views

I have netCDF files of oceanographic data processed in Python, that I'd like to update the global attributes of (i.e., add the same attributes to a bunch of files). Tried doing it in Xarray per their ...
Kurt's user avatar
  • 1
0 votes
1 answer
109 views

I am trying to concatenate 10 netCDF files that are output files from a software named Ichthyop. Each of the files is a result of a lagrangian simulation of particles drifting in the Eastern ...
Yotam Ben Saadon's user avatar
0 votes
0 answers
40 views

from joblib import load ntrees_16_model = load(r"ntrees_quantile_16_model_watermask.joblib") ntrees_50_model = load(r"ntrees_quantile_50_model_watermask.joblib") ntrees_84_model = ...
Adriano Matos's user avatar
0 votes
1 answer
57 views

I calculated the Growing Season Length (GSL) index for the 1950–2023 period in Turkey using ERA5-Land daily mean temperature data. According to the definition: First, find the first occurrence of at ...
ibrahimin's user avatar
1 vote
1 answer
63 views

I'm currently trying to resample a large geotiff file to a coarser resolution. This file contains classes of tree species (indicated by integer values) at each pixel, so I want to resample each block (...
dtm34's user avatar
  • 13
0 votes
1 answer
61 views

I have a dasked xarray which is about 150k x 90k with chunk size of 8192 x 8192. I am working on a Window virtual machine which has 100gb RAM and 16 cores. I want to plot it using the Datashader ...
Nanoputian's user avatar
0 votes
0 answers
46 views

I use Python version 3.9.18 to reading wrfout files (name like: wrfout_d02_2020-01-01_00:00:00) and get T2, Q2, PSFC, U10, V10, ACSWDNB variables and combine all days in the month to a output netcdf ...
rock0789's user avatar
0 votes
1 answer
81 views

I had the task of analyzing a .nc file. I have not worked with it before, so I did some research online and found some codes. I was exploring the dataset. I tried: I am using Debian 12, Python3 and ...
Njoku Okechukwu Valentine's user avatar
0 votes
0 answers
45 views

My overall goal is the set up a virtual dataset of ERA5 data using Icechunk. As a smaller test example, I'm trying to pull all the data located in the 194001 ERA5 folder. I've been mostly able to ...
Kieran Bartels's user avatar
2 votes
1 answer
51 views

I have an existing DataFrame with metadata. I am now trying to add a column with the data. For each row in the DataFrame I want to add a subset of my xarray.DataSet. However, pandas seems to try and ...
BlueScr33n's user avatar
0 votes
0 answers
37 views

I am using xarray and rioxarray to compute values from an existing dataset, the existing dataset as band like red, blue and green so I have something like this: import xarray as xr dataset: xr....
Holt's user avatar
  • 38.1k
0 votes
0 answers
29 views

I have a very large Dask array containing geospatial information. I need to upload this array as a TIF file to an S3 bucket, but I cannot afford to load this raster in memory or save it to disk: I'd ...
ultrapoci's user avatar
  • 374
0 votes
1 answer
47 views

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: ...
francesco lc's user avatar
0 votes
0 answers
70 views

I currently have to do some calculations on a netcdf dataset. For this, I have to apply a function to each non-NaN element. Here is my current approach: import xarray as xr def calc_things(wind_speed)...
ATYslh's user avatar
  • 98
1 vote
0 answers
29 views

I have a script to load individual files into xarray for a custom data format which works fine when loading in individual files, however the moment I try to either load using open_mfdataset() or ...
JoelinRome's user avatar
0 votes
1 answer
35 views

I have an xarray.Dataset that looks like this, which is available here: https://psl.noaa.gov/thredds/dodsC/Datasets/NARR/Dailies/monolevel/acpcp.1979.nc: <xarray.Dataset> Dimensions: ...
pbreach's user avatar
  • 17.1k
1 vote
1 answer
27 views

hvplot has a groupby parameter that lets you pick what variables to group the output by. This results in a widget you use to select the data subset you want to plot. If groupby is not specified, ...
Caleb's user avatar
  • 4,167
0 votes
0 answers
48 views

I have 78 netcdf files each around 17MB, with shape (time=1, x=2048, y=2048) to be merged spatially. The single timestep is shared for all 78 files. The collgrid merge command below was able to ...
siegfried's user avatar
  • 461
0 votes
0 answers
64 views

I have global daily radiation data for 19 years. It is divided into one netCDF file for every day (so around 7000 files). I am loading all the files together as a single xarray dataset. This takes ...
Karan Mahajan's user avatar
2 votes
1 answer
58 views

How to convert multidimensional coordinate to standard coordinate in order to unify data when using xarray for nc data: import xarray as xr da = xr.DataArray( [[0, 1], [2, 3]], coords={ ...
Breeze's user avatar
  • 586
1 vote
0 answers
82 views

I'm not sure if it's a version compatibility issue either. I've spent a lot of time trying but still can't get it to work. Please help me!The codes and mistakes are as follows: [in]: print(xr....
张轻疾's user avatar
0 votes
0 answers
41 views

I need help on the usage of MetPy's interpolate_to_isosurface function (link). My goal was to interpolate a gridded meteorological dataset, such that its vertical coordinate is transformed from ...
Brian Añano's user avatar
0 votes
0 answers
25 views

Suppose I open an xarray dataset ds using xarray.open_dataset that contains a 3d array called cube with dimension coordinates x, y, and z. Usually just opening the dataset doesn't load all the data ...
Caleb's user avatar
  • 4,167
1 vote
0 answers
404 views

An example HRRR file I'm trying to open with xarray: https://storage.googleapis.com/high-resolution-rapid-refresh/hrrr.20250427/conus/hrrr.t18z.wrfprsf06.grib2 When trying to open the dataset with ...
Ryan Connelly's user avatar
0 votes
2 answers
83 views

Now I have a timelonlat 3D data where time is recorded as year, month and day. I need to split time in the form of year*month+day. So that the data becomes 4 dimensional. How should I do this? I have ...
Breeze's user avatar
  • 586
1 vote
1 answer
81 views

I am trying to get started using Xarray, but having an issue with a specific task: the labels I want to use in one dimension are dependent on another dimension. Specifically, in the example below, the ...
user13132640's user avatar
1 vote
1 answer
167 views

When selecting data from an xarray.Dataset type, the examples they provide all include hardcoding the name of the dimension like so: ds = ds.sel(state_name='California') TLDR; How can you select from ...
MKF's user avatar
  • 686
0 votes
0 answers
64 views

I have two datasets with identical dimension names and shapes and I am trying to use xarray.open_mfdataset() to merge them into one dataset before opening them. You can drop this code in your own IDE ...
MKF's user avatar
  • 686
0 votes
0 answers
135 views

I'm looking to use a shapefile to rio.clip a raster so I can find where they overlap. I'm using the polygon for the overlap (in operation it will be a state or county shapefile, this is simplified for ...
deadpickle's user avatar
0 votes
1 answer
412 views

According to the xarray documentation: xarray.DataArray is xarray’s implementation of a labeled, multi-dimensional array. To me, this means a DataArray is just numpy with labels. However, xarray ...
Jommy's user avatar
  • 1,113
0 votes
1 answer
121 views

I have a grib file containing reanalysis (an), ensemble mean (em), and ensemble spread (es) data. The dataset I access is the analysis data, import xarray as xr import cfgrib file = 'C:/Users/...
Researcher R's user avatar
1 vote
0 answers
46 views

I have gridded atmospheric field data stored in an xarray.DataArray. I computed its gradient and rotated it to obtain vector components that are tangent to the isolines at each grid point: ddata_dlon =...
Ofir Ariel's user avatar
0 votes
1 answer
74 views

My workflow generates a dataset of format xr.Dataset with dims (6, 36, 2, 13, 699, 1920) in float32. I can process and write output array chunk by chunk, but only if the zarr file already exists, with:...
AMA's user avatar
  • 226
0 votes
0 answers
67 views

When using the map method to apply a custom function in Xarray resample, the dimension coordinates are lost, and the resulting Dataset has a sequence instead of the actual coordinate values. The ...
RogUE's user avatar
  • 363
0 votes
1 answer
200 views

I'm using metpy.calc.windchill in order to calculate wind chill values, and it automatically spits out an array with a numpy mask on it. t2m, uwind, and vwind all come from ERA5 (on the Google Cloud: ...
user29903541's user avatar
0 votes
2 answers
154 views

I am trying to generated Netcdf files from a imageCollection. The code is working fine. I can save as nc file and reopened it in Colab using Xarray package. I also can open it in Panoply, however it ...
Alexandre's user avatar
1 vote
1 answer
108 views

I know set_bad can colour the pixel into a specific colour but in my example I only want to have edge colour for blue and grey pixels with values and not the bad pixels (red) import matplotlib.pyplot ...
Jane's user avatar
  • 626
0 votes
1 answer
101 views

I have created a netCDF file using xarray in python with the code below: latitude_save = sorted(list(set(copy2_sorted['lat']))) longitud_save = sorted(list(set(copy2_sorted['lon']))) time_save = ...
Kontraa Kontraa's user avatar
1 vote
0 answers
282 views

I am encountering a warning from Dask where it takes a long time to start a computation (roughly around 5 minutes) because of my large task graphs. Here is the full warning: UserWarning: Sending large ...
Adriano Matos's user avatar
0 votes
0 answers
30 views

I have a function apply_dask_function() that I use to apply the function dask_function() on a xarray dataset (ds_example). dask_function() takes 3 inputs, which are two 1D arrays (length "time&...
vdc's user avatar
  • 149
1 vote
1 answer
74 views

I have big TIFF-arrays that I want to save with xarray and view in napari. However, napari seems unable to read the zarr-format produced by xarray. Is there a way that I can specify the arguments of ...
user8188435's user avatar
0 votes
0 answers
145 views

I have an xarray dataset that contains data on a rotated grid: I want to regrid it to a regular grid. I am using: dat.interp(latitude=np.arange(8, 24, 0.001), longitude=np.arange(102, 110, 0.001), ...
Gaelle's user avatar
  • 11
1 vote
1 answer
208 views

I am trying to prevent unnecessary downloading of large datasets by reading the publicly available files directly from their online location. Surprisingly I cannot find an answer to my question on ...
Linda's user avatar
  • 47
-1 votes
1 answer
244 views

I have downloaded ERA5 global data which contains the following params: total precipitation snow fall cloud cover temperature at 2m The data range is from Jan 2008 to Dec 2024.I am using xarray ...
Imtiaz Nabi's user avatar

1
2 3 4 5
50