def _set_path_auto_config(self, verbose=True): """ auto configure directories: assume you are running in the root of the relevant HAWC2 model and assume we are in a simulation case of a certain turbine/project """ tmp = dlcdefs.configure_dirs(verbose=verbose) (self.P_RUN, self.P_SOURCE, self.PROJECT, self.sim_id, self.P_MASTERFILE, self.MASTERFILE, self.POST_DIR) = tmp
# P_SOURCE = os.path.join(p_root_local, PROJECT, sim_id) # # location of the master file # P_MASTERFILE = os.path.join(p_root_local, PROJECT, sim_id, 'htc', '_master/') # # location of the pre and post processing data # POST_DIR = os.path.join(p_root_remote, PROJECT, sim_id, 'prepost-data/') # force_dir = P_RUN # launch_dlcs_excel(sim_id) # post_launch(sim_id, check_logs=True, update=False, force_dir=force_dir, # saveinterval=2000, csv=True, fatigue_cycles=True, fatigue=False) # ------------------------------------------------------------------------- # auto configure directories: assume you are running in the root of the # relevant HAWC2 model # and assume we are in a simulation case of a certain turbine/project P_RUN, P_SOURCE, PROJECT, sim_id, P_MASTERFILE, MASTERFILE, POST_DIR \ = dlcdefs.configure_dirs(verbose=True) if opt.wine_64bit: opt.wine_arch, opt.wine_prefix = ('win64', '~/.wine') if opt.gendlcs: DLB = GenerateDLCCases() DLB.execute(filename=os.path.join(P_SOURCE, opt.dlcmaster), folder=os.path.join(P_RUN, opt.dlcfolder)) # create HTC files and PBS launch scripts (*.p) if opt.prep: print('Start creating all the htc files and pbs_in files...') launch_dlcs_excel(sim_id, silent=False, zipchunks=opt.zipchunks,
if not os.path.exists(fig_dir_base): os.makedirs(fig_dir_base) fig_path = os.path.join(fig_dir_base, '-'.join(sim_ids) + '_stair.png') print('saving: %s ...' % fig_path, end='') fig.savefig(fig_path) #.encode('latin-1') print('done') fig.clear() if __name__ == '__main__': # auto configure directories: assume you are running in the root of the # relevant HAWC2 model # and assume we are in a simulation case of a certain turbine/project P_RUN, P_SOURCE, PROJECT, sim_id, P_MASTERFILE, MASTERFILE, POST_DIR \ = dlcdefs.configure_dirs() # ------------------------------------------------------------------------- # # manually configure all the dirs # p_root_remote = '/mnt/hawc2sim' # p_root_local = '/home/dave/DTU/Projects/AVATAR/' # # project name, sim_id, master file name # PROJECT = 'DTU10MW' # sim_id = 'C0014' # MASTERFILE = 'dtu10mw_master_C0014.htc' # # MODEL SOURCES, exchanche file sources # P_RUN = os.path.join(p_root_remote, PROJECT, sim_id+'/') # P_SOURCE = os.path.join(p_root_local, PROJECT) # # location of the master file # P_MASTERFILE = os.path.join(p_root_local, PROJECT, 'htc', '_master/') # # location of the pre and post processing data