From e89d51f335f7639b4e2b0dfe64bc04690053a912 Mon Sep 17 00:00:00 2001
From: "Daniel.Frisinghelli" <daniel.frisinghelli@eurac.edu>
Date: Mon, 21 Jun 2021 16:33:02 +0200
Subject: [PATCH] Remap EuroCordex simulations to target grid.

---
 climax/main/preprocess.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/climax/main/preprocess.py b/climax/main/preprocess.py
index 3cc2984..75ec051 100644
--- a/climax/main/preprocess.py
+++ b/climax/main/preprocess.py
@@ -183,6 +183,16 @@ if __name__ == '__main__':
                                     row.institute_rcm,
                                     row.downscale_realisation, nc_pattern])
 
+                # filter by variable
+                if args.variable is not None:
+                    if not pattern.startswith(args.variable):
+                        continue
+
+                # filter by experiment
+                if args.scenario is not None:
+                    if not args.scenario in pattern:
+                        continue
+
                 # run cordex preprocessing
                 preprocess_cordex_simulation(pattern)
 
-- 
GitLab