{ "cells": [ { "cell_type": "code", "execution_count": 2, "id": "44127b59", "metadata": {}, "outputs": [], "source": [ "import xarray as xr\n", "import pandas as pd\n", "import os\n", "import geopandas as gpd\n", "from shapely.geometry import mapping\n", "import numpy as np" ] }, { "cell_type": "code", "execution_count": 46, "id": "f555db26", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Collecting rioxarray\n", " Downloading rioxarray-0.14.0-py3-none-any.whl (53 kB)\n", "Requirement already satisfied: pyproj>=2.2 in c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages (from rioxarray) (3.4.1)\n", "Requirement already satisfied: numpy>=1.21 in c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages (from rioxarray) (1.22.3)\n", "Requirement already satisfied: packaging in c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages (from rioxarray) (21.3)\n", "Requirement already satisfied: rasterio>=1.2 in c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages (from rioxarray) (1.3.6)\n", "Requirement already satisfied: xarray>=0.17 in c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages (from rioxarray) (2022.3.0)\n", "Requirement already satisfied: certifi in c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages (from pyproj>=2.2->rioxarray) (2021.10.8)\n", "Requirement already satisfied: snuggs>=1.4.1 in c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages (from rasterio>=1.2->rioxarray) (1.4.7)\n", "Requirement already satisfied: attrs in c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages (from rasterio>=1.2->rioxarray) (21.4.0)\n", "Requirement already satisfied: click>=4.0 in c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages (from rasterio>=1.2->rioxarray) (8.0.4)\n", "Requirement already satisfied: click-plugins in c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages (from rasterio>=1.2->rioxarray) (1.1.1)\n", "Requirement already satisfied: affine in c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages (from rasterio>=1.2->rioxarray) (2.4.0)\n", "Requirement already satisfied: cligj>=0.5 in c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages (from rasterio>=1.2->rioxarray) (0.7.2)\n", "Requirement already satisfied: setuptools in c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages (from rasterio>=1.2->rioxarray) (58.0.4)\n", "Requirement already satisfied: colorama in c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages (from click>=4.0->rasterio>=1.2->rioxarray) (0.4.4)\n", "Requirement already satisfied: pyparsing>=2.1.6 in c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages (from snuggs>=1.4.1->rasterio>=1.2->rioxarray) (3.0.4)\n", "Requirement already satisfied: pandas>=1.1 in c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages (from xarray>=0.17->rioxarray) (1.5.3)\n", "Requirement already satisfied: pytz>=2020.1 in c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages (from pandas>=1.1->xarray>=0.17->rioxarray) (2021.3)\n", "Requirement already satisfied: python-dateutil>=2.8.1 in c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages (from pandas>=1.1->xarray>=0.17->rioxarray) (2.8.2)\n", "Requirement already satisfied: six>=1.5 in c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages (from python-dateutil>=2.8.1->pandas>=1.1->xarray>=0.17->rioxarray) (1.16.0)\n", "Installing collected packages: rioxarray\n", "Successfully installed rioxarray-0.14.0\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING: Ignoring invalid distribution -yqt5-sip (c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages)\n", "WARNING: Ignoring invalid distribution -yqt5-sip (c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages)\n", "WARNING: Ignoring invalid distribution -yqt5-sip (c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages)\n", "WARNING: Ignoring invalid distribution -yqt5-sip (c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages)\n", "WARNING: Ignoring invalid distribution -yqt5-sip (c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages)\n", "WARNING: Ignoring invalid distribution -yqt5-sip (c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages)\n", "WARNING: Ignoring invalid distribution -yqt5-sip (c:\\users\\dboateng\\anaconda3\\envs\\regionmask_env\\lib\\site-packages)\n", "WARNING: You are using pip version 22.0.4; however, version 23.0.1 is available.\n", "You should consider upgrading via the 'C:\\Users\\dboateng\\Anaconda3\\envs\\regionmask_env\\python.exe -m pip install --upgrade pip' command.\n" ] } ], "source": [ "!pip install rioxarray" ] }, { "cell_type": "code", "execution_count": 51, "id": "0f4db48f", "metadata": {}, "outputs": [], "source": [ "# set paths\n", "import regionmask\n", "era_data_path=\"C:/Users/dboateng/Desktop/Datasets/ERA5/monthly_1950_2021/\"\n", "path_shapefile=\"C:/Users/dboateng/Desktop/Datasets/Station/Ghana/Ghana_ShapeFile/gh_wgs16dregions.shp\"\n", "afr_shape = \"C:/Users/dboateng/Desktop/Datasets/Station/Ghana/Africa_shapefile/afr_g2014_2013_0.shp\"\n", "\n", "from1979to2012 = pd.date_range(start=\"1979-01-01\", end=\"2012-12-31\", freq=\"MS\")\n", "# read data\n", "\n", "ghana_shape = gpd.read_file(path_shapefile)" ] }, { "cell_type": "code", "execution_count": 56, "id": "9d9d5040", "metadata": {}, "outputs": [], "source": [ "tp_monthly= xr.open_dataset(os.path.join(era_data_path, \"tp_monthly.nc\"))\n", "tp_monthly = tp_monthly[\"tp\"].sel(time=from1979to2012).mean(dim=\"time\")\n", "tp_monthly = tp_monthly.assign_coords({\"longitude\": (((tp_monthly.longitude + 180) % 360) - 180)})" ] }, { "cell_type": "code", "execution_count": 57, "id": "51db8c57", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
<xarray.DataArray 'tp' (latitude: 721, longitude: 1440)>\n", "array([[0.00069632, 0.00069632, 0.00069632, ..., 0.00069632, 0.00069632,\n", " 0.00069632],\n", " [0.00070333, 0.00070337, 0.00070338, ..., 0.00070332, 0.00070333,\n", " 0.00070335],\n", " [0.0006945 , 0.00069459, 0.00069464, ..., 0.00069443, 0.00069443,\n", " 0.00069447],\n", " ...,\n", " [0.00017392, 0.0001739 , 0.00017387, ..., 0.00017391, 0.00017391,\n", " 0.00017392],\n", " [0.00017434, 0.00017429, 0.00017429, ..., 0.00017439, 0.00017439,\n", " 0.0001744 ],\n", " [0.00018674, 0.00018674, 0.00018674, ..., 0.00018674, 0.00018674,\n", " 0.00018674]], dtype=float32)\n", "Coordinates:\n", " expver float64 1.0\n", " * longitude (longitude) float32 0.0 0.25 0.5 0.75 ... -1.0 -0.75 -0.5 -0.25\n", " * latitude (latitude) float32 90.0 89.75 89.5 89.25 ... -89.5 -89.75 -90.0\n", " spatial_ref int32 0
<xarray.DataArray 'tp' (latitude: 22, longitude: 1440)>\n", "array([[0.00216022, 0.00199021, 0.00189564, ..., 0.00212618, 0.001947 ,\n", " 0.00184436],\n", " [ nan, nan, nan, ..., 0.00205568, 0.00212555,\n", " 0.00212988],\n", " [0.00244041, 0.00207277, 0.00209045, ..., 0.00240557, 0.00269521,\n", " 0.00254029],\n", " ...,\n", " [0.0036659 , 0.00372819, 0.00330154, ..., 0.00386723, 0.00438464,\n", " 0.00364647],\n", " [0.00347596, 0.00212743, 0.00262582, ..., 0.0040779 , 0.00491352,\n", " 0.00403812],\n", " [0.00188213, 0.00165231, 0.00205362, ..., 0.00494683, 0.00430314,\n", " 0.0027265 ]], dtype=float32)\n", "Coordinates:\n", " * latitude (latitude) float64 11.0 10.75 10.5 10.25 ... 6.5 6.25 6.0 5.75\n", " * longitude (longitude) float64 0.0 0.25 0.5 0.75 ... -1.0 -0.75 -0.5 -0.25\n", " expver float64 1.0\n", " spatial_ref int32 0
\n", " | ADM0_CODE | \n", "ADM0_NAME | \n", "CONTINENT | \n", "ISO3 | \n", "ISO2 | \n", "UNI | \n", "UNDP | \n", "FAOSTAT | \n", "GAUL | \n", "RIC_ISO3 | \n", "... | \n", "CRA | \n", "ECOWAS | \n", "IGAD | \n", "IOC | \n", "SADC | \n", "CICOS | \n", "ICPAC | \n", "BDMS | \n", "MOI | \n", "geometry | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "6 | \n", "Sudan | \n", "Africa | \n", "SDN | \n", "SD | \n", "729.0 | \n", "SUD | \n", "276.0 | \n", "6.0 | \n", "ICPAC-SDN | \n", "... | \n", "0 | \n", "0 | \n", "4 | \n", "0 | \n", "0 | \n", "0.0 | \n", "14.0 | \n", "0.0 | \n", "NaN | \n", "MULTIPOLYGON (((38.58148 18.02542, 38.58203 18... | \n", "
1 | \n", "8 | \n", "Angola | \n", "Africa | \n", "AGO | \n", "AO | \n", "24.0 | \n", "ANG | \n", "7.0 | \n", "8.0 | \n", "BDMS-AGO | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "6 | \n", "0.0 | \n", "0.0 | \n", "16.0 | \n", "NaN | \n", "MULTIPOLYGON (((11.79481 -16.81925, 11.79375 -... | \n", "
2 | \n", "29 | \n", "Benin | \n", "Africa | \n", "BEN | \n", "BJ | \n", "204.0 | \n", "BEN | \n", "53.0 | \n", "29.0 | \n", "CRA-BEN | \n", "... | \n", "13 | \n", "3 | \n", "0 | \n", "0 | \n", "0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "MULTIPOLYGON (((1.86343 6.28872, 1.86292 6.288... | \n", "
3 | \n", "35 | \n", "Botswana | \n", "Africa | \n", "BWA | \n", "BW | \n", "72.0 | \n", "BOT | \n", "20.0 | \n", "35.0 | \n", "BDMS-BWA | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "6 | \n", "0.0 | \n", "0.0 | \n", "16.0 | \n", "NaN | \n", "POLYGON ((25.17447 -17.77881, 25.18476 -17.783... | \n", "
4 | \n", "42 | \n", "Burkina Faso | \n", "Africa | \n", "BFA | \n", "BF | \n", "854.0 | \n", "BKF | \n", "233.0 | \n", "42.0 | \n", "CRA-BFA | \n", "... | \n", "13 | \n", "3 | \n", "0 | \n", "0 | \n", "0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "POLYGON ((-0.45567 15.08082, -0.45411 15.07937... | \n", "
5 | \n", "45 | \n", "Cameroon | \n", "Africa | \n", "CMR | \n", "CM | \n", "120.0 | \n", "CMR | \n", "32.0 | \n", "45.0 | \n", "CICOS-CMR | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "11.0 | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "MULTIPOLYGON (((9.26462 3.94935, 9.26302 3.948... | \n", "
6 | \n", "47 | \n", "Cape Verde | \n", "Africa | \n", "CPV | \n", "CV | \n", "132.0 | \n", "CVI | \n", "35.0 | \n", "47.0 | \n", "CRA-CPV | \n", "... | \n", "13 | \n", "3 | \n", "0 | \n", "0 | \n", "0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "MULTIPOLYGON (((-24.69949 14.89513, -24.69853 ... | \n", "
7 | \n", "49 | \n", "Central African Republic | \n", "Africa | \n", "CAF | \n", "CF | \n", "140.0 | \n", "CAF | \n", "37.0 | \n", "49.0 | \n", "CICOS-CAF | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "11.0 | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "POLYGON ((22.52068 11.00757, 22.55266 10.99373... | \n", "
8 | \n", "50 | \n", "Chad | \n", "Africa | \n", "TCD | \n", "TD | \n", "148.0 | \n", "CHD | \n", "39.0 | \n", "50.0 | \n", "CRA_CICOS-TCD | \n", "... | \n", "13 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "11.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "POLYGON ((24.00000 16.00000, 24.00000 15.71112... | \n", "
9 | \n", "58 | \n", "Comoros | \n", "Africa | \n", "COM | \n", "KM | \n", "174.0 | \n", "COI | \n", "45.0 | \n", "58.0 | \n", "MOI-COM | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "5 | \n", "0 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "15.0 | \n", "MULTIPOLYGON (((43.71993 -12.40682, 43.72064 -... | \n", "
10 | \n", "59 | \n", "Congo | \n", "Africa | \n", "COG | \n", "CG | \n", "178.0 | \n", "PRC | \n", "46.0 | \n", "59.0 | \n", "CICOS-COG | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "11.0 | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "POLYGON ((17.60632 3.64125, 17.65328 3.63904, ... | \n", "
11 | \n", "66 | \n", "Côte d'Ivoire | \n", "Africa | \n", "CIV | \n", "CI | \n", "384.0 | \n", "IVC | \n", "107.0 | \n", "66.0 | \n", "CRA-CIV | \n", "... | \n", "13 | \n", "3 | \n", "0 | \n", "0 | \n", "0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "MULTIPOLYGON (((-6.61524 4.74392, -6.61529 4.7... | \n", "
12 | \n", "68 | \n", "Democratic Republic of the Congo | \n", "Africa | \n", "COD | \n", "CD | \n", "180.0 | \n", "ZAI | \n", "250.0 | \n", "68.0 | \n", "BDMS-COD | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "6 | \n", "11.0 | \n", "0.0 | \n", "16.0 | \n", "0.0 | \n", "MULTIPOLYGON (((12.44326 -6.05846, 12.44326 -6... | \n", "
13 | \n", "70 | \n", "Djibouti | \n", "Africa | \n", "DJI | \n", "DJ | \n", "262.0 | \n", "DJI | \n", "72.0 | \n", "70.0 | \n", "ICPAC-DJI | \n", "... | \n", "0 | \n", "0 | \n", "4 | \n", "0 | \n", "0 | \n", "0.0 | \n", "14.0 | \n", "0.0 | \n", "NaN | \n", "MULTIPOLYGON (((42.63588 11.47977, 42.63588 11... | \n", "
14 | \n", "74 | \n", "South Sudan | \n", "Africa | \n", "SSD | \n", "SS | \n", "728.0 | \n", "NaN | \n", "277.0 | \n", "74.0 | \n", "ICPAC-SSD | \n", "... | \n", "0 | \n", "0 | \n", "4 | \n", "0 | \n", "0 | \n", "0.0 | \n", "14.0 | \n", "0.0 | \n", "NaN | \n", "POLYGON ((33.02315 12.22673, 33.25586 12.21435... | \n", "
15 | \n", "76 | \n", "Equatorial Guinea | \n", "Africa | \n", "GNQ | \n", "GQ | \n", "226.0 | \n", "EQG | \n", "61.0 | \n", "76.0 | \n", "CICOS-GNQ | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "11.0 | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "MULTIPOLYGON (((5.63372 -1.40429, 5.63449 -1.4... | \n", "
16 | \n", "77 | \n", "Eritrea | \n", "Africa | \n", "ERI | \n", "ER | \n", "232.0 | \n", "ERI | \n", "178.0 | \n", "77.0 | \n", "ICPAC-ERI | \n", "... | \n", "0 | \n", "0 | \n", "4 | \n", "0 | \n", "0 | \n", "0.0 | \n", "14.0 | \n", "0.0 | \n", "NaN | \n", "MULTIPOLYGON (((43.15610 12.71929, 43.15624 12... | \n", "
17 | \n", "79 | \n", "Ethiopia | \n", "Africa | \n", "ETH | \n", "ET | \n", "231.0 | \n", "ETH | \n", "238.0 | \n", "79.0 | \n", "ICPAC-ETH | \n", "... | \n", "0 | \n", "0 | \n", "4 | \n", "0 | \n", "0 | \n", "0.0 | \n", "14.0 | \n", "0.0 | \n", "NaN | \n", "POLYGON ((37.94868 14.83911, 37.95420 14.83687... | \n", "
18 | \n", "89 | \n", "Gabon | \n", "Africa | \n", "GAB | \n", "GA | \n", "266.0 | \n", "GAB | \n", "74.0 | \n", "89.0 | \n", "CICOS-GAB | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "11.0 | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "MULTIPOLYGON (((9.54272 -2.06359, 9.54272 -2.0... | \n", "
19 | \n", "90 | \n", "Gambia | \n", "Africa | \n", "GMB | \n", "GM | \n", "270.0 | \n", "GAM | \n", "75.0 | \n", "90.0 | \n", "CRA-GMB | \n", "... | \n", "13 | \n", "3 | \n", "0 | \n", "0 | \n", "0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "MULTIPOLYGON (((-16.82265 13.38340, -16.82221 ... | \n", "
20 | \n", "94 | \n", "Ghana | \n", "Africa | \n", "GHA | \n", "GH | \n", "288.0 | \n", "GHA | \n", "81.0 | \n", "94.0 | \n", "CRA-GHA | \n", "... | \n", "13 | \n", "3 | \n", "0 | \n", "0 | \n", "0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "MULTIPOLYGON (((-1.94577 4.79251, -1.94592 4.7... | \n", "
21 | \n", "105 | \n", "Guinea-Bissau | \n", "Africa | \n", "GNB | \n", "GW | \n", "624.0 | \n", "GBS | \n", "175.0 | \n", "105.0 | \n", "CRA-GNB | \n", "... | \n", "13 | \n", "3 | \n", "0 | \n", "0 | \n", "0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "MULTIPOLYGON (((-15.72265 10.85933, -15.72317 ... | \n", "
22 | \n", "106 | \n", "Guinea | \n", "Africa | \n", "GIN | \n", "GN | \n", "324.0 | \n", "GUI | \n", "90.0 | \n", "106.0 | \n", "CRA-GIN | \n", "... | \n", "13 | \n", "3 | \n", "0 | \n", "0 | \n", "0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "MULTIPOLYGON (((-13.27189 9.29412, -13.27383 9... | \n", "
23 | \n", "133 | \n", "Kenya | \n", "Africa | \n", "KEN | \n", "KE | \n", "404.0 | \n", "KEN | \n", "114.0 | \n", "133.0 | \n", "ICPAC-KEN | \n", "... | \n", "0 | \n", "0 | \n", "4 | \n", "0 | \n", "0 | \n", "0.0 | \n", "14.0 | \n", "0.0 | \n", "15.0 | \n", "MULTIPOLYGON (((39.37656 -4.72125, 39.37412 -4... | \n", "
24 | \n", "142 | \n", "Lesotho | \n", "Africa | \n", "LSO | \n", "LS | \n", "426.0 | \n", "LES | \n", "122.0 | \n", "142.0 | \n", "BDMS-LSO | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "6 | \n", "0.0 | \n", "0.0 | \n", "16.0 | \n", "NaN | \n", "POLYGON ((28.69016 -28.58986, 28.69980 -28.600... | \n", "
25 | \n", "144 | \n", "Liberia | \n", "Africa | \n", "LBR | \n", "LR | \n", "430.0 | \n", "LIR | \n", "123.0 | \n", "144.0 | \n", "CRA-LBR | \n", "... | \n", "13 | \n", "3 | \n", "0 | \n", "0 | \n", "0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "MULTIPOLYGON (((-7.82210 4.42817, -7.82210 4.4... | \n", "
26 | \n", "150 | \n", "Madagascar | \n", "Africa | \n", "MDG | \n", "MG | \n", "450.0 | \n", "MAG | \n", "129.0 | \n", "150.0 | \n", "BDMS_MOI-MDG | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "5 | \n", "6 | \n", "0.0 | \n", "0.0 | \n", "16.0 | \n", "15.0 | \n", "MULTIPOLYGON (((44.22955 -25.22101, 44.22670 -... | \n", "
27 | \n", "152 | \n", "Malawi | \n", "Africa | \n", "MWI | \n", "MW | \n", "454.0 | \n", "MLW | \n", "130.0 | \n", "152.0 | \n", "BDMS-MWI | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "6 | \n", "0.0 | \n", "0.0 | \n", "16.0 | \n", "NaN | \n", "MULTIPOLYGON (((34.76880 -12.09417, 34.72768 -... | \n", "
28 | \n", "155 | \n", "Mali | \n", "Africa | \n", "MLI | \n", "ML | \n", "466.0 | \n", "MLI | \n", "133.0 | \n", "155.0 | \n", "CRA-MLI | \n", "... | \n", "13 | \n", "3 | \n", "0 | \n", "0 | \n", "0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "POLYGON ((-5.00000 24.99792, -5.00000 24.99589... | \n", "
29 | \n", "159 | \n", "Mauritania | \n", "Africa | \n", "MRT | \n", "MR | \n", "478.0 | \n", "MAU | \n", "136.0 | \n", "159.0 | \n", "CRA-MRT | \n", "... | \n", "13 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "MULTIPOLYGON (((-16.50235 16.05727, -16.50409 ... | \n", "
30 | \n", "160 | \n", "Mauritius | \n", "Africa | \n", "MUS | \n", "MU | \n", "480.0 | \n", "MAR | \n", "137.0 | \n", "160.0 | \n", "BDMS_MOI-MUS | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "5 | \n", "6 | \n", "0.0 | \n", "0.0 | \n", "16.0 | \n", "15.0 | \n", "MULTIPOLYGON (((57.33786 -20.47313, 57.33677 -... | \n", "
31 | \n", "170 | \n", "Mozambique | \n", "Africa | \n", "MOZ | \n", "MZ | \n", "508.0 | \n", "MOZ | \n", "144.0 | \n", "170.0 | \n", "BDMS-MOZ | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "6 | \n", "0.0 | \n", "0.0 | \n", "16.0 | \n", "15.0 | \n", "MULTIPOLYGON (((32.99153 -25.97012, 32.99189 -... | \n", "
32 | \n", "172 | \n", "Namibia | \n", "Africa | \n", "NAM | \n", "NA | \n", "516.0 | \n", "NAM | \n", "147.0 | \n", "172.0 | \n", "BDMS-NAM | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "6 | \n", "0.0 | \n", "0.0 | \n", "16.0 | \n", "NaN | \n", "MULTIPOLYGON (((15.52104 -27.66624, 15.52115 -... | \n", "
33 | \n", "181 | \n", "Niger | \n", "Africa | \n", "NER | \n", "NE | \n", "562.0 | \n", "NER | \n", "158.0 | \n", "181.0 | \n", "CRA-NER | \n", "... | \n", "13 | \n", "3 | \n", "0 | \n", "0 | \n", "0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "POLYGON ((12.12185 23.48946, 12.15302 23.48107... | \n", "
34 | \n", "182 | \n", "Nigeria | \n", "Africa | \n", "NGA | \n", "NG | \n", "566.0 | \n", "NIR | \n", "159.0 | \n", "182.0 | \n", "CRA-NGA | \n", "... | \n", "13 | \n", "3 | \n", "0 | \n", "0 | \n", "0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "MULTIPOLYGON (((5.95832 4.33796, 5.95832 4.337... | \n", "
35 | \n", "217 | \n", "Senegal | \n", "Africa | \n", "SEN | \n", "SN | \n", "686.0 | \n", "SEN | \n", "195.0 | \n", "217.0 | \n", "CRA-SEN | \n", "... | \n", "13 | \n", "3 | \n", "0 | \n", "0 | \n", "0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "MULTIPOLYGON (((-16.78778 12.66777, -16.78882 ... | \n", "
36 | \n", "220 | \n", "Seychelles | \n", "Africa | \n", "SYC | \n", "SC | \n", "690.0 | \n", "SEY | \n", "196.0 | \n", "220.0 | \n", "BDMS_MOI-SYC | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "5 | \n", "6 | \n", "0.0 | \n", "0.0 | \n", "16.0 | \n", "15.0 | \n", "MULTIPOLYGON (((51.12800 -10.22187, 51.12868 -... | \n", "
37 | \n", "221 | \n", "Sierra Leone | \n", "Africa | \n", "SLE | \n", "SL | \n", "694.0 | \n", "SIL | \n", "197.0 | \n", "221.0 | \n", "CRA-SLE | \n", "... | \n", "13 | \n", "3 | \n", "0 | \n", "0 | \n", "0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "MULTIPOLYGON (((-11.58407 6.97383, -11.58407 6... | \n", "
38 | \n", "226 | \n", "Somalia | \n", "Africa | \n", "SOM | \n", "SO | \n", "706.0 | \n", "SOM | \n", "201.0 | \n", "226.0 | \n", "ICPAC-SOM | \n", "... | \n", "0 | \n", "0 | \n", "4 | \n", "0 | \n", "0 | \n", "0.0 | \n", "14.0 | \n", "0.0 | \n", "NaN | \n", "MULTIPOLYGON (((41.57762 -1.66024, 41.57721 -1... | \n", "
39 | \n", "227 | \n", "South Africa | \n", "Africa | \n", "ZAF | \n", "ZA | \n", "710.0 | \n", "SAF | \n", "202.0 | \n", "227.0 | \n", "BDMS-ZAF | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "6 | \n", "0.0 | \n", "0.0 | \n", "16.0 | \n", "NaN | \n", "MULTIPOLYGON (((37.84717 -46.85358, 37.84717 -... | \n", "
40 | \n", "235 | \n", "Swaziland | \n", "Africa | \n", "SWZ | \n", "SZ | \n", "748.0 | \n", "SWA | \n", "209.0 | \n", "235.0 | \n", "BDMS-SWZ | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "6 | \n", "0.0 | \n", "0.0 | \n", "16.0 | \n", "NaN | \n", "POLYGON ((31.42451 -25.71965, 31.47514 -25.751... | \n", "
41 | \n", "243 | \n", "Togo | \n", "Africa | \n", "TGO | \n", "TG | \n", "768.0 | \n", "TOG | \n", "217.0 | \n", "243.0 | \n", "CRA-TGO | \n", "... | \n", "13 | \n", "3 | \n", "0 | \n", "0 | \n", "0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "POLYGON ((-0.00000 11.11002, 0.03523 11.10232,... | \n", "
42 | \n", "253 | \n", "Uganda | \n", "Africa | \n", "UGA | \n", "UG | \n", "800.0 | \n", "UGA | \n", "226.0 | \n", "253.0 | \n", "ICPAC-UGA | \n", "... | \n", "0 | \n", "0 | \n", "4 | \n", "0 | \n", "0 | \n", "0.0 | \n", "14.0 | \n", "0.0 | \n", "NaN | \n", "POLYGON ((34.09062 3.87878, 34.09114 3.87310, ... | \n", "
43 | \n", "257 | \n", "United Republic of Tanzania | \n", "Africa | \n", "TZA | \n", "TZ | \n", "834.0 | \n", "URT | \n", "215.0 | \n", "257.0 | \n", "BDMS-TZA | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "6 | \n", "0.0 | \n", "0.0 | \n", "16.0 | \n", "15.0 | \n", "MULTIPOLYGON (((40.21717 -10.29314, 40.21717 -... | \n", "
44 | \n", "270 | \n", "Zambia | \n", "Africa | \n", "ZMB | \n", "ZM | \n", "894.0 | \n", "ZAM | \n", "251.0 | \n", "270.0 | \n", "BDMS-ZMB | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "6 | \n", "0.0 | \n", "0.0 | \n", "16.0 | \n", "NaN | \n", "POLYGON ((30.78884 -8.25962, 30.79738 -8.28310... | \n", "
45 | \n", "271 | \n", "Zimbabwe | \n", "Africa | \n", "ZWE | \n", "ZW | \n", "716.0 | \n", "ZIM | \n", "181.0 | \n", "271.0 | \n", "BDMS-ZWE | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "6 | \n", "0.0 | \n", "0.0 | \n", "16.0 | \n", "NaN | \n", "POLYGON ((29.90322 -15.62243, 29.90864 -15.623... | \n", "
46 | \n", "4 | \n", "Algeria | \n", "Africa | \n", "DZA | \n", "DZ | \n", "12.0 | \n", "ALG | \n", "4.0 | \n", "4.0 | \n", "OTHER-DZA | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "MULTIPOLYGON (((-1.91302 35.08822, -1.91302 35... | \n", "
47 | \n", "43 | \n", "Burundi | \n", "Africa | \n", "BDI | \n", "BI | \n", "108.0 | \n", "BDI | \n", "29.0 | \n", "43.0 | \n", "ICPAC-BDI | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0.0 | \n", "14.0 | \n", "0.0 | \n", "NaN | \n", "POLYGON ((30.43090 -2.32831, 30.43728 -2.32935... | \n", "
48 | \n", "102 | \n", "Abyei | \n", "Africa | \n", "NaN | \n", "NaN | \n", "0.0 | \n", "NaN | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "... | \n", "0 | \n", "0 | \n", "4 | \n", "0 | \n", "0 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "POLYGON ((28.97701 9.64116, 28.97701 9.64116, ... | \n", "
49 | \n", "145 | \n", "Libya | \n", "Africa | \n", "LBY | \n", "LY | \n", "434.0 | \n", "LIB | \n", "124.0 | \n", "145.0 | \n", "OTHER-LBY | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "MULTIPOLYGON (((19.12258 30.29128, 19.12199 30... | \n", "
50 | \n", "169 | \n", "Morocco | \n", "Africa | \n", "MAR | \n", "MA | \n", "504.0 | \n", "MOR | \n", "143.0 | \n", "169.0 | \n", "OTHER-MAR | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "MULTIPOLYGON (((-9.79329 31.49641, -9.79350 31... | \n", "
51 | \n", "205 | \n", "Rwanda | \n", "Africa | \n", "RWA | \n", "RW | \n", "646.0 | \n", "RWA | \n", "184.0 | \n", "205.0 | \n", "ICPAC-RWA | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0.0 | \n", "14.0 | \n", "0.0 | \n", "NaN | \n", "POLYGON ((30.46679 -1.06294, 30.46446 -1.06678... | \n", "
52 | \n", "214 | \n", "Sao Tome and Principe | \n", "Africa | \n", "STP | \n", "ST | \n", "678.0 | \n", "STP | \n", "193.0 | \n", "214.0 | \n", "OTHER-STP | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "MULTIPOLYGON (((6.52215 -0.01493, 6.52073 -0.0... | \n", "
53 | \n", "248 | \n", "Tunisia | \n", "Africa | \n", "TUN | \n", "TN | \n", "788.0 | \n", "TUN | \n", "222.0 | \n", "248.0 | \n", "OTHER-TUN | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "MULTIPOLYGON (((11.41957 33.17910, 11.41803 33... | \n", "
54 | \n", "268 | \n", "Western Sahara | \n", "Africa | \n", "NaN | \n", "NaN | \n", "0.0 | \n", "NaN | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "MULTIPOLYGON (((-17.01258 21.40293, -17.01285 ... | \n", "
55 | \n", "40760 | \n", "Hala'ib triangle | \n", "Africa | \n", "NaN | \n", "NaN | \n", "0.0 | \n", "NaN | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "MULTIPOLYGON (((36.66130 22.24455, 36.66102 22... | \n", "
56 | \n", "40762 | \n", "Ma'tan al-Sarra | \n", "Africa | \n", "NaN | \n", "NaN | \n", "0.0 | \n", "NaN | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "... | \n", "0 | \n", "0 | \n", "4 | \n", "0 | \n", "0 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "POLYGON ((34.00521 21.77233, 33.95924 21.76744... | \n", "
57 | \n", "40765 | \n", "Egypt | \n", "Africa | \n", "EGY | \n", "EG | \n", "818.0 | \n", "EGY | \n", "59.0 | \n", "40765.0 | \n", "OTHER-EGY | \n", "... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "MULTIPOLYGON (((36.24782 23.56470, 36.24783 23... | \n", "
58 | \n", "61013 | \n", "Ilemi triangle | \n", "Africa | \n", "NaN | \n", "NaN | \n", "0.0 | \n", "NaN | \n", "0.0 | \n", "0.0 | \n", "NaN | \n", "... | \n", "0 | \n", "0 | \n", "4 | \n", "0 | \n", "0 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "POLYGON ((35.32822 4.97037, 35.31111 4.91972, ... | \n", "
59 rows × 24 columns
\n", "<xarray.DataArray 'mask' (latitude: 721, longitude: 1440)>\n", "array([[nan, nan, nan, ..., nan, nan, nan],\n", " [nan, nan, nan, ..., nan, nan, nan],\n", " [nan, nan, nan, ..., nan, nan, nan],\n", " ...,\n", " [nan, nan, nan, ..., nan, nan, nan],\n", " [nan, nan, nan, ..., nan, nan, nan],\n", " [nan, nan, nan, ..., nan, nan, nan]])\n", "Coordinates:\n", " expver float64 1.0\n", " * latitude (latitude) float32 90.0 89.75 89.5 89.25 ... -89.5 -89.75 -90.0\n", " * longitude (longitude) float32 0.0 0.25 0.5 0.75 ... 359.0 359.2 359.5 359.8