diff --git a/scripts/goes-download.py b/scripts/goes-download.py index 8ff6a7b..c5fa423 100644 --- a/scripts/goes-download.py +++ b/scripts/goes-download.py @@ -337,6 +337,7 @@ def _check_save_dir(save_dir: str) -> bool: else: try: os.mkdir(save_dir) + return True except: msg = "Save directory does not exist" msg += f"\nReceived: {save_dir}" diff --git a/scripts/modis-download.py b/scripts/modis-download.py index 12ba1b0..6ccc2cf 100644 --- a/scripts/modis-download.py +++ b/scripts/modis-download.py @@ -20,7 +20,7 @@ def modis_download( save_dir: Optional[str]=".", processing_level: str = 'L1b', resolution: str = "1KM", - bounding_box: Optional[tuple[float, float, float, float]]=(-180, -90, 180, 90), + bounding_box: Optional[tuple[float, float, float, float]]=(-180, -90, 180, 90), # TODO: Add polygon option earthdata_username: Optional[str]="", earthdata_password: Optional[str]="", # day_night_flag: Optional[str]=None, NOTE: can pass day/night flag ('day' or 'night') but if arg is passed it cannot be None - need to find a way to make it work as optional argument @@ -143,9 +143,6 @@ def modis_download( return files - # TODO: Implement downloading - # TODO: Implement pre-processing (e.g. matching coordinates?, transforming coordinate systems etc.) - # start/end times are used as daily window def get_daily_window(daily_start, end_time): """computes tuple of start and end date/time for each day for earthaccess call""" @@ -282,6 +279,7 @@ def _check_save_dir(save_dir: str) -> bool: else: try: os.mkdir(save_dir) + return True except: msg = "Save directory does not exist" msg += f"\nReceived: {save_dir}"