From a7c80cea3aa2b8430da25c8c7acbbb17dd67ff0a Mon Sep 17 00:00:00 2001
From: Bing Gong <b.gong@fz-juelich.de>
Date: Fri, 25 Feb 2022 11:52:40 +0100
Subject: [PATCH] Update swtich the load modules and activate environment in
 Data extraction template

---
 .../JSC_scripts/data_extraction_era5_template.sh             | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/video_prediction_tools/JSC_scripts/data_extraction_era5_template.sh b/video_prediction_tools/JSC_scripts/data_extraction_era5_template.sh
index ec226b48..a57bbcaa 100644
--- a/video_prediction_tools/JSC_scripts/data_extraction_era5_template.sh
+++ b/video_prediction_tools/JSC_scripts/data_extraction_era5_template.sh
@@ -23,8 +23,7 @@ jutil env activate -p deepacf
 # Name of virtual environment 
 VIRT_ENV_NAME="my_venv"
 
-# Loading mouldes
-source ../env_setup/modules_preprocess+extract.sh
+
 # Activate virtual environment if needed (and possible)
 if [ -z ${VIRTUAL_ENV} ]; then
    if [[ -f ../virtual_envs/${VIRT_ENV_NAME}/bin/activate ]]; then
@@ -35,6 +34,8 @@ if [ -z ${VIRTUAL_ENV} ]; then
       exit 1
    fi
 fi
+# Loading mouldes
+source ../env_setup/modules_preprocess+extract.sh
 
 # Declare path-variables (dest_dir will be set and configured automatically via generate_runscript.py)
 source_dir=/my/path/to/era5
-- 
GitLab