From 48c83f3a972cae6dd2b948149866e9dc7a56736b Mon Sep 17 00:00:00 2001 From: David Robert Verelst <dave@dtu.dk> Date: Sun, 4 Jun 2017 14:53:02 +0200 Subject: [PATCH] prepost.windIO.LoadResults: use sensortag for wind speed unique ch name --- wetb/prepost/windIO.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wetb/prepost/windIO.py b/wetb/prepost/windIO.py index 5bdcb5e0..6ba34a61 100755 --- a/wetb/prepost/windIO.py +++ b/wetb/prepost/windIO.py @@ -1166,12 +1166,19 @@ class LoadResults(ReadHawc2): # ----------------------------------------------------------------- # WIND SPEED # WSP gl. coo.,Vx + # Free wind speed Vx, gl. coo, of gl. pos 0.00, 0.00, -6.00 LABEL elif self.ch_details[ch, 0].startswith('WSP gl.'): units = self.ch_details[ch, 1] direction = self.ch_details[ch, 0].split(',')[1] tmp = self.ch_details[ch, 2].split('pos')[1] x, y, z = tmp.split(',') x, y, z = x.strip(), y.strip(), z.strip() + tmp = z.split(' ') + sensortag = '' + if len(tmp) == 2: + z, sensortag = tmp + elif len(tmp) == 1: + z = tmp[0] # and tag it tag = 'windspeed-global-%s-%s-%s-%s' % (direction, x, y, z) @@ -1181,6 +1188,7 @@ class LoadResults(ReadHawc2): channelinfo['pos'] = (x, y, z) channelinfo['units'] = units channelinfo['chi'] = ch + channelinfo['sensortag'] = sensortag # WIND SPEED AT BLADE # 0: WSP Vx, glco, R= 61.5 -- GitLab