Skip to content

Commit

Permalink
feat:ZLIB COMPRESSION APPLIED IN LEVEL_SCRIPT
Browse files Browse the repository at this point in the history
  • Loading branch information
Fraser Goldsworth committed Dec 10, 2020
1 parent 8eef1bc commit 20688c4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/level_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@

# Save the merged output
print('Saving merged output \n')
ds_combined.to_netcdf(out_file)

coord_encoding = {elem: {'zlib': True} for elem in ds_combined.coords}
var_encoding = {elem: {'zlib': True} for elem in ds_combined.data_vars}
encoding = {**coord_encoding, **var_encoding}

ds_combined.to_netcdf(out_file, engine='netcdf4', encoding=encoding)
tsave = time.time() - tcombined - tpool - tsearch - t0

print('Processing completed \n')
Expand Down

0 comments on commit 20688c4

Please sign in to comment.