Skip to content

Commit

Permalink
Always error for not found file in open_dataset
Browse files Browse the repository at this point in the history
since nothing to return, unlike mfdataset, where we still
have something as long as there is at least one file that does
exist
  • Loading branch information
zmoon committed Mar 19, 2024
1 parent efc3b33 commit cec5823
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions monetio/sat/nesdis_viirs_aod_aws_gridded.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,13 @@ def open_dataset(date, satellite="SNPP", data_resolution=0.1, averaging_time="da
fs = s3fs.S3FileSystem(anon=True)

if averaging_time.lower() == "monthly":
file_list, _ = create_monthly_aod_list(satellite, date_generated, fs)
file_list, _ = create_monthly_aod_list(satellite, date_generated, fs, warning=False)
elif averaging_time.lower() == "weekly":
file_list, _ = create_weekly_aod_list(satellite, date_generated, fs)
file_list, _ = create_weekly_aod_list(satellite, date_generated, fs, warning=False)
elif averaging_time.lower() == "daily":
file_list, _ = create_daily_aod_list(data_resolution, satellite, date_generated, fs)
file_list, _ = create_daily_aod_list(
data_resolution, satellite, date_generated, fs, warning=False
)
else:
raise ValueError(
f"Invalid input for 'averaging_time' {averaging_time!r}: "
Expand Down

0 comments on commit cec5823

Please sign in to comment.