From b780794146140e0521163d6f20079ee63d4c7ac2 Mon Sep 17 00:00:00 2001
From: Alex Rojas <a.rojas8907@gmail.com>
Date: Thu, 19 Oct 2023 02:53:59 +0000
Subject: [PATCH] updated input filepath in main.py file for GEDI data.

---
 main.py                          | 5 +++--
 notebooks/run-gedi-biomass.ipynb | 8 ++++----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/main.py b/main.py
index 12d2ac0..02e55b0 100644
--- a/main.py
+++ b/main.py
@@ -112,8 +112,9 @@ if __name__ == '__main__':
         # get level 1 and level 2 data
         print(l1b_basename)
         print(l2a_basename)
-        l1b_ds = h5py.File(f"./{l1b_basename}")
-        l2a_ds = h5py.File(f"./{l2a_basename}")
+        CWD = os.path.dirname(os.path.abspath(__file__))
+        l1b_ds = h5py.File(os.path.join(CWD, f"{l1b_basename}"))
+        l2a_ds = h5py.File(os.path.join(CWD, f"{l2a_basename}"))
     except Exception as e:
         # Some raw L1B files are corrupt?
         print("Corrupt file: ", l1b_basename)
diff --git a/notebooks/run-gedi-biomass.ipynb b/notebooks/run-gedi-biomass.ipynb
index 148ba05..fb472a9 100644
--- a/notebooks/run-gedi-biomass.ipynb
+++ b/notebooks/run-gedi-biomass.ipynb
@@ -98,7 +98,7 @@
      "name": "stdout",
      "output_type": "stream",
      "text": [
-      "[{'job_id': '9e4d8c3e-c8e2-47df-82cf-e9f0f4357ce8', 'status': 'Accepted', 'machine_type': None, 'architecture': None, 'machine_memory_size': None, 'directory_size': None, 'operating_system': None, 'job_start_time': None, 'job_end_time': None, 'job_duration_seconds': None, 'cpu_usage': None, 'cache_usage': None, 'mem_usage': None, 'max_mem_usage': None, 'swap_usage': None, 'read_io_stats': None, 'write_io_stats': None, 'sync_io_stats': None, 'async_io_stats': None, 'total_io_stats': None, 'error_details': None, 'response_code': 200, 'outputs': []}]\n"
+      "[{'job_id': '8746412d-a0d2-4b97-b004-337b67c3565d', 'status': 'Accepted', 'machine_type': None, 'architecture': None, 'machine_memory_size': None, 'directory_size': None, 'operating_system': None, 'job_start_time': None, 'job_end_time': None, 'job_duration_seconds': None, 'cpu_usage': None, 'cache_usage': None, 'mem_usage': None, 'max_mem_usage': None, 'swap_usage': None, 'read_io_stats': None, 'write_io_stats': None, 'sync_io_stats': None, 'async_io_stats': None, 'total_io_stats': None, 'error_details': None, 'response_code': 200, 'outputs': []}]\n"
      ]
     }
    ],
@@ -117,7 +117,7 @@
      "output_type": "stream",
      "text": [
       "Accepted\n",
-      "7c2243dc-d90c-4ac0-8d57-6651f98b1b10\n"
+      "8746412d-a0d2-4b97-b004-337b67c3565d\n"
      ]
     }
    ],
@@ -131,7 +131,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 10,
+   "execution_count": 11,
    "id": "2018077f-9640-4e70-bd01-a9d939b3626a",
    "metadata": {},
    "outputs": [
@@ -140,7 +140,7 @@
      "output_type": "stream",
      "text": [
       "Succeeded\n",
-      "7c2243dc-d90c-4ac0-8d57-6651f98b1b10\n"
+      "8746412d-a0d2-4b97-b004-337b67c3565d\n"
      ]
     }
    ],
-- 
GitLab