From f2ac9fa1366190dec00bc4476767a4dd2d871ec0 Mon Sep 17 00:00:00 2001
From: madsmpedersen <m@madsp.dk>
Date: Tue, 28 Jun 2016 09:42:21 +0200
Subject: [PATCH] user name thing

---
 wetb/hawc2/cluster_simulation.py | 4 ++--
 wetb/hawc2/htc_file.py           | 5 ++++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/wetb/hawc2/cluster_simulation.py b/wetb/hawc2/cluster_simulation.py
index 544cde2f..05623625 100644
--- a/wetb/hawc2/cluster_simulation.py
+++ b/wetb/hawc2/cluster_simulation.py
@@ -1,5 +1,5 @@
 from wetb.hawc2.simulation import Simulation, SimulationThread
-import os  
+import os
 import sys
 from threading import  Thread
 class ClusterSimulation(Simulation):
@@ -17,7 +17,7 @@ class ClusterSimulation(Simulation):
 
     def update_status(self, *args, **kwargs):
         Simulation.update_status(self, *args, **kwargs)
-        with open("/home/mmpe/.hawc2launcher/status_%s" % self.simulation_id, 'w') as fid:
+        with open("/home/%s/.hawc2launcher/status_%s" % (os.environ['USER'], self.simulation_id), 'w') as fid:
             fid.write (";".join([self.simulation_id, self.status] + [str(getattr(self.logFile, v)) for v in ['status', 'pct', 'remaining_time', 'lastline']]) + "\n")
 
     def show_status(self):
diff --git a/wetb/hawc2/htc_file.py b/wetb/hawc2/htc_file.py
index 5c38bdc9..92740e80 100644
--- a/wetb/hawc2/htc_file.py
+++ b/wetb/hawc2/htc_file.py
@@ -234,6 +234,9 @@ class HTCFile(HTCContents, HTCDefaults):
             raise Exception (str(stdout) + str(stderr))
 
 if "__main__" == __name__:
-    f = HTCFile(r"C:\mmpe\HAWC2\models\PhaseIJacketv30\htc", "../../")
+    f = HTCFile(r"C:\mmpe\HAWC2\models\DTU10MWRef6.0\htc\DTU_10MW_RWT_power_curve.htc", "../")
+    f.save(r"C:\mmpe\HAWC2\models\DTU10MWRef6.0\htc\DTU_10MW_RWT_power_curve.htc")
 
+    f = HTCFile(r"C:\mmpe\HAWC2\models\DTU10MWRef6.0\htc\DTU_10MW_RWT.htc", "../")
+    f.save(r"C:\mmpe\HAWC2\models\DTU10MWRef6.0\htc\DTU_10MW_RWT.htc")
 
-- 
GitLab