From 0402069e3ed13dcff5c19542a8908be579def078 Mon Sep 17 00:00:00 2001 From: Gabriele Tramonte Date: Wed, 17 Jul 2024 16:50:39 +0200 Subject: [PATCH] breaking the expand dim operation into two steps --- drivers/intake_geokube/afm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/intake_geokube/afm.py b/drivers/intake_geokube/afm.py index 63353cf..5792e71 100644 --- a/drivers/intake_geokube/afm.py +++ b/drivers/intake_geokube/afm.py @@ -18,7 +18,9 @@ def postprocess_afm(dset: xr.Dataset) -> xr.Dataset: dset = dset.drop('lat') dset = dset.drop('lon') dset = dset.sortby('time') - return dset.expand_dims(dim={"lat": latitude}, axis=0).expand_dims(dim={"lon": longitude}, axis=0) + dset = dset.expand_dims(dim={"lat": latitude}, axis=0) + dset = dset.expand_dims(dim={"lon": longitude}, axis=0) + return dset class CMCCAFMSource(GeokubeSource):