Commit 99e1c858 authored by Chichi Lalescu's avatar Chichi Lalescu
Browse files

use different precision initial conditions without conversion

also, fix typo in __main__.py
parent f244d748
Pipeline #36987 passed with stage
in 16 minutes and 46 seconds
...@@ -930,18 +930,9 @@ class DNS(_code): ...@@ -930,18 +930,9 @@ class DNS(_code):
3) 3)
src_file = h5py.File(src_file_name, 'r') src_file = h5py.File(src_file_name, 'r')
if (src_file[src_dset_name].shape == dst_shape): 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(
dst_file[dst_dset_name] = h5py.ExternalLink( src_file_name,
src_file_name, src_dset_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]
else: else:
min_shape = (min(dst_shape[0], src_file[src_dset_name].shape[0]), min_shape = (min(dst_shape[0], src_file[src_dset_name].shape[0]),
min(dst_shape[1], src_file[src_dset_name].shape[1]), min(dst_shape[1], src_file[src_dset_name].shape[1]),
......
...@@ -40,7 +40,7 @@ def main(): ...@@ -40,7 +40,7 @@ def main():
version = '%(prog)s ' + bfps.__version__) version = '%(prog)s ' + bfps.__version__)
parser.add_argument( parser.add_argument(
'base_class', 'base_class',
choices = ['DNS', 'PP', 'TEST'] choices = ['DNS', 'PP', 'TEST'],
type = str) type = str)
# first option is the choice of base class or -h or -v # first option is the choice of base class or -h or -v
# all other options are passed on to the base_class instance # all other options are passed on to the base_class instance
......
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