Improved checking of spatial resolution when importing geometry from HDF5 file.

这个提交包含在:
Craig Warren
2017-03-27 18:04:14 +01:00
父节点 a89c9e74dc
当前提交 f3d4e04209

查看文件

@@ -92,7 +92,7 @@ def process_geometrycmds(geometry, G):
# Open geometry object file and read/check spatial resolution attribute
f = h5py.File(geofile, 'r')
dx_dy_dz = f.attrs['dx, dy, dz']
if dx_dy_dz[0] != G.dx or dx_dy_dz[1] != G.dy or dx_dy_dz[2] != G.dz:
if int(dx_dy_dz[0] / G.dx) != 1 or int(dx_dy_dz[1] / G.dy) != 1 or int(dx_dy_dz[2] / G.dz) != 1:
raise CmdInputError("'" + ' '.join(tmp) + "'" + ' requires the spatial resolution of the geometry objects file to match the spatial resolution of the model')
data = f['/data'][:]