{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## GlaThiDa to RGI, step 3: check results" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We assume the HDF file is ready." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import geopandas as gpd\n", "import numpy as np\n", "import pandas as pd" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "file = 'glathida-v3.1.0/data/TTT_per_rgi_id.h5'" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "['RGI60-01.00570' 'RGI60-01.08989' 'RGI60-01.10006' ... 'RGI60-19.02146'\n", " 'RGI60-19.02147' 'RGI60-19.02150']\n" ] } ], "source": [ "with pd.HDFStore(file) as store:\n", " rgi_ids = list(store.keys())\n", "rgi_ids = np.array([s[1:] for s in rgi_ids])\n", "print(rgi_ids)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df = pd.DataFrame(index=rgi_ids)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df.to_csv('rgi_ids_with_ttt.csv')" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "df = pd.read_hdf(file, key='RGI60-01.08989')" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | GlaThiDa_ID | \n", "POLITICAL_UNIT | \n", "GLACIER_NAME | \n", "SURVEY_DATE | \n", "PROFILE_ID | \n", "POINT_ID | \n", "POINT_LAT | \n", "POINT_LON | \n", "ELEVATION | \n", "THICKNESS | \n", "THICKNESS_UNCERTAINTY | \n", "DATA_FLAG | \n", "REMARKS | \n", "RGI_REG | \n", "RGI_ID | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3759818 | \n", "6577 | \n", "US | \n", "EKLUTNA GLACIER | \n", "20120316 | \n", "16 | \n", "300 | \n", "61.196465 | \n", "-148.972931 | \n", "1471.0 | \n", "161 | \n", "35.0 | \n", "NaN | \n", "NaN | \n", "1 | \n", "RGI60-01.08989 | \n", "
3759819 | \n", "6577 | \n", "US | \n", "EKLUTNA GLACIER | \n", "20120316 | \n", "16 | \n", "301 | \n", "61.196686 | \n", "-148.972885 | \n", "1470.0 | \n", "160 | \n", "35.0 | \n", "NaN | \n", "NaN | \n", "1 | \n", "RGI60-01.08989 | \n", "
3759820 | \n", "6577 | \n", "US | \n", "EKLUTNA GLACIER | \n", "20120316 | \n", "16 | \n", "302 | \n", "61.196907 | \n", "-148.972855 | \n", "1470.0 | \n", "159 | \n", "35.0 | \n", "NaN | \n", "NaN | \n", "1 | \n", "RGI60-01.08989 | \n", "
3759821 | \n", "6577 | \n", "US | \n", "EKLUTNA GLACIER | \n", "20120316 | \n", "16 | \n", "303 | \n", "61.197132 | \n", "-148.972824 | \n", "1470.0 | \n", "158 | \n", "35.0 | \n", "NaN | \n", "NaN | \n", "1 | \n", "RGI60-01.08989 | \n", "
3759822 | \n", "6577 | \n", "US | \n", "EKLUTNA GLACIER | \n", "20120316 | \n", "16 | \n", "304 | \n", "61.197353 | \n", "-148.972778 | \n", "1470.0 | \n", "158 | \n", "35.0 | \n", "NaN | \n", "NaN | \n", "1 | \n", "RGI60-01.08989 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
3760402 | \n", "6577 | \n", "US | \n", "EKLUTNA GLACIER | \n", "20120316 | \n", "16 | \n", "2048 | \n", "61.231388 | \n", "-149.005554 | \n", "1244.0 | \n", "192 | \n", "35.0 | \n", "NaN | \n", "Medium confidence | \n", "1 | \n", "RGI60-01.08989 | \n", "
3760403 | \n", "6577 | \n", "US | \n", "EKLUTNA GLACIER | \n", "20120316 | \n", "16 | \n", "2049 | \n", "61.231598 | \n", "-149.005386 | \n", "1242.0 | \n", "190 | \n", "35.0 | \n", "NaN | \n", "Medium confidence | \n", "1 | \n", "RGI60-01.08989 | \n", "
3760404 | \n", "6577 | \n", "US | \n", "EKLUTNA GLACIER | \n", "20120316 | \n", "16 | \n", "2050 | \n", "61.231804 | \n", "-149.005203 | \n", "1240.0 | \n", "188 | \n", "35.0 | \n", "NaN | \n", "NaN | \n", "1 | \n", "RGI60-01.08989 | \n", "
3760405 | \n", "6577 | \n", "US | \n", "EKLUTNA GLACIER | \n", "20120316 | \n", "16 | \n", "2051 | \n", "61.232010 | \n", "-149.005020 | \n", "1239.0 | \n", "186 | \n", "35.0 | \n", "NaN | \n", "NaN | \n", "1 | \n", "RGI60-01.08989 | \n", "
3760406 | \n", "6577 | \n", "US | \n", "EKLUTNA GLACIER | \n", "20120316 | \n", "16 | \n", "2052 | \n", "61.232216 | \n", "-149.004837 | \n", "1236.0 | \n", "184 | \n", "35.0 | \n", "NaN | \n", "NaN | \n", "1 | \n", "RGI60-01.08989 | \n", "
589 rows × 15 columns
\n", "