def setUp(self): self.log = EasyLogger('testlog.txt', level=logging.PROGRESS) self.log.logger.handlers.append(logging.StreamHandler()) self.log.logger.info(self.id()) self.start_lat = 60.75 self.start_lon = -147 self.start_depth = 0 self.num_particles = 4 self.time_step = 3600 self.num_steps = 10 self.start_time = datetime(2014, 1, 2, 00) self.transport = Transport(horizDisp=0.05, vertDisp=0.0003) output_dir = "/data/lm/tests/output" test_dir = self.id().split('.')[-1] self.output_path = os.path.join(output_dir, test_dir) if not os.path.isdir(self.output_path): os.makedirs(self.output_path) self.output_formats = [ex.H5Trackline] cache_dir = "/data/lm/tests/cache" self.cache_path = os.path.join(cache_dir, test_dir, 'cache.nc') self.bathy_file = "/data/lm/bathy/global/ETOPO1_Bed_g_gmt4.grd" self.shoreline_path = "/data/lm/shore"
def setUp(self): self.start_lat = 60.75 self.start_lon = -147 self.start_depth = 0 self.num_particles = 4 self.time_step = 3600 self.num_steps = 10 self.start_time = datetime(2012, 8, 1, 00) self.transport = Transport(horizDisp=0.05, vertDisp=0.0003) self.log = EasyLogger('testlog.txt', level=logging.PROGRESS) self.output_path = "/data/lm/output" self.cache_path = "/data/lm/cache" self.bathy_file = "/data/lm/bathy/ETOPO1_Bed_g_gmt4.grd" self.shoreline_path = "/data/lm/shore"