From 41530106634704269459e2e7ef587c1499e6823d Mon Sep 17 00:00:00 2001 From: Measrainsey Meng Date: Mon, 2 Sep 2024 15:10:11 +0200 Subject: [PATCH] Remove `if` statement that has the same selection for each condition --- .../model/water/data/pre_processing/hydro_agg_raster.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/message_ix_models/model/water/data/pre_processing/hydro_agg_raster.py b/message_ix_models/model/water/data/pre_processing/hydro_agg_raster.py index 7b9f4d86c9..a596c5e9cc 100644 --- a/message_ix_models/model/water/data/pre_processing/hydro_agg_raster.py +++ b/message_ix_models/model/water/data/pre_processing/hydro_agg_raster.py @@ -161,12 +161,7 @@ def process_raster(user, isimip, cl, scen, var, data): hydro_data = path_water + f"*{cl}*{scen}*{var}*monthly*.nc" files = glob.glob(hydro_data) - if var != "qr": - # Open hydrological data as a combined dataset - da = xr.open_mfdataset(files) - else: - # Open hydrological data as a combined dataset - da = xr.open_mfdataset(files) + da = xr.open_mfdataset(files) if monthlyscale: if var == "dis":