Skip to content

Commit

Permalink
fix local nwm file size read
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanLaserGit committed Nov 28, 2023
1 parent 53bc753 commit ffa0302
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion forcingprocessor/src/forcingprocessor/forcingprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,10 @@ 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]
response = fs_s3.open(bucket_key, mode='rb')
if fs_s3 is None:
nwm_file_sizes = os.path.getsize(filename)
else:
response = fs_s3.open(bucket_key, mode='rb')
nwm_file_sizes.append(response.details['size'])

nwm_file_size_avg = np.average(nwm_file_sizes)
Expand Down

0 comments on commit ffa0302

Please sign in to comment.