From a1e2f7f05c3bc1796bd9836e92a7fc55faa5b7a5 Mon Sep 17 00:00:00 2001
From: Alex Rojas <a.rojas8907@gmail.com>
Date: Thu, 14 Mar 2024 19:30:11 -0700
Subject: [PATCH] updated run.sh file

---
 .ipynb_checkpoints/run-checkpoint.sh |  2 +-
 notebooks/run-gedi-biomass.ipynb     | 28 +++++++++++++++++++++++-----
 run.sh                               |  2 +-
 3 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/.ipynb_checkpoints/run-checkpoint.sh b/.ipynb_checkpoints/run-checkpoint.sh
index 4a8471e..f959a6f 100644
--- a/.ipynb_checkpoints/run-checkpoint.sh
+++ b/.ipynb_checkpoints/run-checkpoint.sh
@@ -8,7 +8,7 @@ basedir=$( cd "$(dirname "$0")" ; pwd -P)
 
 # Create output dir
 # OUTPUTDIR="${PWD}/output"
-# mkdir -p output
+mkdir -p output
 # INPUT_FILES
 L1B_URL=$1
 L2A_URL=$2 # e.g. GEDI01_B or GEDI02_A
diff --git a/notebooks/run-gedi-biomass.ipynb b/notebooks/run-gedi-biomass.ipynb
index ca555ed..c05b695 100644
--- a/notebooks/run-gedi-biomass.ipynb
+++ b/notebooks/run-gedi-biomass.ipynb
@@ -55,7 +55,26 @@
    "metadata": {
     "tags": []
    },
-   "outputs": [],
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "on file num:  200\r"
+     ]
+    },
+    {
+     "ename": "KeyboardInterrupt",
+     "evalue": "",
+     "output_type": "error",
+     "traceback": [
+      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
+      "\u001b[0;31mKeyboardInterrupt\u001b[0m                         Traceback (most recent call last)",
+      "Cell \u001b[0;32mIn[3], line 38\u001b[0m\n\u001b[1;32m     36\u001b[0m     \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mon file num: \u001b[39m\u001b[38;5;124m\"\u001b[39m, counter, end\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;130;01m\\r\u001b[39;00m\u001b[38;5;124m'\u001b[39m)\n\u001b[1;32m     37\u001b[0m     \u001b[38;5;66;03m# break\u001b[39;00m\n\u001b[0;32m---> 38\u001b[0m     \u001b[43mtime\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msleep\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m900\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m     39\u001b[0m counter\u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m1\u001b[39m\n",
+      "\u001b[0;31mKeyboardInterrupt\u001b[0m: "
+     ]
+    }
+   ],
    "source": [
     "# Change to appropriate filepaths for urls\n",
     "l1b_urls_fpath = \"../GEDI-L1B-2021-URLS.txt\"\n",
@@ -86,16 +105,15 @@
     "                   algo_id=\"arojas_biomass_gedi\",\n",
     "                   version=\"master\",\n",
     "                   username=\"arojearthdata\",\n",
-    "                   queue=\"maap-dps-worker-16gb\",\n",
+    "                   queue=\"maap-dps-worker-8gb\",\n",
     "                   L1B_URL=l1b_fp,\n",
     "                   L2A_URL=l2a_fp)\n",
     "    jobs_list.append(job)\n",
     "    \n",
-    "    if counter%20==0:\n",
+    "    if counter%100==0:\n",
     "        print(\"on file num: \", counter, end='\\r')\n",
-    "        break\n",
     "        # break\n",
-    "        # time.sleep(1200)\n",
+    "        time.sleep(900)\n",
     "    counter+=1"
    ]
   },
diff --git a/run.sh b/run.sh
index 4a8471e..f959a6f 100644
--- a/run.sh
+++ b/run.sh
@@ -8,7 +8,7 @@ basedir=$( cd "$(dirname "$0")" ; pwd -P)
 
 # Create output dir
 # OUTPUTDIR="${PWD}/output"
-# mkdir -p output
+mkdir -p output
 # INPUT_FILES
 L1B_URL=$1
 L2A_URL=$2 # e.g. GEDI01_B or GEDI02_A
-- 
GitLab