# \#xarray

**URL:** https://forum.access-hive.org.au/tag/xarray/56.md

[Latest](https://forum.access-hive.org.au/latest.md) · [Categories](https://forum.access-hive.org.au/categories.md) · [Tags](https://forum.access-hive.org.au/tags.md)

---

## [Running complex numpy-based code in parallel with xarray/dask](https://forum.access-hive.org.au/t/running-complex-numpy-based-code-in-parallel-with-xarray-dask/5377)

<div class="topic-metadata">

**Author:** [@robwarren](https://forum.access-hive.org.au/u/robwarren)\
**Replies:** 10\
**Last updated:** [15 October 2025 23:17 UTC](https://forum.access-hive.org.au/t/running-complex-numpy-based-code-in-parallel-with-xarray-dask/5377 "2025-10-15T23:17:47Z")

</div>

Background I have written a Python library called atmos for performing thermodynamic calculations and deriving various convective parameters. The code works with numpy arrays and is designed to perform calculations in…

---

## [VTK now supports xarray](https://forum.access-hive.org.au/t/vtk-now-supports-xarray/4555)

<div class="topic-metadata">

**Author:** [@Aidan](https://forum.access-hive.org.au/u/Aidan)\
**Replies:** 0\
**Last updated:** [28 May 2025 23:33 UTC](https://forum.access-hive.org.au/t/vtk-now-supports-xarray/4555 "2025-05-28T23:33:36Z")

</div>

Good news for those interested in advanced 3D visualisation: VTK now supports your xarray data: Some pretty pics from the link above: Open zarr, grib or netCDF files via Xarray in panapoly Or embed a Pan 3D vi…

---

## [Possible bug(?) in xarray.groupby('time.month') operations](https://forum.access-hive.org.au/t/possible-bug-in-xarray-groupby-time-month-operations/4101)

<div class="topic-metadata">

**Author:** [@hrsdawson](https://forum.access-hive.org.au/u/hrsdawson)\
**Replies:** 25\
**Last updated:** [17 February 2025 01:29 UTC](https://forum.access-hive.org.au/t/possible-bug-in-xarray-groupby-time-month-operations/4101 "2025-02-17T01:29:04Z")

</div>

I’ve come across a problem using some of xarray’s .groupby('time.month') operations that I don’t understand. This might not be the forum for it (should I post on the xarray github?), but I thought I’d post here in case a…

---

## [New CMS blog - preprocess in open\_mfdataset](https://forum.access-hive.org.au/t/new-cms-blog-preprocess-in-open-mfdataset/911)

<div class="topic-metadata">

**Author:** [@dale.roberts](https://forum.access-hive.org.au/u/dale.roberts)\
**Replies:** 3\
**Last updated:** [17 November 2024 22:58 UTC](https://forum.access-hive.org.au/t/new-cms-blog-preprocess-in-open-mfdataset/911 "2024-11-17T22:58:31Z")

</div>

Hi All CMS has put together a blog entry about using the preprocess argument to xarray.open\_mfdataset() here: More efficent use of xarray.open\_mfdataset() — CLEX CMS Blog. I’m sure many of you (especially the COSMIA fol…

---

## [Xr.open\_mfdataset OS Errno 22 on load](https://forum.access-hive.org.au/t/xr-open-mfdataset-os-errno-22-on-load/3788)

<div class="topic-metadata">

**Author:** [@jemmajeffree](https://forum.access-hive.org.au/u/jemmajeffree)\
**Replies:** 6\
**Last updated:** [28 October 2024 07:18 UTC](https://forum.access-hive.org.au/t/xr-open-mfdataset-os-errno-22-on-load/3788 "2024-10-28T07:18:02Z")

</div>

I’m trying to read ORAS5 sea surface height data with xarray, and it seems to be struggling at the concatenation step. All the files can be read individually with xr.open\_dataset, and the ones I’ve checked look fine, but…

---

## [Compatibility between coordinate definitions in GIS and CF conventions](https://forum.access-hive.org.au/t/compatibility-between-coordinate-definitions-in-gis-and-cf-conventions/2017)

<div class="topic-metadata">

**Author:** [@Aidan](https://forum.access-hive.org.au/u/Aidan)\
**Replies:** 3\
**Last updated:** [5 April 2024 02:08 UTC](https://forum.access-hive.org.au/t/compatibility-between-coordinate-definitions-in-gis-and-cf-conventions/2017 "2024-04-05T02:08:46Z")

</div>

There is a fundamental incompatibility between the approaches much of the GIS world takes to coordinates to that used in climate and earth system modelling (the CF conventions). There is a fascinating discussion over on…

---

## [Inconsistent (and confusing) relative speeds of various xarray operations](https://forum.access-hive.org.au/t/inconsistent-and-confusing-relative-speeds-of-various-xarray-operations/1700)

<div class="topic-metadata">

**Author:** [@jemmajeffree](https://forum.access-hive.org.au/u/jemmajeffree)\
**Replies:** 1\
**Last updated:** [21 December 2023 00:07 UTC](https://forum.access-hive.org.au/t/inconsistent-and-confusing-relative-speeds-of-various-xarray-operations/1700 "2023-12-21T00:07:40Z")

</div>

I’ve been trying to shave some time off a couple of computations, and have noticed that the behaviour of some xarray functions is inconsistent across different computing platforms, and inconsistent with what I’d expect. …

---

## [Convert daily-to-monthly xarray using customized calendar](https://forum.access-hive.org.au/t/convert-daily-to-monthly-xarray-using-customized-calendar/1409)

<div class="topic-metadata">

**Author:** [@abhik](https://forum.access-hive.org.au/u/abhik)\
**Replies:** 2\
**Last updated:** [19 September 2023 08:17 UTC](https://forum.access-hive.org.au/t/convert-daily-to-monthly-xarray-using-customized-calendar/1409 "2023-09-19T08:17:27Z")

</div>

I have a 3-D Xarray with a 365-day calendar, having dimensions \[3650 x 73 x 144\] : (time x lat x lon). I want to convert this 10-year daily dataset into a monthly format. This can be done using groupby(‘time.month’) for…

---

## [Dask remove time chunks for Fourier transforms](https://forum.access-hive.org.au/t/dask-remove-time-chunks-for-fourier-transforms/1163)

<div class="topic-metadata">

**Author:** [@ashjbarnes](https://forum.access-hive.org.au/u/ashjbarnes)\
**Replies:** 9\
**Last updated:** [30 August 2023 06:02 UTC](https://forum.access-hive.org.au/t/dask-remove-time-chunks-for-fourier-transforms/1163 "2023-08-30T06:02:38Z")

</div>

I’ve got a bit of a dask riddle: I have several 25Gb files on disk that are chunked in time as separate files on disk. I want to read in a very skinny slice of this data amounting to ~50Mb and perform a Fourier transfor…

---

## [Regrid from an irregular grid by summing](https://forum.access-hive.org.au/t/regrid-from-an-irregular-grid-by-summing/968)

<div class="topic-metadata">

**Author:** [@dougrichardson](https://forum.access-hive.org.au/u/dougrichardson)\
**Replies:** 4\
**Last updated:** [10 July 2023 01:25 UTC](https://forum.access-hive.org.au/t/regrid-from-an-irregular-grid-by-summing/968 "2023-07-10T01:25:03Z")

</div>

I have an array of Australia’s population density, pop. The data have spatial point dimensions (x and y) in units of metres (GDA94 / Australian Albers - EPSG:3577). Using pyproj, I transformed the projection to a regular…

---

## [Lazy sorting with dask (bootstrapping problem)](https://forum.access-hive.org.au/t/lazy-sorting-with-dask-bootstrapping-problem/866)

<div class="topic-metadata">

**Author:** [@dougrichardson](https://forum.access-hive.org.au/u/dougrichardson)\
**Replies:** 3\
**Last updated:** [29 June 2023 02:05 UTC](https://forum.access-hive.org.au/t/lazy-sorting-with-dask-bootstrapping-problem/866 "2023-06-29T02:05:52Z")

</div>

This is something that might be useful to all who do bootstrapping. I have a 2D (141 x 173) array of observations (obs, with lat and lon dimensions) and a 3D (141 x 173 x 1000) array of bootstrapped (resampled) statistic…

---

## [Vertically integrated OHC with ACCESS-OM2-01 -- how to handle a lot of 3D data](https://forum.access-hive.org.au/t/vertically-integrated-ohc-with-access-om2-01-how-to-handle-a-lot-of-3d-data/829)

<div class="topic-metadata">

**Author:** [@JuliaN](https://forum.access-hive.org.au/u/JuliaN)\
**Replies:** 16\
**Last updated:** [2 June 2023 04:55 UTC](https://forum.access-hive.org.au/t/vertically-integrated-ohc-with-access-om2-01-how-to-handle-a-lot-of-3d-data/829 "2023-06-02T04:55:44Z")

</div>

Hi! First of all apologies if something like this was posted already. I did a bit of a search on Slack and here and couldn’t find anything directly related that could be a solution. I am calculating global OHC using out…

---

## [Using a polygon (long, lat) to define and extract a region of the model output](https://forum.access-hive.org.au/t/using-a-polygon-long-lat-to-define-and-extract-a-region-of-the-model-output/758)

<div class="topic-metadata">

**Author:** [@kathy.gunn](https://forum.access-hive.org.au/u/kathy.gunn)\
**Replies:** 1\
**Last updated:** [10 May 2023 23:51 UTC](https://forum.access-hive.org.au/t/using-a-polygon-long-lat-to-define-and-extract-a-region-of-the-model-output/758 "2023-05-10T23:51:16Z")

</div>

Hello everyone. Here is an example of how to extract a geographical region from the model output using a polygon, rather than a regular shape like a square. In this example, I used a polygon (specifically, pairs of lon…

---

## [Remapping from depth to density space and back again (xgcm, xarray)](https://forum.access-hive.org.au/t/remapping-from-depth-to-density-space-and-back-again-xgcm-xarray/265)

<div class="topic-metadata">

**Author:** [@kathy.gunn](https://forum.access-hive.org.au/u/kathy.gunn)\
**Replies:** 7\
**Last updated:** [18 January 2023 06:59 UTC](https://forum.access-hive.org.au/t/remapping-from-depth-to-density-space-and-back-again-xgcm-xarray/265 "2023-01-18T06:59:24Z")

</div>

Hello everyone. I need to re-map some data (temperature and salinity) from pressure-latitude space into density-latitude space. In density-latitude space, I do some calculations. Then, I need to re-map the results back i…

---

## [Axiom - High performance metadata utility](https://forum.access-hive.org.au/t/axiom-high-performance-metadata-utility/279)

<div class="topic-metadata">

**Author:** [@ben](https://forum.access-hive.org.au/u/ben)\
**Replies:** 3\
**Last updated:** [9 January 2023 04:27 UTC](https://forum.access-hive.org.au/t/axiom-high-performance-metadata-utility/279 "2023-01-09T04:27:56Z")

</div>

Hi All, just letting you know about a little utility we’re developing for ACS to process model data into standards-compliant datasets. https://axiom.readthedocs.io/en/latest/ Contributions welcome. Cheers, Ben

---

## [Creating an xarray mask based on multiple conditions in xr.where](https://forum.access-hive.org.au/t/creating-an-xarray-mask-based-on-multiple-conditions-in-xr-where/255)

<div class="topic-metadata">

**Author:** [@taimoorsohail](https://forum.access-hive.org.au/u/taimoorsohail)\
**Replies:** 3\
**Last updated:** [9 December 2022 06:25 UTC](https://forum.access-hive.org.au/t/creating-an-xarray-mask-based-on-multiple-conditions-in-xr-where/255 "2022-12-09T06:25:41Z")

</div>

Hello, I want to take an empty 4D array and fill it with 1s and 0s based on certain conditions being met in another array. The way I have coded it is: da\_fuzz = xr.zeros\_like(S).expand\_dims({'tree\_depth':2\*\*tree\_depth}…

---

## [Optimizing sorting a 3D xarray.DataArray by another 2D xarray.DataArray](https://forum.access-hive.org.au/t/optimizing-sorting-a-3d-xarray-dataarray-by-another-2d-xarray-dataarray/239)

<div class="topic-metadata">

**Author:** [@kathy.gunn](https://forum.access-hive.org.au/u/kathy.gunn)\
**Replies:** 10\
**Last updated:** [9 December 2022 00:53 UTC](https://forum.access-hive.org.au/t/optimizing-sorting-a-3d-xarray-dataarray-by-another-2d-xarray-dataarray/239 "2022-12-09T00:53:56Z")

</div>

Hello! I would like to sort my 3D (depth, lat, time) fields of temperature, salinity, and density by a 2D (lat, time) array of dynamic height anomaly. I’ve been able to sort in a for-loop, but I imagine there is a bett…
