Skip to content

Commit

Permalink
small fix in _check_save_dir function
Browse files Browse the repository at this point in the history
Co-authored-by: annajungbluth <[email protected]>
Co-authored-by: Juan Emmanuel Johnson <[email protected]>
  • Loading branch information
3 people committed Feb 2, 2024
1 parent b2ce001 commit 9532404
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions scripts/goes-download.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
6 changes: 2 additions & 4 deletions scripts/modis-download.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"""
Expand Down Expand Up @@ -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}"
Expand Down

0 comments on commit 9532404

Please sign in to comment.