Skip to content

Commit

Permalink
Bug fix in download hycom.py
Browse files Browse the repository at this point in the history
  • Loading branch information
GRautenbach committed Nov 27, 2024
1 parent 6aa2294 commit b46b657
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion download/hycom.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def download_hycom(variables, domain, depths, run_date, hdays, fdays, save_dir,w
end_date = pd.Timestamp(run_date) + timedelta(days=fdays)
ds = xr.open_mfdataset(os.path.join(save_dir, 'hycom_*.nc'))
check_time_range(start_date, end_date, ds.coords['time'].values)
outfile = os.path.abspath(os.path.join(save_dir, f"HYCOM_{run_date.strftime('%Y%m%d_00')}.nc"))
outfile = os.path.abspath(os.path.join(save_dir, f"HYCOM_{run_date.strftime('%Y%m%d_%H')}.nc"))
if os.path.exists(outfile):
os.remove(outfile)
ds.to_netcdf(outfile, 'w')
Expand Down

0 comments on commit b46b657

Please sign in to comment.