diff --git a/.gitignore b/.gitignore
index 0221f8c7a67bff2321d886db32a004d3f8aa9dde..a6ee8d1f5146c81eb3dc09dc2f5bc79c3a501f90 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
 .env
 .venv
 mapfile/*.map
+last_run_timestamp
diff --git a/conda_environment.yml b/conda_environment.yml
new file mode 100644
index 0000000000000000000000000000000000000000..7f5511fc7bee23d497e3f5b3ea1f76a17e7e98c8
--- /dev/null
+++ b/conda_environment.yml
@@ -0,0 +1,9 @@
+name: SEPTREFHUM
+channels:
+  - conda-forge 
+dependencies:
+  - cdo=2.4.0
+  - Jinja2
+  - netCDF4
+  - pytz
+  - python-dotenv
\ No newline at end of file
diff --git a/run_SEPTREFHUM.sh b/run_SEPTREFHUM.sh
index b77fc5a3a65ade14109da9943bf3e7beb86a7fa5..fe0e4dbe4d024dbf18b590982039965cbfe31598 100755
--- a/run_SEPTREFHUM.sh
+++ b/run_SEPTREFHUM.sh
@@ -18,42 +18,55 @@
 # Configures environment and logging before running the model
 # @author: Tor-Einar Skog <tor-einar.skog@nibio.no>
 
+# Defines HOME_DIR
+source .env
 
-
-# First: Test that we have CDO and GDAL installed
-if ! command -v cdo &> /dev/null
+# Check for HOME_DIR
+if [ -z "${HOME_DIR}" ]
 then
-    echo "ERROR: CDO could not be found. Exiting."
+    echo "ERROR: \$HOME_DIR is not set. Please declare it in an .env file"
     exit
 fi
 
+# Paths to scripts and requirements
+LOG_FILE=${HOME_DIR}log/SEPTREFHUM.log
+REQUIREMENTS=${HOME_DIR}requirements.txt
+CDO_VERSION=2.4.0
+
+# Test that we have GDAL and Miniconda installed
 if ! command -v gdal_merge.py &> /dev/null
 then
     echo "ERROR: GDAL is either not installed, or not built with Python support. Exiting."
     exit
 fi
 
-# Defines HOME_DIR
-source .env
-
-# Check for HOME_DIR
-if [ -z "${HOME_DIR}" ]
+if ! command -v conda &> /dev/null
 then
-    echo "ERROR: \$HOME_DIR is not set. Please declare it in an .env file"
+    echo "ERROR: Miniconda is not installed. Pleare read: https://code.mpimet.mpg.de/projects/cdo/wiki/Anaconda"
     exit
 fi
 
-# Paths to scripts and requirements
-LOG_FILE=${HOME_DIR}log/SEPTREFHUM.log
-REQUIREMENTS=${HOME_DIR}requirements.txt
-
 cd $HOME_DIR
 
-# Create and activate the virtual environment
-python3 -m venv .venv
-. .venv/bin/activate
-python3 -m pip install -q --upgrade pip
-pip install -q -r $REQUIREMENTS
+# Check if we need to create the virtual environment
+eval "$(conda shell.bash hook)"
+now=$(date +%s)
+if ! conda env list | grep -q "SEPTREFHUM "; then
+    echo "Conda env not found, creating it"
+    conda env create -f conda_environment.yml
+    conda activate SEPTREFHUM
+else
+    # Make sure we catch/update changes in dependencies
+    if [ -e last_run_timestamp ]; then
+        last_run_timestamp=$(<last_run_timestamp)
+        last_modified_env_file=$(stat -c "%Y" conda_environment.yml)
+        if [ $((last_run_timestamp - last_modified_env_file)) -lt 0 ]; then
+            echo "conda_environment.yml file has been updated. Updating the conda env. This may take a while"
+            conda env update --prune -f conda_environment.yml
+        fi
+    fi
+    conda activate SEPTREFHUM
+fi
 
 # Run the model
 echo "==== `date`: Running model" &>> "$LOG_FILE"
@@ -61,4 +74,7 @@ python3 ${HOME_DIR}SEPTREFHUM.py &>> "$LOG_FILE"
 echo "==== `date`: DONE running model" &>> "$LOG_FILE"
 
 # Deactivate the virtual environment
-deactivate
+conda deactivate
+
+# Log this to compare with changes in conda_environment.yml
+echo $now > last_run_timestamp