Skip to content

Commit

Permalink
improve the subgrid algorithm script
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-frey committed Feb 1, 2022
1 parent 535d007 commit 53b8cce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python-scripts/subgrid_2d_generalised.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 53b8cce

Please sign in to comment.