Commit e4390285 authored by Peters, Wouter's avatar Peters, Wouter
Browse files

minor tweaks to make files overwrite

parent b4821281
......@@ -61,7 +61,7 @@ def monthly_avg(rundir,avg):
print sd, nd , len(avg_files)
if len(avg_files) > 0:
command = ['ncra']+ avg_files + [os.path.join(monthdir,'%s_fluxes.%s.nc'%(avg,sd.strftime('%Y-%m')))]
command = ['ncra','-O']+ avg_files + [os.path.join(monthdir,'%s_fluxes.%s.nc'%(avg,sd.strftime('%Y-%m')))]
status = subprocess.check_call(command)
......
......@@ -66,5 +66,6 @@ if __name__ == "__main__":
while dacycle['time.end'] < dacycle['time.finish']:
time_avg(dacycle,avg='transcom')
time_avg(dacycle,avg='olson')
dacycle.advance_cycle_times()
......@@ -54,7 +54,7 @@ def yearly_avg(rundir,avg):
print sd, nd , len(avg_files)
if len(avg_files) > 0 :
command = ['ncra']+ avg_files + [os.path.join(yeardir,'%s_fluxes.%s.nc'%(avg,sd.strftime('%Y')))]
command = ['ncra','-O']+ avg_files + [os.path.join(yeardir,'%s_fluxes.%s.nc'%(avg,sd.strftime('%Y')))]
status = subprocess.check_call(command)
......
Supports Markdown
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