From 3577f966b59bec25d2327e02e94496df430e2f60 Mon Sep 17 00:00:00 2001
From: Boba Fett <bobafett@maap-project.org>
Date: Fri, 24 Jul 2020 22:24:02 +0000
Subject: [PATCH] Upload New File

---
 1_Download_IS2_ATL08.ipynb | 104 +++++++++++++++++++++++++++++++++++++
 1 file changed, 104 insertions(+)
 create mode 100644 1_Download_IS2_ATL08.ipynb

diff --git a/1_Download_IS2_ATL08.ipynb b/1_Download_IS2_ATL08.ipynb
new file mode 100644
index 0000000..3b9e6ba
--- /dev/null
+++ b/1_Download_IS2_ATL08.ipynb
@@ -0,0 +1,104 @@
+{
+ "cells": [
+  {
+   "cell_type": "code",
+   "execution_count": 11,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from maap.maap import MAAP\n",
+    "maap = MAAP()\n",
+    "import os\n"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 8,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "s=maap.searchGranule(collection_concept_id=\"C1200116818-NASA_MAAP\", bounding_box=\"9.295153,-0.002190,10.000536,0.397200\", limit=1000)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 9,
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "54\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(len(s))"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "maap.searchGranule(collection_concept_id=\"C1200116818-NASA_MAAP\", limit=1000)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 15,
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Finished Downloading\n"
+     ]
+    }
+   ],
+   "source": [
+    "files = [file for file in os.listdir('/projects/bobafett/Icesat2Gabon/Data/ATL08/') if file.endswith('.h5')]\n",
+    "\n",
+    "for f in range(len(s)):\n",
+    "        ID = s[f]['Granule']['DataGranule']['ProducerGranuleId']\n",
+    "        if ID in files:\n",
+    "            pass\n",
+    "        else:\n",
+    "            s[f].getLocalPath('/projects/bobafett/Icesat2Gabon/Data/ATL08/')\n",
+    "            \n",
+    "print('Finished Downloading')"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.7.3"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 4
+}
-- 
GitLab