diff --git a/TurTLE/DNS.py b/TurTLE/DNS.py index 606014b09a87b490f1dda781fc6bc6e501d12eb8..c1c6464538f8beb6a5ad29ad56f1275f50a7f7eb 100644 --- a/TurTLE/DNS.py +++ b/TurTLE/DNS.py @@ -1028,17 +1028,21 @@ class DNS(_code): opt = None, iter0 = 0): """Launches jobs. Prepares initial condition and writes parameters to file if necessary.""" - if not os.path.exists(self.get_data_file_name()): - if not os.path.isdir(self.work_dir): - os.makedirs(self.work_dir) - self.generate_initial_condition(opt = opt) - self.write_par(iter0 = iter0) if (('test' in self.dns_type) or - (self.dns_type in ['kraichnan_field', 'NSVE'])): + (self.dns_type in ['kraichnan_field'])): self.check_current_vorticity_exists = False + self.check_current_velocity_exists = False if self.dns_type in ['NSE', 'NSE_alt_dealias']: self.check_current_vorticity_exists = False self.check_current_velocity_exists = True + if self.dns_type in ['NSVE']: + self.check_current_vorticity_exists = True + self.check_current_velocity_exists = False + if not os.path.exists(self.get_data_file_name()): + if not os.path.isdir(self.work_dir): + os.makedirs(self.work_dir) + self.generate_initial_condition(opt = opt) + self.write_par(iter0 = iter0) self.run( nb_processes = opt.nb_processes, nb_threads_per_process = opt.nb_threads_per_process,