Commit d92dbcff authored by Modellers Operational's avatar Modellers Operational

Change archiving window to ensure overlap

parent 08d4c020
......@@ -18,10 +18,8 @@ this_filestr = '{}/{}_0001.nc'.format(fvcom_output_path,fvcom_grid_name)
this_fr = pf.read.FileReader(this_filestr)
for i, this_date in enumerate(date_list):
time_ind = [np.argwhere(this_fr.time.datetime == this_date), np.argwhere(this_fr.time.datetime == this_date + dt.timedelta(hours=23))]
time_ind = [np.argwhere(this_fr.time.datetime == this_date), np.argwhere(this_fr.time.datetime == this_date + dt.timedelta(hours=24))]
this_out_filestr = '{}_{}.nc'.format(fvcom_grid_name, this_date.strftime('%Y-%m-%d'))
with open('make_daily_nc.sh', 'a') as f:
f.write('ncks -d time,{},{} {} {} \n'.format(np.squeeze(time_ind[0]), np.squeeze(time_ind[1]), this_filestr, this_out_filestr))
f.write('ncks -d time,{},{} {} {} \n'.format(np.squeeze(time_ind[0]), np.squeeze(time_ind[1]), this_filestr, this_out_filestr))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment