Skip to content

Commit

Permalink
#1056: Deleted unnecessary loop
Browse files Browse the repository at this point in the history
  • Loading branch information
philipjyoon committed Jan 18, 2025
1 parent 916e191 commit 751e598
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tools/download_from_daac.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,10 @@

# NOTE: This time filter isn't really used - we hard-coded it to 1999 to 2099 for now. If at some point we want to
# filter by time as well, we will need to configure this a bit to make it work
for attrib in disp_s1.get("umm").get("AdditionalAttributes"):
# Need to perform secondary filter. Not sure if we always need to do this or temporarily so.
actual_temporal_time = datetime.datetime.strptime(
disp_s1.get("umm").get("TemporalExtent")['RangeDateTime']['EndingDateTime'], "%Y-%m-%dT%H:%M:%SZ")
if not(actual_temporal_time >= smallest_date and actual_temporal_time <= greatest_date):
continue
actual_temporal_time = datetime.datetime.strptime(
disp_s1.get("umm").get("TemporalExtent")['RangeDateTime']['EndingDateTime'], "%Y-%m-%dT%H:%M:%SZ")
if not(actual_temporal_time >= smallest_date and actual_temporal_time <= greatest_date):
continue

# If the path umm.RelatedUrls contains "URL" that starts with "s3" and "Format" field value "netCDF-4" then store that value
for related_url in disp_s1.get("umm").get("RelatedUrls"):
Expand Down

0 comments on commit 751e598

Please sign in to comment.