{ "cells": [ { "cell_type": "markdown", "id": "e332933a-960c-4dfc-92a7-6f39ad95f13c", "metadata": {}, "source": [ "# Conservative Region Aggregation with Xarray, Geopandas and Sparse\n", "\n", "**Goal:** Regrid a global precipitation dataset into countries _conservatively_, i.e. by exactly partitioning each grid cell into the precise region boundaries.\n", "\n", "**Meta Goal:** Demonstrate that we don't necessarily need a package for this workflow and showcase some of the new capabilities of GeoPandas along the way.\n", "\n", "**Approach:** We take a three step approach:\n", "- Represent both the original grid and target grid as GeoSeries with Polygon geometry\n", "- Compute their area overlay and turn it into a sparse matrix\n", "- Perform matrix multiplication on the full Xarray dataset (with a time dimension)\n", "\n", "It is quite fast and transparent." ] }, { "cell_type": "code", "execution_count": 1, "id": "10c5e445-cb29-4c40-89ff-f97e72193d17", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Exception reporting mode: Minimal\n" ] } ], "source": [ "import xarray as xr\n", "import geopandas as gp\n", "import pandas as pd\n", "import sparse\n", "%xmode minimal" ] }, { "cell_type": "markdown", "id": "4a26f08f-cf8e-4f11-b44d-ed80fda4150f", "metadata": {}, "source": [ "## Load Region Data\n", "\n", "To make this realistic, we will start from an actual shapefile. To download the data, run the following cell uncommented." ] }, { "cell_type": "code", "execution_count": 2, "id": "bc789221-73d8-4d3e-b0ad-c5b746a3958c", "metadata": {}, "outputs": [], "source": [ "# ! wget https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/50m/cultural/ne_50m_admin_0_countries.zip\n", "# ! unzip ne_50m_admin_0_countries.zip" ] }, { "cell_type": "markdown", "id": "c47aaa91-de9d-4653-9697-d6c6adbfb288", "metadata": {}, "source": [ "Load with geopandas:" ] }, { "cell_type": "code", "execution_count": 3, "id": "ec98354c-1cb4-4775-8226-909dc3739338", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | featurecla | \n", "scalerank | \n", "LABELRANK | \n", "SOVEREIGNT | \n", "SOV_A3 | \n", "ADM0_DIF | \n", "LEVEL | \n", "TYPE | \n", "TLC | \n", "ADMIN | \n", "... | \n", "FCLASS_TR | \n", "FCLASS_ID | \n", "FCLASS_PL | \n", "FCLASS_GR | \n", "FCLASS_IT | \n", "FCLASS_NL | \n", "FCLASS_SE | \n", "FCLASS_BD | \n", "FCLASS_UA | \n", "geometry | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "Admin-0 country | \n", "1 | \n", "3 | \n", "Zimbabwe | \n", "ZWE | \n", "0 | \n", "2 | \n", "Sovereign country | \n", "1 | \n", "Zimbabwe | \n", "... | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "POLYGON ((31.28789 -22.40205, 31.19727 -22.344... | \n", "
1 | \n", "Admin-0 country | \n", "1 | \n", "3 | \n", "Zambia | \n", "ZMB | \n", "0 | \n", "2 | \n", "Sovereign country | \n", "1 | \n", "Zambia | \n", "... | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "POLYGON ((30.39609 -15.64307, 30.25068 -15.643... | \n", "
2 | \n", "Admin-0 country | \n", "1 | \n", "3 | \n", "Yemen | \n", "YEM | \n", "0 | \n", "2 | \n", "Sovereign country | \n", "1 | \n", "Yemen | \n", "... | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "MULTIPOLYGON (((53.08564 16.64839, 52.58145 16... | \n", "
3 | \n", "Admin-0 country | \n", "3 | \n", "2 | \n", "Vietnam | \n", "VNM | \n", "0 | \n", "2 | \n", "Sovereign country | \n", "1 | \n", "Vietnam | \n", "... | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "MULTIPOLYGON (((104.06396 10.39082, 104.08301 ... | \n", "
4 | \n", "Admin-0 country | \n", "5 | \n", "3 | \n", "Venezuela | \n", "VEN | \n", "0 | \n", "2 | \n", "Sovereign country | \n", "1 | \n", "Venezuela | \n", "... | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "MULTIPOLYGON (((-60.82119 9.13838, -60.94141 9... | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
237 | \n", "Admin-0 country | \n", "1 | \n", "3 | \n", "Afghanistan | \n", "AFG | \n", "0 | \n", "2 | \n", "Sovereign country | \n", "1 | \n", "Afghanistan | \n", "... | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "POLYGON ((66.52227 37.34849, 66.82773 37.37129... | \n", "
238 | \n", "Admin-0 country | \n", "1 | \n", "5 | \n", "Kashmir | \n", "KAS | \n", "0 | \n", "2 | \n", "Indeterminate | \n", "None | \n", "Siachen Glacier | \n", "... | \n", "Unrecognized | \n", "Unrecognized | \n", "Unrecognized | \n", "Unrecognized | \n", "Unrecognized | \n", "Unrecognized | \n", "Unrecognized | \n", "Unrecognized | \n", "Unrecognized | \n", "POLYGON ((77.04863 35.10991, 77.00449 35.19634... | \n", "
239 | \n", "Admin-0 country | \n", "3 | \n", "4 | \n", "Antarctica | \n", "ATA | \n", "0 | \n", "2 | \n", "Indeterminate | \n", "1 | \n", "Antarctica | \n", "... | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "MULTIPOLYGON (((-45.71777 -60.52090, -45.49971... | \n", "
240 | \n", "Admin-0 country | \n", "3 | \n", "6 | \n", "Netherlands | \n", "NL1 | \n", "1 | \n", "2 | \n", "Country | \n", "1 | \n", "Sint Maarten | \n", "... | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "POLYGON ((-63.12305 18.06895, -63.01118 18.068... | \n", "
241 | \n", "Admin-0 country | \n", "5 | \n", "6 | \n", "Tuvalu | \n", "TUV | \n", "0 | \n", "2 | \n", "Sovereign country | \n", "1 | \n", "Tuvalu | \n", "... | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "POLYGON ((179.21367 -8.52422, 179.20059 -8.534... | \n", "
242 rows × 169 columns
\n", "<xarray.Dataset>\n", "Dimensions: (latitude: 180, nv: 2, longitude: 360, time: 9226)\n", "Coordinates:\n", " lat_bounds (latitude, nv) float32 dask.array<chunksize=(180, 2), meta=np.ndarray>\n", " * latitude (latitude) float32 -90.0 -89.0 -88.0 -87.0 ... 87.0 88.0 89.0\n", " lon_bounds (longitude, nv) float32 dask.array<chunksize=(360, 2), meta=np.ndarray>\n", " * longitude (longitude) float32 0.0 1.0 2.0 3.0 ... 356.0 357.0 358.0 359.0\n", " * time (time) datetime64[ns] 1996-10-01 1996-10-02 ... 2021-12-31\n", " time_bounds (time, nv) datetime64[ns] dask.array<chunksize=(200, 2), meta=np.ndarray>\n", "Dimensions without coordinates: nv\n", "Data variables:\n", " precip (time, latitude, longitude) float32 dask.array<chunksize=(200, 180, 360), meta=np.ndarray>\n", "Attributes: (12/45)\n", " Conventions: CF-1.6, ACDD 1.3\n", " Metadata_Conventions: CF-1.6, Unidata Dataset Discovery v1.0, NOAA ...\n", " acknowledgment: This project was supported in part by a grant...\n", " cdm_data_type: Grid\n", " cdr_program: NOAA Climate Data Record Program for satellit...\n", " cdr_variable: precipitation\n", " ... ...\n", " standard_name_vocabulary: CF Standard Name Table (v41, 22 February 2017)\n", " summary: Global Precipitation Climatology Project (GPC...\n", " time_coverage_duration: P1D\n", " time_coverage_end: 1996-10-01T23:59:59Z\n", " time_coverage_start: 1996-10-01T00:00:00Z\n", " title: Global Precipitation Climatatology Project (G...
<xarray.Dataset>\n", "Dimensions: (latitude: 180, nv: 2, longitude: 360)\n", "Coordinates:\n", " * latitude (latitude) float32 -90.0 -89.0 -88.0 -87.0 ... 87.0 88.0 89.0\n", " * longitude (longitude) float32 0.0 1.0 2.0 3.0 ... 356.0 357.0 358.0 359.0\n", "Dimensions without coordinates: nv\n", "Data variables:\n", " lat_bounds (latitude, nv) float32 -90.0 -89.0 -89.0 ... 89.0 89.0 90.0\n", " lon_bounds (longitude, nv) float32 0.0 1.0 1.0 2.0 ... 359.0 359.0 360.0\n", "Attributes: (12/45)\n", " Conventions: CF-1.6, ACDD 1.3\n", " Metadata_Conventions: CF-1.6, Unidata Dataset Discovery v1.0, NOAA ...\n", " acknowledgment: This project was supported in part by a grant...\n", " cdm_data_type: Grid\n", " cdr_program: NOAA Climate Data Record Program for satellit...\n", " cdr_variable: precipitation\n", " ... ...\n", " standard_name_vocabulary: CF Standard Name Table (v41, 22 February 2017)\n", " summary: Global Precipitation Climatology Project (GPC...\n", " time_coverage_duration: P1D\n", " time_coverage_end: 1996-10-01T23:59:59Z\n", " time_coverage_start: 1996-10-01T00:00:00Z\n", " title: Global Precipitation Climatatology Project (G...
<xarray.Dataset>\n", "Dimensions: (nv: 2, point: 64800)\n", "Coordinates:\n", " * point (point) MultiIndex\n", " - latitude (point) float64 -90.0 -90.0 -90.0 -90.0 ... 89.0 89.0 89.0 89.0\n", " - longitude (point) float64 0.0 1.0 2.0 3.0 4.0 ... 356.0 357.0 358.0 359.0\n", "Dimensions without coordinates: nv\n", "Data variables:\n", " lat_bounds (nv, point) float32 -90.0 -90.0 -90.0 -90.0 ... 90.0 90.0 90.0\n", " lon_bounds (nv, point) float32 0.0 1.0 2.0 3.0 ... 357.0 358.0 359.0 360.0\n", "Attributes: (12/45)\n", " Conventions: CF-1.6, ACDD 1.3\n", " Metadata_Conventions: CF-1.6, Unidata Dataset Discovery v1.0, NOAA ...\n", " acknowledgment: This project was supported in part by a grant...\n", " cdm_data_type: Grid\n", " cdr_program: NOAA Climate Data Record Program for satellit...\n", " cdr_variable: precipitation\n", " ... ...\n", " standard_name_vocabulary: CF Standard Name Table (v41, 22 February 2017)\n", " summary: Global Precipitation Climatology Project (GPC...\n", " time_coverage_duration: P1D\n", " time_coverage_end: 1996-10-01T23:59:59Z\n", " time_coverage_start: 1996-10-01T00:00:00Z\n", " title: Global Precipitation Climatatology Project (G...
<xarray.DataArray (point: 64800)>\n", "array([<shapely.geometry.polygon.Polygon object at 0x7fb5449d8c70>,\n", " <shapely.geometry.polygon.Polygon object at 0x7fb5449d8fd0>,\n", " <shapely.geometry.polygon.Polygon object at 0x7fb5449d8550>, ...,\n", " <shapely.geometry.polygon.Polygon object at 0x7fb535d69ac0>,\n", " <shapely.geometry.polygon.Polygon object at 0x7fb535d69af0>,\n", " <shapely.geometry.polygon.Polygon object at 0x7fb535d69b20>],\n", " dtype=object)\n", "Coordinates:\n", " * point (point) MultiIndex\n", " - latitude (point) float64 -90.0 -90.0 -90.0 -90.0 ... 89.0 89.0 89.0 89.0\n", " - longitude (point) float64 0.0 1.0 2.0 3.0 4.0 ... 356.0 357.0 358.0 359.0
\n", " | \n", " | geometry | \n", "latitude | \n", "longitude | \n", "
---|---|---|---|---|
latitude | \n", "longitude | \n", "\n", " | \n", " | \n", " |
-90.0 | \n", "0.0 | \n", "POLYGON ((0.00000 -90.00000, 0.00000 -89.00000... | \n", "-90.0 | \n", "0.0 | \n", "
1.0 | \n", "POLYGON ((1.00000 -90.00000, 1.00000 -89.00000... | \n", "-90.0 | \n", "1.0 | \n", "|
2.0 | \n", "POLYGON ((2.00000 -90.00000, 2.00000 -89.00000... | \n", "-90.0 | \n", "2.0 | \n", "|
3.0 | \n", "POLYGON ((3.00000 -90.00000, 3.00000 -89.00000... | \n", "-90.0 | \n", "3.0 | \n", "|
4.0 | \n", "POLYGON ((4.00000 -90.00000, 4.00000 -89.00000... | \n", "-90.0 | \n", "4.0 | \n", "|
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
89.0 | \n", "355.0 | \n", "POLYGON ((-5.00000 89.00000, -5.00000 90.00000... | \n", "89.0 | \n", "355.0 | \n", "
356.0 | \n", "POLYGON ((-4.00000 89.00000, -4.00000 90.00000... | \n", "89.0 | \n", "356.0 | \n", "|
357.0 | \n", "POLYGON ((-3.00000 89.00000, -3.00000 90.00000... | \n", "89.0 | \n", "357.0 | \n", "|
358.0 | \n", "POLYGON ((-2.00000 89.00000, -2.00000 90.00000... | \n", "89.0 | \n", "358.0 | \n", "|
359.0 | \n", "POLYGON ((-1.00000 89.00000, -1.00000 90.00000... | \n", "89.0 | \n", "359.0 | \n", "
64800 rows × 3 columns
\n", "\n", " | latitude | \n", "longitude | \n", "featurecla | \n", "scalerank | \n", "LABELRANK | \n", "SOVEREIGNT | \n", "SOV_A3 | \n", "ADM0_DIF | \n", "LEVEL | \n", "TYPE | \n", "... | \n", "FCLASS_TR | \n", "FCLASS_ID | \n", "FCLASS_PL | \n", "FCLASS_GR | \n", "FCLASS_IT | \n", "FCLASS_NL | \n", "FCLASS_SE | \n", "FCLASS_BD | \n", "FCLASS_UA | \n", "geometry | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "-90.0 | \n", "0.0 | \n", "Admin-0 country | \n", "3 | \n", "4 | \n", "Antarctica | \n", "ATA | \n", "0 | \n", "2 | \n", "Indeterminate | \n", "... | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "POLYGON ((0.000 -6370029.666, 111194.927 -6370... | \n", "
1 | \n", "-90.0 | \n", "1.0 | \n", "Admin-0 country | \n", "3 | \n", "4 | \n", "Antarctica | \n", "ATA | \n", "0 | \n", "2 | \n", "Indeterminate | \n", "... | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "POLYGON ((111194.927 -6370029.666, 222389.853 ... | \n", "
2 | \n", "-90.0 | \n", "2.0 | \n", "Admin-0 country | \n", "3 | \n", "4 | \n", "Antarctica | \n", "ATA | \n", "0 | \n", "2 | \n", "Indeterminate | \n", "... | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "POLYGON ((222389.853 -6370029.666, 333584.780 ... | \n", "
3 | \n", "-90.0 | \n", "3.0 | \n", "Admin-0 country | \n", "3 | \n", "4 | \n", "Antarctica | \n", "ATA | \n", "0 | \n", "2 | \n", "Indeterminate | \n", "... | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "POLYGON ((333584.780 -6370029.666, 444779.707 ... | \n", "
4 | \n", "-90.0 | \n", "4.0 | \n", "Admin-0 country | \n", "3 | \n", "4 | \n", "Antarctica | \n", "ATA | \n", "0 | \n", "2 | \n", "Indeterminate | \n", "... | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "POLYGON ((444779.707 -6370029.666, 555974.633 ... | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
27634 | \n", "66.0 | \n", "341.0 | \n", "Admin-0 country | \n", "1 | \n", "3 | \n", "Iceland | \n", "ISL | \n", "0 | \n", "2 | \n", "Sovereign country | \n", "... | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "MULTIPOLYGON (((-2001508.680 5820198.111, -202... | \n", "
27635 | \n", "66.0 | \n", "342.0 | \n", "Admin-0 country | \n", "1 | \n", "3 | \n", "Iceland | \n", "ISL | \n", "0 | \n", "2 | \n", "Sovereign country | \n", "... | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "MULTIPOLYGON (((-1890313.753 5820198.111, -194... | \n", "
27636 | \n", "66.0 | \n", "343.0 | \n", "Admin-0 country | \n", "1 | \n", "3 | \n", "Iceland | \n", "ISL | \n", "0 | \n", "2 | \n", "Sovereign country | \n", "... | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "POLYGON ((-1890313.753 5828182.772, -1886925.7... | \n", "
27637 | \n", "66.0 | \n", "344.0 | \n", "Admin-0 country | \n", "1 | \n", "3 | \n", "Iceland | \n", "ISL | \n", "0 | \n", "2 | \n", "Sovereign country | \n", "... | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "POLYGON ((-1779118.826 5843385.413, -1777495.4... | \n", "
27638 | \n", "66.0 | \n", "345.0 | \n", "Admin-0 country | \n", "1 | \n", "3 | \n", "Iceland | \n", "ISL | \n", "0 | \n", "2 | \n", "Sovereign country | \n", "... | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "None | \n", "MULTIPOLYGON (((-1667923.900 5835808.462, -166... | \n", "
27639 rows × 171 columns
\n", "\n", " | \n", " | \n", " | weights | \n", "
---|---|---|---|
latitude | \n", "longitude | \n", "SOVEREIGNT | \n", "\n", " |
-90.0 | \n", "0.0 | \n", "Antarctica | \n", "0.000009 | \n", "
1.0 | \n", "Antarctica | \n", "0.000009 | \n", "|
2.0 | \n", "Antarctica | \n", "0.000009 | \n", "|
3.0 | \n", "Antarctica | \n", "0.000009 | \n", "|
4.0 | \n", "Antarctica | \n", "0.000009 | \n", "|
... | \n", "... | \n", "... | \n", "... | \n", "
66.0 | \n", "341.0 | \n", "Iceland | \n", "0.005459 | \n", "
342.0 | \n", "Iceland | \n", "0.004817 | \n", "|
343.0 | \n", "Iceland | \n", "0.016131 | \n", "|
344.0 | \n", "Iceland | \n", "0.015022 | \n", "|
345.0 | \n", "Iceland | \n", "0.001937 | \n", "
27639 rows × 1 columns
\n", "<xarray.Dataset>\n", "Dimensions: (dim_0: 27639)\n", "Coordinates:\n", " * dim_0 (dim_0) MultiIndex\n", " - latitude (dim_0) float64 -90.0 -90.0 -90.0 -90.0 ... 66.0 66.0 66.0 66.0\n", " - longitude (dim_0) float64 0.0 1.0 2.0 3.0 4.0 ... 342.0 343.0 344.0 345.0\n", " - SOVEREIGNT (dim_0) object 'Antarctica' 'Antarctica' ... 'Iceland' 'Iceland'\n", "Data variables:\n", " weights (dim_0) float64 8.803e-06 8.803e-06 ... 0.01502 0.001937
<xarray.DataArray 'weights' (latitude: 171, longitude: 360, SOVEREIGNT: 201)>\n", "<COO: shape=(171, 360, 201), dtype=float64, nnz=27627, fill_value=0.0>\n", "Coordinates:\n", " * latitude (latitude) float64 -90.0 -89.0 -88.0 -87.0 ... 81.0 82.0 83.0\n", " * longitude (longitude) float64 0.0 1.0 2.0 3.0 ... 356.0 357.0 358.0 359.0\n", " * SOVEREIGNT (SOVEREIGNT) object 'Afghanistan' 'Albania' ... 'eSwatini'
<xarray.DataArray (time: 9226, SOVEREIGNT: 201)>\n", "dask.array<sum-aggregate, shape=(9226, 201), dtype=float64, chunksize=(200, 201), chunktype=numpy.ndarray>\n", "Coordinates:\n", " * time (time) datetime64[ns] 1996-10-01 1996-10-02 ... 2021-12-31\n", " * SOVEREIGNT (SOVEREIGNT) object 'Afghanistan' 'Albania' ... 'eSwatini'
<xarray.DataArray 'precip' (time: 9226, latitude: 180, longitude: 360)>\n", "dask.array<xarray-<this-array>, shape=(9226, 180, 360), dtype=float32, chunksize=(38, 180, 360), chunktype=numpy.ndarray>\n", "Coordinates:\n", " * latitude (latitude) float32 -90.0 -89.0 -88.0 -87.0 ... 87.0 88.0 89.0\n", " * longitude (longitude) float32 0.0 1.0 2.0 3.0 ... 356.0 357.0 358.0 359.0\n", " * time (time) datetime64[ns] 1996-10-01 1996-10-02 ... 2021-12-31\n", "Attributes:\n", " cell_methods: area: mean time: mean\n", " long_name: NOAA Climate Data Record (CDR) of Daily GPCP Satellite-Ga...\n", " standard_name: lwe_precipitation_rate\n", " units: mm/day\n", " valid_range: [0.0, 100.0]
<xarray.DataArray (time: 9226, SOVEREIGNT: 201)>\n", "dask.array<transpose, shape=(9226, 201), dtype=float64, chunksize=(38, 201), chunktype=numpy.ndarray>\n", "Coordinates:\n", " * SOVEREIGNT (SOVEREIGNT) object 'Afghanistan' 'Albania' ... 'eSwatini'\n", " * time (time) datetime64[ns] 1996-10-01 1996-10-02 ... 2021-12-31