Skip to content

Commit

Permalink
random tweaks #3
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjbr123 committed Aug 27, 2024
1 parent b443a1e commit 0a1cf08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/convert_GEAR_beam.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
suf = ".nc"
td = "/work/scratch-pw2/mattjbr"
tn = "gear_1hrly_fulloutput_yearly_100km_chunks.zarr"
target_chunks = {"time": int(365.25*24), "y": 100, "x": 100}
target_chunks = {"time": int(365.25*24), "y": 100, "x": 100, "bnds": 2}
#nprocs = 64
prune = 12 # no. of files to process, set to 0 to use all

Expand All @@ -46,7 +46,7 @@ def make_path(time):

recipe = (
beam.Create(pattern.items())
| OpenWithXarray(file_type=pattern.file_type)
| OpenWithXarray(file_type=pattern.file_type, xarray_open_kwargs={'preprocess':lambda ds: ds.set_coords(['x_bnds', 'y_bnds', 'time_bnds', 'crs'])})
| StoreToZarr(
target_root=td,
store_name=tn,
Expand Down

0 comments on commit 0a1cf08

Please sign in to comment.