diff --git a/bfps/DNS.py b/bfps/DNS.py index b22a309a1494ee1a953c3e19e53e6548d067d619..487583950b69e40cc32a0d800efefd41ee39a2fe 100644 --- a/bfps/DNS.py +++ b/bfps/DNS.py @@ -930,18 +930,9 @@ class DNS(_code): 3) src_file = h5py.File(src_file_name, 'r') if (src_file[src_dset_name].shape == dst_shape): - if make_link and (src_file[src_dset_name].dtype == self.ctype): - dst_file[dst_dset_name] = h5py.ExternalLink( - src_file_name, - src_dset_name) - else: - dst_file.create_dataset( - dst_dset_name, - shape = dst_shape, - dtype = self.ctype, - fillvalue = 0.0) - for kz in range(src_file[src_dset_name].shape[0]): - dst_file[dst_dset_name][kz] = src_file[src_dset_name][kz] + dst_file[dst_dset_name] = h5py.ExternalLink( + src_file_name, + src_dset_name) else: min_shape = (min(dst_shape[0], src_file[src_dset_name].shape[0]), min(dst_shape[1], src_file[src_dset_name].shape[1]), diff --git a/bfps/__main__.py b/bfps/__main__.py index 25d3d101baa4329adc3e0fc3730b9f8a35c34b98..16a7cf7d099c49a39368a8ff09cb05bf890feb6f 100644 --- a/bfps/__main__.py +++ b/bfps/__main__.py @@ -40,7 +40,7 @@ def main(): version = '%(prog)s ' + bfps.__version__) parser.add_argument( 'base_class', - choices = ['DNS', 'PP', 'TEST'] + choices = ['DNS', 'PP', 'TEST'], type = str) # first option is the choice of base class or -h or -v # all other options are passed on to the base_class instance