def setup_comparison(self, src, dst, testModel=True): # adjust htol if it is smaller than IMS outer_dvclose dvclose = self._get_dvclose(dst) if dvclose is not None: dvclose *= 5.0 if self.htol < dvclose: self.htol = dvclose # get rclose to use with budget comparisons rclose = self._get_rclose(dst) if rclose is None: rclose = 0.5 else: rclose *= 5.0 self.rclose = rclose # Copy comparison simulations if available if self.mf6_regression: action = "mf6-regression" pth = os.path.join(dst, action) if os.path.isdir(pth): shutil.rmtree(pth) shutil.copytree(dst, pth) elif testModel: action = pymake.setup_mf6_comparison( src, dst, remove_existing=self.delFiles ) else: action = pymake.get_mf6_comparison(dst) self.action = action return
def setup(self, src, dst): msg = sfmt.format('Setup test', self.name) print(msg) self.originpath = src self.simpath = dst # write message print('running pymake.setup_mf6 from ' + '{}'.format(os.path.abspath(os.getcwd()))) try: self.inpt, self.outp = pymake.setup_mf6(src=src, dst=dst) print('waiting...') time.sleep(0.5) success = True except: success = False print('source: {}'.format(src)) print('destination: {}'.format(dst)) assert success, 'did not run pymake.setup_mf6' # Copy comparison simulations if available if success: action = pymake.setup_mf6_comparison(src, dst, remove_existing=self.delFiles) self.action = action return
def setup(self, src, dst): msg = sfmt.format("Setup test", self.name) print(msg) self.originpath = src self.simpath = dst # write message print("running pymake.setup_mf6 from " + "{}".format(os.path.abspath(os.getcwd()))) try: self.inpt, self.outp = pymake.setup_mf6(src=src, dst=dst) print("waiting...") time.sleep(0.5) success = True except: success = False print("source: {}".format(src)) print("destination: {}".format(dst)) assert success, "did not run pymake.setup_mf6" # adjust htol if it is smaller than IMS outer_dvclose dvclose = self._get_dvclose(dst) if dvclose is not None: dvclose *= 5.0 if self.htol < dvclose: self.htol = dvclose # Copy comparison simulations if available if success: if self.mf6_regression and not self.name.endswith("_dev"): action = "mf6-regression" shutil.copytree(dst, os.path.join(dst, "mf6-regression")) else: action = pymake.setup_mf6_comparison( src, dst, remove_existing=self.delFiles) self.action = action return