diff --git a/src/tropolink/cluster.py b/src/tropolink/cluster.py
index 658c5ce0386443a474d9315bcf62f9affd1bddcc..0cb155f2091ff49f3aa526b7eb1c1e93d50f6a14 100644
--- a/src/tropolink/cluster.py
+++ b/src/tropolink/cluster.py
@@ -155,6 +155,10 @@ def make_xrun_file(date, study):
     return xrun_filename
 
 
+def get_setup_file_content():
+    return loader.render_to_string(template_name="SETUP.CFG")
+
+
 @contextmanager
 def connect_cluster():
     """
@@ -247,12 +251,14 @@ def run_hysplit(study, control_files, xrun_files):
         make_and_change_dir(study.user.username)
         make_and_change_dir(study.slug)
         sftp.mkdir('slurmOutput')
-        sftp.mkdir('slurmOutputTraj')
 
         # Put CONTROL and xrun files
         for cfile, xfile in zip(control_files, xrun_files):
             sftp.put(localpath=cfile, remotepath=cfile)
             sftp.put(localpath=xfile, remotepath=xfile)
+        setup_content = get_setup_file_content()
+        with sftp.open('SETUP.CFG', 'w') as f:
+            f.write(setup_content)
         sftp.close()
 
         # Create the output directory
diff --git a/src/tropolink/templates/SETUP.CFG b/src/tropolink/templates/SETUP.CFG
new file mode 100644
index 0000000000000000000000000000000000000000..9f72faadc9866e1b07f028e268478e0cedb7a733
--- /dev/null
+++ b/src/tropolink/templates/SETUP.CFG
@@ -0,0 +1,29 @@
+ &SETUP
+ tratio = 0.75,
+ delt = 0.0,
+ mgmin = 10,
+ khmax = 9999,
+ kmixd = 0,
+ kmsl = 0,
+ kagl = 1,
+ k10m = 1,
+ nstr = 0,
+ mhrs = 9999,
+ nver = 0,
+ tout = 60,
+ tm_pres = 1,
+ tm_tpot = 1,
+ tm_tamb = 1,
+ tm_rain = 1,
+ tm_mixd = 1,
+ tm_relh = 1,
+ tm_sphu = 1,
+ tm_mixr = 1,
+ tm_dswf = 1,
+ tm_terr = 1,
+ dxf = 1.00,
+ dyf = 1.00,
+ dzf = 0.01,
+ messg = 'MESSAGE',
+ /
+
diff --git a/src/tropolink/templates/xrun_tpl.txt b/src/tropolink/templates/xrun_tpl.txt
index c9c69c708dcc369ee9e0345553f2b260829d2cdf..289b377fe23f7f9a2b3bb4186f35839570f70907 100644
--- a/src/tropolink/templates/xrun_tpl.txt
+++ b/src/tropolink/templates/xrun_tpl.txt
@@ -1,17 +1,16 @@
 #!/bin/bash
-# charge le module hysplit le plus récent
-ml hysplit
-
-export PGM={{ pgm }}
-
+#SBATCH --output {{ localpath }}/slurmOutput/hysplitJob%A_%a.out
+#SBATCH --error {{ localpath }}/slurmOutput/hysplitJob%A_%a.err
 export local_path={{ localpath }}
 
-# la variable slurmOutputTraj pointe le répertoire où sont stockés les messages Slurm du calcul des traj
-export slurmOutputTraj={{ localpath }}/slurmOutputTraj
-
-#SBATCH --output slurmOutput/hysplitJob%A_%a.out
-#SBATCH --error slurmOutput/hysplitJob%A_%a.err
-
 cd $local_path
+# Useless because there is only one hysplit module?
+#ml hysplit
+
 echo "'TITLE&','Backward Trajectory&'" >LABELS.CFG
-${PGM}hyts_std {{ date }}
+cp SETUP.CFG SETUP.{{ date }}
+
+{{ pgm }}hyts_std {{ date }}
+
+rm -f SETUP.{{ date }}
+rm -f MESSAGE.{{ date }}