diff --git a/docs/configure-wine.md b/docs/configure-wine.md
index b3d2225cbc3bace5306bd0241259a740eea405ef..e2c891bceff0694989144b9cfbc17dda6884e8f2 100644
--- a/docs/configure-wine.md
+++ b/docs/configure-wine.md
@@ -1,5 +1,4 @@
-
-Configure Wine for HAWC2
+Configure Wine for Gorm
 ------------------------
 
 > Note that the steps described here are executed automatically by the
@@ -52,3 +51,11 @@ executable. The file ```hawc2-latest.exe``` will always be the latest HAWC2
 version at ```/home/MET/hawc2exe/```. When a new HAWC2 is released you can
 simply copy all the files from there again to update.
 
+
+Configure Wine for Jess
+------------------------
+
+```
+g-000 $ WINEARCH=win32 WINEPREFIX=~/.wine32 winefix
+g-000 $ WINEARCH=win32 WINEPREFIX=~/.wine32 wine test.exe
+```
diff --git a/docs/howto-make-dlcs.md b/docs/howto-make-dlcs.md
index d6a92f59b2afa403e8e20636548ad829e2d0ef5f..ce0ea476e9329063d56c634c7a82d7fc97e4b95d 100644
--- a/docs/howto-make-dlcs.md
+++ b/docs/howto-make-dlcs.md
@@ -369,6 +369,29 @@ node for which the a fixed file name is assumed
 * ```[copyto_generic] = ['ESYSMooring_init.dat']```
 
 
+### Tags required for standalone Mann 64-bit turbulence generator
+
+```dlctemplate.py``` has a flag named ```--pbs_turb```, which when activated
+generates PBS input files containing the instructions to generate all required
+turbulence boxes using the 64-bit version of the stand alone Mann turbulence
+box generator. The appropriate input parameters are taken from the following
+tags:
+
+* ```[tu_model]```
+* ```[Turb base name]```
+* ```[MannAlfaEpsilon]```
+* ```[MannL]```
+* ```[MannGamma]```
+* ```[tu_seed]```
+* ```[turb_nr_u]``` : number of grid points in the u direction
+* ```[turb_nr_v]``` : number of grid points in the v direction
+* ```[turb_nr_w]``` : number of grid points in the w direction
+* ```[turb_dx]``` : grid spacing in meters in the u direction
+* ```[turb_dy]``` : grid spacing in meters in the v direction
+* ```[turb_dz]``` : grid spacing in meters in the w direction
+* ```[high_freq_comp]```
+
+
 Launching the jobs on the cluster
 ---------------------------------
 
diff --git a/wetb/prepost/Simulations.py b/wetb/prepost/Simulations.py
index 89ea46e44eba842512627b41f3a85737de1fbb29..e12a6aa069fdcab864570269b677e166c740ed86 100755
--- a/wetb/prepost/Simulations.py
+++ b/wetb/prepost/Simulations.py
@@ -33,7 +33,7 @@ import pickle
 import re
 # what is actually the difference between warnings and logging.warn?
 # for which context is which better?
-#import warnings
+import warnings
 import logging
 from operator import itemgetter
 from time import time
@@ -1809,6 +1809,12 @@ class HtcMaster(object):
 
         htc = self.master_str
 
+        # FIXME: HAWC2 always outputs result and logfile in lower case, so
+        # force case_id/Case id. to be lower case
+        self.tags['[case_id]'] = self.tags['[case_id]'].lower()
+        if '[Case id.]' in self.tags:
+            self.tags['[Case id.]'] = self.tags['[Case id.]'].lower()
+
         # and now replace all the tags in the htc master file
         # when iterating over a dict, it will give the key, given in the
         # corresponding format (string keys as strings, int keys as ints...)
@@ -1930,14 +1936,13 @@ class PBS(object):
             self.maxcpu = 1
             self.secperiter = 0.012
             self.wine = 'time WINEARCH=win32 WINEPREFIX=~/.wine32 wine'
-            self.winefix = ''
         elif server == 'jess':
             self.maxcpu = 1
             self.secperiter = 0.012
-            self.winefix = 'WINEARCH=win32 WINEPREFIX=~/.wine32 winefix\n'
             self.wine = 'time WINEARCH=win32 WINEPREFIX=~/.wine32 wine'
         else:
             raise UserWarning('server support only for jess or gorm')
+        self.winefix = 'WINEARCH=win32 WINEPREFIX=~/.wine32 winefix\n'
 
         # the output channels comes with a price tag. Each time step
         # will have a penelty depending on the number of output channels
@@ -2627,7 +2632,8 @@ class PBS(object):
             run_dir = case['[run_dir]']
             res_dir = case['[res_dir]']
             log_dir = case['[log_dir]']
-            cname_ = cname.replace('.htc', '')
+            # FIXME: HAWC2 outputs result and logfile always in lower cases
+            cname_ = cname.replace('.htc', '').lower()
             f_log = os.path.join(run_dir, log_dir, cname_)
             f_res = os.path.join(run_dir, res_dir, cname_)
             if not os.path.exists(f_log + '.log'):
@@ -2706,38 +2712,31 @@ class ErrorLogs(windIO.LogFile):
         """
 
         # MsgListLog = []
-
-        # load all the files in the given path
         FileList = []
-        for files in os.walk(self.PathToLogs):
-            FileList.append(files)
+        # if a directory, load all files first
+        if os.path.isdir(self.PathToLogs):
 
-        # if the instead of a directory, a file path is given
-        # the generated FileList will be empty!
-        try:
+            for files in os.walk(self.PathToLogs):
+                FileList.append(files)
             NrFiles = len(FileList[0][2])
-        # input was a single file:
-        except:
-            NrFiles = 1
+        else:
             # simulate one entry on FileList[0][2], give it the file name
             # and save the directory on in self.PathToLogs
-            tmp = self.PathToLogs.split(os.path.sep)[-1]
-            # cut out the file name from the directory
-            self.PathToLogs = self.PathToLogs.replace(tmp, '')
-            FileList.append([ [],[],[tmp] ])
+            NrFiles = 1
+            FileList.append([ [],[],[os.path.basename(self.PathToLogs)] ])
+            self.PathToLogs = os.path.dirname(self.PathToLogs)
             single_file = True
         i=1
 
         # walk trough the files present in the folder path
         for fname in FileList[0][2]:
-            fname_lower = fname.lower()
             # progress indicator
             if NrFiles > 1:
                 if not self.silent:
                     print('progress: ' + str(i) + '/' + str(NrFiles))
 
             # open the current log file
-            f_log = os.path.join(self.PathToLogs, str(fname_lower))
+            f_log = os.path.join(self.PathToLogs, fname)
 
             if self.cases is not None:
                 case = self.cases[fname.replace('.log', '.htc')]
@@ -2829,14 +2828,23 @@ class ModelData(object):
         #12    13  14  15  16  17  18
         #I_p/K k_x k_y A pitch x_e y_e
         # 19 cols
-        self.st_column_header_list = ['r', 'm', 'x_cg', 'y_cg', 'ri_x', \
-            'ri_y', 'x_sh', 'y_sh', 'E', 'G', 'I_x', 'I_y', 'J', 'k_x', \
+        self.st_column_header_list = ['r', 'm', 'x_cg', 'y_cg', 'ri_x',
+            'ri_y', 'x_sh', 'y_sh', 'E', 'G', 'I_x', 'I_y', 'J', 'k_x',
             'k_y', 'A', 'pitch', 'x_e', 'y_e']
 
-        self.st_column_header_list_latex = ['r','m','x_{cg}','y_{cg}','ri_x',\
-            'ri_y', 'x_{sh}','y_{sh}','E', 'G', 'I_x', 'I_y', 'J', 'k_x', \
+        self.st_column_header_list_latex = ['r','m','x_{cg}','y_{cg}','ri_x',
+            'ri_y', 'x_{sh}','y_{sh}','E', 'G', 'I_x', 'I_y', 'J', 'k_x',
             'k_y', 'A', 'pitch', 'x_e', 'y_e']
 
+        self.st_fpm_cols = ['r', 'm', 'x_cg', 'y_cg', 'ri_x', 'ri_y', 'pitch',
+                            'x_e', 'y_e', 'E11', 'E12', 'E13', 'E14', 'E15',
+                            'E16', 'E22', 'E23', 'E24', 'E25', 'E26', 'E33',
+                            'E34', 'E35', 'E36', 'E44', 'E45', 'E46', 'E55',
+                            'E56', 'E66']
+        # set column names/indeices as class attributes
+        for i, col in enumerate(self.st_fpm_cols):
+            setattr(self, col, i)
+
         # make the column header
         self.column_header_line = 19 * self.col_width * '=' + '\n'
         for k in self.st_column_header_list:
@@ -3607,7 +3615,7 @@ class Cases(object):
 
         respath = os.path.join(case['[run_dir]'], case['[res_dir]'])
         resfile = case['[case_id]']
-        self.res = windIO.LoadResults(respath, resfile)
+        self.res = windIO.LoadResults(respath, resfile.lower())
         if not _slice:
             _slice = np.r_[0:len(self.res.sig)]
         self.time = self.res.sig[_slice,0]
@@ -3669,12 +3677,6 @@ class Cases(object):
 
         #return cases
 
-    def force_lower_case_id(self):
-        tmp_cases = {}
-        for cname, case in self.cases.items():
-            tmp_cases[cname.lower()] = case.copy()
-        self.cases = tmp_cases
-
     def _get_cases_dict(self, post_dir, sim_id):
         """
         Load the pickled dictionary containing all the cases and their
@@ -3691,8 +3693,6 @@ class Cases(object):
         self.cases = load_pickled_file(os.path.join(post_dir, sim_id + '.pkl'))
         self.cases_fail = {}
 
-        self.force_lower_case_id()
-
         if self.rem_failed:
             try:
                 self.load_failed(sim_id)
@@ -5176,6 +5176,18 @@ class Cases(object):
                 csv_table.flush()
         h5f.close()
 
+    def force_lower_case_id(self):
+        """Keep for backwards compatibility with the dlctemplate.py
+        """
+        msg = "force_lower_case_id is depricated and is integrated in "
+        msg += "Cases.createcase() instead."
+        warnings.warn(msg, DeprecationWarning)
+
+        tmp_cases = {}
+        for cname, case in self.cases.items():
+             tmp_cases[cname.lower()] = case.copy()
+        self.cases = tmp_cases
+
 
 class EnvelopeClass(object):
     """
@@ -5271,12 +5283,28 @@ class Results(object):
 class MannTurb64(prepost.PBSScript):
     """
     alfaeps, L, gamma, seed, nr_u, nr_v, nr_w, du, dv, dw high_freq_comp
-    mann_turb_x64.exe fname 1.0 29.4 3.0 1209 256 32 32 2.0 5 5 true
+    mann_turb_x64.exe fname 1.0 29.4 3.0 1209 256 32 32 2.0 5 5 true.
+
+    Following tags have to be defined:
+        * [tu_model]
+        * [turb_base_name]
+        * [MannAlfaEpsilon]
+        * [MannL]
+        * [MannGamma]
+        * [tu_seed]
+        * [turb_nr_u]
+        * [turb_nr_v]
+        * [turb_nr_w]
+        * [turb_dx]
+        * [turb_dy]
+        * [turb_dz]
+        * [high_freq_comp]
     """
 
     def __init__(self, silent=False):
         super(MannTurb64, self).__init__()
         self.exe = 'time wine mann_turb_x64.exe'
+        self.winefix = 'winefix\n'
         # PBS configuration
         self.umask = '0003'
         self.walltime = '00:59:59'
@@ -5287,6 +5315,13 @@ class MannTurb64(prepost.PBSScript):
         self.pbs_in_dir = 'pbs_in_turb/'
 
     def gen_pbs(self, cases):
+        """
+        Parameters
+        ----------
+
+        cases : dict of dicts
+            each key holding a dictionary with tag/value pairs.
+        """
 
         case0 = cases[list(cases.keys())[0]]
         # make sure the path's end with a trailing separator, why??
@@ -5298,10 +5333,10 @@ class MannTurb64(prepost.PBSScript):
             # only relevant for cases with turbulence
             if '[tu_model]' in case and int(case['[tu_model]']) == 0:
                 continue
-            if '[Turb base name]' not in case:
+            if '[turb_base_name]' not in case:
                 continue
 
-            base_name = case['[Turb base name]']
+            base_name = case['[turb_base_name]']
             # pbs_in/out dir can contain subdirs, only take the inner directory
             out_base = misc.path_split_dirs(case['[pbs_out_dir]'])[0]
             turb = case['[turb_dir]']
@@ -5310,10 +5345,24 @@ class MannTurb64(prepost.PBSScript):
             self.path_pbs_o = os.path.join(out_base, turb, base_name + '.out')
             self.path_pbs_i = os.path.join(self.pbs_in_dir, base_name + '.p')
 
+            # apply winefix
+            self.prelude = self.winefix
+            # browse to scratch dir
+            self.prelude += 'cd {}\n'.format(self.scratchdir)
+
+            self.coda = '# COPY BACK FROM SCRATCH AND RENAME, remove _ at end\n'
+            # copy back to turb dir at the end
             if case['[turb_db_dir]'] is not None:
-                self.prelude = 'cd %s' % case['[turb_db_dir]']
+                dst = os.path.join('$PBS_O_WORKDIR', case['[turb_db_dir]'],
+                                   base_name)
             else:
-                self.prelude = 'cd %s' % case['[turb_dir]']
+                dst = os.path.join('$PBS_O_WORKDIR', case['[turb_dir]'],
+                                   base_name)
+            # FIXME: Mann64 turb exe creator adds an underscore to output
+            for comp in list('uvw'):
+                src = '{}_{}.bin'.format(base_name, comp)
+                dst2 = '{}{}.bin'.format(dst, comp)
+                self.coda += 'cp {} {}\n'.format(src, dst2)
 
             # alfaeps, L, gamma, seed, nr_u, nr_v, nr_w, du, dv, dw high_freq_comp
             rpl = (float(case['[MannAlfaEpsilon]']),
@@ -5418,5 +5467,6 @@ def eigenstructure(cases, debug=False):
 
     return cases
 
+
 if __name__ == '__main__':
     pass
diff --git a/wetb/prepost/dlcdefs.py b/wetb/prepost/dlcdefs.py
index df704758291dded2e75773f9b6c47a709e473113..278e9b571302ce84549c239ff51a31f96c7f1e20 100644
--- a/wetb/prepost/dlcdefs.py
+++ b/wetb/prepost/dlcdefs.py
@@ -185,6 +185,17 @@ def tags_dlcs(master):
     master.tags['[Time pitch runaway]'] = 1000
     master.tags['[Induction]'] = 1
     master.tags['[Dyn stall]'] = 1
+    # required tags for the MannTurb64 standalone turbulence box generator
+    master.tags['[MannAlfaEpsilon]'] = 1.0
+    master.tags['[MannL]'] = 29.4
+    master.tags['[MannGamma]'] = 3.0
+    master.tags['[turb_nr_u]'] = 8192
+    master.tags['[turb_nr_v]'] = 32
+    master.tags['[turb_nr_w]'] = 32
+    master.tags['[turb_dx]'] = 1
+    master.tags['[turb_dy]'] = 6.5
+    master.tags['[turb_dz]'] = 6.5
+    master.tags['[high_freq_comp]'] = 1
 
     return master
 
@@ -218,6 +229,17 @@ def tags_defaults(master):
     master.tags['[hydro_dir]']     = False
     master.tags['[mooring_dir]']   = False
     master.tags['[externalforce]'] = False
+    # required tags for the MannTurb64 standalone turbulence box generator
+    master.tags['[MannAlfaEpsilon]'] = 1.0
+    master.tags['[MannL]'] = 29.4
+    master.tags['[MannGamma]'] = 3.0
+    master.tags['[turb_nr_u]'] = 8192
+    master.tags['[turb_nr_v]'] = 32
+    master.tags['[turb_nr_w]'] = 32
+    master.tags['[turb_dx]'] = 1
+    master.tags['[turb_dy]'] = 6.5
+    master.tags['[turb_dz]'] = 6.5
+    master.tags['[high_freq_comp]'] = 1
     # zip_root_files only is used when copy to run_dir and zip creation, define
     # in the HtcMaster object
     master.tags['[zip_root_files]'] = []
diff --git a/wetb/prepost/dlctemplate.py b/wetb/prepost/dlctemplate.py
index 5331c89179942da4bee4e4cb6dea08f4b0350a38..fdc21f63a0b024f5abc6ef294c35683eccef59e1 100755
--- a/wetb/prepost/dlctemplate.py
+++ b/wetb/prepost/dlctemplate.py
@@ -35,7 +35,7 @@ plt.rc('axes', labelsize=12)
 # on Gorm tex printing doesn't work
 if socket.gethostname()[:2] == 'g-':
     RUNMETHOD = 'gorm'
-elif socket.gethostname()[:4] == 'jess':
+elif socket.gethostname()[:1] == 'j':
     RUNMETHOD = 'jess'
 else:
     plt.rc('text', usetex=True)
@@ -279,7 +279,6 @@ def post_launch(sim_id, statistics=True, rem_failed=True, check_logs=True,
     config['Weibull']['Vref'] = 50
     config['nn_shaft'] = 4
     cc = sim.Cases(POST_DIR, sim_id, rem_failed=rem_failed, config=config)
-    cc.force_lower_case_id()
 
     if force_dir:
         for case in cc.cases:
diff --git a/wetb/prepost/h2_vs_hs2.py b/wetb/prepost/h2_vs_hs2.py
index 72996d2f885b6819a9dbf3181ea0b6e550609c23..b9d415786530c0118b512fc3c7d3aecf4ffe57d2 100644
--- a/wetb/prepost/h2_vs_hs2.py
+++ b/wetb/prepost/h2_vs_hs2.py
@@ -107,7 +107,11 @@ class ConfigBase(object):
         opt_tags[0]['[blade_nbodies]'] = 1
         opt_tags[0]['[Windspeed]'] = 0.0
         opt_tags[0]['[initspeed_rotor_rads]'] = 0.0
-        opt_tags[0]['[operational_data]'] = 'case-turbine2-empty.opt'
+        opt_tags[0]['[operational_data]'] = 'empty.opt'
+        opt_tags[0]['[eigen_analysis]'] = True
+        opt_tags[0]['[output]'] = False
+        opt_tags[0]['[t0]'] = 0.0
+        opt_tags[0]['[time stop]'] = 0.0
 
         return opt_tags
 
@@ -116,7 +120,7 @@ class ConfigBase(object):
         analysis, at 0 RPM.
         """
         opt_tags = [self.opt_hs2.copy()]
-        opt_tags[0]['[Case id.]'] = '%s_hawc2_eigenanalysis' % basename
+        opt_tags[0]['[Case id.]'] = '%s_hs2_eigenanalysis' % basename
         opt_tags[0]['[blade_damp_x]'] = 0.0
         opt_tags[0]['[blade_damp_y]'] = 0.0
         opt_tags[0]['[blade_damp_z]'] = 0.0
@@ -124,7 +128,8 @@ class ConfigBase(object):
         opt_tags[0]['[Windspeed]'] = 0.0
         opt_tags[0]['[initspeed_rotor_rads]'] = 0.0
         opt_tags[0]['[fixspeed_rotor_rads]'] = 0.0
-        opt_tags[0]['[operational_data]'] = 'case-turbine2-empty.opt'
+        opt_tags[0]['[operational_data]'] = 'empty.opt'
+        opt_tags[0]['[hs2_blademodes]'] = True
 
         return opt_tags
 
diff --git a/wetb/prepost/prepost.py b/wetb/prepost/prepost.py
index c706aa79cb69e6f97edcc2a9e50cc8763c5a3a8b..2bc93cb56e8df1ed99ddd9bae9fda66051c3c542 100644
--- a/wetb/prepost/prepost.py
+++ b/wetb/prepost/prepost.py
@@ -97,6 +97,7 @@ exit
         self.prelude = ''
         self.execution = ''
         self.coda = ''
+        self.scratchdir = '/scratch/$USER/$PBS_JOBID/'
 
     def check_dirs(self):
         """Create the directories of std out, std error and pbs file if they
diff --git a/wetb/prepost/simchunks.py b/wetb/prepost/simchunks.py
index 931cde2d4bef86131c85b23c6826686b0942726e..4e4d560313bf88756054d24e0dd5981a4bca617b 100644
--- a/wetb/prepost/simchunks.py
+++ b/wetb/prepost/simchunks.py
@@ -35,7 +35,7 @@ from wetb.prepost.Simulations import Cases
 def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20,
                           nr_procs_series=9, processes=1, queue='workq',
                           walltime='24:00:00', chunks_dir='zip-chunks-jess',
-                          pyenv='wetb_py3'):
+                          pyenv='wetb_py3', i0=0):
     """Group a large number of simulations htc and pbs launch scripts into
     different zip files so we can run them with find+xargs on various nodes.
     """
@@ -405,8 +405,8 @@ def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20,
     df_ind = pd.DataFrame(columns=['chnk_nr'], dtype=np.int32)
     df_ind.index.name = '[case_id]'
     for ii, dfi in enumerate(df_iter):
-        fname, ind = make_zip_chunks(dfi, ii, sim_id, run_dir, model_zip)
-        make_pbs_chunks(dfi, ii, sim_id, run_dir, model_zip)
+        fname, ind = make_zip_chunks(dfi, i0+ii, sim_id, run_dir, model_zip)
+        make_pbs_chunks(dfi, i0+ii, sim_id, run_dir, model_zip)
         df_ind = df_ind.append(ind)
         print(fname)
 
diff --git a/wetb/prepost/tests/data/demo_dlc/ref/htc/DLCs/dlc01_demos.xlsx b/wetb/prepost/tests/data/demo_dlc/ref/htc/DLCs/dlc01_demos.xlsx
index 246cbf5e6e5c94b732349be0a6a09336fb1f715f..2725ebf94c486118c288c7b1bf73bfba9fb79afd 100755
Binary files a/wetb/prepost/tests/data/demo_dlc/ref/htc/DLCs/dlc01_demos.xlsx and b/wetb/prepost/tests/data/demo_dlc/ref/htc/DLCs/dlc01_demos.xlsx differ
diff --git a/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp11_s101.htc b/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp11_s101.htc
new file mode 100644
index 0000000000000000000000000000000000000000..ef1b58340806045503694d523719f32303c767fa
--- /dev/null
+++ b/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp11_s101.htc
@@ -0,0 +1,850 @@
+;this version was at some point based on: Avatar_10MW_RWT version 1, 06-08-14, Anyd
+begin simulation;
+  time_stop    40;
+  solvertype   1 ;    (newmark)
+  on_no_convergence continue ;
+;  convergence_limits 1E3 1.0 1E-7 ;
+  logfile ./logfiles/dlc01_demos/dlc01_steady_wsp11_s101.log ;
+  begin newmark;
+    deltat    0.02;
+  end newmark;
+end simulation;
+;
+;----------------------------------------------------------------------------------------------------------------------------------------------------------------
+begin new_htc_structure;
+;--------------------------------------------------------------------------------------------------
+;  beam_output_file_name  ./res_eigen/dlc01_demos/dlc01_steady_wsp11_s101/dlc01_steady_wsp11_s101_beam.dat;
+;  body_output_file_name  ./res_eigen/dlc01_demos/dlc01_steady_wsp11_s101/dlc01_steady_wsp11_s101_body.dat;
+;  struct_inertia_output_file_name ./res_eigen/dlc01_demos/dlc01_steady_wsp11_s101/dlc01_steady_wsp11_s101_struct.dat;
+;  body_eigenanalysis_file_name ./res_eigen/dlc01_demos/dlc01_steady_wsp11_s101/dlc01_steady_wsp11_s101_body_eigen.dat;
+;  structure_eigenanalysis_file_name ./res_eigen/dlc01_demos/dlc01_steady_wsp11_s101/dlc01_steady_wsp11_s101_strc_eigen.dat;
+;---------------------------------------------------------------------------------------------------
+  begin main_body;         tower 123.6m
+    name        tower ;
+    type        timoschenko ;
+    nbodies     3 ;
+    node_distribution     c2_def ;
+    damping_posdef   0 0 0 4.7E-03 4.7E-03 4.3E-04 ; tuned by Anyd 12/8/14
+     begin timoschenko_input;
+      filename ./data/AVATAR_10MW_RWT_tower_st.dat;
+      set 1 1 ;
+    end timoschenko_input;
+    begin c2_def;              Definition of centerline (main_body coordinates)
+      nsec 20;
+      sec	1	0	0	0.000	0	;  x,y,z,twist
+      sec	2	0	0	-12.293	0	;
+      sec	3	0	0	-12.294	0	;
+      sec	4	0	0	-24.585	0	;
+      sec	5	0	0	-24.586	0	;
+      sec	6	0	0	-36.878	0	;
+      sec	7	0	0	-36.879	0	;
+      sec	8	0	0	-49.171	0	;
+      sec	9	0	0	-49.172	0	 ;
+      sec	10	0	0	-61.463	0	;
+      sec	11	0	0	-61.464	0	;
+      sec	12	0	0	-73.756	0	;
+      sec	13	0	0	-73.757	0	;
+      sec	14	0	0	-86.049	0	;
+      sec	15	0	0	-86.050	0	;
+      sec	16	0	0	-98.341	0	;
+      sec	17	0	0	-98.342	0	;
+      sec	18	0	0	-110.634	0	;
+      sec	19	0	0	-110.635	0	;
+      sec	20	0	0	-123.600	0	;
+     end c2_def ;
+    end main_body;
+;
+  begin main_body;
+    name        towertop ;
+    type        timoschenko ;
+    nbodies     1 ;
+    node_distribution     c2_def ;
+    damping_posdef  7.50E-03  7.40E-03  7.00E-03  7.00E-03  7.00E-03  7.00E-03  ;   "changed by Anyd
+	concentrated_mass	2.0	0.0	2.6870E+00	3.0061E-01	4.4604E+05	4.1060E+06	4.1060E+05	4.1060E+06	;	Nacel
+	begin timoschenko_input;
+      filename ./data/DTU_10MW_RWT_Towertop_st.dat ;
+      set 1 2 ;
+    end timoschenko_input;
+    begin c2_def;              Definition of centerline (main_body coordinates)
+      nsec 2;
+      sec 1 0.0 0.0  0.0    0.0 ; x,y,z,twist
+      sec 2 0.0 0.0 -2.75   0.0 ;
+    end c2_def ;
+  end main_body;
+;
+  begin main_body;
+    name        shaft ;
+    type        timoschenko ;
+    nbodies     1 ;
+    node_distribution     c2_def ;
+;	damping_posdef  8.00E-3  8.00E-03  8.00E-02  4.65E-04  4.65E-04  2.38E-02 ; "tuned by Anyd 22/2/13
+	damping_posdef  0.0 0.0 3.983E-03 4.65E-04  4.65E-04  3.983E-03 ; "tuned by Anyd 23/5/13 to 31.45 l
+    concentrated_mass	1.0	0.0	0.0	0.0	0.0	0.0	0.0	3.751E+06	;	generator equivalent slow shaft "re_tu
+    concentrated_mass	5.0	0.0	0.0	0.0	1.0552E+05	0.0	0.0	3.257E+05	;	hub mass and inertia;	"re_tuned
+	begin timoschenko_input;
+      filename ./data/DTU_10MW_RWT_Shaft_st.dat ;
+      set 1 1 ;
+    end timoschenko_input;
+    begin c2_def;              Definition of centerline (main_body coordinates)
+      nsec 5;
+      sec 1 0.0 0.0 0.0 0.0 ; Tower top x,y,z,twist
+      sec 2 0.0 0.0 1.5 0.0 ;
+      sec 3 0.0 0.0 3.0 0.0 ;
+      sec 4 0.0 0.0 4.4	0.0 ; Main bearing
+      sec 5 0.0 0.0 7.1 0.0 ; Rotor centre
+    end c2_def ;
+  end main_body;
+;
+  begin main_body;
+    name        shaft_nonrotate ;
+    type        timoschenko ;
+    nbodies     1 ;
+    node_distribution     c2_def ;
+    damping_posdef  0.00E+00 0.00E+00 0.00E+00  1.0E-01  1.0E-01  1.0E-01 ;
+	begin timoschenko_input;
+      filename ./data/DTU_10MW_RWT_Shaft_st.dat ;
+      set 1 3; dummy light and stiff structure
+    end timoschenko_input;
+    begin c2_def;
+      nsec 2;
+      sec 1 0.0 0.0 0.0    0.0 ;
+      sec 2 0.0 0.0 0.1    0.0 ;
+    end c2_def;
+  end main_body;
+;
+  begin main_body;
+    name        hub1 ;
+    type        timoschenko ;
+    nbodies     1 ;
+    node_distribution     c2_def ;
+    damping_posdef  2.00E-05  2.00E-05  2.00E-04  3.00E-06  3.00E-06  2.00E-05;
+	begin timoschenko_input;
+      filename ./data/DTU_10MW_RWT_Hub_st.dat ;
+      set 1 2 ;
+    end timoschenko_input;
+    begin c2_def;              Definition of centerline (main_body coordinates)
+      nsec 2;
+      sec 1 0.0 0.0 0.0 0.0 ; x,y,z,twist
+      sec 2 0.0 0.0 2.8 0.0 ;
+    end c2_def ;
+  end main_body;
+;
+  begin main_body;
+    name           hub2 ;
+    copy_main_body hub1;
+  end main_body;
+;
+  begin main_body;
+    name           hub3 ;
+    copy_main_body hub1 ;
+  end main_body;
+;
+  begin main_body;
+    name        blade1 ;
+    type        timoschenko ;
+    nbodies     10 ;
+    node_distribution    c2_def;
+;	damping_posdef   0.0 0.0 0.0 2.5e-3 8.9e-4 3.2e-4 ; "Tuned by Anyd"
+;	damping_posdef   0.0 0.0 0.0 1.5e-3 2.45e-3 3.2e-4 ; " 3% damping tuned by Anyd 20/02/12 unable to
+;	damping_posdef   0.0 0.0 0.0 2.1e-3 1.9e-3 1.3e-4 ; " 3% damping tuned by Anyd 15/08/14 rev2
+	damping_posdef   0.0 0.0 0.0 1.68e-3 2.25e-3 1.0e-4 ; " 3% damping tuned by Anyd 16/12/14
+   begin timoschenko_input ;
+      filename ./data/AVATAR_10MW_RWT_Blade_st.dat ;
+      set 1 9 ;
+    end timoschenko_input;
+    begin c2_def;
+      nsec 27 ;
+      sec  1   -0.001   -0.001     0.000   -17.280 ;
+      sec  2   -0.005   -0.001     2.220   -17.280 ;
+      sec  3   -0.006   -0.000     4.440   -17.280 ;
+      sec  4   -0.086    0.022     6.660   -17.280 ;
+      sec  5   -0.231    0.069    11.039   -17.273 ;
+      sec  6   -0.447    0.121    15.418   -16.441 ;
+      sec  7   -0.690    0.161    19.797   -14.613 ;
+      sec  8   -0.812    0.162    24.176   -12.578 ;
+      sec  9   -0.891    0.158    28.555   -10.588 ;
+      sec 10   -0.865    0.124    32.934    -9.070 ;
+      sec 11   -0.833    0.112    37.313    -8.224 ;
+      sec 12   -0.797    0.102    41.692    -7.688 ;
+      sec 13   -0.760    0.093    46.071    -7.205 ;
+      sec 14   -0.721    0.083    50.450    -6.749 ;
+      sec 15   -0.683    0.075    54.829    -6.288 ;
+      sec 16   -0.644    0.066    59.208    -5.838 ;
+      sec 17   -0.606    0.058    63.587    -5.401 ;
+      sec 18   -0.567    0.050    67.966    -4.982 ;
+      sec 19   -0.529    0.044    72.345    -4.640 ;
+      sec 20   -0.492    0.037    76.724    -4.380 ;
+      sec 21   -0.456    0.032    81.103    -4.144 ;
+      sec 22   -0.422    0.026    85.482    -3.914 ;
+      sec 23   -0.392    0.021    89.861    -3.685 ;
+      sec 24   -0.346    0.014    94.240    -3.460 ;
+      sec 25   -0.307    0.010    96.190    -3.350 ;
+      sec 26   -0.249    0.005    98.130    -3.250 ;
+      sec 27   -0.089    0.006   100.080    -3.140 ;
+   end c2_def ;
+  end main_body;
+;
+  begin main_body;
+    name           blade2 ;
+    copy_main_body blade1;
+  end main_body;
+;
+  begin main_body;
+    name           blade3 ;
+    copy_main_body blade1 ;
+  end main_body;
+;-------------------------------------------------------------------------------------------------------------------------------
+;
+  begin orientation;
+    begin base;
+      body   tower;
+      inipos        0.0 0.0 0.0 ;         initial position of node 1
+      body_eulerang 0.0 0.0 0.0;
+    end base;
+;
+    begin relative;
+      body1  tower last;
+      body2  towertop 1;
+      body2_eulerang 0.0 0.0 0.0;
+    end relative;
+;
+    begin relative;
+      body1  towertop last;
+      body2  shaft 1;
+      body2_eulerang 90.0 0.0 0.0;
+      body2_eulerang 5.0 0.0 0.0;    5 deg tilt angle
+      body2_eulerang 0.0 0.0 0;
+      mbdy2_ini_rotvec_d1 0.0 0.0 -1.0 0.5 ; mbdy2_ini_rotvec_d1 0.0 0.0 -1.0 0.5;
+    end relative;
+;
+    begin relative; dummy non rotating hub coordinates
+      body1  towertop last;
+      body2  shaft_nonrotate 1;
+      body2_eulerang 90.0 0.0 0.0;
+      body2_eulerang  5.0 0.0 0.0; same 5 deg tilt angle as real shaft
+    end relative;
+;
+    begin relative;
+      body1  shaft last;
+      body2  hub1 1;
+      body2_eulerang -90.0 0.0 0.0;
+      body2_eulerang 0.0 180.0 0.0;
+      body2_eulerang 2.5 0.0 0.0;      2.5deg cone angle
+    end relative;
+;
+    begin relative;
+      body1  shaft last;
+      body2  hub2 1;
+      body2_eulerang -90.0 0.0 0.0;
+      body2_eulerang 0.0 60.0 0.0;
+      body2_eulerang 2.5 0.0 0.0;      2.5deg cone angle
+    end relative;
+;
+    begin relative;
+      body1  shaft last;
+      body2  hub3 1;
+      body2_eulerang -90.0 0.0 0.0;
+      body2_eulerang 0.0 -60.0 0.0;
+      body2_eulerang 2.5 0.0 0.0;      2.5deg cone angle
+    end relative;
+;
+    begin relative;
+      body1  hub1 last;
+      body2  blade1 1;
+      body2_eulerang 0.0 0.0 0;
+    end relative;
+;
+    begin relative;
+      body1  hub2 last;
+      body2  blade2 1;
+      body2_eulerang 0.0 0.0 0.0;
+    end relative;
+;
+    begin relative;
+      body1  hub3 last;
+      body2  blade3 1;
+      body2_eulerang 0.0 0.0 0.0;
+    end relative;
+;
+ 	end orientation;
+;-------------------------------------------------------------------------------------------------------------------------------
+begin constraint;
+;
+    begin fix0;  fixed to ground in translation and rotation of node 1
+      body tower;
+    end fix0;
+;
+     begin fix1;
+		   body1 tower last ;
+		   body2 towertop 1;
+		 end fix1;
+;
+    begin bearing1;                       free bearing
+      name  shaft_rot;
+      body1 towertop last;
+      body2 shaft 1;
+      bearing_vector 2 0.0 0.0 -1.0;        x=coo (0=global.1=body1.2=body2) vector in body2 coordinates where the free rotation is present
+   end bearing1;
+;
+;    begin bearing3;                       free bearing
+;      name  shaft_rot;
+;      body1 towertop last;
+;      body2 shaft 1;
+;      bearing_vector 2 0.0 0.0 -1.0;        x=coo (0=global.1=body1.2=body2) vector in body2 coordinates where the free rotation is present
+;      omegas 0.0 ;
+;   end bearing3;
+;
+     begin fix1;
+           body1 tower last ;
+           body2 shaft_nonrotate 1;
+     end fix1;
+;
+     begin fix1;
+		   body1 shaft last ;
+		   body2 hub1 1;
+		 end fix1;
+;
+     begin fix1;
+		   body1 shaft last ;
+		   body2 hub2 1;
+		 end fix1;
+;
+     begin fix1;
+		   body1 shaft last ;
+		   body2 hub3 1;
+		 end fix1;
+;
+    begin bearing2;
+      name pitch1;
+      body1 hub1 last;
+     body2 blade1 1;
+			bearing_vector 2 0.0 0.0 -1.0;
+   end bearing2;
+;
+    begin bearing2;
+      name pitch2;
+      body1 hub2 last;
+      body2 blade2 1;
+			bearing_vector 2 0.0 0.0 -1.0;
+    end bearing2;
+;
+    begin bearing2;
+      name pitch3;
+      body1 hub3 last;
+      body2 blade3 1;
+			bearing_vector 2 0.0 0.0 -1.0;
+    end bearing2;
+end constraint;
+;
+end new_htc_structure;
+;----------------------------------------------------------------------------------------------------------------------------------------------------------------
+begin wind ;
+  density                 1.225 ;
+  wsp                     11   ;
+  tint                    0.201454545455   ;
+  horizontal_input        1     ;
+  windfield_rotations     0 8.0 0.0 ;    yaw, tilt (positive=upflow=wind coming from below), rotation
+  center_pos0             0.0 0.0 -127 ; hub heigth
+  shear_format            3 0 ;
+  turb_format             1     ;  0=none, 1=mann,2=flex
+  tower_shadow_method     3     ;  0=none, 1=potential flow, 2=jet
+  scale_time_start       20 ;
+  wind_ramp_factor   0.0 20 0.727272727273 1.0 ;
+  ; iec_gust      ;
+;
+;  wind_ramp_abs  400.0  401.0  0.0   1.0 ;   wsp. after the step:  5.0
+;  wind_ramp_abs  501.0  502.0  0.0   1.0 ;   wsp. after the step:  6.0
+;  wind_ramp_abs  602.0  603.0  0.0   1.0 ;   wsp. after the step:  7.0
+;  wind_ramp_abs  703.0  704.0  0.0   1.0 ;   wsp. after the step:  8.0
+;  wind_ramp_abs  804.0  805.0  0.0   1.0 ;   wsp. after the step:  9.0
+;  wind_ramp_abs  905.0  906.0  0.0   1.0 ;   wsp. after the step: 10.0
+;  wind_ramp_abs  1006.0  1007.0  0.0   1.0 ;   wsp. after the step: 11.0
+;  wind_ramp_abs  1107.0  1108.0  0.0   1.0 ;   wsp. after the step: 12.0
+;  wind_ramp_abs  1208.0  1209.0  0.0   1.0 ;   wsp. after the step: 13.0
+;  wind_ramp_abs  1309.0  1310.0  0.0   1.0 ;   wsp. after the step: 14.0
+;  wind_ramp_abs  1410.0  1411.0  0.0   1.0 ;   wsp. after the step: 15.0
+;  wind_ramp_abs  1511.0  1512.0  0.0   1.0 ;   wsp. after the step: 16.0
+;  wind_ramp_abs  1612.0  1613.0  0.0   1.0 ;   wsp. after the step: 17.0
+;  wind_ramp_abs  1713.0  1714.0  0.0   1.0 ;   wsp. after the step: 18.0
+;  wind_ramp_abs  1814.0  1815.0  0.0   1.0 ;   wsp. after the step: 19.0
+;  wind_ramp_abs  1915.0  1916.0  0.0   1.0 ;   wsp. after the step: 20.0
+;  wind_ramp_abs  2016.0  2017.0  0.0   1.0 ;   wsp. after the step: 21.0
+;  wind_ramp_abs  2117.0  2118.0  0.0   1.0 ;   wsp. after the step: 22.0
+;  wind_ramp_abs  2218.0  2219.0  0.0   1.0 ;   wsp. after the step: 23.0
+;  wind_ramp_abs  2319.0  2320.0  0.0   1.0 ;   wsp. after the step: 24.0
+;  wind_ramp_abs  2420.0  2421.0  0.0   1.0 ;   wsp. after the step: 25.0
+  ;
+;  wind_ramp_abs   400.0  2200.0  0.0   21.0 ;   wsp. after the step: 25.0
+;  wind_ramp_abs  2400.0  4200.0  0.0  -21.0 ;   wsp. after the step: 25.0
+  ;
+  begin mann ;
+    create_turb_parameters 29.4 1.0 3.9 100 1.0 ;      L, alfaeps, gamma, seed, highfrq compensation
+    filename_u    ./turb/turb_s101_11msu.bin ;
+    filename_v    ./turb/turb_s101_11msv.bin ;
+    filename_w    ./turb/turb_s101_11msw.bin ;
+    box_dim_u    512 0.859375 ;
+    box_dim_v    32 7.5;
+    box_dim_w    32 7.5;
+    std_scaling   1.0 0.7 0.5 ;
+  end mann ;
+;
+  begin tower_shadow_potential_2;
+    tower_mbdy_link tower;
+    nsec  2;
+    radius      0.0  4.15 ;
+    radius     123.6 2.75 ; (radius)
+  end tower_shadow_potential_2;
+end wind;
+;
+begin aerodrag ;
+  begin aerodrag_element ;
+    mbdy_name tower;
+    aerodrag_sections uniform 10 ;
+    nsec 2 ;
+    sec 0.0 0.6 8.3 ;  tower bottom
+    sec 123.6 0.6 5.5 ;  tower top  (diameter)
+  end aerodrag_element;
+;
+  begin aerodrag_element ;        Nacelle drag side
+    mbdy_name shaft;
+    aerodrag_sections uniform 2 ;
+    nsec 2 ;
+    sec 0.0   0.8 10.0 ;
+    sec 7.01  0.8 10.0 ;
+  end aerodrag_element;
+end aerodrag;
+;
+begin aero ;
+  nblades  3;
+  hub_vec shaft -3 ;         rotor rotation vector (normally shaft composant directed from pressure to sustion side)
+  link 1 mbdy_c2_def blade1;
+  link 2 mbdy_c2_def blade2;
+  link 3 mbdy_c2_def blade3;
+  ae_filename        ./data/AVATAR_10MW_RWT_ae.dat ;
+  pc_filename        ./data/AVATAR_10MW_RWT_pc_hama_v1.dat ;
+  induction_method   1 ;     0=none, 1=normal
+  aerocalc_method    1 ;     0=ingen aerodynamic, 1=med aerodynamic
+  aero_distribution ae_file 1 ;
+  ae_sets            1 1 1;
+  tiploss_method     1 ;     0=none, 1=prandtl
+  dynstall_method    2 ;     0=none, 1=stig øye method,2=mhh method
+;
+; ; --- Flaps --- ;
+  ; begin dynstall_ateflap ;
+    ; Ais  0.165  0.335  0.0 ;
+    ; Bis  0.0455  0.30  0.30 ;
+      ; flap  59.5925   85.5023   ./data/Flap_dturwt1_Thk24.ds  ;  Flap Sec: 1
+   ; end dynstall_ateflap;
+end aero ;
+;-------------------------------------------------------------------------------------------------
+begin dll;
+;
+  begin type2_dll;
+    name risoe_controller ;
+    filename  ./control/risoe_controller.dll ;
+    dll_subroutine_init init_regulation ;
+    dll_subroutine_update update_regulation ;
+    arraysizes_init  52 1 ;
+    arraysizes_update  12 100 ;
+	begin init ;
+       ; Overall parameters
+      constant   1 10000.0    	; Rated power [kW]
+      constant   2   0.628    	; Minimum rotor speed [rad/s]
+      constant   3   1.005    	; Rated rotor speed [rad/s]
+      constant   4  15.6E+06  	; Maximum allowable generator torque [Nm]
+      constant   5  100.0    	; Minimum pitch angle, theta_min [deg],
+								; if |theta_min|>90, then a table of <wsp,theta_min> is read ;
+								; from a file named 'wpdata.n', where n=int(theta_min)
+      constant   6  90.0    	; Maximum pitch angle [deg]
+      constant   7  10.0    	; Maximum pitch velocity operation [deg/s]
+      constant   8   0.4    	; Frequency of generator speed filter [Hz]
+      constant   9   0.7    	; Damping ratio of speed filter [-]
+      constant  10   1.64   	; Frequency of free-free DT torsion mode [Hz], if zero no notch filter used
+      ; Partial load control parameters
+      constant  11   0.9648030e+07 ; Optimal Cp tracking K factor [Nm/(rad/s)^2], ;
+                                ; Qg=K*Omega^2, K=eta*0.5*rho*A*Cp_opt*R^3/lambda_opt^3
+      constant  12   1.047610E+08 ; Proportional gain of torque controller [Nm/(rad/s)]
+      constant  13   0.153367E+08 ; Integral gain of torque controller [Nm/rad]
+      constant  14   0.0    	; Differential gain of torque controller [Nm/(rad/s^2)]
+;     Full load control parameters
+      constant  15   1      	; Generator control switch [1=constant power, 2=constant torque]
+      constant  16   0.762489  ; Proportional gain of pitch controller [rad/(rad/s)]
+      constant  17   0.224086  ; Integral gain of pitch controller [rad/rad]
+      constant  18   0.0    ; Differential gain of pitch controller [rad/(rad/s^2)]
+      constant  19   0.4e-9 ; Proportional power error gain [rad/W]
+      constant  20   0.4e-9 ; Integral power error gain [rad/(Ws)]
+      constant  21  10.6824   ; Coefficient of linear term in aerodynamic gain scheduling, KK1 [deg]
+      constant  22 601.25499  ; Coefficient of quadratic term in aerodynamic gain scheduling, KK2 [deg^2] &
+                            ; (if zero, KK1 = pitch angle at double gain)
+      constant  23   1.3    ; Relative speed for double nonlinear gain [-]
+;     Cut-in simulation parameters
+      constant  24  -1  ; Cut-in time [s]
+      constant  25  1.0   ; Time delay for soft start of torque [1/1P]
+;     Cut-out simulation parameters
+      constant  26  -1  ; Cut-out time [s]
+      constant  27   5.0  ; Time constant for linear torque cut-out [s]
+      constant  28  1    ; Stop type [1=normal, 2=emergency]
+      constant  29  1.0  ; Time delay for pitch stop after shut-down signal [s]
+      constant  30  3  ; Maximum pitch velocity during initial period of stop [deg/s]
+      constant  31  3.0  ; Time period of initial pitch stop phase [s] (maintains pitch speed specified in constant 30)
+      constant  32  4  ; Maximum pitch velocity during final phase of stop [deg/s]
+;     Expert parameters (keep default values unless otherwise given)
+      constant  33   2.0  	; Lower angle above lowest minimum pitch angle for switch [deg]
+      constant  34   2.0  	; Upper angle above lowest minimum pitch angle for switch [deg], if equal then hard switch
+      constant  35  95.0  	; Ratio between filtered speed and reference speed for fully open torque limits [%]
+      constant  36   2.0  	; Time constant of 1st order filter on wind speed used for minimum pitch [1/1P]
+      constant  37   1.0  	; Time constant of 1st order filter on pitch angle used for gain scheduling [1/1P]
+;     Drivetrain damper
+      constant  38   0.0  	; Proportional gain of active DT damper [Nm/(rad/s)], requires frequency in input 10
+;	  Over speed
+	  constant  39  25.0  	; Overspeed percentage before initiating turbine controller alarm (shut-down) [%]
+;     Additional non-linear pitch control term (not used when all zero)
+	  constant  40   0.0  	; Err0 [rad/s]
+	  constant  41   0.0  	; ErrDot0 [rad/s^2]
+	  constant  42   0.0  	; PitNonLin1 [rad/s]
+;     Storm control command
+	  constant 43   28.0  	; Wind speed 'Vstorm' above which derating of rotor speed is used [m/s]
+	  constant 44   28.0  	; Cut-out wind speed (only used for derating of rotor speed in storm) [m/s]
+;     Safety system parameters
+	  constant 45   25.0  ; Overspeed percentage before initiating safety system alarm (shut-down) [%]
+	  constant 46    1.5  ; Max low-pass filtered tower top acceleration level [m/s^2] - max in DLC 1.3=1.1 m/s^2
+;     Turbine parameter
+	  constant 47  205.8  ; Nominal rotor diameter [m]
+;     Parameters for rotor inertia reduction in variable speed region
+      constant 48    0.0  ; Proportional gain on rotor acceleration in variable speed region [Nm/(rad/s^2)] (not used when zero)
+;     Parameters for alternative partial load controller with PI regulated TSR tracking
+      constant 49    0.0  ; Optimal tip speed ratio [-] (only used when K=constant 11 = 0 otherwise  Qg=K*Omega^2 is used)
+;     Parameters for adding aerodynamic drivetrain damping on gain scheduling
+      constant 50    0.0  ; Proportional gain of aerodynamic DT damping [Nm/(rad/s)]
+      constant 51    0.0  ; Coefficient of linear term in aerodynamic DT damping scheduling, KK1 [deg]
+      constant 52    0.0  ; Coefficient of quadratic term in aerodynamic DT damping scheduling, KK2 [deg^2]
+	end init ;
+;
+    begin output ;
+      general time ; [s]
+      constraint bearing1 shaft_rot 1 only 2 ; Drivetrain speed [rad/s]
+      constraint bearing2 pitch1 1 only 1; [rad]
+      constraint bearing2 pitch2 1 only 1; [rad]
+      constraint bearing2 pitch3 1 only 1; [rad]
+      wind free_wind 1 0.0 0.0 -127 	 ; Global coordinates at hub height
+	  dll inpvec 2 2 					 ; Elec. power from generator servo .dll
+	  dll inpvec 2 8 					 ; Grid state flag from generator servo .dll
+	  mbdy state acc tower 10 1.0 global only 1 ; Tower top x-acceleration [m/s^2]
+	  mbdy state acc tower 10 1.0 global only 2 ; Tower top y-acceleration [m/s^2]
+    end output;
+  end type2_dll;
+;
+   begin type2_dll;
+     name generator_servo ;
+     filename  ./control/generator_servo.dll ;
+     dll_subroutine_init init_generator_servo ;
+     dll_subroutine_update update_generator_servo ;
+     arraysizes_init  7 1 ;
+     arraysizes_update  4 8 ;
+ 	begin init ;
+       constant 1  20.0    ; Frequency of 2nd order servo model of generator-converter system [Hz]
+       constant 2  0.9     ; Damping ratio 2nd order servo model of generator-converter system [-]
+       constant 3 15.6E+06 ; Maximum allowable LSS torque (pull-out torque) [Nm]
+       constant 4 0.94     ; Generator efficiency [-]
+       constant 5 1.0      ; Gearratio [-]
+       constant 6 0.0      ; Time for half value in softstart of torque [s]
+       constant 7 5000    ; Time for grid loss [s]
+     end init ;
+;
+     begin output;
+       general time                          ;   Time [s]
+       dll inpvec 1 1                        ;   Electrical torque reference [Nm]
+       constraint bearing1 shaft_rot 1 only 2;   Generator LSS speed [rad/s]
+       mbdy momentvec shaft 1 1 shaft only 3 ;   Shaft moment [kNm] (Qshaft)
+     end output;
+;
+     begin actions;
+        mbdy moment_int shaft 1 -3 shaft towertop 2 ;   Generator LSS torque [Nm]
+     end actions;
+   end type2_dll;
+;
+   begin type2_dll;
+     name mech_brake ;
+     filename  ./control/mech_brake.dll ;
+     dll_subroutine_init init_mech_brake ;
+     dll_subroutine_update update_mech_brake ;
+     arraysizes_init    7 1 ;
+     arraysizes_update  4 6 ;
+ 	begin init ;
+      constant 1   5225.35 ; Fully deployed maximum brake torque [Nm] (0.6*max torque)
+      constant 2    100.0  ; Parameter alpha used in Q = tanh(omega*alpha), typically 1e2/Omega_nom
+      constant 3      0.5  ; Delay time for before brake starts to deploy [s]
+      constant 4      0.74 ; Time for brake to become fully deployed [s]
+     end init ;
+;
+     begin output;
+	   general time                           ; Time [s]
+	   constraint bearing1 shaft_rot 1 only 2 ; Generator LSS speed [rad/s]
+	   dll inpvec 1 25                        ; Command to deploy mechanical disc brake [0,1]
+     end output;
+;
+     begin actions;
+        mbdy moment_int shaft 1 -3 shaft towertop 2 ;   Generator LSS torque [Nm]
+     end actions;
+   end type2_dll;
+;
+  begin type2_dll;
+    name servo_with_limits ;
+    filename  ./control/servo_with_limits.dll ;
+    dll_subroutine_init init_servo_with_limits ;
+    dll_subroutine_update update_servo_with_limits ;
+    arraysizes_init  10 1 ;
+    arraysizes_update  5 9 ;
+	begin init ;
+      constant 1   3    ; Number of blades [-]
+      constant 2   1.0  ; Frequency of 2nd order servo model of pitch system [Hz]
+      constant 3   0.7  ; Damping ratio 2nd order servo model of pitch system [-]
+      constant 4  10.0  ; Max. pitch speed [deg/s]
+      constant 5  15.0  ; Max. pitch acceleration [deg/s^2]
+      constant 6  -5.0  ; Min. pitch angle [deg]
+      constant  7 90.0  ; Max. pitch angle [deg]
+	  constant  8 5000   ; Time for pitch runaway [s]
+	  constant  9 -1    ; Time for stuck blade 1 [s]
+	  constant 10 0       ; Angle of stuck blade 1 [deg]
+	end init ;
+    begin output;
+      general time        ;  Time                         [s]
+       dll inpvec 1 2     ;  Pitch1 demand angle          [rad]
+       dll inpvec 1 3     ;  Pitch2 demand angle          [rad]
+       dll inpvec 1 4     ;  Pitch3 demand angle          [rad]
+       dll inpvec 1 26    ;  Flag for emergency pitch stop         [0=off/1=on]
+    end output;
+;
+    begin actions;
+      constraint bearing2 angle pitch1 ; Angle pitch1 bearing    [rad]
+      constraint bearing2 angle pitch2 ; Angle pitch2 bearing    [rad]
+      constraint bearing2 angle pitch3 ; Angle pitch3 bearing    [rad]
+    end actions;
+  end type2_dll;
+;
+;	--- DLL for tower-blade tip distance -- ;
+  begin type2_dll;
+    name disttowtip ;
+    filename  ./control/towclearsens.dll ;
+    dll_subroutine_init initialize ;
+    dll_subroutine_update update ;
+    arraysizes_init  1 1 ;
+    arraysizes_update  12 4 ;
+	begin init ;
+	  constant  1  3.87  ; Tower radius close to downward blade tip [m]
+	end init ;
+    begin output;
+	  mbdy state pos tower    5 0.00 global ; [1,2,3]. Tower position: 24.58 m
+	  mbdy state pos blade1  26 1.0 global  ; [4,5,6]
+	  mbdy state pos blade2  26 1.0 global  ; [7,8,9]
+	  mbdy state pos blade3  26 1.0 global  ; [10,11,12]
+    end output;
+  end type2_dll;
+end dll;
+;
+;----------------------------------------------------------------------------------------------------------------------------------------------------------------
+;
+begin output;
+  filename ./res/dlc01_demos/dlc01_steady_wsp11_s101 ;
+  time 20 40 ;
+  data_format  hawc_binary;
+  buffer 1 ;
+;
+  general time;
+  constraint bearing1 shaft_rot 2; angle and angle velocity
+  constraint bearing2 pitch1 5;    angle and angle velocity
+  constraint bearing2 pitch2 5;    angle and angle velocity
+  constraint bearing2 pitch3 5;    angle and angle velocity
+  aero omega ;
+  aero torque;
+  aero power;
+  aero thrust;
+  wind free_wind 1 0.0 0.0 -127; local wind at fixed position: coo (1=global,2=non-rotation rotor coo.), pos x, pos y, pos z
+  ; non rotating coordinates shaft tip: equivalent to stationary hub in BLADED
+  mbdy momentvec shaft 3 2  shaft_nonrotate # non rotating shaft tip ;
+  mbdy forcevec  shaft 3 2  shaft_nonrotate # non rotating shaft tip ;
+  ; Moments:
+  mbdy momentvec tower  1 1  tower # tower base ;
+  mbdy momentvec tower  19 2 tower # tower yaw bearing ;
+  mbdy momentvec shaft  4 1  shaft # main bearing ;
+  mbdy momentvec blade1  3  2 blade1 # blade 1 root ;
+  mbdy momentvec blade2 3  2 blade2 # blade 2 root ;
+  mbdy momentvec blade3 3  2 blade3 # blade 3 root ;
+  ; blade 2,3 root section loads
+  mbdy momentvec blade2  3  2 local # blade 2 section root;
+  mbdy momentvec blade3  3  2 local # blade 3 section root;
+  ; blade 1 sectional loads in local coordinates
+  mbdy momentvec blade1  2  2 local # blade 1 section;
+  mbdy momentvec blade1  3  2 local # blade 1 section root;
+  mbdy momentvec blade1  4  2 local # blade 1 section;
+  mbdy momentvec blade1  5  2 local # blade 1 section;
+  mbdy momentvec blade1  6  2 local # blade 1 section;
+  mbdy momentvec blade1  7  2 local # blade 1 section;
+  mbdy momentvec blade1  8  2 local # blade 1 section;
+  mbdy momentvec blade1  9  2 local # blade 1 section;
+  mbdy momentvec blade1 10  2 local # blade 1 section;
+  mbdy momentvec blade1 11  2 local # blade 1 section;
+  mbdy momentvec blade1 12  2 local # blade 1 section;
+  mbdy momentvec blade1 13  2 local # blade 1 section;
+  mbdy momentvec blade1 14  2 local # blade 1 section;
+  mbdy momentvec blade1 15  2 local # blade 1 section;
+  mbdy momentvec blade1 16  2 local # blade 1 section;
+  mbdy momentvec blade1 17  2 local # blade 1 section;
+  mbdy momentvec blade1 18  2 local # blade 1 section;
+  mbdy momentvec blade1 19  2 local # blade 1 section;
+  mbdy momentvec blade1 20  2 local # blade 1 section;
+  mbdy momentvec blade1 21  2 local # blade 1 section;
+  mbdy momentvec blade1 22  2 local # blade 1 section;
+  mbdy momentvec blade1 23  2 local # blade 1 section;
+  mbdy momentvec blade1 24  2 local # blade 1 section;
+  mbdy momentvec blade1 25  2 local # blade 1 section;
+  mbdy momentvec blade1 26  2 local # blade 1 section;
+  ; blade root out and in of plane forces
+  mbdy momentvec blade1 3  2 hub1 # blade 1 root ;
+  mbdy momentvec blade2 3  2 hub2 # blade 2 root ;
+  mbdy momentvec blade3 3  2 hub3 # blade 3 root ;
+;  mbdy momentvec blade1 14 1 local # blade 1 50% local e coo ;
+;  mbdy momentvec blade2 14 1 local # blade 2 50% local e coo ;
+;  mbdy momentvec blade3 14 1 local # blade 3 50% local e coo ;
+  ; Displacements and accellerations
+  mbdy state pos tower 19 1.0 global only 1 # Tower top FA displ;
+  mbdy state pos tower 19 1.0 global only 2 # Tower top SS displ;
+  mbdy state acc tower 19 1.0 global only 1 # Tower top FA acc;
+  mbdy state acc tower 19 1.0 global only 2 # Tower top SS acc;
+;
+  mbdy state pos blade1  26 1.0 global # gl blade 1 tip pos ;
+  mbdy state pos blade2  26 1.0 global # gl blade 2 tip pos ;
+  mbdy state pos blade3  26 1.0 global # gl blade 3 tip pos ;
+  mbdy state pos blade1  26 1.0 blade1 # blade 1 tip pos ;
+  mbdy state pos blade2  26 1.0 blade2 # blade 2 tip pos ;
+  mbdy state pos blade3  26 1.0 blade3 # blade 3 tip pos ;
+;
+  mbdy state pos tower    5 0.00 global ; [1,2,3]. Tower position: 24.58 m
+;
+  ; elastic twist (torsional deformation) along the blade
+  aero tors_ang 1  45.56;
+  aero tors_ang 1  59.19;
+  aero tors_ang 1  70.87;
+  aero tors_ang 1  80.61;
+  aero tors_ang 1  84.50;
+  aero tors_ang 1  88.40;
+  aero tors_ang 1  92.29;
+  aero tors_ang 1  96.19;
+  aero tors_ang 1  98.13;
+  aero tors_ang 1 100.08; tip
+;
+; - Monitor Aerodynamics - ;
+  aero windspeed 3 1 1 72.5;
+  aero alfa 1 72.5;
+  aero alfa 2 72.5;
+  aero alfa 3 72.5;
+  aero cl 1 72.5;
+  aero cl 2 72.5;
+  aero cl 3 72.5;
+  aero cd 1 72.5;
+  aero cd 2 72.5;
+  aero cd 3 72.5;
+; - Main Controller -
+; Output to controller
+  ; dll outvec 1 1 # time;
+  ; dll outvec 1 2 # slow speed shaft rad/s;
+  ; dll outvec 1 3 # pitch angle 1;
+  ; dll outvec 1 4 # pitch angle 2;
+  ; dll outvec 1 5 # pitch angle 3;
+  ; dll outvec 1 6 # WSP_x_global;
+  ; dll outvec 1 7 # WSP_y_global;
+  ; dll outvec 1 8 # WSP_z_global;
+  ; dll outvec 1 9 # Elec. pwr ;
+  ; dll outvec 1 10 # Grid flag ;
+; Input from controller
+  dll inpvec 1  1 # Generator torque reference            [Nm]   ;
+  dll inpvec 1  2 # Pitch angle reference of blade 1      [rad]  ;
+  dll inpvec 1  3 # Pitch angle reference of blade 2      [rad]  ;
+  dll inpvec 1  4 # Pitch angle reference of blade 3      [rad]  ;
+  ; dll inpvec 1  5 # Power reference                       [W]    ;
+  ; dll inpvec 1  6 # Filtered wind speed                   [m/s]  ;
+  ; dll inpvec 1  7 # Filtered rotor speed                  [rad/s];
+  ; dll inpvec 1  8 # Filtered rotor speed error for torque [rad/s];
+  ; dll inpvec 1  9 # Bandpass filtered rotor speed         [rad/s];
+  ; dll inpvec 1 10 # Proportional term of torque contr.    [Nm]   ;
+  ; dll inpvec 1 11 # Integral term of torque controller    [Nm]   ;
+  ; dll inpvec 1 12 # Minimum limit of torque               [Nm]   ;
+  ; dll inpvec 1 13 # Maximum limit of torque               [Nm]   ;
+  dll inpvec 1 14 # Torque limit switch based on pitch    [-]    ;
+  ; dll inpvec 1 15 # Filtered rotor speed error for pitch  [rad/s];
+  ; dll inpvec 1 16 # Power error for pitch                 [W]    ;
+  ; dll inpvec 1 17 # Proportional term of pitch controller [rad]  ;
+  ; dll inpvec 1 18 # Integral term of pitch controller     [rad]  ;
+  ; dll inpvec 1 19 # Minimum limit of pitch                [rad]  ;
+  ; dll inpvec 1 20 # Maximum limit of pitch                [rad]  ;
+  dll inpvec 1 21 # Torque reference from DT dammper      [Nm]  ;
+  dll inpvec 1 22 # Status signal                         [-]  ;
+  ; dll inpvec 1 23 # Total added pitch rate                [rad/s]  ;
+  dll inpvec 1 24 # Filtered Mean pitch for gain sch      [rad]  ;
+  dll inpvec 1 25 # Flag for mechnical brake              [0=off/1=on] ;
+  dll inpvec 1 26 # Flag for emergency pitch stop         [0=off/1=on] ;
+  dll inpvec 1 27 # LP filtered acceleration level        [m/s^2] ;
+; ; Output to generator model
+   ; dll outvec 2 1  # time ;
+   ; dll outvec 2 2  # Electrical torque reference [Nm] ;
+   ; dll outvec 2 3  # omega LSS ;
+; Input from generator model
+   dll inpvec 2 1  # Mgen LSS [Nm];
+   dll inpvec 2 2  # Pelec W ;
+   dll inpvec 2 3  # Mframe ;
+   dll inpvec 2 4  # Mgen HSS ;
+   dll inpvec 2 5  # Generator Pmech kW ;
+   dll inpvec 2 6  # Filtered Gen speed ;
+   dll inpvec 2 7  # Resulting Eff ;
+   dll inpvec 2 8  # Grid flag ;
+; Output to mechanical brake
+   dll inpvec 3 1 # Brake torque [Nm] ;
+; ; Input from mechanical brake
+   ; dll outvec 3 1 # Time [s] ;
+   ; dll outvec 3 2 # Generator LSS speed [rad/s] ;
+   ; dll outvec 3 3 # Deploy brake ;
+; ; Output to pitch servo
+   ; dll outvec 4 1 # time;
+   ; dll outvec 4 2 # pitchref 1;
+   ; dll outvec 4 3 # pitchref 2;
+   ; dll outvec 4 4 # pitchref 3;
+   ; dll outvec 4 5 # Emerg. stop;
+; Input from pitch servo
+   dll inpvec 4 1 # pitch 1;
+   dll inpvec 4 2 # pitch 2;
+   dll inpvec 4 3 # pitch 3;
+; Check tower clearence
+   dll inpvec 5 1 # Bltip tow min d [m];
+;   general constant 1.0 ;	constant 1.0 - to mesure activity of flap in terms of displacement
+; - Check on flap control:
+	; ; - From flap controller: -
+	; dll type2_dll cyclic_flap_controller inpvec 1	# Ref flap signal bl 1 [deg] ;
+	; dll type2_dll cyclic_flap_controller inpvec 2	# Ref flap signal bl 2 [deg] ;
+	; dll type2_dll cyclic_flap_controller inpvec 3	# Ref flap signal bl 3 [deg] ;
+	; ; - Mbc values
+	; dll type2_dll cyclic_flap_controller inpvec 4	# momvec mbc cos [kNm] ;
+	; dll type2_dll cyclic_flap_controller inpvec 5	# momvec mbc sin [kNm] ;
+	; dll type2_dll cyclic_flap_controller inpvec 6	# momvec mbc filt cos [kNm] ;
+	; dll type2_dll cyclic_flap_controller inpvec 7	# momvec mbc filt sin [kNm] ;
+	; dll type2_dll cyclic_flap_controller inpvec 8	# flap mbc cos [deg] ;
+	; dll type2_dll cyclic_flap_controller inpvec 9	# flap mbc sin [deg] ;
+	; ; - Check Gains - ;
+	; dll type2_dll cyclic_flap_controller inpvec 10	# lead angle [deg] ;
+	; dll type2_dll cyclic_flap_controller inpvec 11	# scaling on rat pow [-] ;
+	; dll type2_dll cyclic_flap_controller inpvec 12	# actual kp [deg/kNm] ;
+	; dll type2_dll cyclic_flap_controller inpvec 13	# actual ki [deg/kNms] ;
+	; dll type2_dll cyclic_flap_controller inpvec 14	# actual kd [deg s/kNm] ;
+	; ; - Actual deflections -
+	;  aero beta 1 1 ;
+	;  aero beta 2 1 ;
+	;  aero beta 3 1 ;
+	; ; - Mbc values
+	; dll type2_dll cyclic_flap_controller inpvec 4	# momvec mbc cos [kNm] ;
+	; dll type2_dll cyclic_flap_controller inpvec 5	# momvec mbc sin [kNm] ;
+	; dll type2_dll cyclic_flap_controller inpvec 6	# momvec mbc filt cos [kNm] ;
+	; dll type2_dll cyclic_flap_controller inpvec 7	# momvec mbc filt sin [kNm] ;
+	; dll type2_dll cyclic_flap_controller inpvec 8	# flap mbc cos [deg] ;
+	; dll type2_dll cyclic_flap_controller inpvec 9	# flap mbc sin [deg] ;
+end output;
+;
+exit;
diff --git a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp10_s100.p b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp10_s100.p
index 8747810f9d82fb4a89293e4169784321fc168138..ad37d08eda8af66d8d9039f92b23411e9adafae0 100644
--- a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp10_s100.p
+++ b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp10_s100.p
@@ -37,7 +37,8 @@ if [ -z ${LAUNCH_PBS_MODE+x} ] ; then
   mkdir -p turb/
   cp -R $PBS_O_WORKDIR/htc/dlc01_demos/dlc01_steady_wsp10_s100.htc ./htc/dlc01_demos/
   cp -R $PBS_O_WORKDIR/../turb/turb_s100_10ms*.bin turb/ 
-  # ------------------------------------------------------------
+  WINEARCH=win32 WINEPREFIX=~/.wine32 winefix
+# ------------------------------------------------------------
 else
   # with find+xargs we first browse to CPU folder
   cd "$CPU_NR"
diff --git a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp11_s101.p b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp11_s101.p
new file mode 100644
index 0000000000000000000000000000000000000000..d4675f07d0ad5d8011fac3c5c19201705054ac8e
--- /dev/null
+++ b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp11_s101.p
@@ -0,0 +1,116 @@
+### Standard Output 
+#PBS -N dlc01_steady_wsp11_s101 
+#PBS -o ./pbs_out/dlc01_demos/dlc01_steady_wsp11_s101.out
+### Standard Error 
+#PBS -e ./pbs_out/dlc01_demos/dlc01_steady_wsp11_s101.err
+#PBS -W umask=0003
+### Maximum wallclock time format HOURS:MINUTES:SECONDS
+#PBS -l walltime=04:00:00
+#PBS -l nodes=1:ppn=1
+### Queue name
+#PBS -q workq
+
+# ==============================================================================
+if [ -z ${LAUNCH_PBS_MODE+x} ] ; then
+  ### Create scratch directory and copy data to it 
+  cd $PBS_O_WORKDIR
+  echo "current working dir (pwd):"
+  pwd 
+  cp -R ./demo_dlc_remote.zip /scratch/$USER/$PBS_JOBID
+fi
+# ------------------------------------------------------------------------------
+
+
+# ------------------------------------------------------------
+# evaluates to true if LAUNCH_PBS_MODE is NOT set
+if [ -z ${LAUNCH_PBS_MODE+x} ] ; then
+  echo 
+  echo 'Execute commands on scratch nodes'
+  cd /scratch/$USER/$PBS_JOBID
+  # create unique dir for each CPU
+  mkdir "1"; cd "1"
+  pwd
+  /usr/bin/unzip ../demo_dlc_remote.zip
+  mkdir -p htc/dlc01_demos/
+  mkdir -p res/dlc01_demos/
+  mkdir -p logfiles/dlc01_demos/
+  mkdir -p turb/
+  cp -R $PBS_O_WORKDIR/htc/dlc01_demos/dlc01_steady_wsp11_s101.htc ./htc/dlc01_demos/
+  cp -R $PBS_O_WORKDIR/../turb/turb_s101_11ms*.bin turb/ 
+  WINEARCH=win32 WINEPREFIX=~/.wine32 winefix
+# ------------------------------------------------------------
+else
+  # with find+xargs we first browse to CPU folder
+  cd "$CPU_NR"
+fi
+# ------------------------------------------------------------
+echo ""
+# evaluates to true if LAUNCH_PBS_MODE is NOT set
+if [ -z ${LAUNCH_PBS_MODE+x} ] ; then
+  echo "execute HAWC2, fork to background"
+  time WINEARCH=win32 WINEPREFIX=~/.wine32 wine hawc2-latest ./htc/dlc01_demos/dlc01_steady_wsp11_s101.htc  &
+  wait
+else
+  echo "execute HAWC2, do not fork and wait"
+  time WINEARCH=win32 WINEPREFIX=~/.wine32 wine hawc2-latest ./htc/dlc01_demos/dlc01_steady_wsp11_s101.htc  
+  echo "POST-PROCESSING"
+  python -c "from wetb.prepost import statsdel; statsdel.logcheck('logfiles/dlc01_demos/dlc01_steady_wsp11_s101.log')"
+  python -c "from wetb.prepost import statsdel; statsdel.calc('res/dlc01_demos/dlc01_steady_wsp11_s101', no_bins=46, m=[3, 4, 6, 8, 10, 12], neq=20.0, i0=0, i1=None, ftype='.csv')"
+fi
+
+
+# ==============================================================================
+### Epilogue
+# evaluates to true if LAUNCH_PBS_MODE is NOT set
+if [ -z ${LAUNCH_PBS_MODE+x} ] ; then
+  ### wait for jobs to finish 
+  wait
+  echo ""
+# ------------------------------------------------------------------------------
+  echo "Copy back from scratch directory" 
+  cd /scratch/$USER/$PBS_JOBID/1/
+  mkdir -p $PBS_O_WORKDIR/res/dlc01_demos/
+  mkdir -p $PBS_O_WORKDIR/logfiles/dlc01_demos/
+  mkdir -p $PBS_O_WORKDIR/animation/
+  mkdir -p $PBS_O_WORKDIR/../turb/
+  cp -R res/dlc01_demos/. $PBS_O_WORKDIR/res/dlc01_demos/.
+  cp -R logfiles/dlc01_demos/. $PBS_O_WORKDIR/logfiles/dlc01_demos/.
+  cp -R animation/. $PBS_O_WORKDIR/animation/.
+
+  echo ""
+  echo "COPY BACK TURB IF APPLICABLE"
+  cd turb/
+  for i in `ls *.bin`; do  if [ -e $PBS_O_WORKDIR/../turb/$i ]; then echo "$i exists no copyback"; else echo "$i copyback"; cp $i $PBS_O_WORKDIR/../turb/; fi; done
+  cd /scratch/$USER/$PBS_JOBID/1/
+  echo "END COPY BACK TURB"
+  echo ""
+
+  echo "COPYBACK [copyback_files]/[copyback_frename]"
+  echo "END COPYBACK"
+  echo ""
+
+  echo ""
+  echo "following files are on node/cpu 1 (find .):"
+  find .
+# ------------------------------------------------------------------------------
+else
+  cd /scratch/$USER/$PBS_JOBID/$CPU_NR/
+  rsync -a --remove-source-files res/dlc01_demos/. ../remote/res/dlc01_demos/.
+  rsync -a --remove-source-files logfiles/dlc01_demos/. ../remote/logfiles/dlc01_demos/.
+  rsync -a --remove-source-files animation/. ../remote/animation/.
+
+  echo ""
+  echo "COPY BACK TURB IF APPLICABLE"
+  cd turb/
+  for i in `ls *.bin`; do  if [ -e ../../turb/$i ]; then echo "$i exists no copyback"; else echo "$i copyback"; cp $i ../../turb/; fi; done
+  cd /scratch/$USER/$PBS_JOBID/$CPU_NR/
+  echo "END COPY BACK TURB"
+  echo ""
+
+  echo "COPYBACK [copyback_files]/[copyback_frename]"
+  echo "END COPYBACK"
+  echo ""
+
+# ------------------------------------------------------------------------------
+fi
+exit
diff --git a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp8_noturb.p b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp8_noturb.p
index 14c07d42e55b395c945458b10ff83325bdba6ec3..8570f9cb95946522ea0f34bdfe4d445b701202e7 100644
--- a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp8_noturb.p
+++ b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp8_noturb.p
@@ -37,7 +37,8 @@ if [ -z ${LAUNCH_PBS_MODE+x} ] ; then
   mkdir -p turb/
   cp -R $PBS_O_WORKDIR/htc/dlc01_demos/dlc01_steady_wsp8_noturb.htc ./htc/dlc01_demos/
   cp -R $PBS_O_WORKDIR/../turb/none*.bin turb/ 
-  # ------------------------------------------------------------
+  WINEARCH=win32 WINEPREFIX=~/.wine32 winefix
+# ------------------------------------------------------------
 else
   # with find+xargs we first browse to CPU folder
   cd "$CPU_NR"
diff --git a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp9_noturb.p b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp9_noturb.p
index 879196497b947b19454fd3bf5addd78ac5365612..8b7dc11bda27c4205e9eb084657ab876200fb122 100644
--- a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp9_noturb.p
+++ b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp9_noturb.p
@@ -37,7 +37,8 @@ if [ -z ${LAUNCH_PBS_MODE+x} ] ; then
   mkdir -p turb/
   cp -R $PBS_O_WORKDIR/htc/dlc01_demos/dlc01_steady_wsp9_noturb.htc ./htc/dlc01_demos/
   cp -R $PBS_O_WORKDIR/../turb/none*.bin turb/ 
-  # ------------------------------------------------------------
+  WINEARCH=win32 WINEPREFIX=~/.wine32 winefix
+# ------------------------------------------------------------
 else
   # with find+xargs we first browse to CPU folder
   cd "$CPU_NR"
diff --git a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in_turb/turb_s100_10ms.p b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in_turb/turb_s100_10ms.p
index d16fe92e9502d1d340173ba6a5605d5ac937b596..79b15e566904b8e0b365b70c46c31bea42f99ea4 100644
--- a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in_turb/turb_s100_10ms.p
+++ b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in_turb/turb_s100_10ms.p
@@ -26,7 +26,9 @@ echo "------------------------------------------------------------------------"
 echo "PRELUDE"
 echo "------------------------------------------------------------------------"
 
-cd ../turb/
+winefix
+cd /scratch/$USER/$PBS_JOBID/
+
 
 echo ""
 echo "------------------------------------------------------------------------"
@@ -42,6 +44,10 @@ echo "------------------------------------------------------------------------"
 echo "CODA"
 echo "------------------------------------------------------------------------"
 
+# COPY BACK FROM SCRATCH AND RENAME, remove _ at end
+cp turb_s100_10ms_u.bin $PBS_O_WORKDIR/../turb/turb_s100_10msu.bin
+cp turb_s100_10ms_v.bin $PBS_O_WORKDIR/../turb/turb_s100_10msv.bin
+cp turb_s100_10ms_w.bin $PBS_O_WORKDIR/../turb/turb_s100_10msw.bin
 
 
 echo ""
diff --git a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in_turb/turb_s101_11ms.p b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in_turb/turb_s101_11ms.p
new file mode 100644
index 0000000000000000000000000000000000000000..7997dc29dc535d9a5136282e8d8744b4d876a0d8
--- /dev/null
+++ b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in_turb/turb_s101_11ms.p
@@ -0,0 +1,55 @@
+
+### Standard Output
+#PBS -N no_name_job
+#PBS -o ./pbs_out/turb/turb_s101_11ms.out
+### Standard Error
+#PBS -e ./pbs_out/turb/turb_s101_11ms.err
+#PBS -W umask=0003
+### Maximum wallclock time format HOURS:MINUTES:SECONDS
+#PBS -l walltime=00:59:59
+#PBS -lnodes=1:ppn=1
+### Queue name
+#PBS -q workq
+
+### #PBS -a [start_time]
+### #PBS -W depend=afterany:[job_id]
+
+### Browse to current working dir
+echo ""
+cd $PBS_O_WORKDIR
+echo "current working dir:"
+pwd
+echo ""
+
+### ===========================================================================
+echo "------------------------------------------------------------------------"
+echo "PRELUDE"
+echo "------------------------------------------------------------------------"
+
+winefix
+cd /scratch/$USER/$PBS_JOBID/
+
+
+echo ""
+echo "------------------------------------------------------------------------"
+echo "EXECUTION"
+echo "------------------------------------------------------------------------"
+
+time wine mann_turb_x64.exe turb_s101_11ms 1.000000 29.400000 3.000000 100 8192 32 32 0.8594 6.5000 6.5000 1
+### wait for jobs to finish
+wait
+
+echo ""
+echo "------------------------------------------------------------------------"
+echo "CODA"
+echo "------------------------------------------------------------------------"
+
+# COPY BACK FROM SCRATCH AND RENAME, remove _ at end
+cp turb_s101_11ms_u.bin $PBS_O_WORKDIR/../turb/turb_s101_11msu.bin
+cp turb_s101_11ms_v.bin $PBS_O_WORKDIR/../turb/turb_s101_11msv.bin
+cp turb_s101_11ms_w.bin $PBS_O_WORKDIR/../turb/turb_s101_11msw.bin
+
+
+echo ""
+### ===========================================================================
+exit
diff --git a/wetb/prepost/tests/data/demo_dlc/ref/prepost/remote_tags.txt b/wetb/prepost/tests/data/demo_dlc/ref/prepost/remote_tags.txt
index c191125c1237fc1732a98ab1327ff1ae1734004a..eebe622e1cd2307810c65f8ed345bec9f81ebe5d 100644
--- a/wetb/prepost/tests/data/demo_dlc/ref/prepost/remote_tags.txt
+++ b/wetb/prepost/tests/data/demo_dlc/ref/prepost/remote_tags.txt
@@ -176,3 +176,59 @@
                     [windramp] : False               
                   [wsp factor] : 0.8                 
               [zip_root_files] : []                  
+
+-------------------------------------------------------------------------------
+                 opt_tags set
+-------------------------------------------------------------------------------
+                 [Case folder] : dlc01_demos         
+                    [Case id.] : dlc01_steady_wsp11_s101
+                 [Cut-in time] : -1                  
+                [Cut-out time] : -1                  
+                         [DLC] : 01                  
+                   [Dyn stall] : 2                   
+              [Free shaft rot] : True                
+                         [G_A] : True                
+                         [G_T] : True                
+                      [G_phi0] : True                
+                        [G_t0] : True                
+              [Grid loss time] : 5000                
+                   [Induction] : 1                   
+              [Pitch 1 DLC22b] : 0                   
+                    [Pitvel 1] : 3                   
+                    [Pitvel 2] : 4                   
+               [Rotor azimuth] : 0                   
+                [Rotor locked] : False               
+                   [Stop type] : 1                   
+                          [TI] : 0.201454545455      
+          [Time pitch runaway] : 5000                
+           [Time stuck DLC22b] : -1                  
+              [Turb base name] : turb_s101_11ms      
+                   [Windspeed] : 11                  
+                     [case_id] : dlc01_steady_wsp11_s101
+                    [data_dir] : data/               
+                 [dis_setbeta] : True                
+                    [duration] : 20.0                
+                        [gust] : False               
+                   [gust_type] : True                
+                     [htc_dir] : htc/dlc01_demos/    
+                     [init_wr] : 0.5                 
+                    [iter_dir] : iter/dlc01_demos/   
+                     [log_dir] : logfiles/dlc01_demos/
+                  [out_format] : hawc_binary         
+                  [pbs_in_dir] : pbs_in/dlc01_demos/ 
+                 [pbs_out_dir] : pbs_out/dlc01_demos/
+                     [res_dir] : res/dlc01_demos/    
+                   [shear_exp] : 0                   
+                   [staircase] : False               
+                   [t flap on] : -1                  
+                          [t0] : 20                  
+                   [time stop] : 40                  
+                   [time_stop] : 40                  
+                    [tu_model] : 1                   
+                     [tu_seed] : 100                 
+              [turb_base_name] : turb_s101_11ms      
+                     [turb_dx] : 0.859375            
+                        [wdir] : 0                   
+                    [windramp] : False               
+                  [wsp factor] : 0.727272727273      
+              [zip_root_files] : []                  
diff --git a/wetb/prepost/tests/data/demo_dlc/source/htc/DLCs/dlc01_demos.xlsx b/wetb/prepost/tests/data/demo_dlc/source/htc/DLCs/dlc01_demos.xlsx
index 246cbf5e6e5c94b732349be0a6a09336fb1f715f..2725ebf94c486118c288c7b1bf73bfba9fb79afd 100755
Binary files a/wetb/prepost/tests/data/demo_dlc/source/htc/DLCs/dlc01_demos.xlsx and b/wetb/prepost/tests/data/demo_dlc/source/htc/DLCs/dlc01_demos.xlsx differ
diff --git a/wetb/utils/cluster_tools/pbswrap.py b/wetb/utils/cluster_tools/pbswrap.py
index 5eb3f37091f97405676dac4fd4347c12050bbbe2..2b10eb211cf257c5dcde8f9f388f7a206818735b 100644
--- a/wetb/utils/cluster_tools/pbswrap.py
+++ b/wetb/utils/cluster_tools/pbswrap.py
@@ -127,6 +127,8 @@ def print_node_loading(users, host, nodes, nodesload):
 
 
 def parse_pbsnode_lall(output):
+    """Parse output of pbsnodes -l all
+    """
     # read the qstat output
     frees, exclusives, others, down = 0, 0, 0, 0
     nr_nodes = 0
@@ -186,7 +188,7 @@ def parse_qstat_n1(output):
     host = {}
     users = {}
     # get the hostname
-    hostname = output[1]
+    hostname = socket.gethostname()
     if hostname[:5] == 'g-000':
         host['name'] = 'gorm'
         host['cpu_per_node'] = 12
@@ -199,9 +201,13 @@ def parse_qstat_n1(output):
     # who are down
     #queue['_total_cpu_'] = cpu_node*nr_nodes
 
-    for line in output[5:]:  # first 5 are not relevant
-        if line == "":
+    ii = 0
+    for line in output:
+        # first 5 are not relevant
+        if ii < 5:
+            ii += 1
             continue
+
         items = line.split()
         queue = items[2]
 
@@ -247,6 +253,7 @@ def parse_qstat_n1(output):
             nodes = items[11].split('+')
             # TODO: take into account cpu number for jess: j-304/5
             # on jess, the cpu number of the node is indicated, ignore for now
+            # FIXME: host name can be jess or j-
             if host['name'].startswith('jess'):
                 for i, node in enumerate(nodes):
                     nodes[i] = node.split('/')[0]
@@ -261,9 +268,11 @@ def parse_qstat_n1(output):
                 except KeyError:
                     nodesload[node] = [userid]
 
-    return users, host, nodesload
+        ii += 1
 
+    return users, host, nodesload
 
+# FIXME: counts diffferent compared to launch.py....
 def count_cpus(users, host, pbsnodes):
     """
     See how many cpu's are actually free