{ "cells": [ { "cell_type": "markdown", "id": "valid-miracle", "metadata": {}, "source": [ "# Global maps for the report" ] }, { "cell_type": "markdown", "id": "b725109e-366d-4929-9842-894d0c1de43f", "metadata": {}, "source": [ "This is a bit messy, but there is a bunch of code producing maps for the technical report." ] }, { "cell_type": "code", "execution_count": 1, "id": "durable-article", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import geopandas as gpd\n", "import subprocess\n", "import matplotlib.pyplot as plt\n", "import matplotlib.patches as mpatches\n", "import seaborn as sns\n", "import numpy as np\n", "import sys, os\n", "from oggm import utils\n", "import csv\n", "import seaborn as sns\n", "import cartopy\n", "import cartopy.crs as ccrs\n", "from matplotlib.image import imread\n", "import salem\n", "import glob" ] }, { "cell_type": "code", "execution_count": 2, "id": "93238960-44ee-4d4b-accf-8766d90ee073", "metadata": {}, "outputs": [], "source": [ "# go down from rgi7_scripts/workflow\n", "# data_dir = '../../../../rgi7_data/'\n", "\n", "# final_dir = os.path.join(data_dir, 'rgi7_final')" ] }, { "cell_type": "code", "execution_count": 3, "id": "5fe2841c-7b49-4124-9d4b-664d1236011a", "metadata": {}, "outputs": [], "source": [ "# user_guide_dir = '../../../../rgi_user_guide/'" ] }, { "cell_type": "code", "execution_count": 4, "id": "a1497c2e-0716-4f1f-b055-d757f332c34a", "metadata": {}, "outputs": [], "source": [ "# tmp_dir = data_dir + '/tmp_plots/'" ] }, { "cell_type": "markdown", "id": "bc168a07-6f98-4434-a02e-d07ae0ba4ca4", "metadata": {}, "source": [ "## Read RGI6 and RGI7 tables " ] }, { "cell_type": "code", "execution_count": 5, "id": "f3cfec31-1ac1-4875-8641-320d33ea9458", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'/home/www/oggm/gdirs/oggm_v1.6/exps/igm_v3'" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "pwd" ] }, { "cell_type": "code", "execution_count": 6, "id": "e7c51864-57c7-478d-a141-fe8eeb301f81", "metadata": {}, "outputs": [], "source": [ "fl = list(sorted(glob.glob(os.path.join('RGI70C', 'b_040', 'L2', 'summary', 'millan_statistics_*.csv'))))\n", "df = pd.concat((pd.read_csv(f, index_col=0) for f in fl))" ] }, { "cell_type": "code", "execution_count": 7, "id": "9b994266-5419-4508-921b-e70362780d18", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | rgi_region | \n", "rgi_subregion | \n", "rgi_area_km2 | \n", "millan_vol_km3 | \n", "millan_area_km2 | \n", "millan_perc_cov | \n", "millan_avg_vel | \n", "millan_max_vel | \n", "millan_vel_perc_cov | \n", "
---|---|---|---|---|---|---|---|---|---|
rgi_id | \n", "\n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " |
RGI2000-v7.0-C-01-00001 | \n", "1 | \n", "01-01 | \n", "0.239199 | \n", "0.004874 | \n", "0.150625 | \n", "0.629705 | \n", "15.923846 | \n", "63.091652 | \n", "1.008574 | \n", "
RGI2000-v7.0-C-01-00002 | \n", "1 | \n", "01-01 | \n", "0.104641 | \n", "0.000033 | \n", "0.033125 | \n", "0.316559 | \n", "13.787321 | \n", "93.787354 | \n", "0.997459 | \n", "
RGI2000-v7.0-C-01-00003 | \n", "1 | \n", "01-01 | \n", "0.216605 | \n", "0.000495 | \n", "0.109375 | \n", "0.504951 | \n", "11.222503 | \n", "52.570351 | \n", "1.007017 | \n", "
RGI2000-v7.0-C-01-00004 | \n", "1 | \n", "01-01 | \n", "0.252649 | \n", "0.007279 | \n", "0.181250 | \n", "0.717399 | \n", "4.083957 | \n", "36.010231 | \n", "1.001884 | \n", "
RGI2000-v7.0-C-01-00005 | \n", "1 | \n", "01-01 | \n", "0.474716 | \n", "0.013645 | \n", "0.288125 | \n", "0.606942 | \n", "6.749967 | \n", "81.282494 | \n", "0.996649 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
RGI2000-v7.0-C-19-01597 | \n", "19 | \n", "19-24 | \n", "188.556385 | \n", "0.000000 | \n", "0.000000 | \n", "0.000000 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
RGI2000-v7.0-C-19-01598 | \n", "19 | \n", "19-24 | \n", "503.235510 | \n", "0.000000 | \n", "0.000000 | \n", "0.000000 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
RGI2000-v7.0-C-19-01599 | \n", "19 | \n", "19-24 | \n", "48.779761 | \n", "0.000000 | \n", "0.000000 | \n", "0.000000 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
RGI2000-v7.0-C-19-01600 | \n", "19 | \n", "19-24 | \n", "443.394111 | \n", "0.000000 | \n", "0.000000 | \n", "0.000000 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
RGI2000-v7.0-C-19-01601 | \n", "19 | \n", "19-24 | \n", "465.811025 | \n", "0.000000 | \n", "0.000000 | \n", "0.000000 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
192869 rows × 9 columns
\n", "