From 0a1cf085413b255cda437a426f952049519defed Mon Sep 17 00:00:00 2001 From: mattjbr123 Date: Tue, 27 Aug 2024 16:32:38 +0100 Subject: [PATCH] random tweaks #3 --- scripts/convert_GEAR_beam.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/convert_GEAR_beam.py b/scripts/convert_GEAR_beam.py index adfbe9d..2673c48 100644 --- a/scripts/convert_GEAR_beam.py +++ b/scripts/convert_GEAR_beam.py @@ -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 @@ -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,