Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • toolbox/WindEnergyToolbox
  • tlbl/WindEnergyToolbox
  • cpav/WindEnergyToolbox
  • frza/WindEnergyToolbox
  • borg/WindEnergyToolbox
  • mmpe/WindEnergyToolbox
  • ozgo/WindEnergyToolbox
  • dave/WindEnergyToolbox
  • mmir/WindEnergyToolbox
  • wluo/WindEnergyToolbox
  • welad/WindEnergyToolbox
  • chpav/WindEnergyToolbox
  • rink/WindEnergyToolbox
  • shfe/WindEnergyToolbox
  • shfe1/WindEnergyToolbox
  • acdi/WindEnergyToolbox
  • angl/WindEnergyToolbox
  • wliang/WindEnergyToolbox
  • mimc/WindEnergyToolbox
  • wtlib/WindEnergyToolbox
  • cmos/WindEnergyToolbox
  • fabpi/WindEnergyToolbox
22 results
Show changes
===============================================================================
iter_dict
===============================================================================
[empty] : [False]
===============================================================================
opt_tags
===============================================================================
-------------------------------------------------------------------------------
opt_tags set
-------------------------------------------------------------------------------
[Case folder] : dlc01_demos
[Case id.] : dlc01_steady_wsp8_noturb
[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.232
[Time pitch runaway] : 5000
[Time stuck DLC22b] : -1
[Turb base name] : none
[Windspeed] : 8
[case_id] : dlc01_steady_wsp8_noturb
[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] : 0
[tu_seed] : 0
[turb_base_name] : none
[turb_dx] : 0.0390625
[wdir] : 0
[windramp] : False
[wsp factor] : 1.0
[zip_root_files] : []
-------------------------------------------------------------------------------
opt_tags set
-------------------------------------------------------------------------------
[Case folder] : dlc01_demos
[Case id.] : dlc01_steady_wsp9_noturb
[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.219555555556
[Time pitch runaway] : 5000
[Time stuck DLC22b] : -1
[Turb base name] : none
[Windspeed] : 9
[case_id] : dlc01_steady_wsp9_noturb
[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] : 0
[tu_seed] : 0
[turb_base_name] : none
[turb_dx] : 0.0439453125
[wdir] : 0
[windramp] : False
[wsp factor] : 0.888888888889
[zip_root_files] : []
-------------------------------------------------------------------------------
opt_tags set
-------------------------------------------------------------------------------
[Case folder] : dlc01_demos
[Case id.] : dlc01_steady_wsp10_noturb
[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.2096
[Time pitch runaway] : 5000
[Time stuck DLC22b] : -1
[Turb base name] : none
[Windspeed] : 10
[case_id] : dlc01_steady_wsp10_noturb
[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] : 0
[tu_seed] : 0
[turb_base_name] : none
[turb_dx] : 0.048828125
[wdir] : 0
[windramp] : False
[wsp factor] : 0.8
[zip_root_files] : []
just one demo line
just one demo line
File added
File added
'''
Created on 05/11/2015
@author: MMPE
'''
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
import unittest
import os
import filecmp
import pickle
from wetb.prepost import dlctemplate as tmpl
class TestGenerateInputs(unittest.TestCase):
def setUp(self):
self.basepath = os.path.dirname(__file__)
def test_launch_dlcs_excel(self):
# manually configure paths, HAWC2 model root path is then constructed as
# p_root_remote/PROJECT/sim_id, and p_root_local/PROJECT/sim_id
# adopt accordingly when you have configured your directories differently
p_root = os.path.join(self.basepath, 'data/')
# project name, sim_id, master file name
tmpl.PROJECT = 'demo_dlc'
tmpl.MASTERFILE = 'demo_dlc_master_A0001.htc'
# MODEL SOURCES, exchanche file sources
tmpl.P_RUN = os.path.join(p_root, tmpl.PROJECT, 'remote/')
tmpl.P_SOURCE = os.path.join(p_root, tmpl.PROJECT, 'source/')
# location of the master file
tmpl.P_MASTERFILE = os.path.join(p_root, tmpl.PROJECT,
'source', 'htc', '_master/')
# location of the pre and post processing data
tmpl.POST_DIR = os.path.join(p_root, tmpl.PROJECT, 'remote',
'prepost/')
tmpl.force_dir = tmpl.P_RUN
tmpl.launch_dlcs_excel('remote', silent=True)
# we can not check-in empty dirs in git
for subdir in ['control', 'data', 'htc', 'pbs_in']:
remote = os.path.join(p_root, tmpl.PROJECT, 'remote', subdir)
ref = os.path.join(p_root, tmpl.PROJECT, 'ref', subdir)
cmp = filecmp.dircmp(remote, ref)
self.assertTrue(len(cmp.diff_files)==0)
self.assertTrue(len(cmp.right_only)==0)
self.assertTrue(len(cmp.left_only)==0)
# for the pickled file we can just read it
remote = os.path.join(p_root, tmpl.PROJECT, 'remote', 'prepost')
ref = os.path.join(p_root, tmpl.PROJECT, 'ref', 'prepost')
cmp = filecmp.cmp(os.path.join(remote, 'remote_tags.txt'),
os.path.join(ref, 'remote_tags.txt'), shallow=False)
self.assertTrue(cmp)
# with open(os.path.join(remote, 'remote.pkl'), 'rb') as FILE:
# pkl_remote = pickle.load(FILE)
# with open(os.path.join(ref, 'remote.pkl'), 'rb') as FILE:
# pkl_ref = pickle.load(FILE)
# self.assertTrue(pkl_remote == pkl_ref)
if __name__ == "__main__":
unittest.main()
This diff is collapsed.