diff --git a/atl06_play.ipynb b/atl06_play.ipynb new file mode 100644 index 0000000..207abc9 --- /dev/null +++ b/atl06_play.ipynb @@ -0,0 +1,2286 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# **ATLAS/ICESat-2 Land Ice Height [ATL06](https://nsidc.org/data/atl06/) Exploratory Data Analysis**\n", + "\n", + "[Yet another](https://xkcd.com/927) take on playing with ICESat-2's Land Ice Height ATL06 data,\n", + "specfically with a focus on analyzing ice elevation changes over Antarctica.\n", + "Specifically, this jupyter notebook will cover:\n", + "\n", + "- Downloading datasets from the web via [intake](https://intake.readthedocs.io)\n", + "- Performing [Exploratory Data Analysis](https://en.wikipedia.org/wiki/Exploratory_data_analysis)\n", + " using the [PyData](https://pydata.org) stack (e.g. [xarray](http://xarray.pydata.org), [dask](https://dask.org))\n", + "- Plotting figures using [Hvplot](https://hvplot.holoviz.org) and [PyGMT](https://www.pygmt.org) (TODO)\n", + "\n", + "This is in contrast with the [icepyx](https://github.com/icesat2py/icepyx) package\n", + "and 'official' 2019/2020 [ICESat-2 Hackweek tutorials](https://github.com/ICESAT-2HackWeek/ICESat2_hackweek_tutorials) (which are also awesome!)\n", + "that tends to use a slightly different approach (e.g. handcoded download scripts, [h5py](http://www.h5py.org) for data reading, etc).\n", + "The core concept here is to run things in a more intuitive and scalable (parallelizable) manner on a continent scale (rather than just a specific region)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import glob\n", + "import json\n", + "import logging\n", + "import netrc\n", + "import os\n", + "\n", + "import cartopy\n", + "import dask\n", + "import dask.distributed\n", + "import hvplot.dask\n", + "import hvplot.pandas\n", + "import hvplot.xarray\n", + "import intake\n", + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "import pandas as pd\n", + "import pyproj\n", + "import requests\n", + "import tqdm\n", + "import xarray as xr\n", + "\n", + "# %matplotlib inline" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n",
+ "Client\n", + "
| \n",
+ "\n",
+ "Cluster\n", + "
| \n",
+ "
array('01', dtype='<U2')
array('11', dtype='<U2')
array('06', dtype='<U2')
array('003', dtype='<U3')
array(['2020-03-06T00:25:18.782277720', '2020-03-06T00:25:18.785109384',\n", + " '2020-03-06T00:25:18.787941512', ..., '2020-03-07T00:05:23.660334576',\n", + " '2020-03-07T00:05:23.663158032', '2020-03-07T00:05:23.665982160'],\n", + " dtype='datetime64[ns]')
\n",
+ "
| \n",
+ "\n", + "\n", + " | \n", + "
\n",
+ "
| \n",
+ "\n", + "\n", + " | \n", + "
array(['2020-03-06T00:25:18.000000000', '2020-03-06T00:25:18.000000000',\n", + " '2020-03-06T00:25:18.000000000', ...,\n", + " '2020-03-06T23:59:40.000000000', '2020-03-06T23:59:40.000000000',\n", + " '2020-03-06T23:59:40.000000000'], dtype='datetime64[ns]')
array(['1073', '1073', '1073', ..., '1088', '1088', '1088'], dtype='<U4')
\n",
+ "
| \n",
+ "\n", + "\n", + " | \n", + "
\n",
+ "
| \n",
+ "\n", + "\n", + " | \n", + "
\n",
+ "
| \n",
+ "\n", + "\n", + " | \n", + "
\n",
+ "
| \n",
+ "\n", + "\n", + " | \n", + "
\n",
+ "
| \n",
+ "\n", + "\n", + " | \n", + "
\n", + " | delta_time | \n", + "laser | \n", + "latitude | \n", + "longitude | \n", + "atl06_quality_summary | \n", + "h_li | \n", + "h_li_sigma | \n", + "segment_id | \n", + "sigma_geo_h | \n", + "
---|---|---|---|---|---|---|---|---|---|
npartitions=154 | \n", + "\n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " |
0 | \n", + "datetime64[ns] | \n", + "object | \n", + "float64 | \n", + "float64 | \n", + "float64 | \n", + "float32 | \n", + "float32 | \n", + "float64 | \n", + "float32 | \n", + "
340326 | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "
... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "
8445120 | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "
8745557 | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "
\n", + " | index | \n", + "delta_time | \n", + "laser | \n", + "latitude | \n", + "longitude | \n", + "atl06_quality_summary | \n", + "h_li | \n", + "h_li_sigma | \n", + "segment_id | \n", + "sigma_geo_h | \n", + "
---|---|---|---|---|---|---|---|---|---|---|
542853 | \n", + "3268611 | \n", + "2019-01-20 08:07:46.068493512 | \n", + "gt2r | \n", + "-73.016195 | \n", + "48.062489 | \n", + "0.0 | \n", + "3152.434326 | \n", + "0.028530 | \n", + "1599374.0 | \n", + "0.312982 | \n", + "
324340 | \n", + "1946356 | \n", + "2018-10-21 12:28:54.317352440 | \n", + "gt3l | \n", + "-69.448531 | \n", + "46.769237 | \n", + "0.0 | \n", + "2206.069824 | \n", + "0.046908 | \n", + "1619499.0 | \n", + "0.480249 | \n", + "
118272 | \n", + "709635 | \n", + "2018-10-21 12:27:17.481998464 | \n", + "gt2r | \n", + "-75.546173 | \n", + "49.547622 | \n", + "0.0 | \n", + "3388.348633 | \n", + "0.010508 | \n", + "1585012.0 | \n", + "0.307785 | \n", + "
868474 | \n", + "5237837 | \n", + "2019-04-21 03:47:11.232018304 | \n", + "gt3r | \n", + "-74.748139 | \n", + "49.080337 | \n", + "0.0 | \n", + "3388.145020 | \n", + "0.027348 | \n", + "1589537.0 | \n", + "0.304449 | \n", + "
1297353 | \n", + "8080232 | \n", + "2020-01-18 14:47:39.217810632 | \n", + "gt2l | \n", + "-70.284789 | \n", + "46.908161 | \n", + "0.0 | \n", + "2500.093018 | \n", + "0.030089 | \n", + "1614817.0 | \n", + "0.359534 | \n", + "
\n", + " | index | \n", + "delta_time | \n", + "laser | \n", + "latitude | \n", + "longitude | \n", + "atl06_quality_summary | \n", + "h_li | \n", + "h_li_sigma | \n", + "segment_id | \n", + "sigma_geo_h | \n", + "x | \n", + "y | \n", + "
---|---|---|---|---|---|---|---|---|---|---|---|---|
542853 | \n", + "3268611 | \n", + "2019-01-20 08:07:46.068493512 | \n", + "gt2r | \n", + "-73.016195 | \n", + "48.062489 | \n", + "0.0 | \n", + "3152.434326 | \n", + "0.028530 | \n", + "1599374.0 | \n", + "0.312982 | \n", + "1.382429e+06 | \n", + "1.242017e+06 | \n", + "
324340 | \n", + "1946356 | \n", + "2018-10-21 12:28:54.317352440 | \n", + "gt3l | \n", + "-69.448531 | \n", + "46.769237 | \n", + "0.0 | \n", + "2206.069824 | \n", + "0.046908 | \n", + "1619499.0 | \n", + "0.480249 | \n", + "1.643908e+06 | \n", + "1.545394e+06 | \n", + "
118272 | \n", + "709635 | \n", + "2018-10-21 12:27:17.481998464 | \n", + "gt2r | \n", + "-75.546173 | \n", + "49.547622 | \n", + "0.0 | \n", + "3388.348633 | \n", + "0.010508 | \n", + "1585012.0 | \n", + "0.307785 | \n", + "1.201144e+06 | \n", + "1.024148e+06 | \n", + "
868474 | \n", + "5237837 | \n", + "2019-04-21 03:47:11.232018304 | \n", + "gt3r | \n", + "-74.748139 | \n", + "49.080337 | \n", + "0.0 | \n", + "3388.145020 | \n", + "0.027348 | \n", + "1589537.0 | \n", + "0.304449 | \n", + "1.259340e+06 | \n", + "1.091631e+06 | \n", + "
1297353 | \n", + "8080232 | \n", + "2020-01-18 14:47:39.217810632 | \n", + "gt2l | \n", + "-70.284789 | \n", + "46.908161 | \n", + "0.0 | \n", + "2500.093018 | \n", + "0.030089 | \n", + "1614817.0 | \n", + "0.359534 | \n", + "1.579289e+06 | \n", + "1.477451e+06 | \n", + "