From ce19f24e1e05da6991e3d3b6863a24e3e0020a22 Mon Sep 17 00:00:00 2001 From: "Daniel.Frisinghelli" <daniel.frisinghelli@eurac.edu> Date: Thu, 19 Aug 2021 14:06:43 +0200 Subject: [PATCH] Fix DEM processing. --- climax/main/downscale_infer.py | 4 ++++ climax/main/downscale_train.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/climax/main/downscale_infer.py b/climax/main/downscale_infer.py index 105956e..4e4d21d 100644 --- a/climax/main/downscale_infer.py +++ b/climax/main/downscale_infer.py @@ -65,6 +65,10 @@ if __name__ == '__main__': dem, {'y': Era5_ds.y, 'x': Era5_ds.x}, add_coord={'time': Era5_ds.time}) + # check whether to use slope and aspect + if not DEM_FEATURES: + dem = dem.drop_vars(['slope', 'aspect']) + # add dem to set of predictor variables Era5_ds = xr.merge([Era5_ds, dem]) diff --git a/climax/main/downscale_train.py b/climax/main/downscale_train.py index 0aa4916..d1bcb5b 100644 --- a/climax/main/downscale_train.py +++ b/climax/main/downscale_train.py @@ -90,7 +90,7 @@ if __name__ == '__main__': dem, {'y': Era5_ds.y, 'x': Era5_ds.x}, add_coord={'time': Era5_ds.time}) - # check wether to use slope and aspect + # check whether to use slope and aspect if not DEM_FEATURES: dem = dem.drop_vars(['slope', 'aspect']) -- GitLab