From 3b3521437c4b896db0f57404a2bb77625d742a15 Mon Sep 17 00:00:00 2001
From: annajungbluth <anna.jungbluth1993@gmail.com>
Date: Fri, 1 Dec 2023 11:23:51 +0000
Subject: [PATCH] removed user information and added scripts for data download

---
 notebooks/0.2.1-MODIS-download.ipynb |  4 +-
 scripts/goes-download.py             | 72 ++++++++++++++++++++++++++++
 scripts/modis-download.py            |  0
 3 files changed, 74 insertions(+), 2 deletions(-)
 create mode 100644 scripts/goes-download.py
 create mode 100644 scripts/modis-download.py

diff --git a/notebooks/0.2.1-MODIS-download.ipynb b/notebooks/0.2.1-MODIS-download.ipynb
index 6fb32ad..d2c1885 100644
--- a/notebooks/0.2.1-MODIS-download.ipynb
+++ b/notebooks/0.2.1-MODIS-download.ipynb
@@ -42,8 +42,8 @@
     "from modis_tools.resources import CollectionApi, GranuleApi\n",
     "from modis_tools.granule_handler import GranuleHandler\n",
     "\n",
-    "username = \"anna.jungbluth\"  # Update this line\n",
-    "password = \"wakqo4-qipbeX-nomjip\"  # Update this line\n",
+    "username = \"\"  # Update this line\n",
+    "password = \"\"  # Update this line\n",
     "\n",
     "# Authenticate a session\n",
     "session = ModisSession(username=username, password=password)"
diff --git a/scripts/goes-download.py b/scripts/goes-download.py
new file mode 100644
index 0000000..6e6d910
--- /dev/null
+++ b/scripts/goes-download.py
@@ -0,0 +1,72 @@
+"""
+
+
+Summary: The download script to interact directly with the goes2go package.
+We only want to specify what is necessary and compatible with the goes2go package.
+In general, we want to satellite, the spatial domain, and the period.
+
+Args:
+    satellite_number: 
+
+**Input Parameters**
+
+Downloading:
+- satellite number: int --> (16,17,18)
+- spatial extent: str --> full disk (F), CONUS (C), Mesoscale domains (M, M1, M2)
+- goes instrument: str --> e.g. ABI radiance (or SUVI for helio)
+- preprocessing level: str --> e.g. level-1b
+- directory: str
+- return xarray dataset or list of files --> return as file list works better?
+- band specifications: list[int] --> download all or subset only
+- start time (of range of times to be downloaded): str
+- end time: str
+- timesteps/number of files: str
+- day vs. night mode: --> e.g. for only downloading day mode images
+
+Basic Processing:
+- resolution: --> downscale all bands to common resolution (e.g. 2 km)
+- coordinate system transformations
+- etc.
+
+
+# download stuff
+np.arange, np.linspace
+t0, t1, dt | num_files
+timestamps = [t0, t1, t2]
+
+for itime in timestamps:
+    # download to folder
+    # open data in folder
+    # preprocess - downscale, aggregate bands, coordinate reference system transformations
+    # resave
+
+# preprocess stuff
+preprocess_stuff(*args, **kwargs)
+
+########## GOES ############
+# ==================
+# DOWNLOAD
+# ==================
+# download data
+download_data(*arg, **kwargs)
+
+# ==================
+# QUALITY CHECKS
+# ==================
+# day & night flag
+ds: xr.Dataset = day_and_night_flag(ds, *args, **kwargs)
+# all bands are there?
+ds: xr.Dataset = check_all_bands(ds, *args, **kwargs)
+
+# ==================
+# PREPROCESSING
+# ==================
+# open dataset
+ds: xr.Dataset = ...
+# crs transformation
+ds: xr.Dataset = crs_transform(ds, *args, **kwargs)
+# upscale/downscale
+ds: xr.Dataset = resample(ds, *args, **kwargs)
+
+
+"""
\ No newline at end of file
diff --git a/scripts/modis-download.py b/scripts/modis-download.py
new file mode 100644
index 0000000..e69de29