diff --git a/python-scripts/subgrid_2d_generalised.py b/python-scripts/subgrid_2d_generalised.py index 47b611337..47b4c08b2 100644 --- a/python-scripts/subgrid_2d_generalised.py +++ b/python-scripts/subgrid_2d_generalised.py @@ -33,6 +33,7 @@ time_step = args.time_step a_fac = args.a_fac b_fac = args.b_fac +fields = args.fields file_root, file_ext = os.path.splitext(input_file_name) @@ -214,15 +215,15 @@ def write_field(h5handle, field, field_name): h5file.attrs['b_fac'] = b_fac h5file.attrs['time_step'] = time_step -h5file.attrs['projfac'] = 12 -h5file.attrs['r_limit_fac'] = 4.0 +h5file.attrs['projfac'] = projfac +h5file.attrs['r_limit_fac'] = r_limit_fac h5file.attrs['input_file_name'] = input_file_name group = h5file.create_group('step#' + '0'.zfill(10)) group.attrs['t'] = 0.0 -for target_variable in ["buoyancy"]: #, "vorticity"]: +for target_variable in fields: scalar = h5reader.get_dataset(time_step, target_variable).copy() # Initialise "thread-based" fields for this file