Skip to content

Commit

Permalink
fix filename bug
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanLaserGit committed Nov 28, 2023
1 parent ffa0302 commit 4634428
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions forcingprocessor/src/forcingprocessor/forcingprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,10 +598,11 @@ def prep_ngen_data(conf):
if j > 10: break
_nc_file_parts = jfile.split('/')
bucket_key = "noaa-nwm-pds/" + _nc_file_parts[-3] + '/' + _nc_file_parts[-2] + '/' + _nc_file_parts[-1]
if fs_s3 is None:
nwm_file_sizes = os.path.getsize(filename)
else:
if fs_s3:
response = fs_s3.open(bucket_key, mode='rb')
else:
nwm_file_sizes = os.path.getsize(jfile)

nwm_file_sizes.append(response.details['size'])

nwm_file_size_avg = np.average(nwm_file_sizes)
Expand Down

0 comments on commit 4634428

Please sign in to comment.