Commit f91a3f36 authored by Modellers Operational's avatar Modellers Operational

Reorder dimensions of file being output

parent f90adbfe
......@@ -121,15 +121,15 @@ if rank == 0:
outfile.add_variable('lon', worker.regular_grid.lons, ['lon'], attributes=all_attributes['lon'])
outfile.add_variable('lat', worker.regular_grid.lats, ['lat'], attributes=all_attributes['lat'])
outfile.add_variable('depth', worker.regular_grid.dep_lays, ['depth'], attributes=all_attributes['depth'])
outfile.add_variable('mask', land_mask, ['lon', 'lat', 'depth'], attributes=all_attributes['mask'])
outfile.add_variable('h', h, ['lon', 'lat'], attributes=all_attributes['h'])
outfile.add_variable('mask', land_mask, ['depth', 'lat', 'lon'], attributes=all_attributes['mask'])
outfile.add_variable('h', h, ['lat', 'lon'], attributes=all_attributes['h'])
for this_var, this_mode in varlist.items():
if this_mode == 'surface':
outfile.add_variable(this_var, collected_interp_data[this_var], ['time', 'lon', 'lat'],
outfile.add_variable(this_var, np.swapaxes(collected_interp_data[this_var],1,2), ['time', 'lon', 'lat'],
attributes=all_attributes[this_var], ncopts=ncopts)
else:
outfile.add_variable(this_var, collected_interp_data[this_var], ['time', 'lon', 'lat', 'depth'],
outfile.add_variable(this_var, np.swapaxes(collected_interp_data[this_var],1,3), ['time', 'lon', 'lat', 'depth'],
attributes=all_attributes[this_var], ncopts=ncopts)
else:
......
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