Skip to content

Commit

Permalink
delete time steps in variance exodus file
Browse files Browse the repository at this point in the history
  • Loading branch information
hyysun committed Apr 28, 2013
1 parent 48bc5ae commit 72c84f7
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/mr_outputvar_hadoop.py
Expand Up @@ -25,7 +25,8 @@ def insert_vars(source, destination, varNames, varVals):
#Copy all dims for new exofile creation
for d in source.cdf.dimensions.keys():
if d == 'time_step':
destination.cdf.createDimension('time_step', source.cdf.dimensions['time_step'])
#destination.cdf.createDimension('time_step', source.cdf.dimensions['time_step'])
pass
elif d == 'num_nod_var':
pass
#destination.cdf.createDimension(d,0)
Expand All @@ -47,10 +48,11 @@ def insert_vars(source, destination, varNames, varVals):
elif var == 'name_nod_var':
pass
elif var == 'time_whole':
getvar= source.cdf.variables[var]
vardata = getvar.getValue()
var1 = destination.cdf.createVariable(var,(getvar.typecode()),(getvar.dimensions))
var1.assignValue(vardata)
#getvar= source.cdf.variables[var]
#vardata = getvar.getValue()
#var1 = destination.cdf.createVariable(var,(getvar.typecode()),(getvar.dimensions))
#var1.assignValue(vardata)
pass
elif source.cdf.variables[var].dimensions[0] == 'time_step': # NOTE assume all time dimensions are in first dimension
continue
else:
Expand Down

0 comments on commit 72c84f7

Please sign in to comment.